2009-07-20 Vladimir Serbinenko <phcoder@gmail.com>
[grub2/phcoder.git] / ChangeLog
blobcd66c863d467220e19a4aaac1539505de40d33dd
1 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
3         Add symlink, mtime and label support to AtheFS.
5         * fs/afs.c (grub_afs_sblock): Declare `name' as char.
6         (grub_afs_iterate_dir): Handle symlinks.
7         (grub_afs_open): Use grub_afs_read_symlink.
8         (grub_afs_dir): Likewise.
9         Pass mtime.
10         (grub_afs_label): New function.
11         (grub_afs_fs): Add grub_afs_label.
12         (grub_afs_read_symlink): New function.
14 2009-07-20  Vladimir Serbinenko  <phcoder@gmail.com>
16         Fix AtheFS support.
18         * fs/afs.c: Fix comments style.
19         (grub_afs_blockrun): Declare as packed.
20         (grub_afs_datastream): Likewise.
21         (grub_afs_bnode): Likewise.
22         (grub_afs_btree): Likewise.
23         (grub_afs_sblock): Likewise.
24         Declare `name' as char.
25         (grub_afs_inode): Declare as packed.
26         Change void *vnode to grub_uint32_t unused.
27         (grub_afs_iterate_dir): Check that key_size is positive.
28         (grub_afs_mount): Don't read superblock twice.
29         (grub_afs_dir): Don't free node in case of errorx
30         grub_fshelp_find_file already handles this.
31         (grub_afs_open): Likewise.
33 2009-07-19  Pavel Roskin  <proski@gnu.org>
35         * Makefile.in: Remove LIBLZO and enable_lzo.
36         * conf/i386-pc.rmk: Remove lzo support.
37         * configure.ac: Remove checks for lzo, don't define ENABLE_LZMA.
38         * include/grub/i386/pc/kernel.h: Define ENABLE_LZMA.  Remove lzo
39         support.
40         * kern/i386/pc/lzo1x.S: Remove.
41         * kern/i386/pc/startup.S: Remove lzo support.
42         * util/i386/pc/grub-mkimage.c: Likewise.
44 2009-07-19  Vladimir Serbinenko  <phcoder@gmail.com>
46         * disk/usbms.c (grub_usbms_transfer): Fix double semicolon.
47         * fs/xfs.c (grub_xfs_dir): Likewise.
48         * fs/afs.c (grub_afs_dir): Likewise.
49         * fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
50         (grub_iso9660_open): Likewise.
51         * fs/jfs.c (grub_jfs_open): Likewise.
52         * fs/ext2.c (grub_ext2_dir): Likewise.
53         * include/grub/macho.h (grub_macho_fat_arch): Likewise.
54         * script/sh/lexer.c (grub_script_yylex): Likewise.
55         
56 2009-07-16  Pavel Roskin  <proski@gnu.org>
58         * configure.ac: Never add "-c" to CFLAGS.
60         * configure.ac: Fix incorrect comparison for grub_cv_cc_efiemu.
62         * configure.ac: Fix wrong use of grub_cv_cc_no_red_zone where
63         grub_cv_cc_efiemu should be used.
65         * configure.ac: Typo fixes.
67         * kern/mm.c (grub_zalloc): New function.
68         (grub_debug_zalloc): Likewise.
69         * include/grub/mm.h: Declare grub_zalloc() and
70         grub_debug_zalloc().
71         * util/misc.c (grub_zalloc): New function.
72         * bus/usb/uhci.c (grub_uhci_pci_iter): Use grub_zalloc()
73         instead of grub_malloc(), remove unneeded initializations.
74         * bus/usb/usbhub.c (grub_usb_hub_add_dev): Likewise.
75         * commands/extcmd.c (grub_extcmd_dispatcher): Likewise.
76         * commands/parttool.c (grub_cmd_parttool): Likewise.
77         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Likewise.
78         * disk/raid5_recover.c (grub_raid5_recover): Likewise.
79         * disk/raid6_recover.c (grub_raid6_recover): Likewise.
80         * disk/usbms.c (grub_usbms_finddevs): Likewise.
81         * efiemu/mm.c (grub_efiemu_request_memalign): Likewise.
82         * efiemu/pnvram.c (grub_efiemu_pnvram): Likewise.
83         (grub_cmd_efiemu_pnvram): Likewise.
84         * fs/i386/pc/pxe.c (grub_pxefs_open): Likewise.
85         * fs/iso9660.c (grub_iso9660_mount): Likewise.
86         (grub_iso9660_iterate_dir): Likewise.
87         * fs/jfs.c (grub_jfs_opendir): Likewise.
88         * fs/ntfs.c (list_file): Likewise.
89         (grub_ntfs_mount): Likewise.
90         * kern/disk.c (grub_disk_open): Likewise.
91         * kern/dl.c (grub_dl_load_core): Likewise.
92         * kern/elf.c (grub_elf_file): Likewise.
93         * kern/env.c (grub_env_context_open): Likewise.
94         (grub_env_set): Likewise.
95         (grub_env_set_data_slot): Likewise.
96         * kern/file.c (grub_file_open): Likewise.
97         * kern/fs.c (grub_fs_blocklist_open): Likewise.
98         * loader/i386/multiboot.c (grub_module): Likewise.
99         * loader/xnu.c (grub_xnu_create_key): Likewise.
100         (grub_xnu_create_value): Likewise.
101         * normal/main.c (grub_normal_add_menu_entry): Likewise.
102         (read_config_file): Likewise.
103         * normal/menu_entry.c (make_screen): Likewise.
104         * partmap/sun.c (sun_partition_map_iterate): Likewise.
105         * script/sh/lexer.c (grub_script_lexer_init): Likewise.
106         * script/sh/script.c (grub_script_parse): Likewise.
107         * video/bitmap.c (grub_video_bitmap_create): Likewise.
108         * video/readers/jpeg.c (grub_video_reader_jpeg): Likewise.
109         * video/readers/png.c (grub_png_output_byte): Likewise.
110         (grub_video_reader_png): Likewise.
112 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
114         Enable all targets that can be built by default
116         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
117         grub-mkfont and grub-fstest if they can be built
119 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
121         Fix hang and segmentation fault in grub-emu-usb
123         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
124         * util/usb.c (grub_libusb_devices): likewise
125         (grub_libusb_init): rename to ...
126         (GRUB_MOD_INIT (libusb)):...this
127         (grub_libusb_fini): rename to ..
128         (GRUB_MOD_FINI (libusb)):...this
129         * disk/usbms.c (grub_usbms_transfer): fix retry logic
130         * include/grub/disk.h (grub_raid_init): removed, it's useless
131         (grub_raid_fini): likewise
132         (grub_lvm_init): likewise
133         (grub_lvm_fini): likewise
134         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
135         by grub_init_all
137 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
139         Fix libusb
141         * Makefile.in (LIBUSB): new macro
142         * genmk.rb (Utility/print_tail): new method
143         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
144         (top level): call util.print_tail at the end.
146 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
148         Make FreeBSD accept zpool.cache
150         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
151         type is /boot/zfs/zpool.cache
153 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
155         Fix 64-bit efiemu
157         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
158         correct wrong typedef
159         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
161 2009-07-15  Pavel Roskin  <proski@gnu.org>
163         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
164         * kern/disk.c (struct grub_disk_cache): Likewise.
166         * commands/probe.c (options): Typo fix.
168         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
169         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
170         accordingly.
171         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
173         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
174         the end of "Error" to make the message more readable.
176         * boot/i386/pc/boot.S (kernel_segment): Remove.
177         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
178         for destination.
180         * boot/i386/pc/boot.S (boot_version): Remove.
181         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
182         Remove.
184         * include/grub/i386/pc/boot.h: Sort all offsets.
185         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
186         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
187         * boot/i386/pc/boot.S: Assert location of every offset listed in
188         include/grub/i386/pc/boot.h.
190 2009-07-13  Pavel Roskin  <proski@gnu.org>
192         * include/grub/i386/coreboot/machine.h: Rename
193         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
194         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
195         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
197         * kern/dl.c: Force native word size to suppress warnings when
198         compiling grub-emu.
200         * kern/device.c (grub_device_iterate): Change struct part_ent to
201         hold the name, not a pointer to it.  Use one grub_malloc() per
202         partition, not two.  Free partition_name if grub_malloc() fails.
203         Set ents to NULL only before grub_partition_iterate() is called.
205 2009-07-11  Bean  <bean123ch@gmail.com>
207         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
208         childname.
210 2009-07-10  Bean  <bean123ch@gmail.com>
211 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
213         * kern/ieee1275/openfw.c (grub_children_iterate)
214         (grub_devalias_iterate): Fix size evaluation for property or path
215         strings, which was broken since r2132.
217 2009-07-07  Pavel Roskin  <proski@gnu.org>
219         * commands/search.c (search_file): Merge into ...
220         (search_fs): ... this.  Accept search type as argument.
221         (grub_cmd_search): Pass search type to search_fs().
223         * include/grub/util/console.h: New file.
224         * util/console.c: Use it instead of grub/machine/console.h.
225         * util/grub-emu.c: Likewise.
227         * lib/arg.c (find_long_option): Remove.
228         (find_long): Add `len' argument, make `s' const char *.
229         (grub_arg_parse): Parse long options in place, not in a
230         temporary buffer.
232 2009-07-06  Pavel Roskin  <proski@gnu.org>
234         * commands/search.c (search_fs): Fix potential NULL pointer
235         dereference.
237         * commands/search.c (search_fs): Replace QUID macro with quid_fn
238         function pointer.
240 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
242         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
243         comparison.
245 2009-07-05  Pavel Roskin  <proski@gnu.org>
247         * include/grub/i386/linux.h (struct linux_kernel_params):
248         Restore padding3, it's still needed.
250         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
251         FreeBSD.
252         * util/osdetect.lua: Likewise.
254 2009-07-05  Bean  <bean123ch@gmail.com>
256         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
258         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
259         (grub_lua_getenv): Likewise.
260         (grub_lua_setenv): Likewise.
261         (save_errno): New function.
262         (push_result): Likewise.
263         (grub_lua_enum_device): Likewise.
264         (grub_lua_enum_file): Likewise.
265         (grub_lua_file_open): Likewise.
266         (grub_lua_file_close): Likewise.
267         (grub_lua_file_seek): Likewise.
268         (grub_lua_file_read): Likewise.
269         (grub_lua_file_getline): Likewise.
270         (grub_lua_file_getsize): Likewise.
271         (grub_lua_file_getpos): Likewise.
272         (grub_lua_file_eof): Likewise.
273         (grub_lua_file_exist): Likewise.
274         (grub_lua_add_menu): Likewise.
276         * script/lua/grub_lua.h (isupper): New inline function.
277         (islower): Likewise.
278         (ispunct): Likewise.
279         (isxdigit): Likewise.
280         (strcspn): Change to normal function.
281         (strpbkr): New function declaration.
282         (memchr): Likewise.
284         * script/lua/grub_main.c (scan_str): New function.
285         (strcspn): Likewise.
286         (strpbrk): Likewise.
287         (memchr): Likewise.
289         * script/lua/linit.c (lualibs): Enable the string library.
291         * util/osdetect.lua: New file.
293 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
295         * include/grub/i386/linux.h (struct linux_kernel_params): Add
296         `capabilities' member.
298 2009-07-02  Pavel Roskin  <proski@gnu.org>
300         * genparttoollist.sh: Add missing newline at the end.
302 2009-07-01  Pavel Roskin  <proski@gnu.org>
304         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
306         * util/hostdisk.c (open_device): Remove `const' from
307         `sysctl_size', as sysctlbyname() can change it (in this case it
308         doesn't actually happen).
310         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
311         using signed long int constants.
313         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
314         constant to avoid a warning on FreeBSD.
316         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
317         where it's needed.
319         * Makefile.in: Install include/grub/machine symlink.
321         * Makefile.in: When installing symlinks, use "cp -fR", which
322         works on FreeBSD and MacOSX.
323         From Yves Blusseau <cl7m42e02@sneakemail.com>
325         * kern/dl.c (grub_dl_resolve_symbol): Make static.
326         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
328         * util/misc.c: Move grub_reboot() and grub_halt() ...
329         * util/grub-emu.c: ... here.  Make main_env static.
330         * include/grub/util/misc.h: Remove main_env.
332         * kern/mm.c: Use correct format to print size_t.
334         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
335         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
336         * kern/powerpc/dl.c: Likewise.
337         * kern/sparc64/dl.c: Likewise.
338         * kern/x86_64/dl.c: Likewise.
340 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
342         Fix grub-emu build on sparc64-ieee1275.
344         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
347 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
349         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
350         (grub_reboot, grub_halt): New functions.
352         * util/i386/pc/misc.c: Delete.  Update all users.
353         * util/sparc64/ieee1275/misc.c: Likewise.
354         * util/powerpc/ieee1275/misc.c: Likewise.
356 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
358         * conf/i386.rmk (setjmp_mod_SOURCES)
359         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
360         * conf/common.rmk (setjmp_mod_SOURCES)
361         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
362         to use $(target_cpu).
363         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
364         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
365         * conf/powerpc-ieee1275.rmk: Likewise.
366         * conf/sparc64-ieee1275.rmk: Likewise.
368         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
369         $(target_cpu) for kern/$(target_cpu)/dl.c.
370         * conf/i386-efi.rmk: Likewise.
371         * conf/i386-ieee1275.rmk: Likewise.
372         * conf/x86_64-efi.rmk: Likewise.
373         * conf/i386-coreboot.rmk: Likewise.
374         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
375         $(target_cpu) for kern/$(target_cpu)/dl.c and for
376         kern/$(target_cpu)/cache.S.
377         * conf/sparc64-ieee1275.rmk: Likewise.
379 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
381         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
382         type to `grub_uint8_t', and adjust `padding9' accordingly.
384 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
386         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
388         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
389         assembly in final jump, using register constraints.
391         (grub_linux_boot): For text mode, initialize `have_vga' using
392         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
394         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
395         right before the final jump.
397         Set `video_mode' to 0x3.
399         Document initialization of `video_page', `video_mode' and
400         `video_ega_bx'.
402 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
404         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
405         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
406         and set GRUB_LINUX_FLAG_QUIET appropiately.
408 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
410         Fix build on Debian / sparc.
412         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
414 2009-06-28  Pavel Roskin  <proski@gnu.org>
416         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
417         fix a warning.
419         * util/grub.d/10_linux.in: Match SUSE style initrd names.
421 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
423         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
424         `err'.
426 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
428         Revert r2338.
430         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
431         file can't be opened.  grub_file_open() is already supposed to set
432         grub_errno / grub_errmsg appropiately.
433         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
435 2009-06-27  Pavel Roskin  <proski@gnu.org>
436 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
438         * include/grub/dl.h: Include grub/elf.h.
439         (struct grub_dl): Add symtab field.
440         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
441         GRUB_MODULES_MACHINE_READONLY.
442         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
443         of the header for read-only modules.
444         (grub_dl_unload): Free mod->symtab for read-only modules.
445         * kern/i386/dl.c: Use mod->symtab.
446         * kern/powerpc/dl.c: Likewise.
447         * kern/sparc64/dl.c: Likewise.
448         * kern/x86_64/dl.c: Likewise.
450         * conf/i386-qemu.rmk: New file.
451         * kern/i386/qemu/startup.S: Likewise.
452         * kern/i386/qemu/mmap.c: Likewise.
453         * boot/i386/qemu/boot.S: Likewise.
454         * include/grub/i386/qemu/time.h: Likewise.
455         * include/grub/i386/qemu/serial.h: Likewise.
456         * include/grub/i386/qemu/kernel.h: Likewise.
457         * include/grub/i386/qemu/console.h: Likewise.
458         * include/grub/i386/qemu/boot.h: Likewise.
459         * include/grub/i386/qemu/init.h: Likewise.
460         * include/grub/i386/qemu/machine.h: Likewise.
461         * include/grub/i386/qemu/loader.h: Likewise.
462         * include/grub/i386/qemu/memory.h: Likewise.
464         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
465         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
466         [qemu] (pkglib_IMAGES): Add `boot.img'.
467         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
468         [qemu] (boot_img_FORMAT): New variables.
469         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
470         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
471         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
472         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
473         [qemu] (kernel_img_FORMAT): New variables.
475         * configure.ac: Recognise `i386-qemu'.
477         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
478         (for no compression).
479         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
480         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
481         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
482         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
483         ifdefs).
485 2009-06-27  Pavel Roskin  <proski@gnu.org>
487         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
488         read.
489         * efiemu/prepare32.c: Likewise.
490         * efiemu/prepare64.c: Likewise.
492 2009-06-26  Pavel Roskin  <proski@gnu.org>
494         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
495         * include/grub/elf.h: Define symbols without "32" or "64" based
496         on GRUB_TARGET_WORDSIZE.
497         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
498         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
499         ELF definitions.
500         * efiemu/loadcore64.c: Likewise.
501         * loader/i386/bsd32.c: Likewise.
502         * loader/i386/bsd64.c: Likewise.
503         * kern/dl.c: Remove own ELF definitions.
504         * util/i386/efi/grub-mkimage.c: Likewise.
506 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
508         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
509         segment 0x0 unconditionally, because the reference generated by
510         GAS is an absolute address.
512 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
514         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
515         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
517 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
519         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
520         indexes.  Check for -f explicitly.
521         (search_file): Improve error message.
522         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
524 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
526         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
527         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
529 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
531         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
532         * conf/i386-ieee1275.rmk: Likewise.
533         * conf/i386-coreboot.rmk: Likewise.
535         * kern/i386/pc/startup.S (grub_stop): Remove function.
536         * kern/i386/ieee1275/startup.S: Likewise.
537         * kern/i386/coreboot/startup.S: Likewise.
538         * kern/i386/misc.S (grub_stop): New function.
540 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
542         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
543         * kern/i386/realmode.S (real_to_prot): ... to here.
545 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
547         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
548         with `kernel.img'.
549         (kernel_elf_SOURCES): Rename to ...
550         (kernel_img_SOURCES): ... this.
551         (kernel_elf_HEADERS): Rename to ...
552         (kernel_img_HEADERS): ... this.  Update all users.
553         (kernel_elf_ASFLAGS): Rename to ...
554         (kernel_img_ASFLAGS): ... this.
555         (kernel_elf_CFLAGS): Rename to ...
556         (kernel_img_CFLAGS): ... this.
557         (kernel_elf_LDFLAGS): Rename to ...
558         (kernel_img_LDFLAGS): ... this.
559         * conf/i386-coreboot.rmk: Likewise.
560         * conf/powerpc-ieee1275.rmk: Likewise.
562         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
563         with "kernel.img".
565 2009-06-21  Pavel Roskin  <proski@gnu.org>
567         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
568         to match nested functions.
569         * loader/sparc64/ieee1275/linux.c: Likewise.
571         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
573 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
575         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
576         all i386 platforms.
578 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
580         Fix asm file handling on ELF, and remove workarounds.
582         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
583         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
584         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
585         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
587 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
589         Load BSD ELF modules
591         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
592         and loader/i386/bsd64.c
593         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
594         (FREEBSD_MODTYPE_ELF_MODULE): New definition
595         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
596         (grub_freebsd_load_elfmodule32): New declaration
597         (grub_freebsd_load_elfmoduleobj64): Likewise
598         (grub_freebsd_load_elf_meta32): Likewise
599         (grub_freebsd_load_elf_meta64): Likewise
600         (grub_freebsd_add_meta): Likewise
601         (grub_freebsd_add_meta_module): Likewise
602         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
603         (grub_freebsd_add_meta_module): Likewise and move module-specific
604         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
605         (grub_cmd_freebsd): Add elf-kernel specific parts
606         based on grub_freebsd_add_meta_module
607         (grub_cmd_freebsd_module): Add type parsing moved from
608         grub_freebsd_add_meta_module
609         (grub_cmd_freebsd_module_elf): New function
610         (cmd_freebsd_module_elf): New variable
611         (GRUB_MOD_INIT): Register freebsd_module_elf
612         * loader/i386/bsd32.c: New file
613         * loader/i386/bsd64.c: Likewise
614         * loader/i386/bsdXX.c: Likewise
615         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
616         (grub_elf64_load): Likewise
617         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
618         All users updated
619         (grub_elf64_load_hook_t): Likewise
621 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
623         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
624         variable.
625         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
626         don't write a menu entry for recovery mode.
628 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
630         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
631         after it's no longer needed.
633 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
635         * include/grub/i386/loader.h (grub_linux_prot_size)
636         (grub_linux_tmp_addr, grub_linux_real_addr)
637         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
638         GRUB_MACHINE_PCBIOS.
639         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
640         common grub_util_info() call to ...
641         (generate_image): ... here.
642         Fix use of uninitialized memory, comparison of signed with
643         unsigned integers and memory leak.
644         Remove bogus module address message.
646 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
648         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
649         grub_raid_register
650         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
652 2009-06-19  Pavel Roskin  <proski@gnu.org>
654         * configure.ac: Remove stray AC_MSG_CHECKING.
656 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
658         * disk/scsi.c (grub_scsi_open): use continue instead of big if
660 2009-06-18  Pavel Roskin  <proski@gnu.org>
662         * conf/common.rmk: Add fs_file.mod.
663         * disk/fs_file.c: New file.
664         * include/grub/disk.h (enum grub_disk_dev_id): Add
665         GRUB_DISK_DEVICE_FILE_ID.
667 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
669         Fix build with Apple's toolchain. Part 2
671         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
672         a fake start
674 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
676         Fix build with Apple's toolchain. Part 1
678         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
679         for long calls
680         * configure.ac: remove a leftover AC_MSG_RESULT
681         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
682         Apple's toolchain
684 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
686         Fix warnings
688         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
689         (decomp_block): initialize ch
690         use grub_memcpy instead of memcpy
692 2009-06-17  Pavel Roskin  <proski@gnu.org>
694         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
695         version, use declarations needed to use vga_text as the startup
696         console.
698         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
699         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
700         the kernel.
701         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
702         and grub_at_keyboard_fini(), it's done on module load and
703         unload.
705 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
707         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
708         file can't be found.
709         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
711 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
713         Fix newline handling
715         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
716         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
717         (grub_script_yylex): don't segfault on unterminated script
718         newline terminates command and variable
720 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
722         avoid double grub_adjust_range call. Bug reported by David Simner
724         * kern/disk.c (grub_disk_write): change to raw disk access before
725         calling disk_read
727 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
729         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
730         spaces, for the benefit of help2man.
731         * util/i386/efi/grub-mkimage.c (usage): Likewise.
733 2009-06-16  Pavel Roskin  <proski@gnu.org>
735         * kern/i386/halt.c: Include grub/machine/init.h.
736         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
738 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
740         * util/grub.d/30_os-prober.in: Use ${root} in the generated
741         drivemap menuentry.
743 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
745         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
746         `echo' command.
748 2009-06-16  Pavel Roskin  <proski@gnu.org>
750         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
751         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
752         save %dx, we only need %dl and we never change it.
753         * boot/i386/pc/cdboot.S: Don't set the root drive.
754         * boot/i386/pc/pxeboot.S: Likewise.
755         * include/grub/i386/pc/boot.h: Remove
756         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
757         GRUB_BOOT_MACHINE_DRIVE_CHECK.
758         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
759         * kern/i386/pc/init.c (make_install_device): Remove references
760         to grub_root_drive.
761         * kern/i386/pc/startup.S: Likewise.
762         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
764 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
766         xnu_uuid command
768         * commands/xnu_uuid.c: new file
769         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
770         (xnu_uuid_mod_SOURCES): new variable
771         (xnu_uuid_mod_CFLAGS): likewise
772         (xnu_uuid_mod_LDFLAGS): likewise
773         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
774         * conf/i386-ieee1275.rmk: likewise
775         * conf/i386-pc.rmk: likewise
776         * conf/powerpc-ieee1275.rmk: likewise
777         * conf/sparc64-ieee1275.rmk: likewise
778         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
780 2009-06-16  Pavel Roskin  <proski@gnu.org>
782         * configure.ac: Avoid '==' in test command, it's not portable.
784 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
786         Probe command
788         * commands/probe.c: new file
789         * conf/common.rmk (pkglib_MODULES): add probe.mod
790         (probe_mod_SOURCES): new variable
791         (probe_mod_CFLAGS): likewise
792         (probe_mod_LDFLAGS): likewise
793         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
794         * conf/i386-ieee1275.rmk: likewise
795         * conf/i386-pc.rmk: likewise
796         * conf/powerpc-ieee1275.rmk: likewise
797         * conf/sparc64-ieee1275.rmk: likewise
799 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
801         Fix handling of string like \"hello\" and "a
802         b"
804         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
805         (grub_script_yylex): fix parsing of quoting, escaping and newline
807 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
809         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
810         handling
812 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
814         * util/grub-mkconfig.in: Fix parsing of --output option.
816 2009-06-12  Pavel Roskin  <proski@gnu.org>
818         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
819         genmk.rb don't need to be generated or installed.
821 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
823         * commands/i386/pc/drivemap_int13h.S: add more comments
825 2009-06-11  Pavel Roskin  <proski@gnu.org>
827         * Makefile.in (uninstall): Uninstall manuals.
829         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
830         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
831         and update-grub_lib in two places.
832         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
834         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
835         a compiler warning.
837         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
838         `entry_lo' to fix variable shadowing.
840 2009-06-11  Christian Franke  <franke@computer.org>
842         * kern/misc.c (__enable_execute_stack): Add missing return type
843         to prevent gcc warning.
845 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
847         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
849 2009-06-11  Pavel Roskin  <proski@gnu.org>
851         * Makefile.in: Don't rely on any scripts being executable.
852         Always use $(SHELL) to run shell scripts.
854         * configure.ac: Always define ___main if using -nostdlib.  This
855         fixes tests on Cygwin.
857 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
859         UDF fix
861         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
862         is in bytes and not in blocks
864 2009-06-11  Pavel Roskin  <proski@gnu.org>
866         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
867         warning.
869 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
871         * util/grub.d/30_os-prober.in: Fix a comment. Source
872         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
873         to set the root device.  Place drivemap command in the generated
874         chain entry.
876 2009-06-11  Pavel Roskin  <proski@gnu.org>
878         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
879         have long been resolved.
881 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
883         * util/grub.d/10_linux.in: Capitalise "Linux".
885         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
887 2009-06-11  Pavel Roskin  <proski@gnu.org>
889         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
890         fix a gcc warning and ensure that the function won't ever exit.
892         * kern/i386/ieee1275/init.c: Add missing prototype for
893         grub_stop_floppy().
895         * loader/ieee1275/multiboot2.c [__i386__]: Include
896         grub/cpu/multiboot.h.
898         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
899         casts to short - they are not portable and cause warnings.  Fix
900         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
902 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
904         Drivemap fixes
906         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
907         new function
908         (grub_get_root_biosnumber_saved): new variable
909         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
910         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
911         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
912         %dx after the call if necessary
913         * conf/common.rmk (pkglib_MODULES): remove boot.mod
914         (boot_mod_SOURCES): remove
915         (boot_mod_CFLAGS): remove
916         (boot_mod_LDFLAGS): remove
917         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
918         (boot_mod_SOURCES): new variable
919         (boot_mod_CFLAGS): likewise
920         (boot_mod_LDFLAGS): likewise
921         * conf/i386-efi.rmk: likewise
922         * conf/i386-ieee1275.rmk: likewise
923         * conf/i386-pc.rmk: likewise
924         * conf/powerpc-ieee1275.rmk: likewise
925         * conf/sparc64-ieee1275.rmk: likewise
926         * conf/x86_64-efi.rmk: likewise
927         * include/grub/i386/pc/biosnum.h: new file
928         * lib/i386/pc/biosnum.c: likewise
929         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
930         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
931         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
933 2009-06-10  Pavel Roskin  <proski@gnu.org>
935         * io/gzio.c (test_header): Don't reuse one buffer for all data.
936         Use separate variables.  Read only the file size at the end, but
937         not the checksum that we don't use.
939         * kern/file.c (grub_file_read): Use void pointer for the buffer.
940         Adjust all callers.
942         * kern/ieee1275/openfw.c: Remove libc includes.
943         * kern/ieee1275/cmain.c: Likewise.
944         * include/grub/ieee1275/ieee1275.h: Likewise.
946         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
947         compiler warnings.
949 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
951         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
952         `genparttoollist.sh'.
953         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
954         Add `*.sh' to the list find searches for and change `mdate.sh'
955         to `mdate-sh'.
957 2009-06-10  Pavel Roskin  <proski@gnu.org>
959         * include/grub/multiboot2.h: Provide compatibility defines for
960         multiboot2.h.
961         * include/multiboot2.h: Include stdint.h only if needed, using
962         angle brackets.
963         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
964         grub/multiboot2.h.
965         * loader/ieee1275/multiboot2.c: Likewise.
966         * loader/multiboot2.c: Likewise.
967         * loader/multiboot_loader.c: Likewise.
969         * configure.ac: Use -nostdlib when probing for the target.  It
970         should not be required to have libc for the target.
972         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
973         they fail without libc headers for the target.
974         * include/grub/powerpc/libgcc.h: Use weak attribute for all
975         exports.
976         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
977         preprocessor conditionals.
979         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
980         build system doesn't need to be aware of the tar.c internals.
982 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
984         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
986 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
988         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
989         disk limit to 26 for IDE, Virtio, Xen and SCSI.
991 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
993         * util/i386/pc/grub-install.in: Change the error message if UUIDs
994         aren't available if ata.mod gets used.
996 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
998         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
999         initialising controller.
1000         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1002 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1004         * util/i386/pc/grub-install.in: Add a parameter --disk-module
1005         to choose between ata and biosdisk module on i386-pc.
1007 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
1009         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
1010         Subclass and Programming Interface fields in terms of the 3 byte
1011         Class Code register.
1012         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1014         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
1015         interface is OHCI.  Add grub_dprintf for symmetry with
1016         bus/usb/uhci.c.
1017         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
1018         interface is UHCI.  Add interf variable for programming
1019         interface.  Print interface with class/subclass.
1021         * bus/usb/ohci.c: Set interf with correct field.
1023         * bus/usb/uhci.c: Remove unneeded doubled lines.
1024         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
1025         Remove whitespace inside comment.
1027 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
1029         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
1030         as fallback an equivalent option without depth.
1032 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1034         Not fail if unable to retrieve C/H/S on LBA disks
1036         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
1037         if unable to retrieve C/H/S on LBA disks
1039 2009-06-08  Pavel Roskin  <proski@gnu.org>
1041         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
1042         about aliasing.
1044 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1046         * Makefile.in (uninstall): Remove all $lib_DATA files.
1048 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
1050         Bugfix: install on partitionless device
1052         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
1053         is a whole disk
1055 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1057         * Makefile.in (uninstall): Remove all $include_DATA files.
1059 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
1061         * commands/true.c: New file.  Implement the true and false commands.
1062         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
1063         (true_mod_SOURCES): New variable.
1064         (true_mod_CFLAGS): Likewise.
1065         (true_mod_LDFLAGS): Likewise.
1067 2009-06-05  Colin D Bennett  <colin@gibibit.com>
1069         Optimized font character lookup using binary search instead of linear
1070         search.  Fonts now are required to have the character index ordered by
1071         code point.
1073         * font/font.c (load_font_index): Verify that fonts have ordered
1074         character indices.
1075         (find_glyph): Use binary search instead of linear search to find a
1076         character in a font.
1078 2009-06-05  Michael Scherer  <misc@mandriva.org>
1080         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
1081         uses case sensitive btree.
1082         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
1083         only for case insensitive filesystems.
1085 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
1087         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
1088         * conf/common.rmk (search_mod_CFLAGS): likewise
1090 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1092         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
1093         compensate a compiler bug
1095 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1097         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
1098         instead of '\b'
1100 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1102         Definitions for creating asm symbols with Apple's CC
1104         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
1105         [APPLE_CC] (VARIABLE): likewise
1107 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1109         Disable lnxboot.img when compiled
1110         with Apple's CC
1112         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1113         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1114         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1115         [! APPLE_CC] (CODE_LENG): skip
1116         [! APPLE_CC] (setup_sects): likewise
1117         [! APPLE_CC]: skip filling
1119 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1121         Address in trampolines based on 32-bit registers when compiled
1122         with Apple's CC
1124         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1125         for addresses
1126         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1128 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1130         Avoid aliases when compiling with Apple's CC for PCBIOS machine
1132         * kern/misc.c [APPLE_CC] (memcpy): new function
1133         [APPLE_CC] (memmove): likewise
1134         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1135         (memcpy): define alias conditionally on !APPLE_CC
1136         (memset): likewise
1137         (abort): likewise
1138         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1139         APPLE_CC are defined
1140         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1141         (grub_assert_fail): make prototype conditional
1143 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1145         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1147         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1148         grub-macho2img
1149         (CLEANFILES): add grub-macho2img
1150         (grub_macho2img_SOURCES): new variable
1151         * kern/i386/pc/startup.S (bss_start): new variable
1152         (bss_end): likewise
1153         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1154         * util/grub-macho2img.c: new file
1156 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1158         Use objconv when compiling with Apple's CC
1160         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1161         (efiemu64.o): likewise
1162         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1163         when compiling with Apple's CC
1164         (efiemu64_s.o): likewise
1165         * configure.ac: check for objconv when compiling with Apple's CC
1166         * genmk.rb: use objconv for modules when compiled with Apple's CC
1168 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1170         Define segment as well as section when compiling with
1171         Apple's CC
1173         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1174         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1175         (efiemu_convert_pointer): likewise
1176         (efiemu_set_virtual_address_map): likewise
1177         (efiemu_convert_pointer): likewise
1178         (efiemu_getcrc32): likewise
1179         (init_crc32_table): likewise
1180         (reflect): likewise
1181         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1182         (GRUB_MOD_DEP): likewise
1184 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1186         Allow a compilation without -mcmodel=large
1188         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1189         when compiled without -mcmodel=large
1190         (filter_memory_map): remove memory post 4 GiB when compiled
1191         without -mcmodel=large
1192         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1193         TARGET_CFLAGS when -mcmodel=large isn't supported
1195 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1197         Remove nested functions in efiemu core
1199         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1201 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1203         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1205         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1206         temporary storage
1207         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1208         using Apple's CC
1209         (grub_cpu_is_tsc_supported): likewise
1210         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1212 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1214         Absolute addressing through constant with Apple's cc
1216         * kern/i386/pc/startup.S: Define necessary constants
1217         and address through it when using ABS with Apple's CC
1218         * boot/i386/pc/diskboot.S: likewise
1219         * boot/i386/pc/boot.S: likewise
1220         * boot/i386/pc/lnxboot.S: likewise
1221         * boot/i386/pc/cdboot.S: likewise
1222         * mmap/i386/pc/mmap_helper.S: likewise
1223         * commands/i386/pc/drivemap_int13h.S: likewise
1225 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1227         Check if compiler is apple cc
1229         * Makefile.in (ASFLAGS): new variable
1230         (TARGET_ASFLAGS): likewise
1231         (TARGET_MODULE_FORMAT): likewise
1232         (TARGET_APPLE_CC): likewise
1233         (OBJCONV): likewise
1234         (TARGET_IMG_CFLAGS): likewise
1235         (TARGET_CPPFLAGS): add includedir
1236         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1237         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1238         Check for linker script only if compiler isn't Apple's CC
1239         (TARGET_MODULE_FORMAT): set
1240         (TARGET_APPLE_CC): likewise
1241         (TARGET_ASFLAGS): likewise
1242         (ASFLAGS): likewise
1243         Check for objcopy only if compiler isn't Apple's CC
1244         Check for BSS symbol only if compiler isn't Apple's CC
1245         * genmk.rb: adapt nm options if we use Apple's utils
1246         * aclocal.m4 (grub_apple_cc): new test
1247         (grub_apple_target_cc): likewise
1249 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1251         Simplify sed expressions and improve awk
1253         * Makefile.in (install-local): simplify sed expression
1254         * gencmdlist.sh: likewise
1255         * genmoddep.awk: avoid adding module as a dependency of itself
1257 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1259         Add missing start symbols
1261         * boot/i386/pc/boot.S: add start
1262         * boot/i386/pc/pxeboot.S: likewise
1264 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1266         Fix wrong assumptions with grub-mkimage on EFI
1268         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1269         (relocate_addresses): consider both r_addend and value at offset
1270         (make_mods_section): zerofill modinfo and header
1271         (convert_elf): write prefix here
1273 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1275         Use .asciz instead of .string
1277         * i386/pc/diskboot.S: use .asciz instead of .string
1278         * i386/pc/boot.S: likewise
1279         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1280         (GRUB_MOD_NAME): likewise
1282 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1284         gfxpayload support
1286         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1287         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1288         (grub_video_setup): remove
1289         (grub_video_set_mode): new prototype
1290         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1291         (vid_mode): remove
1292         (linux_vesafb_res): compile only on PCBIOS
1293         (grub_linux_boot): support gfxpayload
1294         * loader/i386/pc/xnu.c (video_hook): new function
1295         (grub_xnu_set_video): support gfxpayload
1296         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1297         (DEFAULT_VIDEO_HEIGHT): likewise
1298         (DEFAULT_VIDEO_FLAGS): likewise
1299         (DEFAULT_VIDEO_MODE): new definition
1300         (video_hook): new function
1301         (grub_gfxterm_init): use grub_video_set_mode
1302         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1303         loading xnu
1304         * video/video.c (grub_video_setup): removed
1305         (grub_video_set_mode): new function based on grub_gfxterm_init and
1306         grub_video_setup
1308 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1310         Avoid calling biosdisk in drivemap
1312         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1313         (revparse_biosdisk): likewise
1314         (list_mappings): derive name from id directly
1315         (grub_cmd_drivemap): use tryparse_diskstring
1317 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1319         Script fixes
1321         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1322         (grub_lexer_param): add tokenonhold
1323         (grub_script_create_cmdline): remove cmdline. All callers updated
1324         (grub_script_function_create): make functionname
1325         grub_script_arg. All callers updated
1326         (grub_script_execute_argument_to_string): new prototype
1327         * kern/parser.c (state_transitions): reorder
1328         (grub_parser_cmdline_state): fix a bug and make more compact
1329         * script/sh/execute.c (grub_script_execute_argument_to_string):
1330         make global
1331         (grub_script_execute_cmdline): use new format
1332         * script/sh/function.c (grub_script_function_create): make functionname
1333         grub_script_arg. All callers updated
1334         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1335         (grub_script_yylex): remove
1336         (grub_script_yylex2): renamed to ...
1337         (grub_script_yylex): ...renamed
1338         parse the expressions like a${b}c
1339         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1340         (GRUB_PARSER_TOKEN_VAR): remove
1341         (GRUB_PARSER_TOKEN_NAME): likewise
1342         ("if"): declare as typeless
1343         ("while"): likewise
1344         ("function"): likewise
1345         ("else"): likewise
1346         ("then"): likewise
1347         ("fi"): likewise
1348         (text): remove
1349         (argument): likewise
1350         (script): accept empty scripts and make exit on error
1351         (arguments): use GRUB_PARSER_TOKEN_ARG
1352         (function): likewise
1353         (command): move error handling to script
1354         (menuentry): move grub_script_lexer_ref before
1355         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1356         argument. All callers updated
1358 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1360         Prevent GRUB from probing floppies during boot.
1362         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1363         * commands/search.c (options): Add --no-floppy.
1364         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1365         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1366         --no-floppy when searching for UUIDs.
1368 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1370         Simplify the code duplication in commands/search.c.
1372         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1373         (search_fs): ... this.  Update all users.
1375 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1377         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1379 2009-05-28  Pavel Roskin  <proski@gnu.org>
1381         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1382         Remove the original symlink explicitly.
1384         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1385         just one slash.  That's how grub_fshelp_find_file() does it.
1387 2009-05-26  Pavel Roskin  <proski@gnu.org>
1389         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1390         to `str'.
1392         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1393         possibly unused.
1395 2009-05-25  Christian Franke  <franke@computer.org>
1397         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1398         register.
1399         (grub_atapi_identify): Add wait after drive select.
1400         (grub_ata_identify): Do more strict status register check before
1401         calling grub_atapi_identify ().  Suppress error message if status
1402         register is 0x00 after command failure.  Add status register
1403         check after PIO read to avoid bogus identify due to stuck DRQ.
1404         Thanks to Pavel Roskin for testing.
1405         (grub_device_initialize): Remove unsafe status register check.
1406         Thanks to 'phcoder' for problem report and patch.
1407         Prevent sign extension in debug message.
1409 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1411         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1412         definition file, and functions defined in `normal/menu.c' have had
1413         their prototypes moved to `include/grub/menu.h' for consistency.
1415         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1416         from normal.h.
1417         (grub_menu_get_entry): Likewise.
1418         (grub_menu_get_timeout): Likewise.
1419         (grub_menu_set_timeout): Likewise.
1420         (grub_menu_execute_entry): Likewise.
1421         (grub_menu_execute_with_fallback): Likewise.
1422         (grub_menu_entry_run): Likewise.
1424         * include/grub/normal.h: Re-ordered and grouped function
1425         prototypes by file that the function is defined in.
1426         (grub_menu_execute_callback): Removed; moved to menu.h.
1427         (grub_menu_get_entry): Likewise.
1428         (grub_menu_get_timeout): Likewise.
1429         (grub_menu_set_timeout): Likewise.
1430         (grub_menu_execute_entry): Likewise.
1431         (grub_menu_execute_with_fallback): Likewise.
1432         (grub_menu_entry_run): Likewise.
1433         (grub_menu_addentry): Renamed from this ...
1434         (grub_normal_add_menu_entry): ... to this.
1436         * normal/main.c (grub_menu_addentry): Renamed from this ...
1437         (grub_normal_add_menu_entry): ... to this.
1439         * script/sh/execute.c (grub_script_execute_menuentry): Update
1440         reference to renamed grub_menu_addentry function.
1442 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1444         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1446 2009-05-22  Pavel Roskin  <proski@gnu.org>
1448         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1449         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1450         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1451         compiling for the i386 targets, but not for the utilities.
1453         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1454         to grub_uint8_t.
1455         (grub_root_drive): Likewise.
1456         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1457         remove alignment.
1458         (grub_root_drive): Change size to byte.
1459         (grub_start_addr): Remove.
1460         (grub_end_addr): Likewise.
1461         (grub_apm_bios_info): Likewise.
1463 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1465         * normal/i386: Remove.
1466         * normal/powerpc: Likewise.
1467         * normal/sparc64: Likewise.
1468         * normal/x86_64: Likewise.
1470 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1472         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1473         * loader/i386/linux_trampoline.S: Fix indentation
1474         * loader/i386/xnu_helper.S: Likewise
1476 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1478         Display error messages when parsing a Lua statement fails.
1479         Previously, executing a syntactically invalid statement like
1480         ")foo" or "bar;" would silently fail.
1482         * script/lua/grub_main.c (handle_lua_error): New function.
1483         (grub_lua_parse_line): Improved reporting of Lua parser and
1484         execution errors.
1486 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1488         Remove -Werror which causes build to fail on some systems
1490         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1491         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1492         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1494 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1496         trampoline for linux on 64-bit platform
1498         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1499         loader/i386/efi/linux_trampoline.S
1500         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1501         declaration
1502         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1503         here
1504         * loader/i386/linux_trampoline.S: moved here
1505         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1506         trampoline
1507         (jumpvector): removed
1508         (grub_linux_trampoline_start): new declaration
1509         (grub_linux_trampoline_end): likewise
1510         (grub_linux_boot): use trampoline when on 64-bit platform
1511         * loader/i386/linux.c: likewise
1513 2009-05-16  Pavel Roskin  <proski@gnu.org>
1515         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1516         const to avoid a warning.
1517         (grub_lua_setenv): Likewise.
1518         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1519         lmsg to fix a warning.
1521 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1523         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1524         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1525         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1526         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1527         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1528         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1529         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1530         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1532 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1534         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1536 2009-05-16  Bean  <bean123ch@gmail.com>
1538         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1539         (lua_mod_SOURCES): New variable.
1540         (lua_mod_CFLAGS): Likewise.
1541         (lua_mod_LDFLAGS): Likewise.
1543         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1544         (setjmp_mod_SOURCES): New variable.
1545         (setjmp_mod_CFLAGS): Likewise.
1546         (setjmp_LDFLAGS): Likewise.
1548         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1549         (setjmp_mod_SOURCES): New variable.
1550         (setjmp_mod_CFLAGS): Likewise.
1551         (setjmp_LDFLAGS): Likewise.
1553         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1554         (setjmp_mod_SOURCES): New variable.
1555         (setjmp_mod_CFLAGS): Likewise.
1556         (setjmp_LDFLAGS): Likewise.
1558         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1559         (setjmp_mod_SOURCES): New variable.
1560         (setjmp_mod_CFLAGS): Likewise.
1561         (setjmp_LDFLAGS): Likewise.
1563         * normal/i386/setjmp.S: Moved from here ...
1564         * lib/i386/setjmp.S: ... Moved here
1565         * normal/x86_64/setjmp.S: Moved from here ...
1566         * lib/x86_64/setjmp.S: ... Moved here
1567         * normal/powerpc/setjmp.S: Moved from here ...
1568         * lib/powerpc/setjmp.S: ... Moved here
1569         * normal/sparc64/setjmp.S: Moved from here ...
1570         * lib/sparc64/setjmp.S: ... Moved here
1572         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1573         returns_twice in mingw.
1575         * script/lua/grub_lib.c: New file.
1576         * script/lua/grub_lib.h: Likewise.
1577         * script/lua/grub_lua.h: Likewise.
1578         * script/lua/grub_main.c: Likewise.
1579         * script/lua/lapi.c: Likewise.
1580         * script/lua/lapi.h: Likewise.
1581         * script/lua/lauxlib.c: Likewise.
1582         * script/lua/lauxlib.h: Likewise.
1583         * script/lua/lbaselib.c: Likewise.
1584         * script/lua/lcode.c: Likewise.
1585         * script/lua/lcode.h: Likewise.
1586         * script/lua/ldblib.c: Likewise.
1587         * script/lua/ldebug.c: Likewise.
1588         * script/lua/ldebug.h: Likewise.
1589         * script/lua/ldo.c: Likewise.
1590         * script/lua/ldo.h: Likewise.
1591         * script/lua/ldump.c: Likewise.
1592         * script/lua/lfunc.c: Likewise.
1593         * script/lua/lfunc.h: Likewise.
1594         * script/lua/lgc.c: Likewise.
1595         * script/lua/lgc.h: Likewise.
1596         * script/lua/linit.c: Likewise.
1597         * script/lua/liolib.c: Likewise.
1598         * script/lua/llex.c: Likewise.
1599         * script/lua/llex.h: Likewise.
1600         * script/lua/llimits.h: Likewise.
1601         * script/lua/lmathlib.c: Likewise.
1602         * script/lua/lmem.c: Likewise.
1603         * script/lua/lmem.h: Likewise.
1604         * script/lua/loadlib.c: Likewise.
1605         * script/lua/lobject.c: Likewise.
1606         * script/lua/lobject.h: Likewise.
1607         * script/lua/lopcodes.c: Likewise.
1608         * script/lua/lopcodes.h: Likewise.
1609         * script/lua/loslib.c: Likewise.
1610         * script/lua/lparser.c: Likewise.
1611         * script/lua/lparser.h: Likewise.
1612         * script/lua/lstate.c: Likewise.
1613         * script/lua/lstate.h: Likewise.
1614         * script/lua/lstring.c: Likewise.
1615         * script/lua/lstring.h: Likewise.
1616         * script/lua/lstrlib.c: Likewise.
1617         * script/lua/ltable.c: Likewise.
1618         * script/lua/ltable.h: Likewise.
1619         * script/lua/ltablib.c: Likewise.
1620         * script/lua/ltm.c: Likewise.
1621         * script/lua/ltm.h: Likewise.
1622         * script/lua/lua.h: Likewise.
1623         * script/lua/luaconf.h: Likewise.
1624         * script/lua/lualib.h: Likewise.
1625         * script/lua/lundump.c: Likewise.
1626         * script/lua/lundump.h: Likewise.
1627         * script/lua/lvm.c: Likewise.
1628         * script/lua/lvm.h: Likewise.
1629         * script/lua/lzio.c: Likewise.
1630         * script/lua/lzio.h: Likewise.
1632 2009-05-16  Bean  <bean123ch@gmail.com>
1634         * include/grub/kernel.h (grub_module_header_types): Add type
1635         OBJ_TYPE_CONFIG.
1637         * kern/main.c (grub_load_config): New function.
1638         (grub_main): Call grub_load_config to read boot config.
1640         * grub-mkimage (generate_image): New parameter config_path.
1641         (options): New option --config.
1642         (main): Parse --config option, and pass it to generate_image.
1644 2009-05-14  Christian Franke  <franke@computer.org>
1646         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1647         This fixes build on Cygwin.
1649 2009-05-14  Pavel Roskin  <proski@gnu.org>
1651         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1652         jump.  This saves two bytes, so the typical case of 2 swapped
1653         drives would fit 32 bytes.
1655 2009-05-13  Pavel Roskin  <proski@gnu.org>
1657         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1658         grub_uint32_t to avoid a warning.
1660         * loader/i386/linux.c (allocate_pages): When assigning
1661         real_mode_mem, cast through grub_size_t to fix a warning.  The
1662         code already makes sure that the value would fit a pointer.
1663         (grub_linux_setup_video): Cast render_target->data to
1664         grub_size_t to fix a warning.
1666 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1668         * commands/i386/pc/drivemap.c: New file - implement drivemap
1669         command.
1670         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1671         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1673 2009-05-13  Pavel Roskin  <proski@gnu.org>
1675         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1676         embedding_area_exists.
1678 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1680         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1681         it easier to understand / work with.
1682         Improve warning messages for cases where there's no embedding area,
1683         or when it is too small (or core.img too large).
1685 2009-05-13  Pavel Roskin  <proski@gnu.org>
1687         * loader/i386/pc/multiboot2.c: Add necessary includes for
1688         grub_multiboot2_real_boot().
1690         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1691         PX record is always little-endian.  We only need the lower 2
1692         bytes of the mode.
1694         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1695         facilitate code reuse.
1696         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1697         fixes a warning reported by gcc 4.4.
1699         * kernel/disk.c (grub_disk_read): Use void pointer for the
1700         buffer.
1701         (grub_disk_write): Use const void pointer for the buffer.
1702         Adjust all callers.  Remove unnecessary casts.
1704 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1706         * util/i386/pc/grub-install.in: Update copyright year.
1708 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1710         gptsync
1712         * commands/gptsync.c: new file
1713         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1714         (gptsync_mod_SOURCES): new variable
1715         (gptsync_mod_CFLAGS): likewise
1716         (gptsync_mod_LDFLAGS): likewise
1717         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1718         new definition
1719         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1720         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1721         * conf/i386-ieee1275.rmk: likewise
1722         * conf/i386-pc.rmk: likewise
1723         * conf/powerpc-ieee1275.rmk: likewise
1725 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1727         Fixed grub-emu
1729         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1730         (grub_dl_ref): likewise
1732 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1734         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1735         split in two functions (one for msdos and one for gpt).
1737 2009-05-08  Pavel Roskin  <proski@gnu.org>
1739         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1740         not modified.
1742         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1743         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1744         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1745         nerr variable.
1747 2009-05-08  David S. Miller  <davem@davemloft.net>
1749         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1751 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1753         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1754         existence.
1756 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1758         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1759         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1761 2009-05-05  David S. Miller  <davem@davemloft.net>
1763         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1765 2009-05-05  Pavel Roskin  <proski@gnu.org>
1767         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1768         of grub_dl_ref() and grub_dl_unref().
1769         * commands/parttool.c: Remove preprocessor conditionals around
1770         grub_dl_ref() and grub_dl_unref().
1771         * fs/affs.c: Likewise.
1772         * fs/afs.c: Likewise.
1773         * fs/cpio.c: Likewise.
1774         * fs/ext2.c: Likewise.
1775         * fs/fat.c: Likewise.
1776         * fs/hfs.c: Likewise.
1777         * fs/hfsplus.c: Likewise.
1778         * fs/iso9660.c: Likewise.
1779         * fs/jfs.c: Likewise.
1780         * fs/minix.c: Likewise.
1781         * fs/ntfs.c: Likewise.
1782         * fs/reiserfs.c: Likewise.
1783         * fs/sfs.c: Likewise.
1784         * fs/udf.c: Likewise.
1785         * fs/ufs.c: Likewise.
1786         * fs/xfs.c: Likewise.
1787         * include/grub/dl.h: Likewise.
1788         * loader/xnu.c: Likewise.
1790 2009-05-04  Pavel Roskin  <proski@gnu.org>
1792         * commands/acpi.c: Remove unused variable my_mod.
1793         * partmap/amiga.c: Likewise.
1794         * partmap/apple.c: Likewise.
1795         * partmap/gpt.c: Likewise.
1796         * partmap/pc.c: Likewise.
1797         * partmap/sun.c: Likewise.
1798         * term/gfxterm.c: Likewise.
1799         * term/i386/pc/vesafb.c: Likewise.
1800         * term/i386/pc/vga.c: Likewise.
1802 2009-05-04  David S. Miller  <davem@davemloft.net>
1804         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1805         pointer args to grub_ieee1275_get_property().
1807         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1809         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1810         devices, and do not traverse down under controller nodes.
1812         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1813         (grub_ofdisk_open): Use it to un-escape "," characters.
1814         * kern/disk.c (find_part_sep): New.
1815         (grub_disk_open): Use it to find the first non-escaped ','
1816         character in the disk name.
1817         * util/ieee1275/devicemap.c (escape_of_path): New.
1818         (grub_util_emit_devicemap_entry): Use it.
1819         * util/sparc64/ieee1275/grub-install.in: Update script to
1820         strip partition specifiers properly by not triggering on
1821         '\' escaped ',' characters.
1823 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1825         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1826         to 0x300.
1827         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1828         resolutions.
1829         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1830         on documentation from Wikipedia).
1832 2009-05-04  Pavel Roskin  <proski@gnu.org>
1834         * disk/ata.c: Spelling fixes.
1835         * disk/raid.c: Likewise.
1836         * disk/usbms.c: Likewise.
1837         * disk/dmraid_nvidia.c: Likewise.
1838         * kern/ieee1275/openfw.c: Likewise.
1839         * kern/ieee1275/init.c: Likewise.
1840         * kern/ieee1275/cmain.c: Likewise.
1841         * boot/i386/pc/cdboot.S: Likewise.
1842         * video/readers/png.c: Likewise.
1843         * video/i386/pc/vbe.c: Likewise.
1844         * fs/udf.c: Likewise.
1845         * fs/hfs.c: Likewise.
1846         * fs/reiserfs.c: Likewise.
1847         * efiemu/runtime/efiemu.c: Likewise.
1848         * efiemu/main.c: Likewise.
1849         * efiemu/mm.c: Likewise.
1850         * include/grub/elf.h: Likewise.
1851         * include/grub/xnu.h: Likewise.
1852         * include/grub/usbdesc.h: Likewise.
1853         * include/grub/usb.h: Likewise.
1854         * include/grub/script_sh.h: Likewise.
1855         * include/grub/lib/LzmaEnc.h: Likewise.
1856         * include/grub/efiemu/efiemu.h: Likewise.
1857         * include/grub/command.h: Likewise.
1858         * normal/menu.c: Likewise.
1859         * normal/main.c: Likewise.
1860         * normal/datetime.c: Likewise.
1861         * bus/usb/uhci.c: Likewise.
1862         * mmap/i386/uppermem.c: Likewise.
1863         * mmap/mmap.c: Likewise.
1864         * commands/acpi.c: Likewise.
1865         * commands/test.c: Likewise.
1866         * partmap/apple.c: Likewise.
1867         * font/font.c: Likewise.
1868         * loader/sparc64/ieee1275/linux.c: Likewise.
1869         * loader/macho.c: Likewise.
1870         * loader/i386/bsd_trampoline.S: Likewise.
1871         * loader/i386/bsd.c: Likewise.
1872         * loader/xnu.c: Likewise.
1873         * term/i386/pc/vesafb.c: Likewise.
1874         * term/usb_keyboard.c: Likewise.
1875         * util/resolve.c: Likewise.
1876         * util/getroot.c: Likewise.
1878 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1880         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1882 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1884         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1885         build error.
1887 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1889         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1890         parameter only available on BIOS.
1892 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1894         Removed wrong semicolon in declaration
1896         * grub/misc.h (grub_dprintf): remove semicolon
1898 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1900         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1901         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1902         is done by grub_cmd_linux() now).
1903         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1904         restore video to text mode.
1905         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1906         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1907         `GRUB_LINUX_VID_MODE_NORMAL'.
1909 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1911         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1912         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1913         and `normal/script.c'.  Add `kern/rescue_reader.c',
1914         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1915         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1916         `grub_script.tab.c'.
1918         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1919         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1920         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1921         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1922         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1924         * Makefile.in: Remove duplicated 2008 in Copyright line.
1926 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1928         * util/misc.c (grub_util_warn): New function.  Emits a warning
1929         unconditionally.
1930         * include/grub/util/misc.h (grub_util_warn): New declaration.
1932         * util/i386/pc/grub-install.in: Understand --force and pass it down
1933         to grub-setup.
1935         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1936         down to setup().
1937         (setup): Improve error messages and add warnings when requested to
1938         install in odd layouts.  Refuse to install using blocklists unless
1939         --force was set.
1941 2009-05-04  martin f. krafft  <madduck@madduck.net>
1943         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1945 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1947         Updated copyright year
1949         * fs/hfsplus.c: updated copyright year
1951 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1953         HFS+ UUID
1955         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1956         in the space previously used by unused3
1957         (grub_hfsplus_uuid): new function
1958         (grub_hfsplus_fs): added uuid field
1960 2009-05-03  Pavel Roskin  <proski@gnu.org>
1962         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1963         suppress warnings.  It's no longer needed.
1964         * disk/host.c: Likewise.
1965         * disk/ata_pthru.c: Likewise.
1966         * disk/loopback.c: Likewise.
1967         * hook/datehook.c: Likewise.
1968         * parttool/pcpart.c: Likewise.
1969         * fs/i386/pc/pxe.c: Likewise.
1970         * fs/ntfscomp.c: Likewise.
1971         * efiemu/main.c: Likewise.
1972         * mmap/mmap.c: Likewise.
1973         * commands/crc.c: Likewise.
1974         * commands/hexdump.c: Likewise.
1975         * commands/hdparm.c: Likewise.
1976         * commands/acpi.c: Likewise.
1977         * commands/echo.c: Likewise.
1978         * commands/minicmd.c: Likewise.
1979         * commands/blocklist.c: Likewise.
1980         * commands/memrw.c: Likewise.
1981         * commands/loadenv.c: Likewise.
1982         * commands/usbtest.c: Likewise.
1983         * commands/lsmmap.c: Likewise.
1984         * commands/boot.c: Likewise.
1985         * commands/parttool.c: Likewise.
1986         * commands/configfile.c: Likewise.
1987         * commands/search.c: Likewise.
1988         * commands/ieee1275/suspend.c: Likewise.
1989         * commands/cat.c: Likewise.
1990         * commands/i386/pc/pxecmd.c: Likewise.
1991         * commands/i386/pc/play.c: Likewise.
1992         * commands/i386/pc/halt.c: Likewise.
1993         * commands/i386/pc/vbeinfo.c: Likewise.
1994         * commands/i386/pc/vbetest.c: Likewise.
1995         * commands/lspci.c: Likewise.
1996         * commands/date.c: Likewise.
1997         * commands/handler.c: Likewise.
1998         * commands/ls.c: Likewise.
1999         * commands/test.c: Likewise.
2000         * commands/cmp.c: Likewise.
2001         * commands/efi/loadbios.c: Likewise.
2002         * commands/efi/fixvideo.c: Likewise.
2003         * commands/halt.c: Likewise.
2004         * commands/help.c: Likewise.
2005         * commands/reboot.c: Likewise.
2006         * hello/hello.c: Likewise.
2007         * script/sh/main.c: Likewise.
2008         * loader/xnu.c: Likewise.
2009         * term/terminfo.c: Likewise.
2010         * term/i386/pc/serial.c: Likewise.
2011         * term/usb_keyboard.c: Likewise.
2013 2009-05-03  David S. Miller  <davem@davemloft.net>
2015         * normal/menu.c: Include grub/parser.h
2017 2009-05-03  Pavel Roskin  <proski@gnu.org>
2019         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
2020         not char*.
2021         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
2022         Suggested by Javier Martín <lordhabbit@gmail.com>
2024         * util/i386/pc/grub-mkrescue.in: Allow for the case when
2025         efiemu??.o doesn't exist.
2026         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
2027         copying.
2029 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
2031         FreeBSD 64-bit support
2033         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
2034         and loader/i386/bsd_trampoline.S
2035         (bsd_mod_ASFLAGS): new variable
2036         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
2037         (FREEBSD_MODTYPE_KERNEL64): likewise
2038         (grub_bsd64_trampoline_start): likewise
2039         (grub_bsd64_trampoline_end): likewise
2040         (grub_bsd64_trampoline_selfjump): likewise
2041         (grub_bsd64_trampoline_gdt): likewise
2042         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
2043         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
2044         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
2045         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
2046         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2047         of "attrib" member
2048         * loader/i386/bsd_pagetable.c: new file
2049         * loader/i386/bsd_trampoline.S: likewise
2050         * loader/i386/bsd.c (ALIGN_QWORD): new macro
2051         (ALIGN_VAR): likewise
2052         (entry_hi): new variable
2053         (kern_end_mdofs): likewise
2054         (is_64bit): likewise
2055         (grub_freebsd_add_meta): use ALIGN_VAR
2056         (grub_e820_mmap): new declaration
2057         (grub_freebsd_add_mmap): new function
2058         (grub_freebsd_add_meta_module): support 64 bit kernels
2059         (grub_freebsd_list_modules): use ALIGN_VAR
2060         (gdt_descriptor): new declaration
2061         (grub_freebsd_boot): support 64 bit kernels
2062         (grub_bsd_elf64_hook): new function
2063         (grub_bsd_load_elf): support elf64
2065 2009-05-03  Bean  <bean123ch@gmail.com>
2067         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
2068         after we get the result of if statement.
2070 2009-05-03  Bean  <bean123ch@gmail.com>
2072         * Makefile.in (enable_efiemu): New variable.
2074         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
2075         set.
2076         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
2077         path.
2078         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
2079         path, add -mno-red-zone option.
2080         (efiemu64_s.o): Likewise.
2081         (efiemu64.o): Use macro $^ for source file.
2083         * configure.ac (--enable-efiemu): New option.
2085 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
2087         xnu support
2089         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
2090         (pkglib_MODULES): add xnu.mod
2091         (xnu_mod_SOURCES): new variable
2092         (xnu_mod_CFLAGS): likewise
2093         (xnu_mod_LDFLAGS): likewise
2094         (xnu_mod_ASFLAGS): likewise
2095         * conf/i386-pc.rmk: likewise
2096         * conf/x86_64-efi.rmk: likewise
2097         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
2098         new declaration
2099         * include/grub/i386/macho.h: new file
2100         * include/grub/i386/xnu.h: likewise
2101         * include/grub/macho.h: likewise
2102         * include/grub/machoload.h: likewise
2103         * include/grub/x86_64/macho.h: likewise
2104         * include/grub/x86_64/xnu.h: likewise
2105         * include/grub/xnu.h: likewise
2106         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
2107         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
2108         * loader/i386/efi/xnu.c: new file
2109         * loader/i386/pc/xnu.c: likewise
2110         * loader/i386/xnu.c: likewise
2111         * loader/i386/xnu_helper.S: likewise
2112         * loader/macho.c: likewise
2113         * loader/xnu.c: likewise
2114         * loader/xnu_resume.c: likewise
2115         * util/grub-dumpdevtree: likewise
2116         * include/grub/i386/pit.h: include grub/err.h
2117         (grub_pit_wait): export
2118         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2120 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2122         Efiemu
2124         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2125         _linux_efi, linux_efi.
2126         new files in grub-emu
2127         new targets efiemu32.o and efiemu64.o
2128         * loader/linux_normal_efiemu.c: likewise
2129         * loader/i386/efi/linux.c: added preliminary efiemu support
2130         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2131         files to copy
2132         * include/grub/autoefi.h: new file
2133         * include/grub/i386/efiemu.h: likewise
2134         * include/grub/i386/pc/efiemu.h: likewise
2135         * include/grub/efi/api.h: add LL suffix when necessary
2136         new definitions relating to tables
2137         * include/grub/efiemu/efiemu.h: new file
2138         * include/grub/efiemu/runtime.h: likewise
2139         * efiemu/prepare.c: likewise
2140         * efiemu/loadcore_common.c: likewise
2141         * efiemu/loadcore64.c: likewise
2142         * efiemu/runtime/efiemu.sh: likewise
2143         * efiemu/runtime/efiemu.S: likewise
2144         * efiemu/runtime/efiemu.c: likewise
2145         * efiemu/runtime/config.h: likewise
2146         * efiemu/prepare32.c: likewise
2147         * efiemu/main.c: likewise
2148         * efiemu/modules/pnvram.c: likewise
2149         * efiemu/modules/i386: likewise
2150         * efiemu/modules/i386/pc: likewise
2151         * efiemu/modules/acpi.c: likewise
2152         * efiemu/i386/pc/cfgtables.c: likewise
2153         * efiemu/i386/loadcore64.c: likewise
2154         * efiemu/i386/loadcore32.c: likewise
2155         * efiemu/prepare64.c: likewise
2156         * efiemu/loadcore.c: likewise
2157         * efiemu/symbols.c: likewise
2158         * efiemu/mm.c: likewise
2159         * efiemu/loadcore32.c: likewise
2161 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2163         ACPI spoofing
2165         * commands/acpi.c: new file
2166         * commands/i386/pc/acpi.c: likewise
2167         * commands/efi/acpi.c: likewise
2168         * include/grub/acpi.h: likewise
2169         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2170         (acpi_mod_SOURCES): new variable
2171         (acpi_mod_CFLAGS): likewise
2172         (acpi_mod_LDFLAGS): likewise
2173         * conf/i386-efi.rmk: likewise
2174         * conf/x86_64-efi.rmk: likewise
2176 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2178         Missing part from mmap patch
2180         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2181         (grub_mmap_unregister)
2182         (grub_mmap_free_and_unregister): use grub_mmap_register
2184 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2186         Mmap services
2188         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2189         * loader/i386/linux.c (find_mmap_size): likewise
2190         (allocate_pages): likewise
2191         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2192         (grub_fill_multiboot_mmap): likewise
2193         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2194         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2195         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2196         (OPENBSD_MMAP_RESERVED): likewise
2197         * include/grub/i386/pc/memory.h: include grub/memory.h
2198         (grub_lower_mem): removed
2199         (grub_upper_mem): likewise
2200         (GRUB_MACHINE_MEMORY_ACPI): new definition
2201         (GRUB_MACHINE_MEMORY_NVS): likewise
2202         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2203         (GRUB_MACHINE_MEMORY_HOLE): likewise
2204         (grub_machine_mmap_register): likewise
2205         (grub_machine_mmap_unregister): likewise
2206         (grub_machine_get_upper): likewise
2207         (grub_machine_get_lower): likewise
2208         (grub_machine_get_post64): likewise
2209         * include/grub/i386/efi/memory.h: new file
2210         * include/grub/x86_64/efi/memory.h: likewise
2211         * include/grub/efi/memory.h: likewise
2212         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2213         (mmap_mod_SOURCES): new variable
2214         (mmap_mod_LDFLAGS): likewise
2215         (mmap_mod_ASFLAGS): likewise
2216         * conf/i386-coreboot.rmk: likewise
2217         * conf/i386-ieee1275.rmk: likewise
2218         * conf/i386-efi.rmk: likewise
2219         * conf/x86_64-efi.rmk: likewise
2220         * include/grub/types.h (UINT_TO_PTR): new macro
2221         (PTR_TO_UINT32): likewise
2222         (PTR_TO_UINT64): likewise
2223         * include/grub/memory.h: new file
2224         * mmap/i386/pc/mmap.c: likewise
2225         * mmap/i386/pc/mmap_helper.S: likewise
2226         * mmap/i386/uppermem.c: likewise
2227         * mmap/mmap.c: likewise
2228         * mmap/efi/mmap.c: likewise
2229         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2230         grub_upper_mem
2231         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2232         (grub_upper_mem): likewise
2233         (grub_machine_init): don't use grub_upper_mem,
2234         make grub_lower_mem local
2235         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2236         grub_mmap_iterate and grub_mmap_get_upper
2237         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2239 2009-05-02  Bean  <bean123ch@gmail.com>
2241         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2242         script/sh/parser.y.
2243         (pkglib_MODULES): Add normal.mod and sh.mod.
2244         (normal_SOURCES): New variable.
2245         (normal_mod_CFLAGS): Likewise.
2246         (normal_mod_LDFLAGS): Likewise.
2247         (sh_mod_SOURCES): Likewise.
2248         (sh_mod_CFLAGS): Likewise.
2249         (sh_mod_LDFLAGS): Likewise.
2251         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2252         script/sh/lexer.c_DEPENDENCIES.
2253         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2254         kern/rescue_reader.c and kern/rescue_parser.c.
2255         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2256         (grub_emu_SOURCES): Change source files.
2257         (pkglib_MODULES): Remove normal.mod.
2258         (normal_SOURCES): Removed.
2259         (normal_mod_CFLAGS): Likewise.
2260         (normal_mod_LDFLAGS): Likewise.
2261         * conf/i386-coreboot.rmk: Likewise.
2262         * conf/i386-efi.rmk: Likewise.
2263         * conf/i386-ieee1276.rmk: Likewise.
2264         * conf/powerpc-ieee1275.rmk: Likewise.
2265         * conf/sparc64-ieee1275.rmk: Likewise.
2266         * conf/x86_64-efi.rmk: Likewise.
2268         * include/grub/command.h (grub_command_execute): New inline function.
2270         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2272         * include/grub/normal.h: Remove <grub/setjmp.h>.
2273         (grub_fs_module_list): Moved to normal/autofs.c.
2274         (grub_exit_env): Removed.
2275         (grub_command_execute): Likewise.
2276         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2277         parameter script.
2278         (read_command_list): New function declaration.
2279         (read_fs_list): Likewise.
2281         * include/parser.h: Include <grub/reader.h>.
2282         (grub_parser_split_cmdline): Change type of getline parameter.
2283         (grub_parser): New structure.
2284         (grub_parser_class): New variable.
2285         (grub_parser_execute): New function declaration.
2286         (grub_register_rescue_parser): Likewise.
2287         (grub_parser_register): New inline function.
2288         (grub_parser_unregister): Likewise.
2289         (grub_parser_get_current): Likewise.
2290         (grub_parser_set_current): Likewise.
2292         * include/grub/reader.h: New file.
2293         * kern/reader.c: Likewise.
2294         * kern/rescue_parser.c: Likewise.
2295         * kern/rescue_reader.c: Likewise.
2296         * normal/autofs.c: Likewise.
2297         * normal/dyncmd.c: Likewise.
2299         * include/grub/rescue.h: Removed.
2300         * normal/command.h: Likewise.
2302         * include/grub/script.h: Moved to ...
2303         * include/grub/script_sh.h: ... Moved here.
2304         * normal/execute.c: Moved to ...
2305         * script/sh/execute.c: ... Moved here.
2306         * normal/function.c: Moved to ...
2307         * script/sh/function.c: ... Moved here.
2308         * normal/lexer.c: Moved to ...
2309         * script/sh/lexer.c: ... Moved here.
2310         * normal/parser.y: Moved to ...
2311         * script/sh/parser.y: ... Moved here.
2312         * normal/script.c: Moved to ...
2313         * script/sh/script.c: ... Moved here.
2315         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2316         <grub/reader.h>.
2317         (grub_exit_env): Removed.
2318         (fs_module_list): Moved to normal/autofs.c.
2319         (grub_file_getline): Don't handle comment here.
2320         (free_menu): Skip removed field entry->commands.
2321         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2322         script parameter.
2323         (read_config_file): Removed nested parameter, change getline function.
2324         (grub_enter_normal_mode): Removed.
2325         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2326         (read_command_list): Likewise.
2327         (autoload_fs_module): Moved to normal/autofs.c.
2328         (read_fs_list): Likewise.
2329         (reader_nested): New variable.
2330         (grub_normal_execute): Run parser.sh to switch to sh parser.
2331         (grub_cmd_rescue): Removed.
2332         (cmd_normal): Removed.
2333         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2334         rescue command.
2335         (grub_cmdline_run): New function.
2336         (grub_normal_reader_init): Likewise.
2337         (grub_normal_read_line): Likewise.
2338         (grub_env_write_pager): Likewise.
2339         (cmdline): New variable.
2340         (grub_normal_reader): Likewise.
2341         (GRUB_MOD_INIT): Register normal reader and set as current, register
2342         pager hook, register normal command with grub_register_command_prio,
2343         so that it won't show up in command.lst.
2344         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2345         grub_fs_autoload_hook.
2347         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2348         (grub_menu_execute_entry): Replace grub_script_execute with
2349         grub_parser_execute, change parameter to grub_command_execute.
2351         * normal/menu_text.c: Remove <grub/script.h>.
2353         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2354         and <grub/parser.h>.
2355         (run): Change editor_getline to use new parser interface. Change
2356         parameter to grub_command_execute.
2358         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2359         <grub/reader.h> and <grub/parser.h>.
2360         (grub_load_normal_mode): Execute normal command.
2361         (grub_main): Call grub_register_core_commands,
2362         grub_register_rescue_parser and grub_register_rescue_reader, use
2363         grub_reader_loop to enter input loop.
2365         * kern/parser.c (grub_parser_split_cmdline): Change type of
2366         getline parameter.
2367         (grub_parser_class): New variable.
2368         (grub_parser_execute): New function.
2370         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2371         * loader/multiboot2.c: Likewise.
2372         * loader/sparc64/ieee1275/linux.c: Likewise.
2374         * util/grub-emu.c (read_command_list): New dummy function.
2376 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2378         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2379         count to 16 for CCISS and IDA.
2381 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2383         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2384         after waiting for user input.
2386         * loader/i386/linux.c: Include `<grub/normal.h>'.
2387         (grub_cmd_linux): Improve the error message about `ask' mode, by
2388         waiting for user input so it's not missed (we can do this, since
2389         user requested interaction).
2391 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2393         Added missing lst to grub-mkrescue
2395         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2396         and ${input_dir}/parttool.lst
2398 2009-04-30  David S. Miller  <davem@davemloft.net>
2400         * util/hostdisk.c (device_is_wholedisk): New function.
2401         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2402         zero only if device_is_wholedisk() returns true.
2404         * util/hostdisk.c (convert_system_partition_to_system_disk):
2405         Handle virtual disk devices named /dev/vdiskX as found on sparc
2406         and powerpc.
2408         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2409         lettered partition specifier is found, convert to numbered.
2411 2009-04-29  David S. Miller  <davem@davemloft.net>
2413         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2414         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2416         * normal/command.c: Add missing newline at end of file.
2418         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2419         warnings.
2420         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2421         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2422         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2423         ihandles have a 32-bit type but need to be stored in a "void *".
2425 2009-04-28  Pavel Roskin  <proski@gnu.org>
2427         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2428         not disk.  Adjust all dependencies.
2429         (grub_fs_uuid_close): Use grub_device_close(), not
2430         grub_disk_close().
2432         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2433         parent's partition, don't copy it by reference, as it gets freed
2434         on close.
2436 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2438         Preboot hooks support
2440         * commands/boot.c (struct grub_preboot_t): new declaration
2441         (preboots_head): new variable
2442         (preboots_tail): likewise
2443         (grub_loader_register_preboot_hook): new function
2444         (grub_loader_unregister_preboot_hook): likewise
2445         (grub_loader_set): launch preboot hooks
2446         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2447         (grub_loader_register_preboot_hook): new declaration
2448         (grub_loader_unregister_preboot_hook): likewise
2450 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2452         Warning fix
2454         * disk/scsi.c (grub_scsi_open): added missing cast when
2455         calling grub_dprintf
2457 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2459         Bug and warning fixes
2461         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2462         declaration
2463         * commands/test.c (test_parse): fixed bug with file tests and corrected
2464         declaration of find_file
2466 2009-04-26  Pavel Roskin  <proski@gnu.org>
2468         * Makefile.in: Don't install empty manual pages if help2man is
2469         missing.  Use help2man option for output, not shell redirection.
2471 2009-04-26  David S. Miller  <davem@davemloft.net>
2473         * util/grub-mkdevicemap.c (make_device_map): Add missing
2474         NESTED_FUNC_ATTR to process_device().
2476 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2478         Test command
2480         * commands/test.c: rewritten to use bash-like test
2482 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2484         Parttool autoloading and improvements
2486         * Makefile.in (pkglib_DATA): add parttool.lst
2487         (parttool.lst): new target
2488         * genmk.rb: generate parttool-*
2489         (CLEANFILES): add #{parttool}
2490         (PARTTOOLFILES): new variable
2491         * genparttoollist.sh: new file
2492         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2493         (grub_pcpart_type): likewise
2494         * commands/parttool.c (helpmsg): new variable
2495         (grub_cmd_parttool): output help if not enough arguments are supplied
2496         autoload modules
2497         (GRUB_MOD_INIT(parttool)): use helpmsg
2499 2009-04-24  David S. Miller  <davem@davemloft.net>
2501         Avoiding opening same device multiple times in device iterator.
2503         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2504         and use it to build a list of partitions in iterate_disk() and
2505         iterate_partition().
2507         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2508         on disk->data.
2510         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2511         grub_devalias_iterate() result instead of unconditional 0.
2512         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2513         Also, capture hook return value, either directly or via
2514         grub_children_iterate(), and propagate to caller.
2515         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2516         grub_children_iterate): Return value is now 'int' instead of
2517         'grub_err_t'.
2518         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2519         like a proper iterator, stopping when hooks return non-zero.
2520         (grub_devalias_iterate): Likewise.
2522 2009-04-23  David S. Miller  <davem@davemloft.net>
2524         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2526 2009-04-22  David S. Miller  <davem@davemloft.net>
2528         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2529         is larger than address_cells, use that value for address_cells too.
2531         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2532         IEEE1275_MAX_PATH_LEN): Define.
2533         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2534         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2535         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2536         'devtype'.  Explicitly NULL terminate devalias expansion.
2538         * util/sparc64/ieee1275/misc.c: New file.
2539         * util/sparc64/ieee1275/grub-setup.c: New file.
2540         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2541         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2542         * util/sparc64/ieee1275/grub-install.in: New file.
2543         * util/ieee1275/ofpath.c: New file.
2544         * util/ieee1275/devicemap.c: New file.
2545         * util/devicemap.c: New file.
2546         * util/deviceiter.c: New file.
2547         * kern/sparc64/ieee1275/init.c: New file.
2548         * include/grub/util/ofpath.h: New file.
2549         * include/grub/util/deviceiter.h: New file.
2550         * util/grub-mkdevicemap.c: Include deviceiter.h.
2551         Implement using grub_util_emit_devicemap_entry and
2552         grub_util_iterate_devices.
2553         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2554         util/devicemap.c into grub-mkdevicemap
2555         * conf/i386-efi.rmk: Likewise.
2556         * conf/i386-ieee1275.rmk: Likewise.
2557         * conf/i386-pc.rmk: Likewise.
2558         * conf/powerpc-ieee1275.rmk: Likewise.
2559         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2560         images and installation utilities.  Build kernel as image
2561         instead of as elf binary.  Use common rules as much as possible.
2563 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2565         Correct GPT definition
2567         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2568         of "attrib" member
2570 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2572         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2574 2009-04-19  David S. Miller  <davem@davemloft.net>
2576         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2577         (grub_rescue_cmd_linux): Rename to...
2578         (grub_cmd_linux): and fix prototype.
2579         (grub_rescue_cmd_initrd): Rename to...
2580         (grub_cmd_initrd): and fix prototype.
2581         (cmd_linux, cmd_initrd): New.
2582         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2583         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2585 2009-04-17  Pavel Roskin  <proski@gnu.org>
2587         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2588         format.
2589         (grub_ohci_transfer): Likewise.
2591         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2593         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2594         return without a value.  Fix inconsistent indentation.
2596         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2597         match struct grub_fs.
2599         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2600         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2601         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2602         * commands/lspci.c (grub_lspci_iter): Likewise.
2604 2009-04-16  Bean  <bean123ch@gmail.com>
2606         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2607         value.
2609 2009-04-15  Pavel Roskin  <proski@gnu.org>
2611         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2612         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2613         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2614         definitions.
2616 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2618         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2619         that no multiple data or metadata areas are supported and `Unknown
2620         metadata header'.
2622 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2624         Move loader out of the kernel
2626         * kern/loader.c: moved to ...
2627         * commands/boot.c: ... moved here
2628         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2629         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2630         * include/grub/kernel.h (grub_machine_fini): export
2631         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2632         (grub_loader_set): likewise
2633         (grub_loader_unset): likewise
2634         (grub_loader_boot): likewise
2635         * conf/common.rmk: new module boot.mod
2636         (pkglib_MODULES): add boot.mod
2637         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2638         (grub_emu_SOURCES): likewise
2639         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2640         (grub_emu_SOURCES): likewise
2641         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2642         (grub_emu_SOURCES): likewise
2643         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2644         (grub_emu_SOURCES): likewise
2645         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2646         (grub_emu_SOURCES): likewise
2647         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2648         (grub_emu_SOURCES): likewise
2649         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2650         (grub_emu_SOURCES): likewise
2652 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2654         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2656         * kern/misc.c (grub_itoa): Removed function
2657         (grub_ltoa): likewise
2658         (grub_vsprintf): use grub_lltoa
2660 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2662         Restore grub-emu
2664         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2665         * conf/i386-coreboot.rmk: likewise
2666         * conf/i386-ieee1275.rmk: likewise
2667         * conf/powerpc-ieee1275.rmk: likewise
2669 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2671         * INSTALL: Add that `./autogen.sh' needs to be run before
2672         `./configure.'.
2674 2009-04-14  Bean  <bean123ch@gmail.com>
2676         * Makefile.in (pkglib_DATA): Add handler.lst.
2677         (handler.lst): New rule.
2679         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2680         * conf/i386-coreboot.rmk: Likewise.
2681         * conf/i386-ieee1275.rmk: Likewise.
2682         * conf/i386-efi.rmk: Likewise.
2683         * conf/x86_64-efi.rmk: Likewise.
2684         * conf/powerpc-ieee1275.rmk: Likewise.
2685         * conf/sparc64-ieee1275.rmk: Likewise.
2687         * genhandlerlist.sh: New file.
2689         * genmk.rb: Add rules to generate handler.lst.
2691         * include/grub/normal.h (grub_file_getline): New function definition.
2692         (read_handler_list): Likewise.
2693         (free_handler_list): Likewise.
2695         * include/grub/term.h (grub_term_register_input): Add name parameter
2696         for auto generation of handler.lst.
2697         (grub_term_register_output): Likewise.
2699         * normal/handler.c: New file.
2701         * normal/main.c (get_line): Renamed to grub_file_getline.
2702         (read_config_file): Use the newly renamed grub_file_getline.
2703         (read_command_list): Likewise.
2704         (read_fs_list): Likewise.
2705         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2706         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2708         * term/efi/console.c (grub_console_init): Add name parameter for auto
2709         generation of handler.lst.
2710         * term/gfxterm.c: Likewise.
2711         * term/i386/pc/at_keyboard.c: Likewise.
2712         * term/i386/pc/console.c: Likewise.
2713         * term/i386/pc/serial.c: Likewise.
2714         * term/i386/pc/vesafb.c: Likewise.
2715         * term/i386/pc/vga.c: Likewise.
2716         * term/i386/pc/vga_text.c: Likewise.
2717         * term/ieee1275/ofconsole.c: Likewise.
2718         * term/usb_keyboard.c: Likewise.
2720 2009-04-14  Bean  <bean123ch@gmail.com>
2722         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2723         properly with null character.
2725 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2727         * configure: Remove.
2728         * config.h.in: Likewise.
2729         * stamp-h.in: Likewise.
2730         * DISTLIST: Likewise.
2731         * conf/common.mk: Likewise.
2732         * conf/i386-coreboot.mk: Likewise.
2733         * conf/i386-efi.mk: Likewise.
2734         * conf/i386-ieee1275.mk: Likewise.
2735         * conf/i386.mk: Likewise.
2736         * conf/i386-pc.mk: Likewise.
2737         * conf/powerpc-ieee1275.mk: Likewise.
2738         * conf/sparc64-ieee1275.mk: Likewise.
2739         * conf/x86_64-efi.mk: Likewise.
2741         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2742         develop on GRUB.
2744 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2745             David S. Miller  <davem@davemloft.net>
2747         * util/hostdisk.c (make_device_name): Fix buffer length
2748         calculations.
2750 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2752         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2753         <sys/param.h> and <sys/sysctl.h>.
2754         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2755         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2756         opening the device and reset them afterwards.
2758 2009-04-13  Pavel Roskin  <proski@gnu.org>
2760         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2761         Reported by John Stanley <jpsinthemix@verizon.net>
2763 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2765         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2766         that name for menuentries when appropriate.
2768 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2770         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2772 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2774         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2775         to Linux, simply abort telling the user it's no longer supported.
2777 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2779         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2780         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2781         `freebsd_loadenv' only when devices.hints exist.
2783 2009-04-13  Pavel Roskin  <proski@gnu.org>
2785         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2787 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2789         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2790         partition number.
2791         (grub_drive): Likewise.
2793 2009-04-13  David S. Miller  <davem@davemloft.net>
2795         * kern/sparc64/ieee1275/ieee1275.c: New file.
2796         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2797         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2798         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2799         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2800         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2801         grub_ieee1275_alloc_physmem): Declare new exported functions.
2803         * include/grub/sparc64/ieee1275/loader.h: New file.
2804         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2805         * include/grub/sparc64/kernel.h: Likewise.
2806         * loader/sparc64/ieee1275/linux.c: Likewise.
2808         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2809         (grub_fstest_SOURCES): Likewise.
2811         * util/hostdisk.c (make_device_name): Do not make any assumptions
2812         about the length of drive names.
2814         * kern/dl.c (grub_dl_load_file): Close file immediately when
2815         we are done using it.
2817 2009-04-12  David S. Miller  <davem@davemloft.net>
2819         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2820         values.  Noticed by Pavel Roskin.
2822         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2823         target compiler.
2825         * genmk.rb: Add more flexible image type specification, also
2826         pass --strip-unneeded to objcopy.
2827         * conf/i386-pc.rmk: Use *_FORMAT.
2828         * conf/i386-pc.mk: Rebuilt.
2830         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2831         (OFDISK_HASH_SZ): Define.
2832         (ofdisk_hash): New hash table.
2833         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2834         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2835         instead of device phandle which is not unique.
2837         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2838         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2839         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2840         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2841         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2842         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2843         GRUB_KERNEL_MACHINE_DATA_END): Define.
2844         (grub_kernel_image_size, grub_total_module_size): Declare.
2846 2009-04-12  Pavel Roskin  <proski@gnu.org>
2848          * configure.ac: Change the logic when we check for target tools.
2849          Do it when the target is specified and it's different from the
2850          specified value of the host.
2852 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2854         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2855         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2856         GNU/kFreeBSD. Check if a device is a character device. Use
2857         DIOCGMEDIASIZE to get the size.
2858         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2859         support for GNU/kFreeBSD.
2860         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2861         is a character device instead of a block device. Add support for
2862         FreeBSD device names.
2864         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2865         is a character device instead of a block device.
2867         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2868         is a character device instead of a block device.
2870 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2872         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2873         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2874         FreeBSD. Check if a device is a character device. Use
2875         DIOCGMEDIASIZE to get the size.
2876         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2877         support for FreeBSD.
2878         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2879         is a character device instead of a block device. Add support for
2880         FreeBSD device names.
2882         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2883         a character device instead of a block device.
2884         (grub_util_check_char_device): New function.
2886         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2887         a character device instead of a block device.
2889         * include/grub/util/getroot.h (grub_util_check_char_device): New
2890         prototype.
2892 2009-04-11  David S. Miller  <davem@davemloft.net>
2894         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2895         static libgcc.
2896         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2897         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2898         function, if present.
2899         (__bswapdi2): Likewise.
2901         * include/grub/sparc64/ieee1275/boot.h: New file.
2902         * boot/sparc64/ieee1275/boot.S: Likewise.
2903         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2905         * kern/misc.c (grub_ltoa): New function.
2906         (grub_vsprintf): Use it to format 'long' integers.
2908 2009-04-10  David S. Miller  <davem@davemloft.net>
2910         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2911         slots are of type grub_ieee1275_cell_t.
2912         (grub_nand_read): Likewise.
2913         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2914         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2915         macros are used to compare values in arg/ret block of the call.
2916         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2917         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2918         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2919         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2920         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2921         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2922         grub_ieee1275_close, grub_ieee1275_set_property,
2923         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2924         grub_ieee1275_cell_t.
2925         * kern/ieee1275/openfw.c (grub_map): Likewise.
2926         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2927         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2929         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2930         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2931         (grub_devalias_iterate): Likewise.
2933 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2935         UFS improvements
2937         * fs/ufs.c (INODE_NBLOCKS): new definition
2938         (struct grub_ufs_dirent): added fields for non-BSD dirents
2939         (grub_ufs_get_file_block): fixed double indirect handling
2940         (grub_ufs_lookup_symlink): use more robust way to determine whether
2941         symlink is inline
2942         (grub_ufs_find_file): support for non-BSD dirents
2943         (grub_ufs_dir): support for non-BSD dirents
2945 2009-04-10  Bean  <bean123ch@gnail.com>
2947         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2948         attribute, otherwise the size would be wrong for i386 platform.
2950         * include/grub/pci.h (grub_pci_read_word): New inline function.
2951         (grub_pci_read_byte): Likewise.
2952         (grub_pci_write): Likewise.
2953         (grub_pci_write_word): Likewise.
2954         (grub_pci_write_byte): Likewise.
2956         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2958         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2959         (find_framebuf): Scan pci to locate the frame buffer address.
2961         * commands/efi/fixvideo.c: New file.
2963         * commands/efi/loadbios.c: Likewise.
2965         * commands/memrw.c: Likewise.
2967         * util/grub-dumpbios.in: Likewise.
2969         * conf/common.rmk (grub-dumpbios): New utility.
2970         (pkglib_MODULES): New module memrw.mod.
2971         (memrw_mod_SOURCE): New macro.
2972         (memrw_mod_CFLAGS): Likewise.
2973         (memrw_mod_LDFLAGS): Likewise.
2975         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2976         fixvideo.mod.
2977         (loadbios_mod_SOURCE): New macro.
2978         (loadbios_mod_CFLAGS): Likewise.
2979         (loadbios_mod_LDFLAGS): Likewise.
2980         (fixvideo_mod_SOURCE): Likewise.
2981         (fixvideo_mod_CFLAGS): Likewise.
2982         (fixvideo_mod_LDFLAGS): Likewise.
2984         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2985         fixvideo.mod.
2986         (loadbios_mod_SOURCE): New macro.
2987         (loadbios_mod_CFLAGS): Likewise.
2988         (loadbios_mod_LDFLAGS): Likewise.
2989         (fixvideo_mod_SOURCE): Likewise.
2990         (fixvideo_mod_CFLAGS): Likewise.
2991         (fixvideo_mod_LDFLAGS): Likewise.
2993 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2995         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2997 2009-04-07  David S. Miller  <davem@davemloft.net>
2999         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
3000         support for R_SPARC_OLO10 relocations.  Fix compile warning for
3001         R_SPARC_WDISP30 case.
3002         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
3004 2009-04-06  Pavel Roskin  <proski@gnu.org>
3006         * include/grub/misc.h (ARRAY_SIZE): New macro.
3007         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
3008         New macro.
3009         * loader/i386/linux.c (allocate_pages): Use free_pages().
3010         (grub_linux_unload): Don't use free_pages().
3011         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
3012         wrong index.  Treat all other modes as text modes.
3013         (grub_cmd_linux): Initialize vid_mode unconditionally to
3014         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
3016         * commands/help.c (print_command_help): Use cmd->prio, not
3017         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
3019 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
3021         Parttool
3023         * parttool/pcpart.c: new file
3024         * commands/parttool.c: likewise
3025         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
3026         (parttool_mod_SOURCES): new variable
3027         (parttool_mod_CFLAGS): likewise
3028         (parttool_mod_LDFLAGS): likewise
3029         (pcpart_mod_SOURCES): likewise
3030         (pcpart_mod_CFLAGS): likewise
3031         (pcpart_mod_LDFLAGS): likewise
3032         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
3033         and parttool/pcpart.c
3034         * conf/i386-efi.rmk: likewise
3035         * conf/i386-ieee1275.rmk: likewise
3036         * conf/i386-pc.rmk: likewise
3037         * conf/powerpc-ieee1275.rmk: likewise
3038         * conf/sparc64-ieee1275.rmk: likewise
3039         * conf/x86_64-ieee1275.rmk: likewise
3041 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3043         Support for mtime and further expandability of dir command
3045         * include/grub/lib/datetime.h: moved to ...
3046         * include/grub/datetime.h: ... moved here and added
3047         declaration of grub_unixtime2datetime. All users updated
3048         * include/grub/fs.h: new syntax for dir and mtime functions in
3049         struct grub_fs
3050         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
3051         and GRUB_FSHELP_FLAGS_MASK
3052         * commands/ls.c (grub_ls_list_files): Write mtime in long format
3053         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
3054         (grub_ext2_mtime): new function
3055         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
3056         (grub_hfsplus_mtime): new function
3057         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
3058         (GRUB_UFS_ATTR_FILE): likewise
3059         (GRUB_UFS_ATTR_LNK): likewise
3060         (struct grub_ufs_sblock): new fields mtime
3061         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
3062         all users updated
3063         (grub_ufs_dir): mtime support
3064         (grub_ufs_mtime): new function
3065         * fs/affs.c (grub_affs_dir): use new dir syntax
3066         * fs/afs.c (grub_afs_dir): likewise
3067         * fs/cpio.c (grub_cpio_dir): likewise
3068         * fs/fat.c (grub_fat_find_dir): likewise
3069         * fs/hfs.c (grub_hfs_dir): likewise
3070         * fs/iso9660.c (grub_iso9660_dir): likewise
3071         * fs/jfs.c (grub_jfs_dir): likewise
3072         * fs/minix.c (grub_minix_dir): likewise
3073         * fs/ntfs.c (grub_ntfs_dir): likewise
3074         * fs/reiserfs.c (grub_reiserfs_dir): likewise
3075         * fs/sfs.c (grub_sfs_dir): likewise
3076         * fs/xfs.c (grub_xfs_dir): likewise
3077         * util/hostfs.c (grub_hostfs_dir): likewise
3078         * lib/datetime.c: moved to ...
3079         * normal/datetime.c: ... moved here
3080         (grub_unixtime2datetime): new function
3081         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
3082         * normal/completion.c (iterate_dir): use new dir syntax
3083         * normal/misc.c (grub_normal_print_device_info): tell the
3084         last modification time of a volume
3085         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
3086         * conf/common.rmk: added lib/datetime.c to ls.mod
3087         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
3088         (normal_mod_SOURCES): likewise
3089         (datetime_mod_SOURCES): Removed lib/datetime.c
3090         * conf/i386-efi.rmk: likewise
3091         * conf/i386-ieee1275.rmk: likewise
3092         * conf/i386-pc.rmk: likewise
3093         * conf/powerpc-ieee1275.rmk: likewise
3094         * conf/sparc64-ieee1275.rmk: likewise
3095         * conf/x86_64-efi.rmk: likewise
3097 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
3099         Trim trailing spaces in FAT label and support mtools-like labels
3101         * fs/fat.c (grub_fat_iterate_dir): New function based
3102         on grub_fat_find_dir
3103         (grub_fat_find_dir): use grub_fat_iterate_dir
3104         (grub_fat_label): likewise
3106 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
3108         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
3109         and command.h
3110         remove extraneous kernel_elf_HEADERS
3112 2009-04-04  Bean  <bean123ch@gnail.com>
3114         * include/grub/util/misc.h: Add dummy function fsync for mingw.
3116         * util/misc.c: Likewise.
3118 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
3120         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3121         instead of grub_printf.
3123 2009-04-03  Robert Millan  <rmh@aybabtu.com>
3125         * loader/i386/linux.c (grub_linux_setup_video): Fill
3126         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3127         values from `mode info' structure instead of hardcoded
3128         values.
3130 2009-04-01  Pavel Roskin  <proski@gnu.org>
3132         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3133         unused now.
3134         * genmk.rb: Likewise.
3135         * configure.ac: Likewise.
3137 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
3139         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3140         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
3142 2009-04-01  David S. Miller  <davem@davemloft.net>
3144         * normal/sparc64/setjmp.S: Fix setjmp implementation.
3145         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3146         (grub_setjmp): Mark with 'returns_twice' attribute.
3147         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3148         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3149         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3151 2009-04-01  Robert Millan  <rmh@aybabtu.com>
3153         Reapply fix from 2008-07-28 which was accidentally reverted; also
3154         perform the same fix to a similar check in same function.
3156         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3157         with the same number are found, just use issue a warning with
3158         grub_dprintf(), as this error has been reported to be non-fatal.
3160 2009-03-31  Pavel Roskin  <proski@gnu.org>
3162         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3163         for cross-compilation.
3165 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3167         Fix i386-ieee1275 build.
3169         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3170         Remove declaration.
3172 2009-03-30  Pavel Roskin  <proski@gnu.org>
3174         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3175         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3176         zero-terminated, rely only on the strlen value.  Fix comparison
3177         of strings differing in length.
3179 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3181         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3182         checking for abi version.  Improve error messages on BIOS to notify
3183         user about `linux16' command.
3185 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3187         Leak fixes
3189         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3190         in case of collision
3191         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3193 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3195         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3196         set `vid_mode' accordingly.
3197         (grub_linux_boot): Process `vid_mode' and set video mode.
3199 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3201         * util/grub.d/10_linux.in (linux_entry): New function.
3202         Factorize generation of Linux boot entries.
3204 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3206         Make the format of Environment Block plain text. The boot loader
3207         part is not tested well yet.
3209         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3210         (buffer): Removed.
3211         (envblk): Likewise.
3212         (usage): Remove "info" and "clear". Add "unset". Update the
3213         description of "set", as this does not delete variables any
3214         longer.
3215         (create_envblk_file): Complete rewrite.
3216         (open_envblk_file): Likewise.
3217         (cmd_info): Removed.
3218         (cmd_list): Likewise.
3219         (cmd_set): Likewise.
3220         (cmd_clear): Likewise.
3221         (list_variables): New function.
3222         (write_envblk): Likewise.
3223         (set_variables): Likewise.
3224         (unset_variables): Likewise.
3225         (main): Complete rewrite.
3227         * commands/loadenv.c (buffer): Removed.
3228         (envblk): Likewise.
3229         (open_envblk_file): New function.
3230         (read_envblk_file): Complete rewrite.
3231         (grub_cmd_load_env): Likewise.
3232         (grub_cmd_list_env): Likewise.
3233         (struct blocklist): New struct.
3234         (free_blocklists): New function.
3235         (check_blocklists): Likewise.
3236         (write_blocklists): Likewise.
3237         (grub_cmd_save_env): Complete rewrite.
3239         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3240         a plain text signature.
3241         (GRUB_ENVBLK_MAXLEN): Removed.
3242         (struct grub_envblk): Complete rewrite.
3243         (grub_envblk_find): Removed.
3244         (grub_envblk_insert): Likewise.
3245         (grub_envblk_open): New prototype.
3246         (grub_envblk_set): Likewise.
3247         (grub_envblk_delete): Put const to VALUE.
3248         (grub_envblk_iterate): Put const to NAME and VALUE.
3249         (grub_envblk_close): New prototype.
3250         (grub_envblk_buffer): New inline function.
3251         (grub_envblk_size): Likewise.
3253         * lib/envblk.c: Include grub/mm.h.
3254         (grub_env_find): Removed.
3255         (grub_envblk_open): New function.
3256         (grub_envblk_close): Likewise.
3257         (escaped_value_len): Likewise.
3258         (find_next_line): Likewise.
3259         (grub_envblk_insert): Removed.
3260         (grub_envblk_set): New function.
3261         (grub_envblk_delete): Complete rewrite.
3262         (grub_envblk_iterate): Likewise.
3264 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3266         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3267         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3268         variables.  Use 16-bit loader.
3269         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3270         loader.
3271         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3272         (grub_linux16_boot): ... this.  Update all users.
3273         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3274         (grub_linux_boot): ... this.  Update all users.
3276         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3277         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3278         commands to `linux16' and `initrd16'.
3279         (GRUB_MOD_FINI(linux)): Rename to ...
3280         (GRUB_MOD_FINI(linux16)): ... this.
3282 2009-03-24  Pavel Roskin  <proski@gnu.org>
3284         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3285         not just for compilation.
3287 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3289         Move multiboot helper out of kernel
3291         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3292         `loader/i386/multiboot_helper.S'.
3293         * conf/i386-coreboot.rmk: Likewise
3294         * conf/i386-ieee1275.rmk: Likewise
3296         * kern/i386/loader.S: Move multiboot helpers from here...
3297         * loader/i386/multiboot_helper.S: ...moved here
3298         * include/grub/i386/loader.h: Move declarations of multiboot
3299         helpers from here...
3300         * include/grub/i386/multiboot.h: ...moved here
3301         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3303 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3305         * kern/env.c (grub_env_context_open): Added an argument to specify
3306         whether a new context inherits exported variables from current
3307         one. This is useful when making a sandbox to interpret a config
3308         file.
3309         All callers updated.
3311         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3313 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3315         * kern/env.c (grub_env_context_close): Fix memory leaks.
3317 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3319         * normal/main.c (grub_normal_execute): Added an argument
3320         BATCH to specify if an interactive interface should be provided
3321         after reading a config file.
3322         All callers updated.
3323         (read_command_list): Prevent being executed twice.
3324         (read_fs_list): Likewise.
3326         * include/grub/normal.h (grub_normal_execute): Updated the
3327         prototype.
3329 2009-03-22  Pavel Roskin  <proski@gno.org>
3331         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3332         _start.
3333         * kern/i386/pc/startup.S: Likewise.
3334         * kern/i386/efi/startup.S: Likewise.
3335         * kern/i386/ieee1275/startup.S: Likewise.
3336         * kern/i386/coreboot/startup.S: Likewise.
3337         * kern/x86_64/efi/startup.S: Likewise.
3339         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3340         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3341         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3343 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3345         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3347         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3348         limit detection.
3349         Use vaddr of correct segment for entry_point.
3351 2009-03-21  Bean  <bean123ch@gmail.com>
3353         * commands/blocklist.c: Add include file <grub/command.h>, remove
3354         <grub/normal.h> and <grub/arg.h>.
3355         (grub_cmd_blocklist): Use the new command interface.
3356         (GRUB_MOD_INIT): Likewise.
3357         (GRUB_MOD_FINI): Likewise.
3358         * commands/boot.c: Likewise.
3359         * commands/cat.c: Likewise.
3360         * commands/cmp.c: Likewise.
3361         * commands/configfile.c: Likewise.
3362         * commands/crc.c: Likewise.
3363         * commands/echo.c: Likewise.
3364         * commands/halt.c: Likewise.
3365         * commands/handler.c: Likewise.
3366         * commands/hdparm.c: Likewise.
3367         * commands/help.c: Likewise.
3368         * commands/hexdump.c: Likewise.
3369         * commands/loadenv.c: Likewise.
3370         * commands/ls.c: Likewise.
3371         * commands/lsmmap.c: Likewise.
3372         * commands/lspci.c: Likewise.
3373         * commands/loadenv.c: Likewise.
3374         * commands/read.c: Likewise.
3375         * commands/reboot.c: Likewise.
3376         * commands/search.c: Likewise.
3377         * commands/sleep.c: Likewise.
3378         * commands/test.c: Likewise.
3379         * commands/usbtest.c: Likewise.
3380         * commands/videotest.c: Likewise.
3381         * commands/i386/cpuid.c: Likewise.
3382         * commands/i386/pc/halt.c: Likewise.
3383         * commands/i386/pc/play.c: Likewise.
3384         * commands/i386/pc/pxecmd.c: Likewise.
3385         * commands/i386/pc/vbeinfo.c: Likewise.
3386         * commands/i386/pc/vbetest.c: Likewise.
3387         * commands/ieee1275/suspend.c: Likewise.
3388         * disk/loopback.c: Likewise.
3389         * font/font_cmd.c: Likewise.
3390         * hello/hello.c: Likewise.
3391         * loader/efi/appleloader.c: Likewise.
3392         * loader/efi/chainloader.c: Likewise.
3393         * loader/i386/bsd.c: Likewise.
3394         * loader/i386/efi/linux.c: Likewise.
3395         * loader/i386/ieee1275/linux.c: Likewise.
3396         * loader/i386/linux.c: Likewise.
3397         * loader/i386/pc/chainloader.c: Likewise.
3398         * loader/i386/pc/linux.c: Likewise.
3399         * loader/powerpc/ieee1275/linux.c: Likewise.
3400         * loader/multiboot_loader.c: Likewise.
3401         * term/gfxterm.c: Likewise.
3402         * term/i386/pc/serial.c: Likewise.
3403         * term/terminfo.c: Likewise.
3405         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3406         * term/i386/pc/vga.c: Likewise.
3407         * video/readers/jpeg.c: Likewise.
3408         * video/readers/png.c: Likewise.
3409         * video/readers/tga.c: Likewise.
3411         * util/grub-fstest (cmd_loopback): Removed.
3412         (cmd_blocklist): Likewise.
3413         (cmd_ls): Likewise.
3414         (grub_register_command): Likewise.
3415         (grub_unregister_command): Likewise.
3416         (execute_command): Use grub_command_find to locate command and execute
3417         it.
3419         * include/grub/efi/chainloader.h: Removed.
3420         * loader/efi/chainloader_normal.c: Likewise.
3421         * loader/i386/bsd_normal.c: Likewise.
3422         * loader/i386/pc/chainloader_normal.c: Likewise.
3423         * loader/i386/pc/multiboot_normal.c: Likewise.
3424         * loader/linux_normal.c: Likewise.
3425         * loader/multiboot_loader_normal.c: Likewise.
3426         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3428         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3429         and grub_register_command_p1.
3431         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3432         kern/command.c, lib/arg.c and commands/extcmd.c.
3433         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3434         (minicmd_mod_SOURCES): New variable.
3435         (minicmd_mod_CFLAGS): Likewise.
3436         (minicmd_mod_LDFLAGS): Likewise.
3437         (extcmd_mod_SOURCES): Likewise.
3438         (extcmd_mod_CFLAGS): Likewise.
3439         (extcmd_mod_LDFLAGS): Likewise.
3440         (boot_mod_SOURCES): Removed.
3441         (boot_mod_CFLAGS): Likewise.
3442         (boot_mod_LDFLAGS): Likewise.
3444         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3445         kern/corecmd.c.
3446         (kernel_img_HEADERS): Add command.h.
3447         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3448         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3449         and lib/arg.c.
3450         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3451         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3452         remove the corresponding normal mode command.
3453         (normal_mod_SOURCES): Remove normal/arg.c.
3454         * conf/i386-coreboot.rmk: Likewise.
3455         * conf/i386-efi.rmk: Likewise.
3456         * conf/i386-ieee1275.rmk: Likewise.
3457         * conf/powerpc-ieee1275.rmk: Likewise.
3458         * conf/x86_64-efi.rmk: Likewise.
3460         * include/grub/arg.h: Move from here ...
3461         * include/grub/lib/arg.h: ... to here.
3463         * normal/arg.c: Move from here ...
3464         * lib/arg.c: ... to here.
3466         * commands/extcmd.c: New file.
3467         * commands/minicmd.c: Likewise.
3468         * include/grub/command.h: Likewise.
3469         * include/grub/extcmd.h: Likewise.
3470         * kern/command.c: Likewise.
3471         * kern/corecmd.c: Likewise.
3473         * kern/list.c (grub_list_iterate): Return int instead of void.
3474         (grub_list_insert): New function.
3475         (grub_prio_list_insert): Likewise.
3477         * kern/rescue.c (grub_rescue_command): Removed.
3478         (grub_rescue_command_list): Likewise.
3479         (grub_rescue_register_command): Likewise.
3480         (grub_rescue_unregister_command): Likewise.
3481         (grub_rescue_cmd_boot): Move to minicmd.c
3482         (grub_rescue_cmd_help): Likewise.
3483         (grub_rescue_cmd_info): Likewise.
3484         (grub_rescue_cmd_boot): Likewise.
3485         (grub_rescue_cmd_testload): Likewise.
3486         (grub_rescue_cmd_dump): Likewise.
3487         (grub_rescue_cmd_rmmod): Likewise.
3488         (grub_rescue_cmd_lsmod): Likewise.
3489         (grub_rescue_cmd_exit): Likewise.
3490         (grub_rescue_print_devices): Moved to corecmd.c.
3491         (grub_rescue_print_files): Likewise.
3492         (grub_rescue_cmd_ls): Likewise.
3493         (grub_rescue_cmd_insmod): Likewise.
3494         (grub_rescue_cmd_set): Likewise.
3495         (grub_rescue_cmd_unset): Likewise.
3496         (attempt_normal_mode): Use grub_command_find to get normal module.
3497         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3498         commands, remove grub_rescue_register_command calls.
3500         * normal/command.c (grub_register_command): Removed.
3501         (grub_unregister_command): Likewise.
3502         (grub_command_find): Likewise.
3503         (grub_iterate_commands): Likewise.
3504         (rescue_command): Likewise.
3505         (export_command): Moved to corecmd.c.
3506         (set_command): Removed.
3507         (unset_command): Likewise.
3508         (insmod_command): Likewise.
3509         (rmmod_command): Likewise.
3510         (lsmod_command): Likewise.
3511         (grub_command_init): Likewise.
3513         * normal/completion.c (iterate_command): Use cmd->prio to check for
3514         active command.
3515         (complete_arguments): Use grub_extcmd_t structure to find options.
3516         (grub_normal_do_completion): Change function grub_iterate_commands to
3517         grub_command_iterate.
3519         * normal/execute.c (grub_script_execute_cmd): No need to parse
3520         argument here.
3522         * normal/main.c (grub_dyncmd_dispatcher): New function.
3523         (read_command_list): Register unload commands as dyncmd.
3524         (grub_cmd_normal): Use new command interface, register rescue,
3525         unregister normal at entry, register normal, unregister rescue at exit.
3527         * include/grub/list.h (grub_list_test_t): New type.
3528         (grub_list_iterate): Return int instead of void.
3529         (grub_list_insert): New function.
3530         (GRUB_AS_NAMED_LIST_P): New macro.
3531         (GRUB_AS_PRIO_LIST): Likewise.
3532         (GRUB_AS_PRIO_LIST_P): Likewise.
3533         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3534         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3535         (grub_prio_list): New structure.
3536         (grub_prio_list_insert): New function.
3537         (grub_prio_list_remove): New inline function.
3539         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3540         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3541         (GRUB_COMMAND_FLAG_MENU): Likewise.
3542         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3543         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3544         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3545         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3546         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3547         (grub_command): Likewise.
3548         (grub_register_command): Likewise.
3549         (grub_command_find): Likewise.
3550         (grub_iterate_commands): Likewise.
3551         (grub_command_init): Likewise.
3552         (grub_arg_parse): Likewise.
3553         (grub_arg_show_help): Likewise.
3555         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3556         (grub_rescue_unregister_command): Likewise.
3558         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3559         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3560         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3562         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3563         grub_rescue_cmd_initrd.
3564         * include/grub/i386/loader.h: Likewise.
3565         * include/grub/x86_64/loader.h: Likewise.
3567         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3569 2009-03-21  Bean  <bean123ch@gmail.com>
3571         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3572         instead of stat in mingw environment.
3574         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3576         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3578         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3579         AC_CONFIG_LINKS.
3581 2009-03-21  Bean  <bean123ch@gmail.com>
3583         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3584         out of range error.
3586 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3588         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3589         checking inode flags for EXT4_EXTENTS_FLAG.
3591 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3593         * loader/i386/linux.c: Include `<grub/video.h>' and
3594         `<grub/i386/pc/vbe.h>'..
3595         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3596         (grub_linux32_boot): Attempt to configure video settings with
3597         grub_linux_setup_video().
3598         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3599         to avoid grub_console_fini() which would step out of graphical mode
3600         unconditionally.
3602 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3604         Fix build on powerpc.
3605         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3607 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3609         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3610         background image command.
3612 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3614         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3615         (grub_gfxterm_putchar): Extract pairs of identical calls to
3616         draw_cursor out of conditional blocks.
3618 2009-03-11  Pavel Roskin  <proski@gnu.org>
3620         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3621         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3623 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3625         * loader/i386/multiboot_elfxx.c
3626         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3628 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3630         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3631         `kern/handler.c'.
3633 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3635         * loader/i386/multiboot.c (code_size): New variable.
3636         (grub_multiboot): Define offsets by adding to `code_size' rather
3637         than subtracting from `grub_multiboot_payload_size'.  Provide
3638         4-byte alignment to MBI and others by increasing
3639         `boot_loader_name_length' appropriately.
3641         * loader/i386/multiboot_elfxx.c
3642         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3644 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3646         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3647         `fs/ext2.c'.
3649 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3651         Make loader/i386/linux.c usable on i386-pc again.
3653         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3654         memory to heap.
3655         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3656         `#error' stanza.
3658 2009-03-07  Bean  <bean123ch@gmail.com>
3660         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3661         allocation.
3663 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3665         Fix display issue on terminals with screen size other than 80x25
3666         (e.g. gfxterm with resolution higher than 640x480).
3668         * normal/main.c (grub_normal_init_page): Display title text in a
3669         position relative to the center of the terminal instead of relying
3670         on a hardcoded offset.
3672 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3674         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3675         installed.
3677         * Makefile.in (host_kernel): New variable.
3678         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3679         scripts instead of just the windows one.
3680         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3682 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3684         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3685         `kern/handler.c'.
3686         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3687         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3688         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3689         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3690         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3691         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3693 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3695         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3696         or if there's no space for the disk label and print the partition number on a
3697         invalid magic.
3699 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3701         * util/misc.c: Include <time.h>.
3702         (grub_millisleep): New function.
3704 2009-03-04  Bean  <bean123ch@gmail.com>
3706         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3707         another option -mno-red-zone.
3709         * commands/handler.c: Change module description.
3711         * kern/handler.c: Add missing space at the end of description line.
3713         * kern/list.c: Likewise.
3715 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3717         Move more components to the relocation area, and fix mbi pointer
3718         handling to use the destination rather than the origin (thanks to
3719         Vladimir Serbinenko for spotting).
3721         * loader/i386/multiboot.c (mbi_dest): New variable.
3722         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3723         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3724         relocation area.
3726 2009-03-01  Bean  <bean123ch@gmail.com>
3728         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3729         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3730         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3731         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3733         * loader/i386/efi/linux.c (acpi_guid): New variable.
3734         (acpi_guid): Likewise.
3735         (EBDA_SEG_ADDR): New constant.
3736         (LOW_MEM_ADDR): Likewise.
3737         (FAKE_EBDA_SEG): Likewise.
3738         (fake_bios_data): New function.
3739         (grub_linux_boot): Call fake_bios_data.
3741 2009-03-01  Bean  <bean123ch@gmail.com>
3743         * commands/terminal.c: Removed.
3745         * commands/handler.c: New file.
3747         * include/grub/list.h: Likewise.
3749         * include/grub/handler.h: Likewise.
3751         * kern/list.c: Likewise.
3753         * kern/handler.c: Likewise.
3755         * kern/term.h: Include header file <grub/handler.h>.
3756         (grub_term_input): Move next field to the beginning.
3757         (grub_term_output): Likewise.
3758         (grub_term_input_class): New variable.
3759         (grub_term_output_class): Likewise.
3760         (grub_term_register_input): Changed to inline function.
3761         (grub_term_register_output): Likewise.
3762         (grub_term_unregister_input): Likewise.
3763         (grub_term_unregister_output): Likewise.
3764         (grub_term_set_current_input): Likewise.
3765         (grub_term_set_current_output): Likewise.
3766         (grub_term_get_current_input): Likewise.
3767         (grub_term_get_current_output): Likewise.
3768         (grub_term_iterate_input): Removed.
3769         (grub_term_iterate_output): Likewise.
3771         * kern/term.c (grub_term_list_input): Removed.
3772         (grub_term_list_output): Likewise.
3773         (grub_term_input_class): New variable.
3774         (grub_term_output_class): Likewise.
3775         (grub_cur_term_input): Change variable as macro.
3776         (grub_cur_term_output): Likewise.
3777         (grub_term_register_input): Removed.
3778         (grub_term_register_output): Likewise.
3779         (grub_term_unregister_input): Likewise.
3780         (grub_term_unregister_output): Likewise.
3781         (grub_term_set_current_input): Likewise.
3782         (grub_term_set_current_output): Likewise.
3783         (grub_term_iterate_input): Likewise.
3784         (grub_term_iterate_output): Likewise.
3785         (grub_term_get_current_input): Likewise.
3786         (grub_term_get_current_output): Likewise.
3788         * util/grub-editenv.c: Include header file <grub/handler.h>.
3789         (grub_term_get_current_input): Removed.
3790         (grub_term_get_current_output): Likewise.
3791         (grub_term_input_class): New variable.
3792         (grub_term_output_class): Likewise.
3794         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3795         (grub_term_get_current_output): Likewise.
3796         (grub_term_input_class): New variable.
3797         (grub_term_output_class): Likewise.
3799         * util/grub-probe.c (grub_term_get_current_input): Removed.
3800         (grub_term_get_current_output): Likewise.
3801         (grub_term_input_class): New variable.
3802         (grub_term_output_class): Likewise.
3804         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3805         (grub_term_get_current_output): Likewise.
3806         (grub_term_input_class): New variable.
3807         (grub_term_output_class): Likewise.
3809         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3810         (terminal_mod_SOURCES): Likewise.
3811         (terminal_mod_CFLAGS): Likewise.
3812         (terminal_mod_LDFLAGS): Likewise.
3814         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3815         handler.c.
3816         (kernel_img_SOURCES): Add list.c and handler.c.
3817         (kernel_img_HEADERS): Add list.h and handler.h.
3819         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3820         handler.c.
3821         (kernel_mod_SOURCES): Add list.c and handler.c.
3822         (kernel_mod_HEADERS): Add list.h and handler.h.
3824         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3825         handler.c.
3826         (kernel_elf_SOURCES): Add list.c and handler.c.
3827         (kernel_elf_HEADERS): Add list.h and handler.h.
3829         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3830         handler.c.
3831         (kernel_elf_SOURCES): Add list.c and handler.c.
3832         (kernel_elf_HEADERS): Add list.h and handler.h.
3834         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3835         handler.c.
3836         (kernel_mod_SOURCES): Add list.c and handler.c.
3837         (kernel_mod_HEADERS): Add list.h and handler.h.
3839         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3840         handler.c.
3841         (kernel_elf_SOURCES): Add list.c and handler.c.
3842         (kernel_elf_HEADERS): Add list.h and handler.h.
3844 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3846         Factorize elf32 / elf64 code in Multiboot loader.  This will
3847         prevent it from getting out of sync again.
3849         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3850         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3851         grub_multiboot_load_elf64): Move from here ...
3852         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3853         grub_multiboot_load_elf): ... to here (new file).
3855 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3857         * util/grub.d/10_linux.in: Rename "single-user mode" to
3858         "recovery mode".
3860 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3862         Don't leak in SCSI code.
3863         * disk/scsi.c (grub_scsi_close): free `scsi'.
3865 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3867         * loader/i386/pc/multiboot.c: Move from here ...
3868         * loader/i386/multiboot.c: ... to here.  Update all users.
3870 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3872         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3873         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3875 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3877         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3878         b-tree.
3880 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3882         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3883         `0x' qualifier as 0 when base is specified as parameter).
3885 2009-02-24  Bean  <bean123ch@gmail.com>
3887         * configure.ac: Check for -mcmodel=large in x86_64 target.
3889         * include/grub/efi/api.h (efi_call_10): New macro.
3890         (efi_wrap_10): New function.
3892         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3893         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3894         (GRUB_PE32_REL_BASED_LOW): Likewise.
3895         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3896         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3897         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3898         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3899         (GRUB_PE32_REL_BASED_REL): Likewise.
3900         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3901         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3902         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3904         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3905         issue.
3907         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3908         (efi_wrap_10): New function.
3910         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3912         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3913         MB/MBP model (NV chipset).
3914         (devdata_devs): Add devpath_5 to the list.
3916         * load/i386/efi/linux.c (video_base): Remove variable.
3917         (RGB_MASK): New macro.
3918         (RGB_MAGIC): Likewise.
3919         (LINE_MIN): Likewise.
3920         (LINE_MAX): Likewise.
3921         (FBTEST_STEP): Likewise.
3922         (FBTEST_COUNT): Likewise.
3923         (fb_list): New variable.
3924         (grub_find_video_card): Remove function.
3925         (find_framebuf): New function.
3926         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3927         line length.
3929         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3930         problem for x86_64.
3932 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3934         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3936         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3937         coding tool name.
3939 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3941         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3942         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3943         in our relocation, instead of using it directly from heap.  Also
3944         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3946 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3948         Implement USB keyboard support (based on patch by Marco Gerards)
3950         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3951         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3952         (usb_keyboard_mod_LDFLAGS): New variables.
3954         * term/usb_keyboard.c: New file.
3956 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3958         Corrected wrong declaration
3960         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3962 2009-02-14  Christian Franke  <franke@computer.org>
3964         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3965         (grub_lspci_iter): Print class code and programming interface byte.
3967 2009-02-14  Christian Franke  <franke@computer.org>
3969         * gendistlist.sh: Ignore `.svn' directories.
3971 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3973         * fs/fat.c: Add 2009 to Copyright line.
3975 2009-02-14  Christian Franke  <franke@computer.org>
3977         * commands/hdparm.c: New file.  Provides `hdparm' command
3978         which sends ATA commands via grub_disk_ata_pass_through ().
3980         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3982         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3983         and <grub/cpu/io.h> to include/grub/ata.h.
3984         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3985         (GRUB_CDROM_SECTOR_SIZE): Remove.
3986         (GRUB_ATA_*): Move to include/grub/ata.h.
3987         (GRUB_ATAPI_*): Likewise.
3988         (enum grub_ata_commands): Likewise.
3989         (enum grub_ata_timeout_milliseconds): Likewise.
3990         (struct grub_ata_device): Likewise.
3991         (grub_ata_regset): Likewise.
3992         (grub_ata_regget): Likewise.
3993         (grub_ata_regset2): Likewise.
3994         (grub_ata_regget2): Likewise.
3995         (grub_ata_check_ready): Likewise.
3996         (grub_ata_wait_not_busy): Remove static, exported in
3997         include/grub/ata.h.
3998         (grub_ata_wait_drq): Likewise.
3999         (grub_ata_pio_read): Likewise.
4001         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
4002         function for hdparm.mod.
4004         * include/grub/ata.h: New file, contains declarations from
4005         disk/ata.c.
4006         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
4008         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
4009         (grub_disk_ata_pass_through): New exported variable.
4011         * kern/disk.c (grub_disk_ata_pass_through): New variable.
4013 2009-02-13  Colin D Bennett  <colin@gibibit.com>
4015         Support multiple fallback entries, and provide an API to support
4016         executing default+fallback menu entries.  Renamed the `terminal' menu
4017         viewer to `text'.
4019         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
4020         variable declaration.
4021         (grub_menu_execute_callback): New structure declaration.
4022         (grub_menu_execute_callback_t): New typedef.
4023         (grub_menu_execute_with_fallback): New function declaration.
4024         (grub_menu_get_entry): Likewise.
4025         (grub_menu_get_timeout): Likewise.
4026         (grub_menu_set_timeout): Likewise.
4028         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
4030         * normal/menu.c (grub_wait_after_message): Moved to
4031         `normal/menu_text.c'.
4032         (draw_border): Likewise.
4033         (print_message): Likewise.
4034         (print_entry): Likewise.
4035         (print_entries): Likewise.
4036         (grub_menu_init_page): Likewise.
4037         (get_entry_number): Likewise.
4038         (print_timeout): Likewise.
4039         (run_menu): Likewise.
4040         (grub_menu_execute_entry): Likewise.
4041         (show_text_menu): Likewise.
4042         (get_and_remove_first_entry_number): New function.
4043         (grub_menu_execute_with_fallback): Likewise.
4044         (get_entry): Renamed to ...
4045         (grub_menu_get_entry): .. this and made it global.
4046         (get_timeout): Renamed to ...
4047         (grub_menu_get_timeout): ... this and made it global.
4048         (set_timeout): Renamed to ...
4049         (grub_menu_set_timeout): ... this and made it global.
4050         (grub_normal_terminal_menu_viewer): Renamed to ...
4051         (grub_normal_text_menu_viewer): ... this.
4053         * normal/menu_text.c: New file.  Extracted text-menu-specific code
4054         from normal/menu.c.
4056         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
4057         (normal_mod_SOURCES): Likewise.
4059         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4060         (normal_mod_SOURCES): Likewise.
4062         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4063         (normal_mod_SOURCES): Likewise.
4065         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
4066         (normal_mod_SOURCES): Likewise.
4068         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4069         (normal_mod_SOURCES): Likewise.
4071         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4072         (normal_mod_SOURCES): Likewise.
4074         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4075         (normal_mod_SOURCES): Likewise.
4077 2009-02-11  Robert Millan  <rmh@aybabtu.com>
4079         * util/grub.d/00_header.in: Update old reference to `font' command.
4081 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
4083         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
4085         Based on patch from Javier Martín.
4087 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4089         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
4090         to avoid false positives with FAT.
4091         (grub_fstest_SOURCES): Likewise.
4092         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
4093         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4094         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4095         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4096         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4097         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4099 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
4101         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
4102         bpb.version_specific.fat12_or_fat16.fstype and
4103         bpb.version_specific.fat32.fstype.
4105 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4107         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
4109 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4111         * Makefile.in (host_os, host_cpu): New variables.
4112         (target_os): Remove.  Update all users.
4114 2009-02-08  Marco Gerards  <marco@gnu.org>
4116         * Makefile.in (enable_grub_emu_usb): New variable.
4117         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4118         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4119         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4120         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4121         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4122         `usbtest.mod' and `usbms.mod'.
4123         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4124         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4125         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4126         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4127         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4128         variables.
4130         * disk/usbms.c: New file.
4132         * include/grub/usb.h: Likewise.
4134         * include/grub/usbtrans.h: Likewise.
4136         * include/grub/usbdesc.h: Likewise.
4138         * bus/usb/usbtrans.c: Likewise.
4140         * bus/usb/ohci.c: Likewise.
4142         * bus/usb/uhci.c: Likewise.
4144         * bus/usb/usbhub.c: Likewise.
4146         * bus/usb/usb.c: Likewise.
4148         * commands/usbtest.c: Likewise.
4150         * util/usb.c: Likewise.
4152         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4154         * configure.ac: Test for libusb presence.
4156         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4158 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
4160         * kern/mm.c: Add more comments.
4162 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4164         Patch from Javier Martín.
4165         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4166         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4168 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4170         * fs/cpio.c: Split tar functionality to ...
4171         * fs/tar.c: ... here (new file).  Update all users.
4173 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4175         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4176         backward-incompatible features.
4178         Based on patch from Javier Martín, with some adjustments.
4180 2009-02-07  Michael Scherer  <misc@mandriva.org>
4182         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4184 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4186         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4187         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4188         after the RAID stuff.
4190 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4192         Fixes problem when running vbetest command as reported by
4193         Vladimir Serbinenko <phcoder@gmail.com>.
4195         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4197 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4199         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4200         /dev/md/NpN style mdraid devices.
4202 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4204         * util/unifont2pff.rb: Remove.
4206 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4208         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4209         `#'.
4211 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4213         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4214         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4215         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4216         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4217         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4218         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4219         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4221 2009-02-02  Christian Franke  <franke@computer.org>
4223         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4225 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4227         * INSTALL: Note that we now require at least autoconf 2.59 and
4228         that LZO is optional.
4230 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4232         Base on patch on bug #24154 created by Tomas Tintera
4233         <trosos@seznam.cz>.
4235         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4237 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4239         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4240         <bero@arklinux.org>.
4242         * normal/parser.y (script_init): Add missing semicolon.
4244 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4246         * normal/main.c: Add include to grub/menu_viewer.h.
4247         (free_menu_entry_classes): Added.
4248         (grub_normal_menu_addentry): Added class property handling.
4249         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4250         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4252         * normal/menu_viewer.c: New file.
4254         * normal/menu.c (run_menu_entry): Renamed to ...
4255         (grub_menu_execute_entry): ... this and made it as global.
4256         (grub_menu_run): Renamed to ...
4257         (show_text_menu): ... this and made it local.
4258         (show_text_menu): Adapt to new function names.
4259         (grub_normal_terminal_menu_viewer): New global variable.
4261         * include/grub/menu.h: New file.
4263         * include/grub/menu_viewer.h: New file.
4265         * include/grub/normal.h: Added include to grub/menu.h.
4266         (grub_menu_entry): Moved to include/grub/menu.h.
4267         (grub_menu_entry_t): Likewise.
4268         (grub_menu): Likewise.
4269         (grub_menu_t): Likewise.
4270         (grub_normal_terminal_menu_viewer): Added.
4271         (grub_menu_execute_entry): Likewise.
4272         (grub_menu_run): Removed.
4274         * DISTLIST: Added include/grub/menu.h.
4275         Added include/grub/menu_viewer.h.
4276         Added normal/menu_viewer.c.
4278 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4280         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4281         arglist for menutitle arguments.
4283         * normal/main.c (grub_normal_menu_addentry): Likewise.
4285         * normal/parser.y (menuentry): Likewise.
4287         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4289         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4290         (grub_script_create_cmdmenu): Likewise.
4292         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4294         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4295         changes.
4297         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4299         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4301         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4303         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4305         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4307         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4309 2009-01-30  Christian Franke  <franke@computer.org>
4311         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4312         in option help text.
4314 2009-01-27  Pavel Roskin  <proski@gnu.org>
4316         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4318 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4320         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4322         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4324         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4325         unregister function.
4327 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4329         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4331         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4333         * util/grub-mkfont.c (usage): Fix typo.
4335         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4337 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4339         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4341         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4343         * kern/misc.c (grub_strcasecmp): New function.
4344         (grub_strcasecmp): Use grub_size_t instead of int for length.
4345         Fix return value.
4346         * include/grub/misc.h: Update function prototypes.
4348 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4350         * configure.ac: Fix cross-compilation check.
4352 2009-01-22  Christian Franke  <franke@computer.org>
4354         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4355         (precision) digit string.  Allow `.format2' without `format1' (width).
4356         Limit input chars for `%s' output to `format2' if specified.  This is
4357         compatible with standard printf ().
4359 2009-01-22  Christian Franke  <franke@computer.org>
4361         * disk/ata.c (grub_ata_wait_status): Replace by ...
4362         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4363         other status bits may be invalid while BSY is asserted.
4364         (grub_ata_check_ready): New function.
4365         (grub_ata_cmd): Removed.
4366         (grub_ata_wait_drq): New function.
4367         (grub_ata_strncpy): Remove inline.
4368         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4369         and error check now done by grub_ata_wait_drq ().
4370         (grub_ata_pio_write): Likewise.
4371         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4372         grub_ata_wait_drq () to wait for data.
4373         (grub_ata_device_initialize): Add status register check to
4374         detect missing SATA slave devices.  Add debug messages.
4375         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4376         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4377         transfer loop by grub_ata_pio_write ().
4378         (grub_ata_identify): Set DEV before check for !BSY. Use
4379         grub_ata_wait_drq () to wait for data.
4380         (grub_ata_setaddress): Set DEV before check for !BSY.
4381         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4382         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4383         command on (size % batch) == 0.  Add missing error check after write of
4384         last block.  Add debug messages.
4385         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4387 2009-01-19  Christian Franke  <franke@computer.org>
4389         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4390         (GRUB_ATAPI_IREASON_*): Likewise.
4391         (grub_ata_pio_write): Fix timeout error return.
4392         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4393         (grub_atapi_wait_drq): New function.
4394         (grub_atapi_packet): New parameter `size'.
4395         Use grub_atapi_wait_drq () and direct write instead of
4396         grub_ata_pio_write ().
4397         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4398         reads the number of bytes requested by the device for each DRQ
4399         assertion.
4400         (grub_atapi_write): Remove old implementation, return not
4401         implemented instead.
4403 2009-01-19  Christian Franke  <franke@computer.org>
4405         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4406         of 512 to calculate data size.
4407         (grub_scsi_read12): Likewise.
4408         (grub_scsi_write10): Likewise.
4409         (grub_scsi_write12): Likewise.
4410         (grub_scsi_read): Adjust size according to blocksize.
4411         Add checks for invalid blocksize and unaligned transfer.
4413 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4415         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4417         * term/gfxterm.c (write_char): Fix background rendering for wide
4418         width glyphs.
4420 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4422         * config.guess: Update to latest version from config git.
4423         * config.sub: Likewise.
4425 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4427         * Makefile.in: Change font compilation to use new grub-mkfont instead
4428         of java version.
4430         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4431         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4432         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4433         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4434         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4435         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4436         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4437         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4438         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4440 2009-01-16  Christian Franke  <franke@computer.org>
4442         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4443         (enum grub_ata_timeout_milliseconds): New enum.
4444         (grub_ata_wait_status): Add parameter milliseconds.
4445         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4446         recovery from timed-out commands.
4447         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4448         return grub_errno instead of REG_ERROR.
4449         (grub_ata_pio_write): Add parameter milliseconds.
4450         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4451         Pass milliseconds to grub_ata_wait_status () and
4452         grub_ata_pio_read ().
4453         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4454         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4455         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4456         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4457         It is not suitable for device detection, because DEV bit is ignored,
4458         the command may run too long, and not all devices set the signature
4459         properly.
4460         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4461         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4462         Fix device selection, DEV bit must be set first to address the registers
4463         of the correct device.
4464         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4465         grub_ata_pio_read/write ().
4466         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4467         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4469 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4471         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4473 2009-01-13  Bean  <bean123ch@gmail.com>
4475         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4477 2009-01-13  Bean  <bean123ch@gmail.com>
4479         * Makefile.in: (enable_grub_mkfont): New variable.
4480         (freetype_cflags): Likewise.
4481         (freetype_libs): Likewise.
4483         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4484         (grub_mkfont_SOURCES): New variable.
4485         (grub_mkfont_CFLAGS): Likewise.
4486         (grub_mkfont_LDFLAGS): Likewise.
4488         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4489         library if `--enable-grub-mkfont' is requested.
4490         (enable_grub_mkfont): New variable.
4491         (freetype_cflags): Likewise.
4492         (freetype_libs): Likewise.
4494         * util/grub-mkfont.c: New file.
4496 2009-01-12  Christian Franke  <franke@computer.org>
4498         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4499         mode check.  Fix setting of compat_use[].
4501 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4503         Update a few copyright years which we forgot to do in 2008 (only for
4504         files whose changes made in 2008 were copyright-significant)
4506         * Makefile.in: Add 2008 to Copyright line.
4507         * disk/ieee1275/ofdisk.c: Likewise.
4508         * disk/efi/efidisk.c: Likewise.
4509         * kern/dl.c: Likewise.
4510         * kern/sparc64/ieee1275/init.c: Likewise.
4511         * kern/mm.c: Likewise.
4512         * kern/efi/mm.c: Likewise.
4513         * boot/i386/pc/boot.S: Likewise.
4514         * genfslist.sh: Likewise.
4515         * fs/iso9660.c: Likewise.
4516         * fs/hfs.c: Likewise.
4517         * fs/jfs.c: Likewise.
4518         * fs/minix.c: Likewise.
4519         * fs/ufs.c: Likewise.
4520         * gensymlist.sh.in: Likewise.
4521         * genkernsyms.sh.in: Likewise.
4522         * include/grub/misc.h: Likewise.
4523         * include/grub/types.h: Likewise.
4524         * include/grub/symbol.h: Likewise.
4525         * include/grub/elf.h: Likewise.
4526         * include/grub/kernel.h: Likewise.
4527         * include/grub/disk.h: Likewise.
4528         * include/grub/dl.h: Likewise.
4529         * include/grub/i386/linux.h: Likewise.
4530         * include/grub/i386/pc/biosdisk.h: Likewise.
4531         * include/grub/efi/api.h: Likewise.
4532         * include/grub/efi/pe32.h: Likewise.
4533         * include/grub/util/misc.h: Likewise.
4534         * normal/execute.c: Likewise.
4535         * normal/arg.c: Likewise.
4536         * normal/completion.c: Likewise.
4537         * normal/lexer.c: Likewise.
4538         * normal/parser.y: Likewise.
4539         * normal/misc.c: Likewise.
4540         * commands/i386/pc/vbeinfo.c: Likewise.
4541         * commands/hexdump.c: Likewise.
4542         * commands/terminal.c: Likewise.
4543         * commands/ls.c: Likewise.
4544         * commands/help.c: Likewise.
4545         * partmap/pc.c: Likewise.
4546         * loader/efi/chainloader.c: Likewise.
4547         * loader/multiboot_loader.c: Likewise.
4548         * loader/i386/pc/multiboot2.c: Likewise.
4549         * term/efi/console.c: Likewise.
4550         * term/i386/pc/serial.c: Likewise.
4551         * util/lvm.c: Likewise.
4552         * util/console.c: Likewise.
4553         * util/i386/efi/grub-mkimage.c: Likewise.
4554         * util/raid.c: Likewise.
4556 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4558         * commands/videotest.c: Removed include to grub/machine/memory.h.
4560         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4561         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4562         (video_mod_SOURCES): Removed.
4563         (video_mod_CFLAGS): Likewise.
4564         (video_mod_LDFLAGS): Likewise.
4565         (gfxterm_mod_SOURCES): Likewise.
4566         (gfxterm_mod_CFLAGS): Likewise.
4567         (gfxterm_mod_LDFLAGS): Likewise.
4568         (videotest_mod_SOURCES): Likewise.
4569         (videotest_mod_CFLAGS): Likewise.
4570         (videotest_mod_LDFLAGS): Likewise.
4571         (bitmap_mod_SOURCES): Likewise.
4572         (bitmap_mod_CFLAGS): Likewise.
4573         (bitmap_mod_LDFLAGS): Likewise.
4574         (tga_mod_SOURCES): Likewise.
4575         (tga_mod_CFLAGS): Likewise.
4576         (tga_mod_LDFLAGS): Likewise.
4577         (jpeg_mod_SOURCES): Likewise.
4578         (jpeg_mod_CFLAGS): Likewise.
4579         (jpeg_mod_LDFLAGS): Likewise.
4580         (png_mod_SOURCES): Likewise.
4581         (png_mod_CFLAGS): Likewise.
4582         (png_mod_LDFLAGS): Likewise.
4584         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4585         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4586         (video_mod_SOURCES): Added.
4587         (video_mod_CFLAGS): Likewise.
4588         (video_mod_LDFLAGS): Likewise.
4589         (videotest_mod_SOURCES): Likewise.
4590         (videotest_mod_CFLAGS): Likewise.
4591         (videotest_mod_LDFLAGS): Likewise.
4592         (bitmap_mod_SOURCES): Likewise.
4593         (bitmap_mod_CFLAGS): Likewise.
4594         (bitmap_mod_LDFLAGS): Likewise.
4595         (tga_mod_SOURCES): Likewise.
4596         (tga_mod_CFLAGS): Likewise.
4597         (tga_mod_LDFLAGS): Likewise.
4598         (jpeg_mod_SOURCES): Likewise.
4599         (jpeg_mod_CFLAGS): Likewise.
4600         (jpeg_mod_LDFLAGS): Likewise.
4601         (png_mod_SOURCES): Likewise.
4602         (png_mod_CFLAGS): Likewise.
4603         (png_mod_LDFLAGS): Likewise.
4604         (gfxterm_mod_SOURCES): Likewise.
4605         (gfxterm_mod_CFLAGS): Likewise.
4606         (gfxterm_mod_LDFLAGS): Likewise.
4608         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4609         grub/machine/console.h.
4611 2009-01-04  Jerone Young  <jerone@gmail.com>
4613         Make on screen instructions clearer
4615         Based on patch created by Jidanni <jidanni@jidanni.org>
4617         * normal/menu.c: print clearer instructions on the screen
4619 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4621         New font engine.
4623         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4624         build system and fixed gfxterm.c to work with different sized fonts.
4626         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4628         * configure: Re-generated.
4630         * DISTLIST: Removed font/manager.c.
4631         Added font/font.c.
4632         Added font/font_cmd.c.
4634         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4635         compilation.
4637         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4639         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4641         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4643         * normal/menu.c: Likewise.
4645         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4646         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4648         * include/grub/font.h: Replaced with new file.
4650         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4651         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4652         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4653         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4654         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4655         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4656         fg_red, fg_green, fg_blue, fg_alpha.
4657         (grub_video_adapter): Removed blit_glyph.
4658         (grub_video_blit_glyph): Removed.
4660         * font/manager.c: Removed file.
4662         * font/font.c: New file.
4664         * font/font_cmd.c: Likewise.
4666         * video/video.c (grub_video_blit_glyph): Removed.
4668         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4669         (grub_video_vbe_map_rgba): Likewise.
4670         (grub_video_vbe_unmap_color_int): Likewise.
4671         (grub_video_vbe_blit_glyph): Removed.
4672         (grub_video_vbe_adapter): Removed blit_glyph.
4674         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4675         (get_pixel): Likewise.
4676         (set_pixel): Likewise.
4678         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4680         * term/gfxterm.c: Adapted to new font engine.
4682         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4684         * term/i386/pc/vga.c: Likewise.
4686         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4688         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4690         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4692         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4694         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4696         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4698         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4700         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4702         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4704         * util/grub.d/00_header.in: Changed to use new loadfont command.
4706         * util/grub-mkconfig_lib.in: Changed font extension.
4708 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4710         * util/getroot.c (grub_util_get_grub_dev): Add support for
4711         /dev/md/dNNpNN style partitionable mdraid devices.
4713 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4715         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4716         at a time limit of the PXE TFTP API correctly.
4717         (grub_pxefs_close): Likewise.
4719 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4721         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4722         grub_ata_device_initialize() calls.
4724 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4726         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4727         iteration failed.
4728         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4730 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4732         Fix build on powerpc-ieee1275.  Based on patch created by
4733         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4734         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4735         `kern/ieee1275/mmap.c'.
4736         * include/grub/powerpc/ieee1275/memory.h: New file.
4738         Provide grub-install on coreboot.
4739         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4740         (grub_install_SOURCES): New variable.
4741         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4742         usable on coreboot.
4744 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4746         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4747         to `grub_term_input_t'.
4748         (grub_term_get_current_output): Change return type to
4749         `grub_term_output_t'.
4751 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4753         Fix breakage on coreboot due to declaration mismatch.
4754         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4755         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4756         grub_vga_text_cls().
4758         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4759         comments.  Avoid copying one more byte than necessary (just in case).
4761         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4762         to 0x200000 (avoids trouble with some OFW implementations, and matches
4763         with the one in Yaboot).
4764         Reported by Manoel Abranches
4766 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4768         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4769         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4771         * util/grub-mkconfig_lib.in (grub_warn): New function.
4772         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4773         warnings, to obtain consistent formatting.
4774         * util/grub.d/00_header.in: Likewise.
4775         * util/update-grub_lib.in: Likewise.
4777         * loader/i386/linux.c (allocate_pages): Fix a warning.
4778         Move comment text to `#error' stanza.
4780         Harmonize ieee1275's grub_available_iterate() with the generic
4781         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4782         build problem on i386-ieee1275):
4783         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4784         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4785         parameter `type'.  Update all users of this function.
4786         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4787         `kern/ieee1275/mmap.c'.
4788         * kern/ieee1275/init.c
4789         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4790         with ...
4791         (grub_machine_mmap_iterate): ... this.
4792         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4793         return type to `grub_err_t'.  Update all implementations of this
4794         function prototype.
4795         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4796         Likewise.
4798         Add `lsmmap' command (lists firmware-provided memory map):
4799         * commands/lsmmap.c: New file.
4800         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4801         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4802         variables.
4803         * conf/powerpc-ieee1275.rmk: Likewise.
4804         * conf/i386-coreboot.rmk: Likewise.
4805         * conf/i386-ieee1275.rmk: Likewise.
4807 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4809         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4810         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4811         constraints to initrd allocation (based on code from
4812         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4813         for Linux to find it.
4815 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4817         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4818         order to cope with duplicate slashes.
4820 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4822         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4823         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4824         don't want to mess with lower memory, because it is used in the Linux
4825         loader.
4827         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4828         an appropriate place in lower memory, between 0x10000 and 0x90000,
4829         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4830         is in our heap (probably as a result of it being corrupted during
4831         decompression).  Add #error instance with comment to explain why this
4832         loader isn't currently usable on PC/BIOS.
4834 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4836         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4837         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4839 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4841         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4843         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4844         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4845         from here ...
4846         * include/grub/i386/pc/memory.h: ... to here.
4848 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4850         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4851         split).
4853         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4854         (grub_console_cur_color, grub_console_real_putchar)
4855         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4856         (grub_console_setcolorstate, grub_console_setcolor)
4857         (grub_console_getcolor): Move from here ...
4858         * include/grub/i386/vga_common.h: ... to here (new file).
4860         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4861         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4862         `<grub/i386/io.h>'.
4863         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4864         `<grub/i386/vga_common.h>'.
4866 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4868         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4869         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4870         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4871         variables.
4872         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4873         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4875         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4876         grub_console_init() with call to grub_vga_text_init().
4877         (grub_machine_fini): Replace call to
4878         grub_console_fini() with call to grub_vga_text_fini() and
4879         grub_at_keyboard_fini().
4881         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4882         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4883         (grub_console_setcolorstate, grub_console_setcolor)
4884         (grub_console_getcolor): New function prototypes.
4886         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4887         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4888         (grub_vga_text_setcursor): Static-ize.
4889         (grub_vga_text_term): New structure.
4890         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4892         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4893         (grub_console_cur_color, grub_console_standard_color)
4894         (grub_console_normal_color, grub_console_highlight_color)
4895         (map_char, grub_console_putchar, grub_console_getcharwidth)
4896         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4897         (grub_console_getcolor): Move from here ...
4898         * term/i386/vga_common.c: ... to here (same function names).
4900 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4902         Use newly-added Multiboot support in coreboot.
4904         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4905         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4907         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4908         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4909         (codestart): Store the MBI in `startup_multiboot_info' when we're
4910         being loaded using Multiboot.
4912         * kern/i386/coreboot/init.c (grub_machine_init): Move
4913         grub_at_keyboard_init() call to beginning of function (useful for
4914         debugging).  Call grub_machine_mmap_init() before attempting to use
4915         grub_machine_mmap_iterate().
4916         (grub_lower_mem, grub_upper_mem): Move from here ...
4917         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4918         here (new file).
4920         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4921         function prototype.
4923 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4925         Fix a regression introduced by the at_keyboard.mod split.  Because
4926         some terminals are default on some platforms and non-default on
4927         others, the first terminal being registered determines which is
4928         going to be default.
4930         * kern/term.c (grub_term_register_input): If this is the first
4931         terminal being registered, set it as the current one.
4932         (grub_term_register_output): Likewise.
4934         * term/efi/console.c (grub_console_init): Do not call
4935         grub_term_set_current_output() or grub_term_set_current_input().
4936         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4937         * term/i386/pc/console.c (grub_console_init): Likewise.
4938         (grub_console_fini): Do not call grub_term_set_current_input()
4939         (but leave grub_term_set_current_output() to restore text mode).
4941 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4943         * util/grub.d/00_header.in: Add backward compatibility check for
4944         versions of terminal.mod that don't understand `terminal_input' or
4945         `terminal_output'.
4947 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4949         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4950         `terminal_input' / `terminal_output', not `terminal'.
4952 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4954         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4955         (DISTCLEANFILES): Add `build_env.mk'.
4957 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4959         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4960         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4961         members.  Update all users.
4962         * util/console.c (grub_ncurses_term): Split in ...
4963         (grub_ncurses_term_input): ... this, and ...
4964         (grub_ncurses_term_output): ... this.  Update all users.
4965         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4967 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4969         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4970         (PKGDATA): Add $(pkgdata_SRCDIR).
4971         (pkglib_BUILDDIR): New variable.
4972         (pkgdata_SRCDIR): New variable.
4973         (build_env.mk): New target.
4974         (include_DATA): New variable.
4975         (install-local): Install $(include_DATA) files in $(includedir).
4977 2008-11-07  Pavel Roskin  <proski@gnu.org>
4979         * gendistlist.sh: Use C locale for sorting to ensure consistent
4980         output on all systems.
4982         * util/grub.d/00_header.in: Remove incorrect space before
4983         "serial".
4985 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4987         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4988         per specification.
4989         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4990         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4991         (based on find_multi_boot1_header).
4992         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4993         using find_multi_boot2_header(), and abort if neither Multiboot or
4994         Multiboot headers were found.
4996 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4998         Modularize at_keyboard.mod:
5000         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
5001         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
5002         (at_keyboard_mod_LDFLAGS): New variables.
5004         Actual terminal split:
5006         * include/grub/term.h (struct grub_term): Split in ...
5007         (struct grub_term_input): ... this, and ...
5008         (struct grub_term_output): ... this.  Update all users.
5009         (grub_term_set_current): Split in ...
5010         (grub_term_set_current_input): ... this, and ...
5011         (grub_term_set_current_output): ... this.
5012         (grub_term_get_current): Split in ...
5013         (grub_term_get_current_input): ... this, and ...
5014         (grub_term_get_current_output): ... this.
5015         (grub_term_register): Split in ...
5016         (grub_term_register_input): ... this, and ...
5017         (grub_term_register_output): ... this.
5018         (grub_term_unregister): Split in ...
5019         (grub_term_unregister_input): ... this, and ...
5020         (grub_term_unregister_output): ... this.
5021         (grub_term_iterate): Split in ...
5022         (grub_term_iterate_input): ... this, and ...
5023         (grub_term_iterate_output): ... this.
5025         * kern/term.c (grub_term_list): Split in ...
5026         (grub_term_list_input): ... this, and ...
5027         (grub_term_list_output): ... this.  Update all users.
5028         (grub_cur_term): Split in ...
5029         (grub_cur_term_input): ... this, and ...
5030         (grub_cur_term_output): ... this.  Update all users.
5031         (grub_term_set_current): Split in ...
5032         (grub_term_set_current_input): ... this, and ...
5033         (grub_term_set_current_output): ... this.
5034         (grub_term_get_current): Split in ...
5035         (grub_term_get_current_input): ... this, and ...
5036         (grub_term_get_current_output): ... this.
5037         (grub_term_register): Split in ...
5038         (grub_term_register_input): ... this, and ...
5039         (grub_term_register_output): ... this.
5040         (grub_term_unregister): Split in ...
5041         (grub_term_unregister_input): ... this, and ...
5042         (grub_term_unregister_output): ... this.
5043         (grub_term_iterate): Split in ...
5044         (grub_term_iterate_input): ... this, and ...
5045         (grub_term_iterate_output): ... this.
5047         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
5048         a check for input and one for output (and only attempt to get keys
5049         from user when input works).
5051         * util/grub-probe.c (grub_term_get_current): Split in ...
5052         (grub_term_get_current_input): ... this, and ...
5053         (grub_term_get_current_output): ... this.
5054         * util/grub-fstest.c: Likewise.
5055         * util/i386/pc/grub-setup.c: Likewise.
5056         * util/grub-editenv.c: Likewise.
5058         Portability adjustments:
5060         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
5061         `term/i386/pc/at_keyboard.c'.
5062         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
5063         grub_keyboard_controller_init() (now handled by terminal .init).
5064         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
5065         grub_at_keyboard_init().
5066         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
5067         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
5068         at_keyboard.mod via input terminal interface).
5069         * include/grub/i386/coreboot/console.h: Convert into a stub for
5070         `<grub/i386/pc/console.h>'.
5072         Migrate full terminals to new API:
5074         * term/efi/console.c (grub_console_term): Split into ...
5075         (grub_console_term_input): ... this, and ...
5076         (grub_console_term_output): ... this.  Update all users.
5077         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
5078         (grub_ofconsole_init): Split into ...
5079         (grub_ofconsole_init_input): ... this, and ...
5080         (grub_ofconsole_init_output): ... this.
5081         (grub_ofconsole_term): Split into ...
5082         (grub_ofconsole_term_input): ... this, and ...
5083         (grub_ofconsole_term_output): ... this.  Update all users.
5084         * term/i386/pc/serial.c (grub_serial_term): Split into ...
5085         (grub_serial_term_input): ... this, and ...
5086         (grub_serial_term_output): ... this.  Update all users.
5087         * term/i386/pc/console.c (grub_console_term): Split into ...
5088         (grub_console_term_input): ... this, and ...
5089         (grub_console_term_output): ... this.  Update all users.
5090         (grub_console_term_input): Only enable it on PC/BIOS platform.
5091         (grub_console_init): Remove grub_keyboard_controller_init() call.
5093         Migrate input terminals to new API:
5095         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
5096         `i386' and `i386/pc' to enable build on x86_64 (this driver is
5097         i386-specific anyway).
5098         (grub_console_checkkey): Rename to ...
5099         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
5100         users.
5101         (grub_keyboard_controller_orig): New variable.
5102         (grub_console_getkey): Rename to ...
5103         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
5104         users.
5105         (grub_keyboard_controller_init): Static-ize.  Save original
5106         controller value so that it can be restored ...
5107         (grub_keyboard_controller_fini): ... here (new function).
5108         (grub_at_keyboard_term): New structure.
5109         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5110         functions.
5112         Migrate output terminals to new API:
5114         * term/i386/pc/vga.c (grub_vga_term): Change type to
5115         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5116         members.  Update all users.
5117         * term/gfxterm.c (grub_video_term): Change type to
5118         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5119         members.  Update all users.
5120         * include/grub/i386/pc/console.h (grub_console_checkkey)
5121         (grub_console_getkey): Do not export (no longer needed by gfxterm,
5122         etc).
5124         Migrate `terminal' command and userland tools to new API:
5126         * commands/terminal.c (grub_cmd_terminal): Split into ...
5127         (grub_cmd_terminal_input): ... this, and ...
5128         (grub_cmd_terminal_output): ... this.
5129         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5130         `terminal_input' and `terminal_output'.
5131         * util/grub.d/00_header.in: Adjust `terminal' calls to new
5132         `terminal_input' / `terminal_output' API.
5133         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5134         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5135         provided ${GRUB_TERMINAL}, convert it).
5137 2008-11-04  Robert Millan  <rmh@aybabtu.com>
5139         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
5140         for FreeBSD.
5141         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5143 2008-11-03  Bean  <bean123ch@gmail.com>
5145         * kern/elf.c (grub_elf32_load): Revert to previous code.
5146         (grub_elf64_load): Likewise.
5148         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5150 2008-11-01  Robert Millan  <rmh@aybabtu.com>
5152         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5153         (TARGET_CPPFLAGS): Likewise.
5154         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5156 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
5158         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5160 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5162         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5163         addition of objects until the code is not going to be able to fail.
5165 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5167         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5168         (add a missing NULL check, and correct them by moving the pointer
5169         operations after the actual check).
5171 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5173         * util/i386/pc/grub-install.in: Handle empty string as output from
5174         make_system_path_relative_to_its_root().
5176 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5178         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5179         circular metadata worst case scenario. If the metadata is circular
5180         then copy the wrap in place.
5181         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5182         project lib/format_text/layout.h
5183         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5185 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5187         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5189 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5191         * util/update-grub_lib.in: Mention filename in warning message.
5193 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5195         * NEWS: Update for rename of update-grub to grub-mkconfig.
5197 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5199         * util/update-grub_lib.in: Copy to ...
5200         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5201         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5202         * util/update-grub.in: Rename to ...
5203         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5204         option. Add `--output' option to allow users to specify the generated
5205         configuration file.  Default to stdout.
5206         (update_grub_dir): Rename to ...
5207         (grub_mkconfig_dir): ... this.
5208         (grub_cfg): Default to an empty string.
5209         * conf/common.rmk (update-grub): Rename to ...
5210         (grub-mkconfig): ... this.
5211         (update-grub_lib): Copy to ...
5212         (grub-mkconfig_lib): ... this.
5213         (update-grub_SCRIPTS): Copy to ...
5214         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5215         (update-grub_DATA): Rename to ...
5216         (grub-mkconfig_DATA): ... this.
5218 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5220         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5221         to `modified'.  Add the real `created' field.
5222         (grub_iso9660_uuid): Use `modified' rather than `created' for
5223         constructing the UUID.
5225 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5227         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5228         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5230 2008-09-28  Bean  <bean123ch@gmail.com>
5232         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5233         Thanks to Christian Franke for finding this bug.
5235 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5237         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5238         instances of grub_util_get_disk_name() (see previous commit).
5240 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5242         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5243         `util/i386/get_disk_name.c'.
5244         * conf/i386-efi.rmk: Likewise.
5245         * conf/x86_64-efi.rmk: Likewise.
5246         * conf/i386-coreboot.rmk: Likewise.
5247         * conf/i386-ieee1275.rmk: Likewise.
5248         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5249         `util/ieee1275/get_disk_name.c'.
5250         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5251         * util/ieee1275/get_disk_name.c: Remove file.
5252         * util/i386/get_disk_name.c: Remove file.
5253         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5254         "hd%d" for device.map entries, rather than using
5255         grub_util_get_disk_name().
5257 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5259         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5260         warning.
5261         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5263 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5265         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5266         Changed to 0x5100.
5267         (GRUB_TERM_PPAGE): Changed to 0x4900.
5269 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5271         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5272         macros (they were i386-pc specific).
5273         * include/grub/sparc64/ieee1275/console.h: Likewise.
5274         * include/grub/efi/console.h: Likewise.
5276 2008-09-22  Bean  <bean123ch@gmail.com>
5278         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5279         resident and in attribute list.
5281         * include/grub/ntfs.h (BMP_LEN): Removed.
5283 2008-09-22  Bean  <bean123ch@gmail.com>
5285         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5286         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5288         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5289         error occurs, as grub_disk_open will call grub_disk_close, which will
5290         call p->close (scsi).
5292 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5294         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5295         (AC_PREREQ): Bumped to 2.59.
5296         (AC_TRY_COMPILE): Replace obsolete macro with ...
5297         (AC_COMPILE_IFELSE): ... this.
5298         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5299         (AC_LINK_IFELSE): ... this.
5301 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5303         * autogen.sh: Add a call to `gendistlist.sh'.
5305 2008-09-19  Christian Franke  <franke@computer.org>
5307         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5308         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5309         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5310         Export __enable_execute_stack() to modules.
5311         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5312         New function.
5314 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5316         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5317         Sort the list.
5319 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5321         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5322         #include <grub/util/hostdisk.h>.
5324 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5326         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5327         segments when their filesz is zero (grub_file_read() interprets
5328         zero-size as "read until EOF", which results in memory corruption).
5329         Use `lowest_segment' rather than 0 for calculating the current
5330         segment load address.
5332 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5334         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5335         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5336         clobbered useful information.
5338 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5340         * include/grub/util/biosdisk.h: Move to ...
5341         * include/grub/util/hostdisk.h: ... here.  Update all users.
5342         * util/biosdisk.c: Move to ...
5343         * util/hostdisk.c: ... here.  Update all users.
5345 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5347         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5348         variables.
5349         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5350         and length can be stored directly in the `mbi->mmap_addr' and
5351         `mbi->mmap_length' struct fields.
5353 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5355         * conf/i386.rmk: New file.  Provides declaration for building
5356         `cpuid.mod'.
5357         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5358         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5359         variables.
5360         Include `conf/i386.mk'.
5361         * conf/i386-efi.rmk: Likewise.
5362         * conf/x86_64-efi.rmk: Likewise.
5363         * conf/i386-coreboot.rmk: Likewise.
5364         * conf/i386-ieee1275.rmk: Likewise.
5366 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5368         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5369         Adds optimization support for BGR based modes.
5371         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5372         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5373         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5374         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5375         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5376         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5377         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5378         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5379         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5380         (grub_video_i386_vbeblit_index_index): Likewise.
5381         (grub_video_i386_vbeblit_replace_directN): Added.
5382         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5383         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5384         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5385         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5386         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5387         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5388         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5389         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5390         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5391         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5392         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5393         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5394         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5396         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5397         (grub_video_i386_vbefill_R8G8B8): Likewise.
5398         (grub_video_i386_vbefill_index): Likewise.
5399         (grub_video_i386_vbefill_direct32): Added.
5400         (grub_video_i386_vbefill_direct24): Likewise.
5401         (grub_video_i386_vbefill_direct16): Likewise.
5402         (grub_video_i386_vbefill_direct8): Likewise.
5404         * include/grub/video.h (grub_video_blit_format): Removed
5405         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5406         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5407         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5408         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5409         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5411         * video/video.c (grub_video_get_blit_format): Updated to use new
5412         blit formats.  Added handling for 16 bit color modes.
5414         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5415         fillers.
5416         (common_blitter): Updated to use new blitters.
5418         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5419         Removed.
5420         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5421         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5422         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5423         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5424         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5425         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5426         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5427         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5428         (grub_video_i386_vbeblit_index_index): Likewise.
5429         (grub_video_i386_vbeblit_replace_directN): Added.
5430         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5431         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5432         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5433         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5434         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5435         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5436         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5437         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5438         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5439         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5440         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5441         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5442         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5444         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5445         (grub_video_i386_vbefill_R8G8B8): Likewise.
5446         (grub_video_i386_vbefill_index): Likewise.
5447         (grub_video_i386_vbefill_direct32): Added.
5448         (grub_video_i386_vbefill_direct24): Likewise.
5449         (grub_video_i386_vbefill_direct16): Likewise.
5450         (grub_video_i386_vbefill_direct8): Likewise.
5452         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5453         types.
5455         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5456         types.
5458         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5459         blitter types.
5461         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5462         types.
5464 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5466         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5467         RAID level 1.
5469 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5471         * fs/iso9660.c (grub_iso9660_date): New structure.
5472         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5473         (grub_iso9660_uuid): New function.
5475 2008-09-05  Bean  <bean123ch@gmail.com>
5477         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5479         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5480         insensitive bit for names in Win32 and Win32 & DOS namespace.
5482         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5484         * include/grub/types.h (LONG_MAX): Likewise.
5486 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5488         * util/getroot.c: Include <config.h>.
5489         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5490         add support for /dev/md/N devices and handle LVM double dash escaping.
5492 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5494         * config.guess: Update to latest version from config git.
5495         * config.sub: Likewise.
5497 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5499         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5500         `disk->total_sectors'.
5502 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5504         * include/grub/normal.h: Fixed incorrect comment for
5505         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5507 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5509         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5510         values with defines.
5512         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5513         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5514         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5515         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5516         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5517         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5518         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5519         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5520         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5521         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5522         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5523         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5524         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5525         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5526         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5527         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5528         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5529         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5530         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5532 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5534         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5535         declaration.
5536         (grub_multiboot): Fix a few warnings.
5538 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5540         * loader/i386/pc/multiboot.c: Update comment not to say that
5541         boot_device support is unimplemented.
5543 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5545         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5546         or memory map support are unimplemented.
5548 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5550         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5552 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5554         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5555         total video memory in 'vbeinfo' output; show color format details for
5556         each video mode.
5558 2008-08-30  Pavel Roskin  <proski@gnu.org>
5560         * util/genmoddep.c: Remove for real this time.
5561         * DISTLIST: Remove util/genmoddep.c.
5563 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5565         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5566         as required by Multiboot spec (it was already 4-byte aligned, but
5567         only by chance).
5569 2008-08-29  Pavel Roskin  <proski@gnu.org>
5571         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5572         * kern/powerpc/ieee1275/startup.S: ... this.
5573         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5574         * DISTLIST: Likewise.
5576         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5577         grub/cpu/kernel.h.  Add start label for consistency with other
5578         platforms.  Add grub_prefix immediately after start.  Add jump
5579         to the code after grub_prefix.
5580         * include/grub/powerpc/kernel.h: Provide valid values for
5581         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5583 2008-08-29  Bean  <bean123ch@gmail.com>
5585         * configure.ac: Change host_os to cygwin for mingw.
5586         (asprintf): New check for function.
5588         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5589         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5591         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5592         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5593         sync, sleep and grub_util_get_disk_size for mingw.
5595         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5596         to get size in mingw.
5597         (open_device): Use flag O_BINARY if it's defined.
5598         (find_root_device): Add dummy code for mingw.
5600         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5601         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5602         (get_scsi_disk_name): Return 0 for mingw.
5604         * util/hostfs.c: #include <grub/util/misc.h>.
5605         (grub_hostfs_open): Use "rb" flag to open file, use
5606         grub_util_get_disk_size to get disk size for mingw.
5608         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5609         (asprintf): New function if HAVE_ASPRINTF is not set.
5610         (sync): New function for mingw.
5611         (sleep): Likewise.
5612         (grub_util_get_disk_size): Likewise.
5614 2008-08-28  Pavel Roskin  <proski@gnu.org>
5616         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5617         kern/time.c.
5619 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5621         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5623 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5625         Change find_grub_drive() syntax so it doesn't prevent it from
5626         detecting NULL names as errors.
5628         * util/biosdisk.c (find_grub_drive): Move free slot search code
5629         from here ...
5630         (find_free_slot): ... to here.
5631         (read_device_map): Use find_free_slot() to search for free slots.
5633 2008-08-27  Marco Gerards  <marco@gnu.org>
5635         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5636         (scsi_mod_SOURCES): New variable.
5637         (scsi_mod_CFLAGS): Likewise
5638         (scsi_mod_LDFLAGS): Likewise.
5640         * disk/scsi.c: New file.
5642         * include/grub/scsi.h: Likewise.
5644         * include/grub/scsicmd.h: Likewise.
5646         * disk/ata.c: Include <grub/scsi.h>.
5647         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5648         instead.
5649         (grub_ata_iterate): Skip ATAPI devices.
5650         (grub_ata_open): Only handle ATAPI devices.
5651         (struct grub_atapi_read): Removed.
5652         (grub_atapi_readsector): Likewise.
5653         (grub_ata_read): No longer handle ATAPI devices.
5654         (grub_ata_write): Likewise.
5655         (grub_atapi_iterate): New function.
5656         (grub_atapi_read): Likewise.
5657         (grub_atapi_write): Likewise.
5658         (grub_atapi_open): Likewise.
5659         (grub_atapi_close): Likewise.
5660         (grub_atapi_dev): New variable.
5661         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5662         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5664         * include/grub/disk.h (enum grub_disk_dev_id): Add
5665         `GRUB_DISK_DEVICE_SCSI_ID'.
5667 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5669         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5670         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5671         descriptive.
5673 2008-08-23  Bean  <bean123ch@gmail.com>
5675         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5676         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5677         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5678         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5679         dm_nv.mod.
5680         (raid5rec_mod_SOURCES): New macro.
5681         (raid5rec_mod_CFLAGS): Likewise.
5682         (raid5rec_mod_LDFLAGS): Likewise.
5683         (raid6rec_mod_SOURCES): Likewise.
5684         (raid6rec_mod_CFLAGS): Likewise.
5685         (raid6rec_mod_LDFLAGS): Likewise.
5686         (mdraid_mod_SOURCES): Likewise.
5687         (mdraid_mod_CFLAGS): Likewise.
5688         (mdraid_mod_LDFLAGS): Likewise.
5689         (dm_nv_mod_SOURCES): Likewise.
5690         (dm_nv_mod_CFLAGS): Likewise.
5691         (dm_nv_mod_LDFLAGS): Likewise.
5693         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5694         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5695         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5697         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5698         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5700         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5702         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5704         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5706         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5708         * disk/raid5_recover.c: New file.
5710         * disk/raid6_recover.c: Likewise.
5712         * disk/mdraid_linux.c: Likewise.
5714         * disk/dmraid_nvidia.c: Likewise.
5716         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5717         ULONG_MAX.
5719         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5720         calculate the size of raid device.
5721         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5722         different layout of raid5.
5723         (grub_raid_scan_device): Remove code specific to mdraid.
5724         (grub_raid_list): New variable.
5725         (free_array): New function.
5726         (grub_raid_register): Likewise.
5727         (grub_raid_unregister): Likewise.
5728         (grub_raid_rescan): Likewise.
5729         (GRUB_MOD_INIT): Don't iterate device here.
5730         (GRUB_MOD_FINI): Use free_array to release resource.
5732         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5733         (grub_raid5_recover_func_t): New function variable type.
5734         (grub_raid6_recover_func_t): Likewise.
5735         (grub_raid5_recover_func): New variable.
5736         (grub_raid6_recover_func): Likewise.
5737         (grub_raid_register): New function.
5738         (grub_raid_unregister): Likewise.
5739         (grub_raid_rescan): Likewise.
5740         (grub_raid_block_xor): Likewise.
5742         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5743         (CMD_CRC): New macro.
5744         (part): Removed.
5745         (read_file): Handle device as well as file.
5746         (cmd_crc): New function.
5747         (fstest): Handle multiple disks.
5748         (options): Remove part, raw and long, add root and diskcount.
5749         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5750         (main): Find the first non option entry and ignore subsequent options,
5751         add handling for the new options, support multiple disks.
5753         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5755 2008-08-23  Bean  <bean123ch@gmail.com>
5757         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5759         * genfslist.sh: Ignore kernel.mod.
5761         * genpartmaplist.sh: Likewise.
5763 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5765         * util/getroot.c (find_root_device): Skip anything that starts with
5766         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5768 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5770         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5771         * util/grub.d/00_header.in: Allow the administrator to change default
5772         gfxmode via ${GRUB_GFXMODE}.
5774 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5776         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5778 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5780         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5781         loader.
5782         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5783         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5785 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5787         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5788         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5790 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5792         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5793         (struct grub_virtual_screen): Remove `cursor_color'.
5794         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5795         initialization.
5796         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5798 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5800         Unify (identical) linux_normal.c files.
5801         * loader/i386/efi/linux_normal.c: Move from here ...
5802         * loader/linux_normal.c: ... to here.  Update all users.
5803         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5804         * loader/i386/ieee1275/linux_normal.c: Likewise.
5806 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5808         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5809         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5810         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5811         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5812         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5813         New macros.
5814         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5815         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5816         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5817         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5818         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5819         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5820         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5821         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5822         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5823         portably using grub_getxy().
5824         Replace `-EFI' with `-bzImage' in boot message.
5826 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5828         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5830 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5832         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5834         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5835         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5836         (grub_machine_mmap_iterate): New function declaration.
5837         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5838         structure.
5839         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5840         macros.
5842         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5843         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5844         Move e820 parsing from here ...
5845         * kern/i386/pc/mmap.c: New file.
5846         (grub_machine_mmap_iterate): ... to here.
5848         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5849         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5850         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5851         (grub_available_iterate): Redeclare to return `void', and redeclare
5852         its hook to use grub_uint64_t as addr and size parameters, and rename
5853         to ...
5854         (grub_machine_mmap_iterate): ... this.  Update all users.
5856         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5857         to make it more readable.  Rename to ...
5858         (grub_machine_mmap_iterate): ... this.
5860         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5861         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5862         (grub_multiboot): Allocate an extra region after the payload, and fill
5863         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5864         with the extra space.
5865         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5866         with the extra space.
5868 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5870         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5872 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5874         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5875         mdate-sh to the list `find' searches for.
5876         * DISTLIST: Regenerated.
5878 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5880         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5881         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5882         genmoddep.awk, gensymlist.sh.in.
5883         (DISTDIRS): Add bus, docs, hook, lib.
5884         * DISTLIST: Regenerated.
5885         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5887 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5889         * disk/raid.c (grub_raid_init): Handle/report errors set by
5890         grub_device_iterate().
5891         * disk/lvm.c (grub_lvm_init): Likewise.
5893 2008-08-15  Bean  <bean123ch@gmail.com>
5895         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5896         and datehook.mod.
5897         (datetime_mod_SOURCES): New macro.
5898         (datetime_mod_CFLAGS): Likewise.
5899         (datetime_mod_LDFLAGS): Likewise.
5900         (date_mod_SOURCES): Likewise.
5901         (date_mod_CFLAGS): Likewise.
5902         (date_mod_LDFLAGS): Likewise.
5903         (datehook_mod_SOURCES): Likewise.
5904         (datehook_mod_CFLAGS): Likewise.
5905         (datehook_mod_LDFLAGS): Likewise.
5907         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5908         and datehook.mod.
5909         (datetime_mod_SOURCES): New macro.
5910         (datetime_mod_CFLAGS): Likewise.
5911         (datetime_mod_LDFLAGS): Likewise.
5912         (date_mod_SOURCES): Likewise.
5913         (date_mod_CFLAGS): Likewise.
5914         (date_mod_LDFLAGS): Likewise.
5915         (datehook_mod_SOURCES): Likewise.
5916         (datehook_mod_CFLAGS): Likewise.
5917         (datehook_mod_LDFLAGS): Likewise.
5919         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5920         and datehook.mod.
5921         (datetime_mod_SOURCES): New macro.
5922         (datetime_mod_CFLAGS): Likewise.
5923         (datetime_mod_LDFLAGS): Likewise.
5924         (date_mod_SOURCES): Likewise.
5925         (date_mod_CFLAGS): Likewise.
5926         (date_mod_LDFLAGS): Likewise.
5927         (datehook_mod_SOURCES): Likewise.
5928         (datehook_mod_CFLAGS): Likewise.
5929         (datehook_mod_LDFLAGS): Likewise.
5931         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5932         and datehook.mod.
5933         (datetime_mod_SOURCES): New macro.
5934         (datetime_mod_CFLAGS): Likewise.
5935         (datetime_mod_LDFLAGS): Likewise.
5936         (date_mod_SOURCES): Likewise.
5937         (date_mod_CFLAGS): Likewise.
5938         (date_mod_LDFLAGS): Likewise.
5939         (datehook_mod_SOURCES): Likewise.
5940         (datehook_mod_CFLAGS): Likewise.
5941         (datehook_mod_LDFLAGS): Likewise.
5943         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5944         and datehook.mod.
5945         (datetime_mod_SOURCES): New macro.
5946         (datetime_mod_CFLAGS): Likewise.
5947         (datetime_mod_LDFLAGS): Likewise.
5948         (date_mod_SOURCES): Likewise.
5949         (date_mod_CFLAGS): Likewise.
5950         (date_mod_LDFLAGS): Likewise.
5951         (datehook_mod_SOURCES): Likewise.
5952         (datehook_mod_CFLAGS): Likewise.
5953         (datehook_mod_LDFLAGS): Likewise.
5955         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5957         * commands/date.c: New file.
5959         * hook/datehook.c: Likewise.
5961         * include/grub/lib/datetime.h: Likewise.
5963         * include/grub/i386/cmos.h: Likewise.
5965         * lib/datetime.c: Likewise.
5967         * lib/i386/datetime.c: Likewise.
5969         * lib/efi/datetime.c: Likewise.
5971 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5973         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5974         (grub_mkelfimage_SOURCES): New variable.
5975         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5977         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5978         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5979         * conf/powerpc-ieee1275.rmk: Likewise.
5980         * conf/i386-ieee1275.rmk: Likewise.
5982         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5983         * kern/i386/coreboot/init.c: Likewise.
5985         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5986         with `<grub/cpu/kernel.h>'.
5987         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5988         to ...
5989         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5990         * kern/i386/coreboot/startup.S: Likewise.
5992         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5993         (GRUB_MOD_GAP): Remove.
5994         * include/grub/powerpc/kernel.h: New file.
5995         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5996         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5997         * include/grub/i386/kernel.h: New file.
5998         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5999         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
6000         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
6002         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
6003         `grub-mkelfimage'.
6004         Use --directory when invoking grub_mkimage.
6006         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
6007         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
6008         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
6009         and GRUB_KERNEL_CPU_PREFIX.
6011 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
6013         * include/grub/err.h (grub_err_printf): New function prototype.
6014         * util/misc.c (grub_err_printf): New function.
6015         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
6016         grub_printf.
6017         * kern/err.c (grub_print_error): Use grub_err_printf.
6019 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6021         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
6023 2008-08-13  Robert Millan  <rmh@aybabtu.com>
6025         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
6026         boot entry.
6028 2008-08-12  Robert Millan  <rmh@aybabtu.com>
6030         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
6031         of the relocation code from here ...
6032         (grub_multiboot): ... to here.
6033         (forward_relocator, backward_relocator): Move from here ...
6034         * kern/i386/loader.S (grub_multiboot_forward_relocator)
6035         (grub_multiboot_backward_relocator): ... to here.
6036         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
6037         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
6038         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
6039         (grub_multiboot_forward_relocator_end)
6040         (grub_multiboot_backward_relocator)
6041         (grub_multiboot_backward_relocator_end): New variables.
6043 2008-08-12  Bean  <bean123ch@gmail.com>
6045         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
6047 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6049         * kern/i386/linuxbios/startup.S: Move from here ...
6050         * kern/i386/coreboot/startup.S: ... to here.
6052         * kern/i386/linuxbios/init.c: Move from here ...
6053         * kern/i386/coreboot/init.c: ... to here.
6055         * kern/i386/linuxbios/table.c: Move from here ...
6056         * kern/i386/coreboot/mmap.c: ... to here.
6058         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
6060 2008-08-11  Robert Millan  <rmh@aybabtu.com>
6062         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
6063         errors.  Leave it to the upper layer to handle them.
6065 2008-08-09  Christian Franke  <franke@computer.org>
6067         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
6068         * conf/common.rmk: Install `grub-pe2elf' only if requested.
6069         Install `grub.d/10_windows' only on Cygwin.
6070         * configure.ac: Add subst of `target_os'.
6071         Check `target_os' also before setting TARGET_OBJ2ELF.
6072         Add `--enable-grub-pe2elf'.
6074 2008-08-08  Robert Millan  <rmh@aybabtu.com>
6076         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6077         (grub_last_time): Change type to grub_uint64_t.
6078         (grub_disk_open): Migrate code from to using grub_get_time_ms().
6079         (grub_disk_close): Likewise.
6081         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
6082         (run_menu): Migrate code from to using grub_get_time_ms().
6084         * util/misc.c (grub_get_time_ms): New function.
6086 2008-08-08  Marco Gerards  <marco@gnu.org>
6088         * disk/ata.c (grub_ata_regget): Change return type to
6089         `grub_uint8_t'.
6090         (grub_ata_regget2): Likewise.
6091         (grub_ata_wait_status): New function.
6092         (grub_ata_wait_busy): Removed function, updated all users to use
6093         `grub_ata_wait_status'.
6094         (grub_ata_wait_drq): Likewise.
6095         (grub_ata_cmd): New function.
6096         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
6097         error handling.
6098         (grub_ata_pio_write): Add error handling.
6099         (grub_atapi_identify): Likewise.
6100         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
6101         handling.
6102         (grub_ata_identify): Use `grub_ata_cmd' and improve error
6103         handling.  Actually use the detected registers.  Reorder the
6104         detection logic such that it is easier to read.
6105         (grub_ata_pciinit): Do not assign the same ID to each controller.
6106         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
6107         handling.
6108         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6110         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6112 2008-08-08  Marco Gerards  <marco@gnu.org>
6114         * NEWS: Update.
6116 2008-08-07  Bean  <bean123ch@gmail.com>
6118         * include/grub/x86_64/pci.h: New file.
6120 2008-08-07  Christian Franke  <franke@computer.org>
6122         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6123         (TIMER2_GATE): Likewise.
6124         (grub_pit_wait): Add enable/disable of the timer2 gate
6125         bit of port 0x61.  This fixes a possible infinite loop.
6127 2008-08-07  Bean  <bean123ch@gmail.com>
6129         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6130         kern/i386/tsc.c and kern/i386/pit.c.
6132         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6133         x86_64 platform.
6135         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6136         <grub/i386/tsc.h>.
6138         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6140 2008-08-07  Bean  <bean123ch@gmail.com>
6142         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6144         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6146         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6147         multiple inclusion. Add #include <grub/types.h>.
6149 2008-08-06  Christian Franke  <franke@computer.org>
6151         * conf/common.rmk: Build and install `10_windows'.
6152         * util/grub.d/10_windows.in: New script.
6154 2008-08-06  Pavel Roskin  <proski@gnu.org>
6156         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6158 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6160         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6161         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6163 2008-08-06  Bean  <bean123ch@gmail.com>
6165         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6166         (grub_pxefs_fs_int): Remove dummy definition.
6167         (grub_pxefs_open): Use data->block_size to store the current block
6168         size setting.
6169         (grub_pxefs_read): Use block size stored in data->block_size. As the
6170         value of grub_pxe_blksize can be changed after the file is opened.
6172 2008-08-06  Bean  <bean123ch@gmail.com>
6174         * fs/i386/pc/pxe.c (curr_file): new variable.
6175         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6176         require the dummy internal file system anymore.
6177         (grub_pxefs_read): Removed.
6178         (grub_pxefs_close): Likewise.
6179         (grub_pxefs_fs_int): Likewise.
6180         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6181         connection when we switch file.
6182         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6184 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6186         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6187         `halt.mod'.
6188         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6189         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6191         * kern/i386/halt.c: New file.
6192         * kern/i386/reboot.c: Likewise.
6193         * include/grub/i386/reboot.h: Likewise.
6194         * include/grub/i386/halt.h: Likewise.
6196         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6197         Include `<grub/cpu/halt.h>'.
6198         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6199         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6201         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6202         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6203         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6204         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6205         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6206         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6207         from here ...
6208         * include/grub/i386/at_keyboard.h: ... to here.
6210 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6212         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6213         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6214         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6215         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6216         `kern/generic/millisleep.c'.
6218         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6219         instead of grub_get_rtc().
6220         (grub_tsc_init): Initialize `tsc_boot_time'.
6222         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6223         (grub_machine_init): Use grub_tsc_init() rather than
6224         installing an RTC-based handler via grub_install_get_time_ms().
6226         * kern/i386/pit.c: New file.
6227         * include/grub/i386/pit.h: Likewise.
6229 2008-08-05  Bean  <bean123ch@gmail.com>
6231         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6233         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6234         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6235         (pxe_mod_SOURCES): New macro.
6236         (pxe_mod_CFLAGS): Likewise.
6237         (pxe_mod_LDFLAGS): Likewise.
6238         (pxecmd_mod_SOURCES): Likewise.
6239         (pxecmd_mod_CFLAGS): Likewise.
6240         (pxecmd_mod_LDFLAGS): Likewise.
6242         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6243         (grub_pxe_call): Likewise.
6245         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6247         * commands/i386/pc/pxecmd.c: New file.
6249         * fs/i386/pc/pxe.c: Likewise.
6251         * include/grub/i386/pc/pxe.h: Likewise.
6253 2008-08-05  Bean  <bean123ch@gmail.com>
6255         * util/console.c (grub_console_cur_color): New variable.
6256         (grub_console_standard_color): Likewise.
6257         (grub_console_normal_color): Likewise.
6258         (grub_console_highlight_color): Likewise.
6259         (color_map): Likewise.
6260         (use_color): Likewise.
6261         (NUM_COLORS): New macro.
6262         (grub_ncurses_setcolorstate): Handle color properly.
6263         (grub_ncurses_setcolor): Don't change color here, just remember the
6264         settings, color will be set in grub_ncurses_setcolorstate.
6265         (grub_ncurses_getcolor): New function.
6266         (grub_ncurses_init): Initialize color pairs.
6267         (grub_ncurses_term): New member grub_ncurses_getcolor.
6269 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6271         High resolution timer support.  Implemented for x86 CPUs using TSC.
6272         Extracted generic grub_millisleep() so it's linked in only as needed.
6273         This requires a Pentium compatible CPU; if the RDTSC instruction is
6274         not supported, then it falls back on the generic grub_get_time_ms()
6275         implementation that uses the machine's RTC.
6277         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6278         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6279         `kern/generic/millisleep.c'.
6281         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6282         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6284         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6285         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6287         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6289         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6290         `kern/generic/millisleep.c'.
6292         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6294         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6296         * kern/generic/rtc_get_time_ms.c: New file.
6298         * kern/generic/millisleep.c: New file.
6300         * kern/misc.c: Don't include
6301         <kern/time.h> anymore.
6302         (grub_millisleep_generic): Removed.
6304         * commands/sleep.c (grub_interruptible_millisleep): Uses
6305         grub_get_time_ms() instead of grub_get_rtc().
6307         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6308         function.
6309         (grub_cpu_is_cpuid_supported): New inline function.
6310         (grub_cpu_is_tsc_supported): New inline function.
6311         (grub_tsc_init): New function prototype.
6312         (grub_tsc_get_time_ms): New function prototype.
6314         * kern/i386/tsc.c (grub_get_time_ms): New file.
6316         * include/grub/time.h: Include <grub/types.h.
6317         (grub_millisleep_generic): Removed.
6318         (grub_get_time_ms): New prototype.
6319         (grub_install_get_time_ms): New prototype.
6320         (grub_rtc_get_time_ms): New prototype.
6322         * kern/time.c (grub_get_time_ms): New function.
6323         (grub_install_get_time_ms): New function.
6325         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6326         <grub/time.h> anymore.
6327         (grub_millisleep): Removed.
6328         (grub_machine_init): Call grub_tsc_init.
6330         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6331         get_time_ms() implementation.
6333         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6334         (ieee1275_get_time_ms): New function.
6335         (grub_machine_init): Install get_time_ms() implementation.
6337         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6338         (grub_machine_init): Call grub_tsc_init().
6339         (grub_millisleep): Removed.
6341         * kern/ieee1275/init.c (grub_millisleep): Removed.
6342         (grub_machine_init): Install ieee1275_get_time_ms()
6343         implementation.
6344         (ieee1275_get_time_ms): New function.
6345         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6346         real work.
6348 2008-08-05  Marco Gerards  <marco@gnu.org>
6350         * disk/ata.c: Include <grub/pci.h>.
6351         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6352         (grub_ata_initialize): Rewritten.
6353         (grub_ata_device_initialize): New function.
6355 2008-08-04  Pavel Roskin  <proski@gnu.org>
6357         * kern/main.c: Include grub/mm.h.
6359 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6361         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6362         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6363         corruption problem).
6365 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6367         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6368         warnings introduced in my last commit.
6370 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6372         Make PCI available on all i386 architectures.
6374         * include/grub/i386/pc/pci.h: Move from here ...
6375         * include/grub/i386/pci.h: ... to here.
6377         * include/grub/i386/pc/pci.h: Remove.
6378         * include/grub/i386/efi/pci.h: Remove.
6379         * include/grub/x86_64/efi/pci.h: Remove.
6381         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6382         `<grub/cpu/pci.h>'.
6384         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6385         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6386         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6388         * conf/i386-ieee1275.rmk: Likewise.
6390 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6392         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6393         (grub_console_setcursor): Make it possible to set cursor off.
6395 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6397         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6398         of modules instead of assuming which platform provides what.
6399         * util/update-grub.in: Likewise.
6401 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6403         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6404         instead of `grub_install_dos_part' to determine whether a drive needs
6405         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6406         because it can be overridden when loading GRUB via Multiboot).
6408 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6410         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6412 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6414         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6415         of informational grub_dprintf() calls.
6417 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6419         * disk/memdisk.c (memdisk_size): Don't initialize.
6420         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6422         * include/grub/i386/pc/kernel.h
6423         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6424         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6425         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6426         (grub_arch_memdisk_size): Remove.
6428         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6429         field (was only used to transfer a constant).  Add `type' field to
6430         support multiple module types.
6431         (grub_module_iterate): New function.
6433         * kern/device.c (grub_device_open): Do not hide error messages
6434         when grub_disk_open() fails.  Use grub_print_error() instead.
6436         * kern/i386/pc/init.c (grub_arch_modules_addr)
6437         (grub_arch_memdisk_size): Remove functions.
6438         (grub_arch_modules_addr): Return the module address in high memory
6439         (now that it isn't copied anymore).
6441         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6442         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6443         decompression routine (grub_total_module_size already includes that
6444         now).  Don't copy modules back to low memory.
6446         * kern/main.c: Include `<grub/mm.h>'.
6447         (grub_load_modules): Split out (and use) ...
6448         (grub_module_iterate): ... this function, which iterates through
6449         module objects and runs a hook.
6450         Comment out grub_mm_init_region() call, as it would cause non-ELF
6451         modules to be overwritten.
6453         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6454         the memdisk image in its own region, make it part of the module list.
6455         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6456         (main): Parse --memdisk|-m option, and pass user-provided path as
6457         parameter to generate_image().
6458         (add_segments): Pass `memdisk_path' down to load_modules().
6459         (load_modules): Embed memdisk image in module section when requested.
6460         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6461         `header.type' instead of `header.offset'.
6463         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6464         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6465         (memdisk_mod_LDFLAGS): New variables.
6466         * conf/i386-coreboot.rmk: Likewise.
6467         * conf/i386-ieee1275.rmk: Likewise.
6469 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6471         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6472         (backward_relocator): New variables.  Used to allocate and relocate
6473         the payload, respectively.
6474         (grub_multiboot_load_elf32): Load into heap instead of requested
6475         address, install the appropriate relocator code in each bound of
6476         the payload, and set the entry point such that
6477         grub_multiboot_real_boot() will jump to one of them.
6479         * kern/i386/loader.S (grub_multiboot_payload_size)
6480         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6481         (grub_multiboot_payload_entry_offset): New variables.
6482         (grub_multiboot_real_boot): Set cpu context to what the relocator
6483         expects, and jump to the relocator instead of the payload.
6485         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6486         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6487         (grub_multiboot_payload_entry_offset): Export.
6489 2008-08-01  Bean  <bean123ch@gmail.com>
6491         * normal/menu_entry.c (editor_getline): Don't return the original
6492         string as result, as it will be released by lexer once it has done
6493         using it.
6495 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6497         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6498         within menuentries, not before them.
6499         util/grub.d/10_hurd.in: Likewise.
6501 2008-08-01  Bean  <bean123ch@gmail.com>
6503         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6504         (bufio_mod_SOURCES): New macro.
6505         (bufio_mod_CFLAGS): Likewise.
6506         (bufio_mod_LDFLAGS): Likewise.
6508         * include/grub/bufio.h: New file.
6510         * io/bufio.c: Likewise.
6512         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6513         (grub_video_reader_png): Use grub_buffile_open to open file.
6515         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6516         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6518         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6519         (grub_video_reader_tga): Use grub_buffile_open to open file.
6521         * font/manager.c: Include <grub/bufio.h>.
6522         (add_font): Use grub_buffile_open to open file.
6524 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6526         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6527         ELF segments, use a macro for arbitrarily accessing any of them instead
6528         of preparing a pointer that allows access to one at a time.
6529         (grub_multiboot_load_elf64): Likewise.
6531 2008-07-31  Bean  <bean123ch@gmail.com>
6533         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6534         GRUB_KERNEL_MACHINE_DATA_END.
6536 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6538         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6539         Increase from 0x50 to 0x60.
6540         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6541         use UUIDs to identify the root drive for them.  If that's not
6542         possible, abort.
6543         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6544         check, for cross-disk installs.
6546 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6548         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6549         is non-empty, use it to set the `prefix' environment variable instead
6550         of the usual approach.
6551         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6552         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6553         environment variable instead of dummy make_install_device().
6555         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6556         (start): Insert a data section, with `grub_prefix' variable.
6557         * kern/i386/linuxbios/startup.S: Likewise.
6559         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6560         New variable reference.
6561         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6562         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6563         to `start').
6564         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6565         section within startup.S (relative to `start').
6566         * include/grub/i386/coreboot/kernel.h: Likewise.
6568         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6569         Overwrite grub_prefix with its contents, at the beginning of the
6570         first segment.
6571         (main): Understand -p|--prefix.
6573 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6575         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6577 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6579         * term/i386/pc/vga_text.c (grub_console_cls): Use
6580         grub_console_gotoxy() to go back to beginning of the screen.
6581         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6583 2008-07-29  Christian Franke  <franke@computer.org>
6585         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6586         Add conversion of emulated mount points on Cygwin.
6588 2008-07-29  Christian Franke  <franke@computer.org>
6590         * util/update-grub.in: Add a check for admin
6591         group on Cygwin.
6592         Remove old `grub.cfg.new' before creation.
6593         Add `-f' to `mv' to handle the different filesystem
6594         semantics of Windows.
6596 2008-07-29  Bean  <bean123ch@gmail.com>
6598         * normal/main.c (get_line): Fix buffer overflow bug.
6600 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6602         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6603         (struct grub_apple_header): New struct.  Describes the layout of
6604         the partmap header.
6605         (apple_partition_map_iterate): Check the header magic as well as the
6606         partition magic (which was already being checked).
6608 2008-07-28  Pavel Roskin  <proski@gnu.org>
6610         * genmk.rb: Add a warning to the beginning of the output that
6611         it's a generated file and should not be edited.
6613 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6615         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6616         with the same number are found, just use issue a warning with
6617         grub_dprintf(), as this error has been reported to be non-fatal.
6619 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6621         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6622         information.
6624 2008-07-27  Bean  <bean123ch@gmail.com>
6626         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6627         (grub_fat_find_dir): Ignore case when comparing filename.
6629 2008-07-27  Bean  <bean123ch@gmail.com>
6631         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6632         smallino, as it's more descriptive, and i8count can be confused with
6633         the other field count.
6634         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6635         inode type.
6637 2008-07-27  Bean  <bean123ch@gmail.com>
6639         * commands/crc.c: New file.
6641         * lib/crc.c: Likewise.
6643         * include/grub/lib/crc.h: Likewise.
6645         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6647         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6648         (hexdump): Move this function to ...
6650         * lib/hexdump.c: ... here.
6652         * include/grub/hexdump.h: Renamed to ...
6654         * include/grub/lib/hexdump.h: ... this.
6656         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6658         * util/grub-editenv.c: Likewise.
6660         * include/envblk.h: Renamed to ...
6662         * include/lib/envblk.h: ... this.
6664         * util/envblk.c: Renamed to ...
6666         * lib/envblk.c: ... this.
6668         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6669         lib/hexdump.c.
6670         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6671         (pkglib_MODULES): Add crc.mod.
6672         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6673         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6674         (crc_mod_SOURCES): New macro.
6675         (crc_mod_CFLAGS): Likewise.
6676         (crc_mod_LDFLAGS): Likewise.
6678         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6680         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6682         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6684         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6686         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6688 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6690         * commands/help.c: Include <grub/term.h>.
6691         (TERM_WIDTH): Removed.  Updated all users.
6693 2008-07-27  Pavel Roskin  <proski@gnu.org>
6695         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6696         spurious warnings about a comment within a comment.
6698 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6700         * util/getroot.c (find_root_device): Skip devices that match
6701         /dev/dm-[0-9].  This lets the real device be found for any type of
6702         abstraction (LVM, EVMS, RAID..).
6703         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6704         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6705         device is found first, find_root_device() will now skip it.
6707 2008-07-24  Pavel Roskin  <proski@gnu.org>
6709         * include/grub/types.h: Use __builtin_bswap32() and
6710         __builtin_bswap64() with gcc 4.3 and newer.
6712 2008-07-24  Christian Franke  <franke@computer.org>
6714         * util/i386/pc/grub-install.in: If `--debug' is specified,
6715         pass `--verbose' to grub-setup.
6716         Abort script if make_system_path_relative_to_its_root() fails.
6718 2008-07-24  Bean  <bean123ch@gmail.com>
6720         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6721         variable `target_platform' should be `platform'.
6723 2008-07-24  Bean  <bean123ch@gmail.com>
6725         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6726         (grub_png_init_fixed_block): New function.
6727         (grub_png_decode_image_data): Handle fixed huffman code compression.
6729 2008-07-24  Bean  <bean123ch@gmail.com>
6731         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6732         (grub_pe2elf_SOURCES): New macro.
6733         (CLEANFILES): Add grub-pe2elf.
6735         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6736         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6737         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6738         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6739         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6740         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6741         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6742         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6743         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6744         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6745         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6746         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6747         (GRUB_PE32_DT_FUNCTION): Likewise.
6748         (GRUB_PE32_REL_I386_DIR32): Likewise.
6749         (GRUB_PE32_REL_I386_REL32): Likewise.
6750         (grub_pe32_symbol): New structure.
6751         (grub_pe32_reloc): Likewise.
6753         * util/grub-pe2elf.c: New file.
6755         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6756         start symbol in non pc platform.
6758         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6760         The following patches are from Christian Franke.
6762         * include/grub/dl.h: Remove .previous, gas supports this only
6763         for ELF format.
6765         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6766         Remove .type, gas supports this only for ELF format.
6768         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6769         nullbytes in symbol table. This fixes an infinite loop if table is
6770         zero filled.
6772         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6773         TARGET_IMG_LDFLAGS and EXEEXT.
6775         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6776         TARGET_IMG_LDFLAGS_AC.
6777         (grub_CHECK_STACK_ARG_PROBE): New function.
6779         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6781         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6783         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6784         to set TARGET_IMG_LD* accordingly.
6785         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6786         Add call to grub_CHECK_STACK_ARG_PROBE.
6787         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6789         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6791         * genmk.rb: Add EXEEXT to CLEANFILES.
6793 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6795         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6796         define the codes for arrows and lines used for the menu).
6797         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6798         as well.
6800         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6801         fonts, because the latter are too slow.
6803 2008-07-21  Bean  <bean123ch@gmail.com>
6805         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6806         a20. Run keyboard test last, as it will cause macbook to halt.
6808 2008-07-18  Pavel Roskin  <proski@gnu.org>
6810         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6811         load foreign architecture modules correctly anyway.  Keep
6812         support for loading host architecture modules, whether we
6813         compile them or not.
6815 2008-07-17  Pavel Roskin  <proski@gnu.org>
6817         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6818         change target_cpu.  The compiler default can mismatch target_cpu
6819         in any case.
6821         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6822         * kern/efi/efi.c: Likewise.
6824         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6825         target compiler is functional.
6826         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6827         are set up.
6829         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6830         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6831         adjustments from the rest, only do them if target is not
6832         explicitly given.  Merge other adjustments with the final sanity
6833         check.  Remove an extraneous check for supported CPU.  Be
6834         specific which CPU and which platform is not supported.
6836         * configure.ac: Default to pc platform for x86_64.
6838 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6840         Partial LinuxBIOS -> Coreboot rename.
6842         * conf/i386-linuxbios.rmk: Renamed to ...
6843         * conf/i386-coreboot.rmk: ... this.
6844         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6845         * configure.ac: Accept "coreboot" as input platform (but maintain
6846         compatibility with "linuxbios").
6847         * include/grub/i386/linuxbios: Renamed to ...
6848         * include/grub/i386/coreboot: ... this.
6850 2008-07-17  Bean  <bean123ch@gmail.com>
6852         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6853         (appleldr_mod_SOURCE): New variable.
6854         (appleldr_mod_CFLAGS): Likewise.
6855         (appleldr_mod_LDFLAGS): Likewise.
6856         (pci_mod_SOURCES): Likewise.
6857         (pci_mod_CFLAGS): Likewise.
6858         (pci_mod_LDFLAGS): Likewise.
6859         (lspci_mod_SOURCES): Likewise.
6860         (lspci_mod_CFLAGS): Likewise.
6861         (lspci_mod_LDFLAGS): Likewise.
6863         * conf/x86_64-efi.rmk: New file.
6865         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6866         macro.
6867         (grub_efidisk_write): Likewise.
6869         * include/efi/api.h (efi_call_0): New macro.
6870         (efi_call_1): Likewise.
6871         (efi_call_2): Likewise.
6872         (efi_call_3): Likewise.
6873         (efi_call_4): Likewise.
6874         (efi_call_5): Likewise.
6875         (efi_call_6): Likewise.
6877         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6878         grub_rescue_cmd_chainloader.
6880         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6881         (grub_pe32_optional_header): Change some fields based on i386 or
6882         x86_64 platform.
6883         (GRUB_PE32_PE32_MAGIC): Likewise.
6885         * include/grub/efi/uga_draw.h: New file.
6887         * include/grub/elf.h (STN_ABS): New constant.
6888         (R_X86_64_NONE): Relocation constant for x86_64.
6889         (R_X86_64_64): Likewise.
6890         (R_X86_64_PC32): Likewise.
6891         (R_X86_64_GOT32): Likewise.
6892         (R_X86_64_PLT32): Likewise.
6893         (R_X86_64_COPY): Likewise.
6894         (R_X86_64_GLOB_DAT): Likewise.
6895         (R_X86_64_JUMP_SLOT): Likewise.
6896         (R_X86_64_RELATIVE): Likewise.
6897         (R_X86_64_GOTPCREL): Likewise.
6898         (R_X86_64_32): Likewise.
6899         (R_X86_64_32S): Likewise.
6900         (R_X86_64_16): Likewise.
6901         (R_X86_64_PC16): Likewise.
6902         (R_X86_64_8): Likewise.
6903         (R_X86_64_PC8): Likewise.
6905         * include/grub/i386/efi/pci.h: New file.
6907         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6908         Change it value based on platform.
6909         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6910         (GRUB_E820_RAM): Likewise.
6911         (GRUB_E820_RESERVED): Likewise.
6912         (GRUB_E820_ACPI): Likewise.
6913         (GRUB_E820_NVS): Likewise.
6914         (GRUB_E820_EXEC_CODE): Likewise.
6915         (GRUB_E820_MAX_ENTRY): Likewise.
6916         (grub_e820_mmap): New structure.
6917         (linux_kernel_header): Change the efi field according to different
6918         kernel version, also field from linux_kernel_header.
6920         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6922         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6923         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6924         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6925         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6926         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6927         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6928         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6929         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6930         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6931         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6933         * include/grub/x86_64/efi/kernel.h: New file.
6935         * include/grub/x86_64/efi/loader.h: Likewise.
6937         * include/grub/x86_64/efi/machine.h: Likewise.
6939         * include/grub/x86_64/efi/pci.h: Likewise.
6941         * include/grub/x86_64/efi/time.h: Likewise.
6943         * include/grub/x86_64/linux.h: Likewise.
6945         * include/grub/x86_64/setjmp.h: Likewise.
6947         * include/grub/x86_64/time.h: Likewise.
6949         * include/grub/x86_64/types.h: Likewise.
6951         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6952          GRUB_TARGET_SIZEOF_VOID_P.
6954         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6955         (grub_efi_locate_handle): Likewise.
6956         (grub_efi_open_protocol): Likewise.
6957         (grub_efi_set_text_mode): Likewise.
6958         (grub_efi_stall): Likewise.
6959         (grub_exit): Likewise.
6960         (grub_reboot): Likewise.
6961         (grub_halt): Likewise.
6962         (grub_efi_exit_boot_services): Likewise.
6963         (grub_get_rtc): Likewise.
6965         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6966         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6967         (grub_efi_allocate_pages): Wrap efi calls.
6968         (grub_efi_free_pages): Wrap efi calls.
6969         (grub_efi_get_memory_map): Wrap efi calls.
6971         * kern/x86_64/dl.c: New file.
6973         * kern/x86_64/efi/callwrap.S: Likewise.
6975         * kern/x86_64/efi/startup.S: Likewise.
6977         * loader/efi/appleloader.c: Likewise.
6979         * loader/efi/chainloader.c (cmdline): New variable.
6980         (grub_chainloader_unload): Wrap efi calls.
6981         (grub_chainloader_boot): Likewise.
6982         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6983         command line.
6985         * loader/efi/chainloader_normal.c (chainloader_command):
6986         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6987         command line.
6989         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6990         method.
6991         (grub_e820_add_region): New function.
6992         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6993         booting.
6994         (grub_find_video_card): New function.
6995         (grub_linux_setup_video): New function.
6996         (grub_rescue_cmd_linux): Probe for video information.
6998         * normal/x86_64/setjmp.S: New file.
7000         * term/efi/console.c (map_char): New function.
7001         (grub_console_putchar): Map unicode char.
7002         (grub_console_checkkey): Wrap efi calls.
7003         (grub_console_getkey): Likewise.
7004         (grub_console_getwh): Likewise.
7005         (grub_console_gotoxy): Likewise.
7006         (grub_console_cls): Likewise.
7007         (grub_console_setcolorstate): Likewise.
7008         (grub_console_setcursor): Likewise.
7010         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
7012 2008-07-16  Pavel Roskin  <proski@gnu.org>
7014         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
7015         format strings.
7017         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
7018         pointer, not an integer.  This fixes a warning and prevents
7019         precision loss on 64-bit systems.
7020         (relocate_addresses): Remove unneeded cast.
7022 2008-07-15  Pavel Roskin  <proski@gnu.org>
7024         * kern/i386/ieee1275/init.c: Include grub/cache.h.
7026         * term/ieee1275/ofconsole.c: Disable code unused on i386.
7028         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
7029         Fix comparison between signed and unsigned.
7031         * include/grub/i386/ieee1275/console.h: Declare
7032         grub_console_init() and grub_console_fini().
7034         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
7035         It's empty and unused.
7037         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
7038         beginning to avoid warnings with some compilers.
7040         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
7041         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
7043 2008-07-14  Pavel Roskin  <proski@gnu.org>
7045         * kern/env.c (grub_register_variable_hook): Don't copy empty
7046         string, it leaks memory.  Pass "" to grub_env_set(), it should
7047         handle constant strings.
7049         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
7050         * commands/cmp.c (grub_cmd_cmp): Likewise.
7051         * kern/dl.c (grub_dl_flush_cache): Likewise.
7052         (grub_dl_load_core): Likewise.
7053         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
7054         (grub_elf64_load_phdrs): Likewise.
7056 2008-07-13  Pavel Roskin  <proski@gnu.org>
7058         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
7059         between signed and unsigned.
7060         (LzmaEnc_Finish): Fix warning about an unused parameter.
7062 2008-07-13  Bean  <bean123ch@gmail.com>
7064         * Makefile.in (enable_lzo): New rule.
7066         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
7068         * configure.ac (ENABLE_LZO): New option --enable-lzo.
7070         * boot/i386/pc/lnxboot.S: #include <config.h>.
7072         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
7073         its value according to the compression algorithm used, lzo or lzma.
7075         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
7076         compression algorithm according to configure macro.
7078         * kern/i386/pc/startup.S (codestart): Likewise.
7080         * kern/i386/pc/lzma_decode.S: New file.
7082         * include/grub/lib/LzFind.h: Likewise.
7084         * include/grub/lib/LzHash.h: Likewise.
7086         * include/grub/lib/LzmaDec.h: Likewise.
7088         * include/grub/lib/LzmaEnc.h: Likewise.
7090         * include/grub/lib/LzmaTypes.h: Likewise.
7092         * lib/LzFind.c: Likewise.
7094         * lib/LzmaDec.c: Likewise.
7096         * lib/LzmaEnc.c: Likewise.
7098 2008-07-13  Bean  <bean123ch@gmail.com>
7100         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
7101         (grub_ext4_extent_header): New structure.
7102         (grub_ext4_extent): Likewise.
7103         (grub_ext4_extent_idx): Likewise.
7104         (grub_ext4_find_leaf): New function.
7105         (grub_ext2_read_block): Handle extents.
7107 2008-07-12  Robert Millan  <rmh@aybabtu.com>
7109         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7111 2008-07-11  Robert Millan  <rmh@aybabtu.com>
7113         * util/grub.d/40_custom.in: New file. Example on how to add custom
7114         entries to /etc/grub.d.
7115         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7116         40_custom (implicitly, by merging all the grub.d rules).
7118 2008-07-11  Pavel Roskin  <proski@gnu.org>
7120         * commands/read.c (grub_getline): Fix invalid memory access.
7121         Don't add newline to the variable value.
7123         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7124         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7125         (serial_hw_get_port): Check validity of the port number.
7126         (grub_cmd_serial): Check return value of serial_hw_get_port().
7128 2008-07-07  Pavel Roskin  <proski@gnu.org>
7130         * boot/i386/pc/diskboot.S (notification_string): Replace
7131         "Loading kernel" with just "loading".  This is shorter, less
7132         confusing and saves a few bytes for possible future changes.
7134 2008-07-05  Pavel Roskin  <proski@gnu.org>
7136         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7137         size for ATAPI devices, they are undefined.  Output sector
7138         number in decimal form.
7140         * disk/ata.c: Use named constants for status bits.
7142 2008-07-04  Pavel Roskin  <proski@gnu.org>
7144         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7145         grub_addr_t before casting it to the void pointer to fix a
7146         warning.  Non-addressable regions are discarded earlier.
7147         (grub_arch_modules_addr): Cast _end to grub_addr_t.
7148         * kern/i386/linuxbios/table.c: Include grub/misc.h.
7149         (check_signature): Don't shadow table_header.
7150         (grub_linuxbios_table_iterate): Cast numeric constants to
7151         grub_linuxbios_table_header_t.
7152         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7153         grub_stop().
7155         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7156         prevent warnings.
7158         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7159         pointer, which can cause warnings.  Support 64-bit addresses.
7161         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7162         of sizeof(long).  This fixes PowerPC image generation on x86_64.
7164 2008-07-04  Robert Millan  <rmh@aybabtu.com>
7166         This fixes a performance issue when pc & gpt partmap iterators
7167         didn't abort iteration even after our hook found what it was
7168         looking for (often causing expensive probes of non-existent drives).
7170         Some callers relied on previous buggy behaviour, since they would
7171         raise an error when their own hooks caused early abortion of its
7172         iteration.
7174         * kern/device.c (grub_device_open): Improve error message.
7175         * disk/lvm.c (grub_lvm_open): Likewise.
7176         * disk/raid.c (grub_raid_open): Likewise.
7178         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7179         when hook requests it, independently of grub_errno.
7180         (pc_partition_map_probe): Do not fail when find_func() caused
7181         early abortion of pc_partition_map_iterate().
7183         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7184         when hook requests it, independently of grub_errno.
7185         (gpt_partition_map_probe): Do not fail when find_func() caused
7186         early abortion of gpt_partition_map_iterate().
7188         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7189         when hook requests it, independently of grub_errno.  Do not fail when
7190         part_map_iterate_hook() caused early abortion of p->iterate().
7192         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7193         when grub_partition_iterate() returned with non-zero.
7195 2008-07-03  Pavel Roskin  <proski@gnu.org>
7197         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7198         like we do in grub_ata_pio_read().
7199         (grub_ata_readwrite): Always write individual sectors.  Fix the
7200         sector count for the remainder.
7201         (grub_ata_write): Enable writing to ATA devices.  Correctly
7202         report error for ATAPI devices.
7204 2008-07-02  Pavel Roskin  <proski@gnu.org>
7206         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7207         warning.
7209         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7210         for every read sector, we already increment it for the whole
7211         batch.  This fixes reading more than 256 sectors at once.
7213         * util/grub-editenv.c (cmd_info): Cast argument to long
7214         explicitly.  ptrdiff_t reduces to int on i386.
7216         * util/grub-editenv.c (main): Be specific which parameter is
7217         missing.
7219         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7220         (memdisk): Make memdisk_orig_addr a pointer.
7222         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7223         for file offsets, use grub_off_t instead.  Fix printf format
7224         warnings.
7226         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7227         there.  Real unexpected warnings should not drown in the noise
7228         about known problems.
7230         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7231         grub_disk_addr_t for memory addresses.
7233         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7234         explicitly to fix a warning.
7236         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7238         * Makefile.in (MODULE_LDFLAGS): New variable.
7239         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7240         the linker accepts --build-id=none.
7241         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7242         MODULE_LDFLAGS.
7243         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7245         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7246         those in Linux XFS code.  Provide a way to access 64-bit parent
7247         inode.
7248         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7249         the end of struct grub_xfs_dir_header.
7251 2008-07-02  Bean  <bean123ch@gmail.com>
7253         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7254         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7255         and GRUB_IEEE1275_FLAG_NO_ANSI.
7257         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7258         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7259         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7261         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7262         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7264         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7265         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7267         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7268         esc sequence on non ANSI terminal.
7269         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7271         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7272         beginning of file.
7274 2008-07-02  Bean  <bean123ch@gmail.com>
7276         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7277         (grub_editenv_SOURCES): New variable.
7278         (pkglib_MODULES): Add loadenv.mod.
7279         (loadenv_mod_SOURCES): New variable.
7280         (loadenv_mod_CFLAGS): Likewise.
7281         (loadenv_mod_LDFLAGS): Likewise.
7283         * include/grub/envblk.h: New file.
7285         * util/envblk.c: New file.
7287         * util/grub-editenv.c: New file.
7289         * commands/loadenv.c: New file.
7291 2008-07-01  Pavel Roskin  <proski@gnu.org>
7293         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7294         not unsigned char.  This fixes warnings and is consistent with
7295         other tags.
7297         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7299         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7301         * term/tparm.c (analyze): Always set *popcount.
7303         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7304         cast to fix a warning.
7306         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7307         cast to suppress a warning.
7309         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7310         grub_fshelp_read_file() expects.
7312         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7313         write uuid as a 32-bit value in CPU byte order, so declare and
7314         use it as such.
7316         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7317         long if the format specifier expects it.
7318         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7319         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7320         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7321         long to fix a warning.
7322         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7323         grub_dprintf() arguments to fix warnings.
7325 2008-06-30  Pavel Roskin  <proski@gnu.org>
7327         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7328         install_bsd_part immediately before core.img is embedded or
7329         modified on disk.  This fixes core.img verification if core.img
7330         cannot be embedded.
7332         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7333         core_path to calculate the blocklist.
7334         Patch from Javier Martín <lordhabbit@gmail.com>
7336 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7338         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7339         block to disk block.
7340         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7341         Patch from Niels Böhm <bitbucket@arcor.de>
7343 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7345         * util/update-grub_lib.in (font_path): Search for fonts in
7346         /boot/grub first, which is more likely to be readable (we aren't
7347         deciding where fonts live, just looking for them).
7349 2008-06-26  Pavel Roskin  <proski@gnu.org>
7351         * util/biosdisk.c (read_device_map): Don't leave dead map
7352         entries for devices failing stat() check.
7354         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7355         core_path_dev for the core.img path on the target device.
7357 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7359         * disk/fs_uuid.c: New file.
7360         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7361         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7362         (fs_uuid_mod_LDFLAGS): New variables.
7363         * include/grub/disk.h (grub_disk_dev_id): Add
7364         `GRUB_DISK_DEVICE_UUID_ID'.
7365         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7366         implement iterate().
7368 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7370         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7371         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7372         Linux image includes no initrd.
7374 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7376         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7377         call to resolve the core image location that effectively appended the
7378         name twice.
7380 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7382         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7383         call from here ...
7385         * util/grub.d/10_hurd.in: ... to here ...
7386         * util/grub.d/10_linux.in: ... and here.
7388 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7390         * kern/main.c (grub_main): Export `prefix' variable immediately
7391         after it has been set by grub_machine_set_prefix().
7393 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7395         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7396         search result when not saving to variable, not the other way around.
7397         When saving to variable, abort iteration as soon as a match is found.
7399 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7401         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7402         check for partition that provides /boot/grub.  Its logic is flawed,
7403         as it prevents prepare_grub_to_access_device() from being called
7404         multiple times.
7406 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7408         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7409         "insmod" command directly when abstraction modules are needed,
7410         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7411         since it had already been processed).
7413 2008-06-19  Pavel Roskin  <proski@gnu.org>
7415         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7416         changed.  This is needed in case GRUB_LIBDIR changes.
7417         * conf/i386-ieee1275.rmk: Likewise.
7418         * conf/i386-linuxbios.rmk: Likewise.
7419         * conf/i386-pc.rmk: Likewise.
7420         * conf/powerpc-ieee1275.rmk: Likewise.
7422 2008-06-18  Pavel Roskin  <proski@gnu.org>
7424         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7425         kernel_elf_symlist.c to symlist.c for consistency with other
7426         architectures.  Update all users.
7427         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7429 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7431         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7432         it in prefix.
7434         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7435         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7436         a RAID device, run setup() for all members independently on whether
7437         LVM abstraction is being used.
7438         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7439         If grub-mkimage has set `*install_dos_part == -2', don't override this
7440         value.
7441         Perform *install_dos_part adjustments independently on whether
7442         we're embedding or not.
7443         Clarify error message when image is too big for embedding.
7444         Remove duplicate *install_dos_part stanza.
7446 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7448         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7449         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7450         variables.
7451         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7452         values in grub_ofconsole_normal_color and
7453         grub_ofconsole_highlight_color (they're not directly related to
7454         background and foreground).
7455         (grub_ofconsole_setcolorstate): Extract background and foreground
7456         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7458 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7460         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7461         /boot/grub for the check in last commit, not /boot (they could be
7462         different partitions).
7464 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7466         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7467         asked to setup access for the same partition that provides /boot,
7468         don't bother using UUIDs since our root already has the value we
7469         want.
7471 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7473         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7474         I2O devices.
7475         Patch from Sven Mueller <sven@debian.org>.
7477 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7479         * util/update-grub.in: Check for $EUID instead of $UID.
7480         Reported by Vincent Zweije.
7482 2008-06-16  Bean  <bean123ch@gmail.com>
7484         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7485         (grub_ext2_read_block): Likewise.
7486         (grub_ext2_read_inode): Likewise.
7487         (grub_ext2_mount): Likewise.
7488         (grub_ext2_close): Likewise.
7489         (grub_ext3_get_journal): Removed.
7491         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7492         (grub_reiserfs_read_symlink): Likewise.
7493         (grub_reiserfs_mount): Likewise.
7494         (grub_reiserfs_open): Likewise.
7495         (grub_reiserfs_read): Likewise.
7496         (grub_reiserfs_close): Likewise.
7497         (grub_reiserfs_get_journal): Removed.
7499         * fs/fshelp.c (grub_fshelp_read): Removed.
7500         (grub_fshelp_map_block): Likewise.
7502         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7503         (grub_fshelp_journal): Likewise.
7504         (grub_fshelp_read): Likewise.
7505         (grub_fshelp_map_block): Likewise.
7507 2008-06-16  Pavel Roskin  <proski@gnu.org>
7509         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7510         floating point anymore.
7511         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7513 2008-06-15  Pavel Roskin  <proski@gnu.org>
7515         * commands/ls.c (grub_ls_list_files): Use integer calculations
7516         for human readable format, avoid floating point use.
7517         * kern/misc.c (grub_ftoa): Remove.
7518         (grub_vsprintf): Remove floating point support.
7520 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7522         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7523         devices.
7524         Reported by Max Vozeler.
7526 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7528         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7529         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7530         skipped later.
7531         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7532         the beginning of the prefix.
7534         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7535         It is assumed that if we have a memdisk, grub-mkimage has set
7536         grub_prefix to include the "(memdisk)" drive in it.
7538 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7540         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7541         Initialize keyboard controller after registering the terminal, so that
7542         grub_printf() can be called from grub_keyboard_controller_init().
7544 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7546         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7547         extent-btree which is written as big endian on disk.
7548         Reported by Alain Greppin  <al@chilibi.org>.
7550 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7552         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7553         * util/i386/pc/grub-install.in (modules): Likewise.
7555 2008-06-13  Pavel Roskin  <proski@gnu.org>
7557         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7559 2008-06-13  Bean  <bean123ch@gmail.com>
7561         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7563         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7565         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7566         to indicate sparse block.
7568 2008-06-12  Pavel Roskin  <proski@gnu.org>
7570         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7571         number, grub_fshelp_read() does it for us.
7573         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7574         linear disk read with journal translation.
7575         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7576         * include/grub/fshelp.h: Declare grub_fshelp_read().
7578 2008-06-09  Pavel Roskin  <proski@gnu.org>
7580         * fs/minix.c (grub_minix_mount): Handle error reading
7581         superblock.
7583 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7585         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7586         don't append the RAID prefix afterwards.
7587         Reported by Clint Adams.
7589 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7591         Based on description from Pavel:
7592         * kern/disk.c (grub_disk_check_range): Rename to ...
7593         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7594         tasks performed by this function.
7596 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7598         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7599         `num_serial' (for consistency with other variables).
7600         (struct grub_ntfs_data): Add `uuid' member.
7601         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7602         (grub_ntfs_uuid): New function.
7603         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7605 2008-06-07  Pavel Roskin  <proski@gnu.org>
7607         * util/biosdisk.c (open_device): Revert last change to the
7608         function, it broke installation.  The sector needs to be
7609         different dependent on which device is opened.
7611 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7613         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7614         rest of GRUB, and breakage doesn't happen if its value were modified.
7616         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7617         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7618         a constant (same value).
7619         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7620         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7622 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7624         * util/biosdisk.c (open_device): Do not modify sector offset when
7625         accessing a partition.  kern/disk.c already handles this for us.
7627 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7629         * util/grub-emu.c (grub_machine_init): Move code in this function from
7630         here ...
7631         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7632         segfault in case grub_printf() is called).
7634         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7635         grub_probe.  Update all users not to explicitly add it again.
7636         (grub_device): New variable; contains corresponding device for grubdir.
7637         (fs_module, partmap_module, devabstraction_module): Pass
7638         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7639         every time.
7641 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7643         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7644         is found, print it (same layout as with labels).
7646 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7648         * util/biosdisk.c (get_drive): Rename to ...
7649         (find_grub_drive): ... this.  Update all users.
7651         (get_os_disk): Rename to ...
7652         (convert_system_partition_to_system_disk): ... this.  Update all users.
7654         (find_drive): Rename to ...
7655         (find_system_device): ... this.  Update all users.
7657 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7659         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7660         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7661         (make_device_map): Likewise.
7663 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7665         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7666         before dereferencing it.
7668         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7669         union with fat12/fat16-specific ones.  Add some new fields, including
7670         `num_serial' for both versions.
7671         (struct grub_fat_data): Add `uuid' member.
7672         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7673         names.  Initialize `data->uuid' using `num_serial'.
7674         (grub_fat_uuid): New function.
7675         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7677         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7678         (grub_reiserfs_uuid): New function.
7679         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7680         member.
7682         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7683         (grub_xfs_uuid): New function.
7684         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7686 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7688         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7689         code that is backward compatible with pre-uuid search command.
7691 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7693         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7694         floppies after everything else, to ensure floppy drive isn't accessed
7695         unnecessarily (patch from Bean).
7697 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7699         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7700         not print device names when we were asked to set a variable.
7702 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7704         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7705         using "cursor-on" and "cursor-off" commands (understood at least by
7706         the Open Firmware flavour on OLPC).
7708 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7710         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7711         on and off sequences.
7713 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7715         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7716         * util/update-grub.in: Likewise.
7718 2008-05-30  Pavel Roskin  <proski@gnu.org>
7720         * util/biosdisk.c (linux_find_partition): Simplify logic and
7721         make the code more universal.  Keep special processing for
7722         devfs, but use a simple rule for all other devices.  If the
7723         device ends with a number, append 'p' and the partition number.
7724         Otherwise, append only the partition number.
7726 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7728         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7729         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7730         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7731         the `root' parameter to Linux.
7733 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7735         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7736         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7737         --fs_uuid with --fs-uuid.
7738         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7739         all filesystems support them).
7741 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7743         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7744         grub_printf() flags, since we're printing in units of 2 bytes.
7746 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7748         * util/grub.d/00_header.in: Remove obsolete comment referencing
7749         convert_system_path_to_grub_path().
7750         * util/update-grub.in: Likewise.
7751         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7752         (convert_system_path_to_grub_path): Add a warning message explaining
7753         that this function is deprecated.  Rely on is_path_readable_by_grub()
7754         for the readability checks.
7755         (font_path): Use is_path_readable_by_grub() for the readability
7756         check rather than convert_system_path_to_grub_path().
7758 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7760         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7761         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7762         converting it first.
7763         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7764         grub.cfg for access to font file, and afterwards call it again to set
7765         the root device.
7767 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7769         * commands/search.c (options): Add --fs_uuid option.
7770         (search_fs_uuid): New function.
7771         (grub_cmd_search): Fix --set argument passing.
7772         Use search_fs_uuid() when requested via --fs_uuid.
7773         (grub_search_init): Update help message.
7774         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7775         and redeclare it as an array of 16-bit words.
7776         (grub_ext2_uuid): New function.
7777         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7778         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7779         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7780         (GRUB_DEVICE_BOOT_UUID): New variables.
7781         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7782         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7783         whenever possible.
7784         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7785         just assume `root' variable has the right value.
7786         * util/grub.d/10_linux.in: Likewise.
7787         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7788         via PRINT_FS_UUID.
7789         (main): Recognise `-t fs_uuid' argument.
7791 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7793         * util/biosdisk.c (map): Redefine structure to hold information
7794         about GRUB drive name.
7795         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7796         drive names.
7797         (call_hook): Remove.
7798         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7799         member.  Assume drive has partitions.
7800         (grub_util_biosdisk_open): Access device names via `.device' struct
7801         member.
7802         (open_device): Likewise.
7803         (find_drive): Likewise.
7804         (read_device_map): Adjust map[] usage to match the new struct
7805         definition.  Don't check for duplicates (still possible, but not cheap
7806         anymore).
7807         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7808         (make_device_name): Remove assumption of BIOS-like drive names.
7810 2008-05-30  Pavel Roskin  <proski@gnu.org>
7812         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7813         compiling execute.c doesn't need grub_script.tab.h anymore.
7814         (normal/command.c_DEPENDENCIES): Likewise.
7815         (normal/function.c_DEPENDENCIES): Likewise.
7816         * conf/i386-ieee1275.rmk: Likewise.
7817         * conf/i386-linuxbios.rmk: Likewise.
7818         * conf/i386-pc.rmk: Likewise.
7819         * conf/powerpc-ieee1275.rmk: Likewise.
7820         * conf/sparc64-ieee1275.rmk: Likewise.
7822 2008-05-29  Pavel Roskin  <proski@gnu.org>
7824         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7825         when scanning metadata for volume group name.
7827         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7828         a generated file, which may only be included from the files with
7829         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7830         use union YYSTYPE, as the later allows forward declaration.
7831         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7833 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7835         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7836         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7837         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7838         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7839         scan codes.
7841 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7843         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7844         control key combinations.
7846 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7848         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7849         * util/ieee1275/grub-install.in: ... to here.
7850         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7851         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7852         (grub_install_SOURCES): Likewise.
7854 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7856         * fs/affs.c: Update copyright year.
7857         * fs/ext2.c: Likewise.
7858         * fs/fshelp.c: Likewise.
7859         * fs/hfsplus.c: Likewise.
7860         * fs/ntfs.c: Likewise.
7861         * fs/xfs.c: Likewise.
7862         * include/grub/fshelp.h: Likewise.
7863         * util/grub-mkdevicemap.c: Likewise.
7865 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7867         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7868         might need to be fatfs to support some firmware implementations
7869         (e.g. OFW or EFI).
7871 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7873         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7874         devices.
7875         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7876         (make_device_map): Likewise.
7878 2008-05-20  Bean  <bean123ch@gmail.com>
7880         * fs/fshelp.c (grub_fshelp_map_block): New function.
7881         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7882         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7884         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7885         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7886         (grub_fshelp_journal): New structure.
7887         (grub_fshelp_map_block): New function prototype.
7888         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7889         (grub_fshelp_map_block): Likewise.
7891         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7892         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7893         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7894         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7895         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7896         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7897         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7898         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7899         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7900         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7901         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7902         (grub_ext2_sblock): New members for journal support.
7903         (grub_ext3_journal_header): New structure.
7904         (grub_ext3_journal_revoke_header): Likewise.
7905         (grub_ext3_journal_block_tag): Likewise.
7906         (grub_ext3_journal_sblock): Likewise.
7907         (grub_fshelp_node): New members logfile and journal.
7908         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7909         grub_fshelp_map_block to get real block number.
7910         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7911         number.
7912         (grub_ext2_read_inode): Likewise.
7913         (grub_ext3_get_journal): New function.
7914         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7915         (grub_ext2_close): Release memory used by journal.
7917         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7918         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7919         (grub_reiserfs_transaction_header): Renamed to
7920         grub_reiserfs_description_block, replace field data with real_blocks.
7921         (grub_reiserfs_commit_block): New structure.
7922         (grub_reiserfs_data): New member journal.
7923         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7924         number.
7925         (grub_reiserfs_read_symlink): Likewise.
7926         (grub_reiserfs_iterate_dir): Likewise.
7927         (grub_reiserfs_open): Likewise.
7928         (grub_reiserfs_read): Likewise.
7929         (grub_reiserfs_get_journal): New function.
7930         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7931         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7932         using grub_reiserfs_get_journal.
7933         (grub_reiserfs_close): Release memory used by journal.
7935         * fs/affs.c (grub_affs_read_block): Change block type to
7936         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7938         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7940         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7942         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7944         * fs/udf.c (grub_udf_read_block): Change block type to
7945         grub_disk_addr_t. Use type cast to avoid warning.
7947         * fs/xfs.c (grub_xfs_read_block): Likewise.
7949 2008-05-16  Christian Franke  <franke@computer.org>
7951         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7952         to ensure that break with ESC will always work.
7953         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7954         Remove ESC from keyboard queue.
7956 2008-05-16  Christian Franke  <franke@computer.org>
7958         * util/biosdisk.c: [__CYGWIN__] Add includes.
7959         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7960         (get_os_disk): Move variable declarations to OS specific
7961         parts to avoid warning.
7962         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7963         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7964         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7965         Cygwin.
7966         * util/getroot.c: [__CYGWIN__] Add includes.
7967         (strip_extra_slashes): Fix "/" case.
7968         [__CYGWIN__] (get_win32_path): New function.
7969         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7970         [__CYGWIN__] (find_root_device): Disable.
7971         [__CYGWIN__] (get_bootsec_serial): New function.
7972         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7973         [__linux__] (grub_guess_root_device): Add early returns to simplify
7974         structure.
7975         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7976         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7977         check for Linux only.
7979 2008-05-15  Bean  <bean123ch@gmail.com>
7981         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7982         keyboard hang problem in apple's intel mac.
7984 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7986         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7987         devices.
7988         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7989         (make_device_map): Likewise.
7990         Reported by Aurelien Jarno <aurel32@debian.org>
7992 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7994         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7995         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7996         (make_device_map): Output entries for xvd type disks.
7998 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8000         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
8001         devices.
8002         * util/grub-mkdevicemap.c (get_cciss_disk_name)
8003         (make_device_map): Likewise.
8004         Reported by Roland Dreier <rdreier@cisco.com>
8006 2008-05-07  Robert Millan  <rmh@aybabtu.com>
8008         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
8009         grub_strstr() call.  Correct a few mistakes in failure path handling.
8011 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8013         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
8014         Do not print a trailing slash (therefore, the root directory is an
8015         empty string).
8016         (convert_system_path_to_grub_path): Do not remove trailing slash
8017         from make_system_path_relative_to_its_root() output.
8019         * util/i386/pc/grub-install.in: Add trailing slash to output from
8020         make_system_path_relative_to_its_root().
8022 2008-05-06  Robert Millan  <rmh@aybabtu.com>
8024         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
8025         ensures that output lines aren't intermangled with those sent to
8026         stderr (via grub_util_info()).
8027         * util/grub-probe.c (grub_refresh): Likewise.
8028         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
8030 2008-05-05  Christian Franke  <franke@computer.org>
8032         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
8033         Add Cygwin device names.
8034         (get_ide_disk_name) [__CYGWIN__]: Likewise.
8035         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
8036         (check_device): Return error instead of success on empty name.
8037         (make_device_map): Move label inside linux specific code to
8038         prevent compiler warning.
8040 2008-04-30  Robert Millan  <rmh@aybabtu.com>
8042         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
8043         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
8044         first boot option.
8045         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
8047 2008-04-29  Robert Millan  <rmh@aybabtu.com>
8049         * docs/grub.cfg: New file (example GRUB configuration).
8051 2008-04-26  Robert Millan  <rmh@aybabtu.com>
8053         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
8054         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
8055         and `disk/ieee1275/nand.c'.
8057 2008-04-25  Bean  <bean123ch@gmail.com>
8059         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
8060         i386-linuxbios.
8062         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
8063         change the buffer size to 4096 for cdrom device.
8065         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
8066         and nand.mod.
8067         (_linux_mod_SOURCES): New variable.
8068         (_linux_mod_CFLAGS): Likewise.
8069         (_linux_mod_LDFLAGS): Likewise.
8070         (linux_mod_SOURCES): Likewise.
8071         (linux_mod_CFLAGS): Likewise.
8072         (linux_mod_LDFLAGS): Likewise.
8073         (nand_mod_SOURCES): Likewise.
8074         (nand_mod_CFLAGS): Likewise.
8075         (nand_mod_LDFLAGS): Likewise.
8077         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
8078         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
8079         type property. (nand device in olpc don't have this property)
8081         * include/grub/disk.h (grub_disk_dev_id): New macro
8082         GRUB_DISK_DEVICE_NAND_ID.
8084         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
8085         function prototype.
8086         (grub_rescue_cmd_initrd): Likewise.
8088         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
8089         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
8090         ofw_cif_handler and ofw_idt, adjust padding number.
8092         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
8093         GRUB_MACHINE_IEEE1275 is defined.
8095         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
8096         Use NESTED_FUNC_ATTR attribute on the hook parameter.
8098         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
8099         on nested function heap_init.
8100         (grub_upper_mem): New variable for i386-ieee1275.
8101         (grub_get_extended_memory): New function for i386-ieee1275.
8102         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
8104         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
8105         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
8106         property.
8108         * loader/i386/ieee1275/linux.c: New file.
8110         * loader/i386/ieee1275/linux_normal.c: New file.
8112         * disk/ieee1275/nand.c: New file.
8114 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
8116         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8117         value.
8118         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8120 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8122         Restructures early code path on ieee1275 to unify grub_main() as
8123         the first C function that is executed in every platform.
8125         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8126         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8127         cmain().
8128         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8129         * kern/ieee1275/cmain.c (cmain): Rename to ...
8130         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8131         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8132         at the beginning.
8134 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8136         * util/update-grub.in: Fix syntax error when setting
8137         `GRUB_PRELOAD_MODULES'.
8138         Reported by Stephane Chazelas <stephane@artesyncp.com>
8140 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
8142         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8143         section into account, newer toolchains generate unique build ids
8144         * configure.ac: remove the test for --build-id=none acceptance,
8145         we want build ids to be preserved
8146         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8147         far from other sections don't cause the raw binary images grow
8148         size
8150 2008-04-15  Robert Millan  <rmh@aybabtu.com>
8152         * disk/lvm.c: Update copyright year.
8153         * kern/misc.c: Likewise.
8155 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8157         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8158         there is no memory left for physical volume name.
8160 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8162         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8163         volume name mapping to support bigger than 9 character names properly.
8165 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8167         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8168         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8170 2008-04-13  Christian Franke  <franke@computer.org>
8172         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8173         to create a floppy emulation boot CD when non emulation mode
8174         does not work.
8175         Enable Joliet CD filesystem extension.
8177 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8179         * kern/misc.c (grub_strncat): Fix off-by-one error.
8180         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8182         * kern/env.c (grub_env_context_close): Clear current context, not
8183         previous one.
8184         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8186         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8188 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8190         Improve robustness when handling LVM.
8192         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8193         (and leave `*p' unmodified).
8194         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8195         through it.
8196         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8197         iterating through it.
8198         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8199         through it.
8200         (grub_lvm_scan_device): Check the return value (and fail gracefully
8201         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8202         Don't assume `vg->pvs != NULL' when iterating through it.
8204 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8206         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8207         * genmk.rb (partmap): New variable.
8208         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8209         (#{partmap}): New target rule.
8210         * genpartmaplist.sh: New file.
8211         * Makefile.in (pkglib_DATA): Add partmap.lst.
8212         (partmap.lst): New target rule.
8213         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8214         modules (including all partition maps), instead of preloading them.
8216 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8218         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8219         `linux-boot-prober' (if installed) to detect other operating
8220         systems which are installed on the computer and add them to
8221         the boot menu.
8222         * conf/common.rmk: Build and install 30_os-prober.
8224 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8226         * kern/powerpc/ieee1275/init.c: Move from here ...
8227         * kern/ieee1275/init.c: ... to here.  Update all users.
8229         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8230         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8232         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8233         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8235         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8236         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8238 2008-04-10  Pavel Roskin  <proski@gnu.org>
8240         * configure.ac: Always use "_cv_" in cache variables for
8241         compatibility with Autoconf 2.62.
8243 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8245         Revert grub/machine/init.h addition by Pavel (since it breaks on
8246         i386-ieee1275 and others):
8247         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8248         * util/powerpc/ieee1275/misc.c: Likewise.
8250 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8252         * util/grub-probe.c (probe): Improve error message.
8254 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8256         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8257         (this prevents the presence of a bogus entry from ruining the whole
8258         thing).
8260 2008-04-06  Pavel Roskin  <proski@gnu.org>
8262         * util/biosdisk.c: Include grub/util/biosdisk.h.
8263         * util/grub-fstest.c (execute_command): Make static.
8264         * util/grub-mkdevicemap.c (check_device): Likewise.
8265         * util/i386/pc/misc.c: Include grub/machine/init.h.
8266         * util/powerpc/ieee1275/misc.c: Likewise.
8267         * util/lvm.c: Include grub/util/lvm.h.
8268         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8269         grub/cache.h.
8270         * util/raid.c: Include grub/util/raid.h.
8271         (grub_util_getdiskname): Make static.
8273         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8274         grub_hostfs_fini(), as they are called from grub_init_all() and
8275         grub_fini_all() respectively.  This fixes an infinite loop in
8276         grub-fstest due to double registration of hostfs.
8277         Reported by Christian Franke <Christian.Franke@t-online.de>
8279 2008-04-05  Pavel Roskin  <proski@gnu.org>
8281         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8282         all 8 functions.  Otherwise, probe function 0 only.
8284 2008-04-04  Pavel Roskin  <proski@gnu.org>
8286         * commands/lspci.c (grub_lspci_iter): Print the bus number
8287         correctly.
8289         * commands/lspci.c (grub_pci_classes): Fix typos.
8290         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8291         before device ID, as it's normally done.
8293         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8294         Fix signedness warnings.
8295         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8296         Likewise.
8297         * util/ieee1275/get_disk_name.c: Include config.h so that
8298         _GNU_SOURCE is defined and getline() is declared.  Mark an
8299         unused argument as such.  Fix a signedness warning.
8301 2008-04-02  Pavel Roskin  <proski@gnu.org>
8303         * genkernsyms.sh.in: Use more robust assignments for CC and
8304         srcdir.  Quote srcdir.
8305         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8306         the symbol table is not empty.
8308         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8309         * fs/cpio.c (grub_cpio_read): Likewise.
8311 2008-04-01  Pavel Roskin  <proski@gnu.org>
8313         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8314         * disk/host.c (grub_host_open): Likewise.
8315         * disk/loopback.c (grub_loopback_open): Likewise.
8316         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8317         disk->id as in disk/host.c, not a multi-character constant.
8319         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8320         later is obsolete, potentially dangerous and sets a bad example.
8321         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8322         * util/misc.c (grub_util_get_image_size): Likewise.
8324         * disk/loopback.c (options): Improve help for "--partitions".
8326         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8327         options to align them with the short options, e.g. "echo -e".
8329 2008-03-31  Bean  <bean123ch@gmail.com>
8331         * video/reader/png.c (grub_png_data): New member is_16bit and
8332         image_data.
8333         (grub_png_decode_image_header): Detect 16 bit png image.
8334         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8335         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8336         (grub_video_reader_png): Release memory occupied by image_data.
8338         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8339         4096 bytes.
8340         (grub_nfs_mount): Skip the test for sector per cluster.
8342         * include/grub/ntfs.h (MAX_SPC): Removed.
8344 2008-03-31  Bean  <bean123ch@gmail.com>
8346         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8347         (grub_probe_SOURCES): Add fs/afs.c.
8348         (grub_fstest_SOURCES): Likewise.
8349         (afs_mod_SOURCES): New variable.
8350         (afs_mod_CFLAGS): Likewise.
8351         (afs_mod_LDFLAGS): Likewise.
8353         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8354         (grub_emu_SOURCES): Likewise.
8356         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8358         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8360         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8362         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8364         * fs/afs.c: New file.
8366 2008-03-30  Pavel Roskin  <proski@gnu.org>
8368         * disk/host.c: Include grub/misc.h to fix a warning.
8369         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8370         warnings about implicit declarations.
8372         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8373         variable.
8374         * include/grub/i386/loader.h: Change declaration of
8375         grub_linux_boot() to match what grub_loader_set() expects.
8376         * util/getroot.c (grub_guess_root_device): Return const char* to
8377         fix a warning.
8378         * util/grub-probe.c (probe): Fix a warning about uninitialized
8379         abstraction_name variable.
8380         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8381         second argument as unused to fix a warning.
8383         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8384         missing grub_error() call.
8386         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8387         2.60 and newer uses it to define datadir.
8389         * commands/sleep.c: Fix warning about implicit declaration.
8390         * disk/memdisk.c: Likewise.
8391         * loader/aout.c: Likewise.
8392         * loader/i386/bsd_normal.c: Likewise.
8393         * util/grub-probe.c: Likewise.
8395         * commands/i386/cpuid.c (has_longmode): Make static.
8396         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8397         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8399         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8400         GDT.  This is more robust, as %ds can change.
8401         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8402         calling real_to_prot().
8403         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8405 2008-03-28  Pavel Roskin  <proski@gnu.org>
8407         * kern/i386/pc/startup.S: Assert that uncompressed functions
8408         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8409         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8410         code, as they push parts of the code (error handlers) beyond
8411         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8412         code as correctness and size.
8414 2008-03-28  Pavel Roskin  <proski@gnu.org>
8416         * kern/i386/pc/startup.S
8417         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8418         data block address to the real mode, keep offset minimal.  This
8419         works around a bug in AWARD BIOS on old Athlon systems, which
8420         makes CD detection hang.
8422 2008-03-26  Pavel Roskin  <proski@gnu.org>
8424         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8425         const.
8426         * include/grub/normal.h: Add grub_parse_color_name_pair()
8427         declaration.
8429 2008-03-24  Bean  <bean123ch@gmail.com>
8431         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8432         (cd_count): Removed.
8433         (cd_drive): New variable.
8434         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8435         (grub_biosdisk_call_hook): Likewise.
8436         (grub_biosdisk_iterate): Change cdrom detection method.
8437         (grub_biosdisk_open): Replace cd_start with cd_drive.
8438         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8439         detect cdrom device.
8441         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8442         Removed.
8443         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8444         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8445         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8446         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8447         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8448         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8449         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8450         (grub_biosdisk_cdrp): New structure.
8451         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8453         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8455         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8456         device.
8458         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8459         New function.
8461 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8463         Remove 2 TiB limit in ata.mod.
8464         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8465         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8466         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8467         grub_uint64_t instead of grub_uint32_t.
8469 2008-03-05  Bean  <bean123ch@gmail.com>
8471         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8472         (grub_multiboot): Set boot device.
8474         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8476 2008-03-02  Bean  <bean123ch@gmail.com>
8478         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8479         symlink_buffer.
8481 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8483         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8484         texinfo.tex.
8486         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8487         modified.
8489         * docs/fdl.texi: New file.
8491         * docs/mdate-sh: New file. Copied from gnulib.
8492         * docs/texinfo.tex: Likewise.
8494         * config.guess: Updated from gnulib.
8495         * install-sh: Likewise.
8497 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8499         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8500         (aout_mod_SOURCES): New variable.
8501         (aout_mod_CFLAGS): Likewise.
8502         (aout_mod_LDFLAGS): Likewise.
8504         * conf/i386-ieee1275.rmk: Likewise.
8506 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8508         * util/update-grub.in: Reorganise terminal validity check.  Accept
8509         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8510         Based on suggestion by Franklin PIAT.
8512 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8514         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8515         function.
8516         * util/getroot.c (grub_util_check_block_device): New function that
8517         returns the given argument if it is a block device and returns NULL else.
8518         * util/grub-probe.c (argument_is_device): New variable.
8519         (probe): Promote device_name from a variable to an argument. Receive
8520         device_name from grub_util_check_block_device() if path is NULL and from
8521         grub_guess_root_device() else. Do not free() device_name anymore.
8522         (options): Introduce new parameter '-d, --device'.
8523         (main): Add description of the new parameter to the help screen.
8524         Rename path variable to argument. Set argument_is_device if the '-d'
8525         option is given. Pass argument to probe() depending on
8526         argument_is_device.
8528 2008-02-24  Bean  <bean123ch@gmail.com>
8530         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8531         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8532         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8533         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8534         (GRUB_ISO9660_VOLDESC_END): Likewise.
8535         (grub_iso9660_primary_voldesc): New member escape.
8536         (grub_iso9660_data): New member joliet.
8537         (grub_iso9660_convert_string): New function.
8538         (grub_iso9660_mount): Detect joliet extension.
8539         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8540         (grub_iso9660_iso9660_label): Likewise.
8542         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8543         (grub_setup_SOURCES): Add fs/udf.c.
8544         (grub_fstest_SOURCES): Likewise.
8545         (udf_mod_SOURCES): New variable.
8546         (udf_mod_CFLAGS): Likewise.
8547         (udf_mod_LDFLAGS): Likewise.
8549         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8550         (grub_emu_SOURCES): Likewise.
8552         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8554         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8556         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8558         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8560         * fs/udf.c: New file.
8562 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8564         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8565         (normal/lexer.c_DEPENDENCIES): New variables.
8566         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8567         (normal/lexer.c_DEPENDENCIES): Likewise.
8568         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8569         (normal/lexer.c_DEPENDENCIES): Likewise.
8570         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8571         (normal/lexer.c_DEPENDENCIES): Likewise.
8572         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8573         (normal/lexer.c_DEPENDENCIES): Likewise.
8574         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8575         (normal/lexer.c_DEPENDENCIES): Likewise.
8577 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8579         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8580         since they were intended to be in hex.  This didn't break previously
8581         because of a bug in gpt_partition_map_iterate() (see below).
8583         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8584         when checking the validity of GPT header.
8585         Remove `partno', since it always provides the same information as `i'.
8587 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8589         * include/grub/efi/time.h: Fix a wrong comment.
8591 2008-02-19  Pavel Roskin  <proski@gnu.org>
8593         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8594         message.
8596 2008-02-19  Bean  <bean123ch@gmail.com>
8598         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8599         (aout_mod_SOURCES): New variable.
8600         (aout_mod_CFLAGS): Likewise.
8601         (aout_mod_LDFLAGS): Likewise.
8602         (_bsd_mod_SOURCES): New variable.
8603         (_bsd_mod_CFLAGS): Likewise.
8604         (_bsd_mod_LDFLAGS): Likewise.
8605         (bsd_mod_SOURCES): New variable.
8606         (bsd_mod_CFLAGS): Likewise.
8607         (bsd_mod_LDFLAGS): Likewise.
8609         * include/grub/aout.h: New file.
8611         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8613         * include/grub/i386/bsd.h: New file.
8615         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8616         to make it public.
8618         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8619         function is called, so that it's possible to change it inside the hook.
8620         (grub_elf64_load): Likewise.
8621         (grub_elf_file): Don't close the file if elf header is not found.
8622         (grub_elf_close): Close the file if grub_elf_file fails (The new
8623         grub_elf_file won't close it).
8624         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8625         (grub_elf64_size): Likewise.
8627         * kern/i386/loader.S (grub_unix_real_boot): New function.
8629         * loader/aout.c: New file.
8631         * loader/i386/bsd.c: New file.
8633         * loader/i386/bsd_normal.c: New file.
8635         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8637         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8638         can test other formats.
8640 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8642         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8643         (grub_gpt_partition_type_empty): Redefine with macro from
8644         `<grub/gpt_partition.h>'.
8645         (gpt_partition_map_iterate): Adjust partition type comparison.
8647         Export `entry' as partmap-specific `part.data' struct.
8648         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8650         * include/grub/gpt_partition.h (grub_gpt_header)
8651         (grub_gpt_partentry): ... to here (new file).
8653         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8655         (grub_gpt_partition_type_bios_boot): New const variable, defined
8656         with macro from `<grub/gpt_partition.h>'.
8658         (setup): Replace `first_start' with `embed_region', which keeps
8659         track of the embed region (and is partmap-agnostic).
8661         Replace find_first_partition_start() with find_usable_region(),
8662         which finds a usable region for embedding using partmap-specific
8663         knowledge (supports PC/MSDOS and GPT).
8665         Fix all assumptions that the embed region start at sector 1, using
8666         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8667         rather than `first_start' to calculate available size.
8669         In grub_util_info() message, replace "into after the MBR" with an
8670         indication of the specific sector our embed region starts at.
8672 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8674         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8675         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8676         `commands/reboot.c'.
8677         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8678         (halt_mod_SOURCES): Likewise.
8679         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8680         (halt_mod_SOURCES): Likewise.
8682 2008-02-17  Christian Franke  <franke@computer.org>
8684         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8686 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8688         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8689         set `first_start' to 0 for non-PC/MSDOS partition maps.
8691 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8693         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8694         do not assume partition map is PC/MSDOS before performing checks that
8695         are specific to that layout.
8697 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8699         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8700         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8701         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8703 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8705         * configure.ac: Only a cosmetic change on the handling of
8706         -fno-stack-protector.
8708 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8710         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8711         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8712         reboot.c.
8713         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8714         (halt_mod_SOURCES): New variable.
8715         (halt_mod_CFLAGS): Likewise.
8716         (halt_mod_LDFLAGS): Likewise.
8717         (reboot_mod_SOURCES): Likewise.
8718         (reboot_mod_CFLAGS): Likewise.
8719         (reboot_mod_LDFLAGS): Likewise.
8721         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8722         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8723         reboot.c.
8724         (halt_mod_SOURCES): Likewise.
8725         (reboot_mod_SOURCES): Likewise.
8727         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8728         commands/i386/pc/reboot.c by commands/reboot.c.
8729         (reboot_mod_SOURCES): Likewise.
8731         * commands/i386/pc/reboot.c: merge this file ...
8733         * commands/ieee1275/reboot.c: ... and this file ...
8735         * commands/reboot.c: ... to this file.
8736         Add some precompiler directive to include the correct header for
8737         each machine.
8739         * commands/ieee1275/halt.c: move this file ...
8741         * commands/halt.c: ... to here.
8742         Add some precompiler directive to include the correct header for
8743         each machine.
8745         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8746         (grub_halt): Likewise.
8748         * kern/efi/efi.c (grub_reboot): New function.
8749         (grub_halt): Likewise.
8751 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8753         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8754         /dev (like it is done for /dev/mapper).  This doesn't provide support
8755         for EVMS, but at least it is now easy to identify the problem when it
8756         arises.
8758 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8760         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8761         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8762         comparing it with -1, not 0.
8764 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8766         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8767         `disk/lvm.c'.
8768         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8769         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8771         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8772         `disk/lvm.c' to the end of the list.
8773         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8774         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8776 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8778         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8779         grub_print_error() instead.  This will let user know why we're entering
8780         rescue mode.
8781         Based on suggestions from Sam Morris.
8783 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8785         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8786         on remaining N args, instead of "--" arg N times.
8788 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8790         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8791         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8792         pattern for unknown glyphs.
8794 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8796         * configure.ac: Probe for `help2man'.
8797         * Makefile.in (builddir): New variable.
8798         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8799         or otherwise add a few flags/options to it.
8800         (install-local): For every executable utility or script that is
8801         installed, invoke $(HELP2MAN) to install a manpage based on --help
8802         output.
8804         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8805         that it doesn't prevent --help from working in build tree.
8807         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8808         with `bug-grub@gnu.org'.
8809         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8810         * util/update-grub.in (usage): New function.
8811         Implement proper argument check, with support for --help and --version
8812         (as well as existing -y).
8814 2008-02-09  Christian Franke  <franke@computer.org>
8816         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8817         avoid overwriting previous output.
8818         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8820 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8822         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8823         drawing the menu.
8825 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8827         * commands/sleep.c: New file.
8828         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8829         (sleep_mod_SOURCES): New variable.
8830         (sleep_mod_CFLAGS): Likewise.
8831         (sleep_mod_LDFLAGS): Likewise.
8833 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8835         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8836         situations in which we can deduce the RAID size and the superblock
8837         doesn't match it.
8839 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8841         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8842         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8843         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8845         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8846         and return a grub_diskmemberlist_t composed of physical array members.
8847         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8849         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8850         prototype.
8851         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8852         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8853         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8855         * util/grub-probe.c (probe): Move partmap probing code from here ...
8856         (probe_partmap): ... to here.
8857         (probe): Use probe_partmap() once for the disk we're probing, and
8858         additionally, when such disk contains a memberlist() struct member,
8859         once for each disk that is contained in the structure returned by
8860         memberlist().
8862 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8864         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8865         environment variable to 'all' in order to obtain debug output from
8866         non-util/ code.
8867         * util/i386/pc/grub-setup.c (main): Likewise.
8869 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8871         * disk/raid.c (grub_raid_scan_device): Check for
8872         `array->device[sb.this_disk.number]' rather than for
8873         `array->device[sb.this_disk.number]->name', since the latter is not
8874         guaranteed to be accessible.
8876 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8878         * disk/raid.c: Update copyright.
8879         * fs/cpio.c: Likewise.
8880         * include/grub/raid.h: Likewise.
8881         * loader/i386/pc/multiboot.c: Likewise.
8882         * util/hostfs.c: Likewise.
8884 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8886         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8887         to a grub_disk_t array.
8888         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8889         `device[x]'.
8890         (grub_raid_scan_device): Replace `device[x].name' accesses with
8891         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8893 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8895         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8896         grub_dprintf() calls.
8897         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8898         error message.
8900 2008-02-07  Christian Franke  <franke@computer.org>
8902         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8903         instead of fseek and ftell to support large files.
8904         (grub_hostfs_read): Likewise.
8906 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8908         Patch from Jeroen Dekkers.
8909         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8910         failure, since successfully reading all array members might not be
8911         required.
8913 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8915         * util/grub-probe.c (probe): Simplify partmap probing (with the
8916         assumption that the first word up to the underscore equals to
8917         the module name).
8919 2008-02-06  Christian Franke  <franke@computer.org>
8921         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8922         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8923         last block of a cpio or tar stream.
8924         Check for "TRAILER!!!" instead of any empty data
8925         block to detect last block of a cpio stream.
8926         (grub_cpio_dir): Fix constness of variable np.
8927         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8928         cpio or tar trailer is detected.  This fixes a crash
8929         on open of a non existing file.
8931 2008-02-05  Bean  <bean123ch@gmail.com>
8933         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8934         address of entry.
8935         (grub_multiboot_load_elf64): Likewise.
8936         (grub_multiboot): Initialize mbi structure.
8938         * util/grub-fstest.c: Don't include unused header file script.h.
8940         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8941         of file.
8942         (grub_fstest_SOURCES): Likewise.
8944 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8946         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8947         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8948         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8949         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8951         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8952         (translation_table): Replace hardcoded values with macros
8953         provided by `<grub/term.h>'.
8955         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8956         (keyboard_map): Correct/add a few values, with macros provided
8957         by `<grub/term.h>'.
8958         (keyboard_map_shift): Zero values that don't differ from their
8959         `keyboard_map' equivalents.
8960         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8961         Discard the second scan code that is always sent by Caps lock.
8962         Only use `keyboard_map_shift' when it provides a non-zero value,
8963         otherwise fallback to `keyboard_map'.
8965 2008-02-04  Bean  <bean123ch@gmail.com>
8967         * Makefile.in (enable_grub_fstest): New variable.
8969         * conf/common.rmk (grub_fstest_init.lst): New rule.
8970         (grub_fstest_init.h): Likewise.
8971         (grub_fstest_init.c): Likewise.
8972         (util/grub-fstest.c_DEPENDENCIES): New variable.
8973         (grub_fstest_SOURCES): Likewise.
8975         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8977         * util/grub-fstest.c: New file.
8979 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8981         Make grub-setup handle a separate root device.
8983         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8984         so that the root device can be compared with the destination
8985         device.
8986         When embedding the core image, if the root and destination devices
8987         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8988         0xFF.
8989         When not embedding, set ROOT_DRIVE to 0xFF.
8991 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8993         Add support for having a grub directory in a different drive. This
8994         is still only the data handling part.
8996         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8997         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8998         (grub_root_drive): New variable.
9000         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
9001         instead of GRUB_BOOT_DRIVE to construct a device name. Set
9002         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
9003         as it was.
9005         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
9007         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
9008         macro.
9009         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
9011         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
9012         is bogus, because PXE booting does not specify any drive
9013         correctly.
9015         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
9016         am not sure if this is really correct.
9018         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
9019         is always identical to the boot drive when booting from a CD.
9021         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
9022         longer.
9023         (root_drive): New variable.
9024         (real_start): Unconditionally set %dh to ROOT_DRIVE.
9025         (setup_sectors): Push %dx right after popping it, because %dh will
9026         be modified later.
9027         (copy_buffer): Restore %dx.
9029 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9031         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
9032         use `cdboot.img' for cdrom images.
9034 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9036         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
9037         only setup gfxterm when `font' command has succeeded.
9039 2008-02-03  Robert Millan  <rmh@aybabtu.com>
9041         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
9042         (grub_rescue_cmd_multiboot_loader)
9043         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
9045 2008-02-03  Pavel Roskin  <proski@gnu.org>
9047         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
9048         %edx and %esi from stack only after grub_gate_a20() is called.
9049         grub_gate_a20() clobbers %edx.
9051 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
9053         * configure.ac (AC_INIT): Bumped to 1.96.
9055         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
9056         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
9057         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
9058         video/readers/png.c.
9060 2008-02-03  Bean  <bean123ch@gmail.com>
9062         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
9063         (cdboot_img_SOURCES): New variable.
9064         (cdboot_img_ASFLAGS): New variable.
9065         (cdboot_img_LDFLAGS): New variable.
9067         * boot/i386/pc/cdboot.S: New file.
9069         * disk/i386/pc/biosdisk.c (cd_start): New variable.
9070         (cd_count): Likewise.
9071         (grub_biosdisk_get_drive): Add support for cd device.
9072         (grub_biosdisk_call_hook): Likewise.
9073         (grub_biosdisk_iterate): Likewise.
9074         (grub_biosdisk_open): Likewise.
9075         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
9076         (grub_biosdisk_rw): Support reading from cd device.
9077         (GRUB_MOD_INIT): Iterate cd devices.
9079         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
9080         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
9081         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
9083         * kern/i386/pc/init.c (make_install_device): Check for cd device.
9085 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9087         * commands/read.c: New file.
9088         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
9089         (read_mod_SOURCES): New variable.
9090         (read_mod_CFLAGS): Likewise.
9091         (read_mod_LDFLAGS): Likewise.
9093 2008-02-02  Robert Millan  <rmh@aybabtu.com>
9095         * normal/main.c (grub_normal_execute): Check for `menu->size' when
9096         determining whether menu has to be displayed.
9098 2008-02-02  Marco Gerards  <marco@gnu.org>
9100         * bus/pci.c: New file.
9102         * include/grub/pci.h: Likewise.
9104         * include/grub/i386/pc/pci.h: Likewise.
9106         * commands/lspci.c: Likewise.
9108         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
9109         `lspci.mod'.
9110         (pci_mod_SOURCES): New variable.
9111         (pci_mod_CFLAGS): Likewise.
9112         (pci_mod_LDFLAGS): Likewise.
9113         (lspci_mod_SOURCES): Likewise.
9114         (lspci_mod_CFLAGS): Likewise.
9115         (lspci_mod_LDFLAGS): Likewise.
9117 2008-02-02  Bean  <bean123ch@gmail.com>
9119         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9120         (grub_ufs_get_file_block): Fix indirect block calculation problem.
9122         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9123         (grub_xfs_btree_node): New structure.
9124         (grub_xfs_btree_root): New structure.
9125         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9126         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9127         (GRUB_XFS_EXTENT_BLOCK): Likewise.
9128         (GRUB_XFS_EXTENT_SIZE): Likewise.
9129         (grub_xfs_read_block): Support btree format type.
9130         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9131         Use directory block as basic unit.
9133         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9135         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9136         __attribute__ ((__regparm__ (1))).
9138 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9140         Correct a mistake in previous commit.
9142         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9143         top.
9144         (normal/command.c_DEPENDENCIES): New variable.
9146 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9148         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9149         top.
9150         (normal/command.c_DEPENDENCIES): New variable.
9151         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9152         * conf/i386-ieee1275.rmk: Likewise.
9153         * conf/i386-linuxbios.rmk: Likewise.
9154         * conf/i386-pc.rmk: Likewise.
9155         * conf/sparc64-ieee1275.rmk: Likewise.
9156         * conf/powerpc-ieee1275.rmk: Likewise.
9157         (grub_emu_SOURCES): Add `fs/fshelp.c'.
9159         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9161 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9163         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9164         call at beginning of function.
9166 2008-01-31  Pavel Roskin  <proski@gnu.org>
9168         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9169         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9170         (grub_mkrescue_SOURCES): Likewise.
9171         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9173 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9175         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9176         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9177         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9178         (grub_probe_SOURCES): ... to here.
9180         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9181         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9182         * conf/i386-ieee1275.rmk: Likewise.
9183         * conf/i386-linuxbios.rmk: Likewise.
9184         * conf/powerpc-ieee1275.rmk: Likewise.
9186 2008-01-30  Tristan Gingold  <gingold@free.fr>
9188         * kern/rescue.c: Silently accept empty lines.
9190 2008-01-29  Bean  <bean123ch@gmail.com>
9192         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9193         (real_code_2): Code cleanup and change comment style.
9194         (move_memory): Avoid using 32-bit address mode.
9196 2008-01-29  Bean  <bean123ch@gmail.com>
9198         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9199         (png_mod_SOURCES): New variable.
9200         (png_mod_CFLAGS): Likewise.
9201         (png_mod_LDFLAGS): Likewise.
9203         * video/readers/png.c: New file.
9205 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9207         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9208         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9209         `ifndef GRUB_MOD_GAP' hack.
9210         * util/elf/grub-mkimage.c (add_segments): Likewise.
9212 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9214         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9215         `GRUB_MOD_GAP' for platforms in which it's not defined.
9216         * util/elf/grub-mkimage.c (add_segments): Likewise.
9218 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9220         Get grub-emu to build again (including parallel builds).
9222         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9223         Split into ...
9224         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9225         (normal/execute.c_DEPENDENCIES): ... this, ...
9226         (grub-emu_DEPENDENCIES): ... and this.
9228         * conf/i386-efi.rmk: Likewise.
9229         * conf/i386-linuxbios.rmk: Likewise.
9230         * conf/i386-ieee1275.rmk: Likewise.
9231         * conf/powerpc-ieee1275.rmk: Likewise.
9232         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9234 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9236         * NEWS: Add a few items.
9238 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9240         Fix parallel builds with grub-emu.  Based on earlier commit for
9241         grub-probe and grub-setup.
9243         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9244         (util/grub-emu.c_DEPENDENCIES): ... this.
9245         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9246         (util/grub-emu.c_DEPENDENCIES): ... this.
9247         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9248         (util/grub-emu.c_DEPENDENCIES): ... this.
9249         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9250         (util/grub-emu.c_DEPENDENCIES): ... this.
9251         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9252         (util/grub-emu.c_DEPENDENCIES): ... this.
9254 2008-01-27  Pavel Roskin  <proski@gnu.org>
9256         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9257         to create a gap between _end and the modules added to the image
9258         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9259         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9260         * util/elf/grub-mkimage.c (add_segments): Likewise.
9262 2008-01-26  Pavel Roskin  <proski@gnu.org>
9264         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9265         just return an error.
9267 2008-01-26  Bean  <bean123ch@gmail.com>
9269         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9270         (grub_reiserfs_get_item): Save offset of the next item.
9271         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9273 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9275         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9276         make all filesystem sources appear together (possibly fixing omissions
9277         while at it).
9278         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9279         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9280         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9281         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9283         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9284         add `kern/file.c'.
9285         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9286         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9287         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9288         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9290         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9291         (probe): Add a sanity check to make sure of our ability to read
9292         requested files when probing for filesystem type.
9294         * genmk.rb: Update copyright year (2007).
9296         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9297         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9298         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9299         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9300         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9301         : Remove function prototypes.
9303 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9305         Revert my previous commits (based on wrong assumption of how grub_errno
9306         works).
9308         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9309         * kern/file.c (grub_file_open): Likewise.
9311 2008-01-24  Pavel Roskin  <proski@gnu.org>
9313         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9314         that hang if GRUB tries to setup colors.
9315         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9316         colors for firmwares that don't support it.
9317         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9318         Recognize Open Hack'Ware, set flags to work around its
9319         limitations.
9321 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9323         * kern/file.c (grub_file_open): Do not account previous failures of
9324         unrelated functions when grub_errno is checked for.
9325         Reported by Oleg Strikov.
9327 2008-01-24  Bean  <bean123ch@gmail.com>
9329         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9330         (grub_ufs_sblock): New member volume name.
9331         (grub_ufs_find_file): Fix string copy bug.
9332         (grub_ufs_label): Implement this function properly.
9334         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9335         (grub_hfs_iterate_records): Use the correct file number for extents
9336         and catalog file. Fix problem in next index calculation.
9337         (grub_hfs_find_node): Replace recursive function call with loop.
9338         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9340 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9342         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9343         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9344         (grub_multiboot2_real_boot): New function prototype.
9346         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9347         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9349         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9350         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9352 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9354         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9355         #ifdef'ed out grub_printf().
9357 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9359         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9360         grub_dprintf calls, since they make "debug=all" mode unusable.
9361         (grub_console_checkkey): Likewise.
9363 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9365         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9366         `term/i386/pc/at_keyboard.c'.
9367         (pkglib_MODULES): Add `serial.mod'.
9368         (serial_mod_SOURCES): New variable.
9369         (serial_mod_CFLAGS): Likewise.
9370         (serial_mod_LDFLAGS): Likewise.
9372         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9373         `<grub/powerpc/ieee1275/console.h>'.
9374         (grub_keyboard_controller_init): New function prototype.
9375         (grub_console_checkkey): Likewise.
9376         (grub_console_getkey): Likewise.
9378         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9379         keyboard on i386.
9381         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9382         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9384 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9386         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9387         present, "(memdisk)/boot/grub" becomes the default prefix.
9389         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9390         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9391         allows users to overlay additional files into the image.
9393 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9395         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9396         and `machine/memory.h'.
9397         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9398         (_multiboot_mod_SOURCES): New variable.
9399         (_multiboot_mod_CFLAGS): Likewise.
9400         (_multiboot_mod_LDFLAGS): Likewise.
9401         (multiboot_mod_SOURCES): Likewise.
9402         (multiboot_mod_CFLAGS): Likewise.
9403         (multiboot_mod_LDFLAGS): Likewise.
9405         * include/grub/i386/ieee1275/loader.h: New file.
9407         * include/grub/i386/ieee1275/machine.h: Likewise.
9409         * include/grub/i386/ieee1275/memory.h: Likewise.
9411         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9412         variable declaration.
9413         (grub_os_area_size): Likewise.
9415         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9416         (grub_lower_mem, grub_upper_mem): New variables.
9417         (grub_stop_floppy): New function (just to make
9418         grub_multiboot2_real_boot() happy).
9420         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9421         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9422         (grub_stop): New function.
9423         Include `"../realmode.S"' and `"../loader.S"'.
9425         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9426         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9428         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9429         rely on grub_multiboot2_real_boot() for final boot.
9431 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9433         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9434         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9435         device that doesn't look like an SD card.
9436         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9437         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9438         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9439         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9440         found.
9442 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9444         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9445         avoid claiming over our own code.
9447 2008-01-22  Bean  <bean123ch@gmail.com>
9449         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9450         (jpeg_mod_SOURCES): New variable.
9451         (jpeg_mod_CFLAGS): Likewise.
9452         (jpeg_mod_LDFLAGS): Likewise.
9454         * video/readers/jpeg.c : New file.
9456 2008-01-22  Bean  <bean123ch@gmail.com>
9458         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9459         there are no more items.
9461 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9463         * kern/mm.c (grub_mm_init_region): Improve debug message.
9465 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9467         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9468         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9469         address.
9470         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9471         a C macro.
9472         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9473         Indicates start of upper memory.
9474         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9475         (generate_image): Abort when image size is big enough to corrupt
9476         upper memory.
9478         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9479         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9480         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9481         instead of hardcoding 0xA0000.
9482         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9483         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9484         instead of hardcoding 0xA0000.
9486 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9488         * disk/memdisk.c (memdisk_size): New variable.
9489         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9490         `memdisk_size'.
9491         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9492         image to dynamic memory.
9493         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9494         `memdisk_size'.  Free memdisk block.
9496 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9498         Fix detection of very small filesystems (like tar).
9500         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9501         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9502         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9503         a problem with this disk).
9505 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9507         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9508         on grub_biosdisk_rw_standard() error.
9510 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9512         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9513         recent changes.
9514         * kern/elf.c: Likewise.
9515         * kern/ieee1275/ieee1275.c: Likewise.
9516         * kern/powerpc/ieee1275/openfw.c: Likewise.
9517         * term/ieee1275/ofconsole.c: Likewise.
9519 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9521         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9523         * include/grub/kernel.h (grub_arch_memdisk_addr)
9524         (grub_arch_memdisk_size): Moved from here ...
9526         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9527         (grub_arch_memdisk_size): ... to here.
9529 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9531         Mostly based on bugfix from Bean.
9533         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9534         attribute with hook() parameter.
9535         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9536         declaration.
9537         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9538         attribute with hook() parameter.
9539         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9540         declaration.
9542 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9544         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9545         (pkglib_MODULES): Add `memdisk.mod'.
9546         (memdisk_mod_SOURCES): New variable.
9547         (memdisk_mod_CFLAGS): Likewise.
9548         (memdisk_mod_LDFLAGS): Likewise.
9550         * disk/memdisk.c: New file.
9552         * include/grub/disk.h (grub_disk_dev_id): Add
9553         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9555         * include/grub/i386/pc/kernel.h
9556         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9557         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9558         (grub_kernel_image_size): New variable declaration.
9559         (grub_total_module_size): Likewise.
9560         (grub_memdisk_image_size): Likewise.
9562         * include/grub/i386/pc/memory.h
9563         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9565         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9566         (grub_arch_memdisk_addr): New variable declaration.
9567         (grub_arch_memdisk_size): Likewise.
9569         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9570         (grub_arch_memdisk_size): Likewise.
9572         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9573         (codestart): Replace hardcoded `0x100000' with
9574         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9576         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9577         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9578         not NULL, append the contents of the file it refers to, at the end of
9579         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9580         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9581         (options): Add "memdisk"|'m' option.
9582         (main): Parse --memdisk|-m option, and pass user-provided path as
9583         parameter to generate_image().
9585 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9587         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9588         grub_dprintf() calls from here ...
9589         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9591 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9593         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9595         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9596         declaration.
9597         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9598         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9599         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9600         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9601         property).
9602         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9603         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9605 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9607         Get rid of confusing function (superseded by
9608         `grub_ieee1275_get_integer_property')
9609         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9610         prototype.
9611         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9612         function.
9613         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9614         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9615         in native endianness from grub_ieee1275_get_integer_property().
9617 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9619         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9620         command after "shut-down", since implementations differ on which
9621         the command for halt is.
9623 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9625         * include/grub/i386/linuxbios/console.h: Add header protection.
9626         (grub_keyboard_controller_init): New function prototype.
9627         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9628         (KEYBOARD_COMMAND_READ): Likewise.
9629         (KEYBOARD_COMMAND_WRITE): Likewise.
9630         (KEYBOARD_SCANCODE_SET1): Likewise.
9631         (grub_keyboard_controller_write): New function.
9632         (grub_keyboard_controller_read): Likewise.
9633         (grub_keyboard_controller_init): Likewise.
9635         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9636         (grub_console_init): On coreboot/LinuxBIOS, call
9637         grub_keyboard_controller_init().
9639 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9641         PowerPC changes provided by Pavel Roskin.
9643         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9644         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9645         don't rely on cmain() doing it.
9646         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9647         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9649 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9651         * include/grub/i386/linuxbios/memory.h
9652         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9653         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9654         receive `table_header' as argument.  Instead, probe for it in the
9655         known memory ranges where it can be present.
9656         (grub_available_iterate): Do not pass a fixed `table_header' address
9657         to grub_linuxbios_table_iterate().
9659 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9661         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9662         * conf/i386-ieee1275.rmk: New file.
9663         * include/grub/i386/ieee1275/console.h: Likewise.
9664         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9665         * include/grub/i386/ieee1275/kernel.h: Likewise.
9666         * include/grub/i386/ieee1275/time.h: Likewise.
9667         * kern/i386/ieee1275/init.c: Likewise.
9668         * kern/i386/ieee1275/startup.S: Likewise.
9670 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9672         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9673         when pointers are 32-bit (but still do set it to one when they are
9674         64-bit).
9676 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9678         * include/grub/ieee1275/ieee1275.h
9679         (grub_ieee1275_get_integer_property): New function prototype.
9681         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9682         (grub_ieee1275_get_integer_property): New function.  Wraps around
9683         grub_ieee1275_get_property() to handle endianness.
9685         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9686         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9687         where appropriate.
9688         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9689         (grub_map): Likewise.
9690         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9692 2008-01-15  Bean  <bean123ch@gmail.com>
9694         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9695         (grub_script_execute_cmdline): Reset grub_errno.
9697         * normal/main.c (read_config_file): Reset grub_errno.
9699         * normal/parse.y (script_init): New.
9700         (script): Move function and menuentry here.
9701         (delimiter): New.
9702         (command): Add delimiter at the end of command.
9703         (commands): Adjust to match the new command.
9704         (commandblock): Remove grub_script_lexer_record_start.
9705         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9706         (if): Use the new commands.
9708         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9710 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9712         * normal/menu.c (run_menu): Move timeout message from here ...
9713         (print_timeout): ... to here.
9714         (run_menu): Use print_timeout() once during initial draw to print
9715         the whole message, and again in every clock tick to update only
9716         the number of seconds.
9718 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9720         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9721         actual size of `available' from grub_ieee1275_get_property(), and
9722         restrict parsing to that bound.
9724 2008-01-15  Christian Franke  <franke@computer.org>
9726         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9727         (argp_program_version): Remove variable.
9728         (argp_program_bug_address): Likewise.
9729         (options): Convert from struct argp_option to struct option.
9730         (struct arguments): Remove.
9731         (parse_opt): Remove.
9732         (usage): New function.
9733         (main): Replace struct args members by simple variables.
9734         Replace argp_parse() by getopt_long().
9735         Add switch to evaluate options.
9736         Add missing "(...)" around root_dev in prefix string.
9738 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9740         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9741         for grub_ieee1275_exit(), in order to improve portability.
9743 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9745         * util/grub.d/10_linux.in (prefix): Define.
9746         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9748 2008-01-13  Pavel Roskin  <proski@gnu.org>
9750         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9751         grub_errno if no errors have been detected.
9753 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9755         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9756         (grub_util_get_dev_abstraction): New function prototype.
9758         * util/getroot.c: Include `<grub/util/getroot.h>'
9759         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9760         (grub_util_get_dev_abstraction): ... here (new function).
9762         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9763         `PRINT_ABSTRACTION'.
9764         (probe): Probe for abstraction type when requested.
9765         (main): Understand `--target=abstraction'.
9767         * util/i386/efi/grub-install.in: Add abstraction module to core
9768         image when it is found to be necessary.
9769         * util/i386/pc/grub-install.in: Likewise.
9770         * util/powerpc/ieee1275/grub-install.in: Likewise.
9772         * util/update-grub_lib.in (font_path): Return system path without
9773         converting to GRUB path.
9774         * util/update-grub.in: Convert system path returned by font_path()
9775         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9776         abstraction module is needed for loading fonts (if any).  Export
9777         that as `GRUB_PRELOAD_MODULES'.
9778         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9779         insmod commands).
9781 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9783         Remove some unused code from reiserfs.
9785         * fs/reiserfs.c (struct grub_reiserfs_key)
9786         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9787         (struct grub_reiserfs_node_body): Removed.
9788         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9789         Likewise.
9790         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9791         Likewise.
9792         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9793         Likewise.
9794         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9795         Likewise.
9796         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9797         Likewise.
9798         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9799         Likewise.
9800         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9801         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9802         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9804 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9806         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9807         Determines if a file is garbage left by packaging systems, etc.
9808         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9809         for processing /etc/grub.d scripts.
9810         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9811         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9812         as a condition for processing Linux images.
9814 2008-01-10  Pavel Roskin  <proski@gnu.org>
9816         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9817         to compile reiserfs.c on PowerPC.
9819 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9821         * kern/device.c (grub_device_iterate): Do not abort device iteration
9822         when one of the devices cannot be opened.
9823         * kern/disk.c (grub_disk_open): Do not account previous failures of
9824         unrelated functions when grub_errno is checked for.
9826 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9828         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9829         `! grub_linux_is_bzimage', change order of address comparison to make
9830         it more intuitive, and improve "too big zImage" error message.
9832 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9834         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9835         `$(update-grub_DATA)'.
9836         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9837         targets.
9839 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9841         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9842         which instruction is modified by grub-setup during installation
9843         (since it wasn't obvious by only looking at this file).
9845 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9847         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9848         listing actual TODO items.
9850 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9852         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9853         correctly.
9854         (grub_reiserfs_get_key_offset): Likewise.
9855         (grub_reiserfs_set_key_offset): Likewise.
9856         (grub_reiserfs_set_key_type): Likewise.
9857         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9859         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9860         better to remove the bitfield version completely.
9862 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9864         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9865         allocated from the heap, due to the fshelp implementation.
9866         (grub_reiserfs_dir): Free NODE, due to the same reason.
9868 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9870         Mostly from Vincent Pelletier:
9872         * fs/reiserfs.c: New file.
9874         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9875         (reiserfs_mod_SOURCES): New variable.
9876         (reiserfs_mod_CFLAGS): Likewise.
9877         (reiserfs_mod_LDFLAGS): Likewise.
9879         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9880         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9881         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9882         normal/color.c.
9884 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9886         * normal/color.c: Remove `<grub/env.h>'.
9888 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9890         * include/grub/normal.h: Include <grub/env.h>.
9892 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9894         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9895         usage example with `(hd0,1)'.
9896         Reported by Samuel Thibault.
9898 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9900         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9901         (grub_linux_boot_zimage): Rename to ...
9902         (grub_linux_boot): ... this.
9903         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9904         (grub_linux_boot_zimage): Conditionalize zImage copy.
9906         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9907         (grub_linux_boot_bzimage): Remove prototype.
9908         (grub_linux_boot_zimage): Rename to ...
9909         (grub_linux_boot): ... this.
9911         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9912         (grub_linux_boot): Remove function.
9914 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9916         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9917         (grub_env_write_color_highlight): Likewise.
9918         (grub_wait_after_message): Likewise.
9920         * normal/color.c: New file.
9922         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9923         (normal_mod_DEPENDENCIES): Likewise.
9925         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9926         (normal_mod_DEPENDENCIES): Likewise.
9928         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9929         (normal_mod_DEPENDENCIES): Likewise.
9931         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9932         (normal_mod_DEPENDENCIES): Likewise.
9934         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9935         for waiting after a message is printed.
9936         * normal/main.c (read_config_file): Likewise.
9937         (grub_normal_init): Register grub_env_write_color_normal() and
9938         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9939         `color_highlight' variables as global.
9941         * normal/menu.c (grub_wait_after_message): New function.
9942         (grub_color_menu_normal): New variable.  Replaces ...
9943         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9944         (grub_color_menu_highlight): New variable.  Replaces ...
9945         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9946         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9947         `GRUB_TERM_COLOR_STANDARD'.
9948         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9949         `normal_code' and `highlight_code' to `old_color_normal' and
9950         `old_color_highlight', respectively.
9951         (grub_menu_init_page): Update colors when drawing the menu, based on
9952         `menu_color_normal' and `menu_color_highlight' variables.
9953         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9954         a message is printed.
9956 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9958         * kern/env.c (grub_env_context_open): Propagate hooks for global
9959         variables to new context.
9961         * kern/main.c (grub_set_root_dev): Export `root' variable.
9963 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9965         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9966         discs unconditionally, since udev and others have options to provide
9967         them.
9969 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9971         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9973 2008-01-04  Christian Franke  <franke@computer.org>
9975         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9976         of eisa_mmap.
9978 2008-01-03  Pavel Roskin  <proski@gnu.org>
9980         * kern/i386/linuxbios/init.c: Put "void" to all function
9981         declarations with no arguments.
9982         * kern/powerpc/ieee1275/init.c: Likewise.
9983         * term/i386/pc/at_keyboard.c: Likewise.
9984         * term/i386/pc/vga_text.c: Likewise.
9985         * util/grub-mkdevicemap.c: Likewise.
9987 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9989         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9990         message when loaded image is out of bounds.
9991         (grub_multiboot_load_elf64): Likewise.
9993 2008-01-02  Pavel Roskin  <proski@gnu.org>
9995         * util/grub.d/10_linux.in: Try version without ".old" when
9996         looking for initrd.  It's better to use initrd from the newer
9997         kernel of the same version than no initrd at all.
9999 2008-01-01  Robert Millan  <rmh@aybabtu.com>
10001         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
10003 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
10005         * include/grub/video.h: Added grub_video_unmap_color and
10006         grub_video_get_active_render_target.
10007         (grub_video_adapter): Added unmap_color and get_active_render_target.
10009         * video/video.c: Added grub_video_unmap_color and
10010         grub_video_get_active_render_target.
10011         (grub_video_get_info): Changed method to accept NULL pointer as an
10012         argument to allow detection of active video adapter.
10014         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
10015         grub_video_vbe_unmap_color_int.
10016         Added grub_video_vbe_unmap_color and
10017         grub_video_vbe_get_active_render_target.
10018         (grub_video_vbe_adapter): Added unmap_color and
10019         get_active_render_target.
10021         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
10022         with grub_video_vbe_unmap_color_int.
10024         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
10025         (DEFAULT_NORMAL_COLOR): Likewise.
10026         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
10027         (DEFAULT_FG_COLOR): Removed.
10028         (DEFAULT_BG_COLOR): Likewise.
10029         (DEFAULT_CURSOR_COLOR): Changed value.
10030         (grub_virtual_screen): Added standard_color_setting,
10031         normal_color_setting, highlight_color_setting and term_color.
10032         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
10033         (bitmap_width): Added.
10034         (bitmap_height): Likewise.
10035         (bitmap): Likewise.
10036         (set_term_color): Likewise.
10037         (grub_virtual_screen_setup): Changed to use new terminal coloring
10038         settings.
10039         (grub_gfxterm_init): Added init for bitmap.
10040         (grub_gfxterm_fini): Added destroy for bitmap.
10041         (redraw_screen_rect): Updated to use background bitmap and new
10042         terminal coloring.
10043         (scroll_up): Added optimization for case when there is no bitmap.
10044         (grub_gfxterm_cls): Fixed to use correct background color.
10045         (grub_virtual_screen_setcolorstate): Changed to use new terminal
10046         coloring.
10047         (grub_virtual_screen_setcolor): Likewise.
10048         (grub_virtual_screen_getcolor): Added.
10049         (grub_gfxterm_background_image_cmd): Likewise.
10050         (grub_video_term): Added setcolor and getcolor.
10051         (MOD_INIT): Added registration of background_image command.
10052         (MOD_TERM): Added unregistration for background_image command.
10054 2007-12-30  Pavel Roskin  <proski@gnu.org>
10056         * loader/multiboot_loader.c: Fix multiboot command
10057         unregistration.  Fix all typos in the word "multiboot".
10059 2007-12-29  Pavel Roskin  <proski@gnu.org>
10061         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
10062         support for initrd names used in Fedora.
10064 2007-12-26  Bean  <bean123ch@gmail.com>
10066         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
10067         (cpio_mod_SOURCES): New variable.
10068         (cpio_mod_CFLAGS): Likewise.
10069         (cpio_mod_LDFLAGS): Likewise.
10071         * fs/cpio.c: New file.
10073         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
10075         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
10077         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
10079         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10081 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10083         * include/grub/term.h (struct grub_term): Add `getcolor' function.
10084         (grub_getcolor): New function.
10086         * kern/term.c (grub_getcolor): New function.
10087         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
10088         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
10089         (print_entry): Set normal and highlight colors to
10090         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
10091         respectively, before printing and restore them to old
10092         values afterwards.
10093         (grub_menu_init_page): Likewise.  Fill an additional colored space
10094         that would otherwise be left blank.
10096         * term/efi/console.c (grub_console_getcolor): New function.
10097         (struct grub_console_term.getcolor): New variable.
10098         * term/i386/pc/console.c (grub_console_getcolor): New function.
10099         (struct grub_console_term.getcolor): New variable.
10100         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
10101         (struct grub_console_term.getcolor): New variable.
10103         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
10104         (struct grub_console_term.setcolor): Remove variable.
10105         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
10106         (struct grub_console_term.setcolor): Remove variable.
10107         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
10108         (struct grub_console_term.setcolor): Remove variable.
10109         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10110         (struct grub_console_term.setcolor): Remove variable.
10112 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10114         * configure.ac: Search for possible unifont.hex locations, and
10115         define UNIFONT_HEX if found.
10117         * Makefile.in (UNIFONT_HEX): Define variable.
10118         (DATA): Rename to ...
10119         (PKGLIB): ... this.  Update all users.
10120         (PKGDATA): New variable.
10121         (pkgdata_IMAGES): Rename to ...
10122         (pkglib_IMAGES): ... this. Update all users.
10123         (pkgdata_MODULES): Rename to ...
10124         (pkglib_MODULES): ... this. Update all users.
10125         (pkgdata_PROGRAMS): Rename to ...
10126         (pkglib_PROGRAMS): ... this. Update all users.
10127         (pkgdata_DATA): Rename to ...
10128         (pkglib_DATA): ... this. Update all users.
10129         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10130         (unicode.pff, ascii.pff): New rules.
10131         (all-local): Add `$(PKGDATA)' dependency.
10132         (install-local): Process `$(PKGDATA)'.
10134         * util/update-grub_lib.in (font_path): Search for *.pff files in
10135         a few more locations, including `${pkgdata}'.
10137 2007-12-23  Robert Millan  <rmh@aybabtu.com>
10139         Patch from Bean  <bean123ch@gmail.com>:
10140         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10141         `size'.
10143 2007-12-21  Bean  <bean123ch@gmail.com>
10145         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10146         (ntfscomp_mod_SOURCES): New variable.
10147         (ntfscomp_mod_CFLAGS): Likewise.
10148         (ntfscomp_mod_LDFLAGS): Likewise.
10150         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10151         (grub_probe_SOURCES): Likewise.
10152         (grub_emu_SOURCES): Likewise.
10154         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10155         (grub_emu_SOURCES): Likewise.
10157         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10158         (grub_emu_SOURCES): Likewise.
10160         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10161         (grub_emu_SOURCES): Likewise.
10163         * fs/ntfs.c (grub_ntfscomp_func): New variable.
10164         (read_run_list): Renamed to grub_ntfs_read_run_list.
10165         (decomp_nextvcn): Moved to ntfscomp.c.
10166         (decomp_getch): Likewise.
10167         (decomp_get16): Likewise.
10168         (decomp_block): Likewise.
10169         (read_block): Likewise.
10170         (read_data): Partially moved to ntfscomp.c.
10171         (fixup): Change unsigned to grub_uint16_t.
10172         (read_mft): Change unsigned long to grub_uint32_t.
10173         (read_attr): Likewise.
10174         (read_data): Likewise.
10175         (read_run_data): Likewise.
10176         (read_run_list): Likewise.
10177         (read_mft): Likewise.
10179         * fs/ntfscomp.c: New file.
10181         * include/grub/ntfs.h: New file.
10183 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10185         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10186         IDE disk check, since Linux is known to support 20 IDE disks.
10187         Reported by Colin Watson.
10189 2007-12-15  Bean  <bean123ch@gmail.com>
10191         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10192         (lnxboot_img_SOURCES): New variable.
10193         (lnxboot_img_ASFLAGS): Likewise.
10194         (lnxboot_img_LDFLAGS): Likewise.
10196         * boot/i386/pc/lnxboot.S: New file.
10198 2007-11-24  Pavel Roskin  <proski@gnu.org>
10200         * configure.ac: Test if '--build-id=none' is supported by the
10201         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10202         objcopy to generate incorrect binary files (binutils
10203         2.17.50.0.18-1 as shipped by Fedora 8).
10204         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10205         linking, so that build ID doesn't break the test.
10207 2007-11-24  Pavel Roskin  <proski@gnu.org>
10209         * include/grub/i386/time.h: use "void" in the argument list
10210         of grub_cpu_idle().
10211         * include/grub/powerpc/time.h: Likewise.
10212         * include/grub/sparc64/time.h: Likewise.
10214 2007-11-18  Christian Franke  <franke@computer.org>
10216         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10217         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10218         This fixes the problem that function keys did not work in grub-emu.
10220 2007-11-18  Christian Franke  <franke@computer.org>
10222         * disk/host.c (grub_host_open): Remove attribute unused from
10223         name parameter. Add check for "host". This fixes the problem
10224         that grub-emu does not find partitions.
10226 2007-11-18  Christian Franke  <franke@computer.org>
10228         * util/hostfs.c (is_dir): New function.
10229         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10230         (grub_hostfs_read): Add missing fseek().
10231         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10232         of grub-emu on "ls (host)".
10234 2007-11-18  Christian Franke  <franke@computer.org>
10236         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10237         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10238         to 64 bit boundary by default.
10240 2007-11-18  Bean  <bean123ch@gmail.com>
10242         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10243         (hexdump_mod_SOURCES): New variable.
10244         (hexdump_mod_CFLAGS): Likewise.
10245         (hexdump_mod_LDFLAGS): Likewise.
10247         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10249         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10251         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10253         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10255         * include/grub/hexdump.h: New file.
10257         * commands/hexdump.c: New file.
10259 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10261         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10262         in grub_outb() calls.
10263         (beep_on): Likewise.
10265 2007-11-10  Christian Franke  <franke@computer.org>
10267         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10268         (grub_menu_run): Likewise.
10270 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10272         * include/grub/i386/efi/machine.h: New file.
10273         * include/grub/i386/linuxbios/machine.h: Likewise.
10274         * include/grub/i386/pc/machine.h: Likewise.
10275         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10276         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10278         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10279         (serial_hw_io_addr): New variable.
10280         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10281         instead of `(unsigned short *) 0x400'.
10283 2007-11-10  Bean  <bean123ch@gmail.com>
10285         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10287 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10289         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10290         (vga_mod_SOURCES): Added.
10291         (vga_mod_CFLAGS): Likewise.
10292         (vga_mod_LDFLAGS): Likewise.
10294         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10295         grub_outb() calls.
10296         (set_map_mask): Likewise.
10297         (set_read_map): Likewise.
10298         (set_read_address): Likewise.
10299         (vga_font): Removed variable.
10300         (get_vga_glyph): Removed function.
10301         (invalidate_char): Likewise.
10302         (write_char): Changed to use grub_font_get_glyph() for font
10303         information.
10304         (grub_vga_putchar): Likewise.
10305         (grub_vga_getcharwidth): Likewise.
10307 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10309         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10310         flags.
10311         (pxeboot_img_LDFLAGS): Likewise.
10312         (diskboot_img_LDFLAGS): Likewise.
10313         (kernel_img_LDFLAGS): Likewise.
10315 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10317         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10318         in grub_outb() calls.
10319         (serial_hw_init): Likewise.
10321 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10323         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10324         spaces.  Skip non-regular files.
10326 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10328         * kern/disk.c (grub_disk_firmware_fini)
10329         (grub_disk_firmware_is_tainted): New variables.
10331         * include/grub/disk.h (grub_disk_firmware_fini)
10332         (grub_disk_firmware_is_tainted): Likewise.
10334         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10335         (grub_disk_biosdisk_fini): ... to here.
10336         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10337         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10338         is set.  Register grub_disk_biosdisk_fini() in
10339         `grub_disk_firmware_fini'.
10341         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10342         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10343         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10344         to finish existing firmware disk interface.
10346         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10347         (ata_mod_SOURCES): New variable.
10348         (ata_mod_CFLAGS): Likewise.
10349         (ata_mod_LDFLAGS): Likewise.
10351 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10353         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10354         (grub_ata_wait): Reimplement using grub_millisleep().
10356         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10357         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10359 2007-11-03  Marco Gerards  <marco@gnu.org>
10361         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10362         (CRTC_ADDR_PORT): New macro.
10363         (CRTC_DATA_PORT): Likewise.
10364         (CRTC_CURSOR): Likewise.
10365         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10366         (CRTC_CURSOR_ADDR_LOW): Likewise.
10367         (update_cursor): New function.
10368         (grub_console_real_putchar): Call `update_cursor'.
10369         (grub_console_gotoxy): Likewise.
10370         (grub_console_cls): Set the default color when clearing the
10371         screen.
10372         (grub_console_setcursor): Implemented.
10374 2007-11-03  Marco Gerards  <marco@gnu.org>
10376         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10377         become activate.
10378         (grub_ata_pio_write): Likewise.
10380         (grub_atapi_identify): Wait after issuing an ATA command.
10381         (grub_atapi_packet): Likewise.
10382         (grub_ata_identify): Likewise.
10383         (grub_ata_readwrite): Likewise.
10385 2007-11-03  Marco Gerards  <marco@gnu.org>
10387         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10388         (grub_ata_pio_write): Likewise.
10389         (grub_ata_readwrite): Use `grub_error', instead of
10390         returning `grub_errno'.
10392 2007-11-03  Marco Gerards  <marco@gnu.org>
10394         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10395         grub_ata_pio_write once for every single sector, instead of for
10396         multiple sectors.
10398 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10400         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10402         * conf/i386-linuxbios.rmk: New file.
10404         * kern/i386/pc/hardware.c: Likewise.
10405         * term/i386/pc/at_keyboard.c: Likewise.
10406         * term/i386/pc/vga_text.c: Likewise.
10408         * include/grub/i386/linuxbios/boot.h: Likewise.
10409         * include/grub/i386/linuxbios/console.h: Likewise.
10410         * include/grub/i386/linuxbios/init.h: Likewise.
10411         * include/grub/i386/linuxbios/kernel.h: Likewise.
10412         * include/grub/i386/linuxbios/loader.h: Likewise.
10413         * include/grub/i386/linuxbios/memory.h: Likewise.
10414         * include/grub/i386/linuxbios/serial.h: Likewise.
10415         * include/grub/i386/linuxbios/time.h: Likewise.
10417         * kern/i386/linuxbios/init.c: Likewise.
10418         * kern/i386/linuxbios/startup.S: Likewise.
10419         * kern/i386/linuxbios/table.c: Likewise.
10421 2007-10-31  Marco Gerards  <marco@gnu.org>
10423         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10424         (ata_mod_SOURCES): New variable.
10425         (ata_mod_CFLAGS): Likewise.
10426         (ata_mod_LDFLAGS): Likewise.
10428         * disk/ata.c: New file.
10430         * include/grub/disk.h (grub_disk_dev_id): Add
10431         `GRUB_DISK_DEV_ATA_ID'.
10433 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10435         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10436         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10438         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10439         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10441         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10442         `<grub/types.h>'.
10444         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10446 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10448         * include/grub/types.h (ULONG_MAX): Define macro.
10450 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10452         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10453         `"../realmode.S"'.
10454         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10456 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10458         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10459         (pkgdata_MODULES): Add `biosdisk.mod'.
10460         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10461         variables.
10463         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10464         (grub_biosdisk_init): Replace with ...
10465         (GRUB_MOD_INIT(biosdisk)): ... this.
10466         (grub_biosdisk_fini): Replace with ...
10467         (GRUB_MOD_FINI(biosdisk)): ... this.
10469         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10470         (grub_machine_init): Remove call to grub_biosdisk_init().
10471         (grub_machine_fini): Remove call to grub_machine_fini().
10473         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10475 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10477         * include/grub/time.h: New file.
10478         * include/grub/i386/time.h: Likewise.
10479         * include/grub/powerpc/time.h: Likewise.
10480         * include/grub/sparc64/time.h: Likewise.
10482         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10483         instances to ...
10484         (KERNEL_MACHINE_TIME_HEADER): ... this.
10485         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10486         instances to ...
10487         (KERNEL_MACHINE_TIME_HEADER): ... this.
10488         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10489         instances to ...
10490         (KERNEL_MACHINE_TIME_HEADER): ... this.
10492         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10493         (grub_millisleep): New function.
10494         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10495         (grub_millisleep): New function.
10496         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10497         Remove `grub/machine/time.h' include.
10498         (grub_millisleep): New function.
10499         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10500         Remove `grub/machine/time.h' include.
10501         (grub_millisleep): New function.
10503         * include/grub/misc.h (grub_div_roundup): New function.
10505         * kern/misc.c: Include `<grub/time.h>'.
10506         (grub_millisleep_generic): New function.
10508         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10509         Add `time.h'.
10510         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10511         Add `time.h'.
10512         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10513         `machine/time.h'.  Add `time.h'.
10514         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10516 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10518         * include/grub/misc.h (grub_max): New function.
10520 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10522         * util/misc.c (grub_util_info): Call fflush() before returning.
10524 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10526         * genmk.rb (Image): Copy `extra_flags' from here ...
10527         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10529         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10530         to `argc' and `args' arguments.
10532 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10534         * kern/i386/loader.S: New file.
10536         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10537         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10538         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10539         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10540         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10541         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10542         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10543         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10544         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10545         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10546         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10547         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10548         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10549         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10551         * kern/i386/realmode.S: New file.
10553         * kern/i386/pc/startup.S (protstack): Moved from here ...
10554         * kern/i386/realmode.S (protstack)... to here.
10555         * kern/i386/pc/startup.S (gdt): Moved from here ...
10556         * kern/i386/realmode.S (gdt)... to here.
10557         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10558         * kern/i386/realmode.S (prot_to_real)... to here.
10560         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10561         `kern/i386/realmode.S'.
10563 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10565         * include/grub/i386/loader.h: New file.
10567         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10568         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10569         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10570         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10571         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10572         * include/grub/i386/loader.h (grub_linux_prot_size)
10573         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10574         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10575         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10576         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10578         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10580 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10582         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10583         filesystem when dev->disk is unset.
10584         Do probe for filesystem even when dev->disk->has_partitions is set.
10585         In case a filesystem is found, always report it.
10586         In case it isn't, if dev->disk->has_partitions is set, report that
10587         a partition table was found instead of reporting that no filesystem
10588         could be identified.
10590 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10592         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10593         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10595         * include/grub/types.h (grub_host_to_target16): New macro.
10596         (grub_host_to_target32): Likewise.
10597         (grub_host_to_target64): Likewise.
10598         (grub_target_to_host16): Likewise.
10599         (grub_target_to_host32): Likewise.
10600         (grub_target_to_host64): Likewise.
10602         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10603         Renamed from to ...
10604         (GRUB_MOD_ALIGN): ...this.  Update all users.
10606         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10607         grub_host_to_target32.
10608         Replace grub_be_to_cpu32 with grub_target_to_host32.
10609         (load_modules): Likewise.
10610         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10611         Replace grub_be_to_cpu32 with grub_target_to_host32.
10612         Replace grub_cpu_to_be16 with grub_host_to_target16.
10613         Replace grub_cpu_to_be32 grub_host_to_target32.
10615 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10617         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10618         * util/elf/grub-mkimage.c: ... here.
10620         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10621         `util/powerpc/ieee1275/grub-mkimage.c'.
10623 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10625         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10626         and make it easier to figure out.
10627         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10628         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10629         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10630         leave us with less than HEAP_MIN_SIZE total heap.
10631         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10633 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10635         * include/grub/i386/io.h: New file.
10636         * commands/i386/pc/play.c (inb): Removed.
10637         (outb): Removed.
10638         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10639         with grub_outb().
10640         * term/i386/pc/serial.c  (inb): Removed.
10641         (outb): Removed.
10642         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10643         with grub_outb().
10644         * term/i386/pc/vga.c  (inb): Removed.
10645         (outb): Removed.
10646         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10647         with grub_outb().
10649 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10651         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10652         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10653         Reported by Marcin Kurek.
10655 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10657         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10658         SmartFirmware version updates (as released by Sven Luther), and avoid
10659         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10660         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10661         known broken.
10663 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10665         From Hitoshi Ozeki:
10666         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10667         when merging two regions.
10669 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10671         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10672         * normal/completion.c (grub_normal_do_completion): Likewise.
10673         Reported by Hitoshi Ozeki.
10675 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10677         Do not use devices at boot in chainloading.
10679         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10680         (boot_part_addr): Likewise.
10681         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10682         with BOOT_DRIVE and BOOT_PART_ADDR.
10683         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10684         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10686 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10688         Patch from Simon Peter <dn.tlp@gmx.net>:
10689         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10690         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10691         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10692         util/i386/pc/grub-setup.c_DEPENDENCIES.
10693         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10694         util/grub-probe.c_DEPENDENCIES.
10695         * conf/powerpc-ieee1275.rmk: Likewise.
10697 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10699         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10700         to tell grub-mkdevicemap how to name devices.
10701         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10702         feature).
10704         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10705         util/i386/get_disk_name.c.
10706         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10707         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10708         util/ieee1275/get_disk_name.c.
10710         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10712         * DISTLIST: Add util/i386/get_disk_name.c and
10713         util/ieee1275/get_disk_name.c.
10715         * util/grub-mkdevicemap.c: Replace device naming logic with
10716         grub_util_get_disk_name() calls.
10718 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10720         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10721         (so that it works for both plural and singular quantities).
10723 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10725         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10726         so that [xz] isn't taken into account when determining order.
10728 2007-08-02  Marco Gerards  <marco@gnu.org>
10730         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10731         `include/multiboot2.h', `include/grub/elfload.h',
10732         `include/multiboot.h', `include/grub/multiboot.h',
10733         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10734         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10735         `kern/elf.c', `loader/multiboot_loader.c',
10736         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10737         `loader/i386/pc/multiboot2.c',
10738         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10739         `util/i386/pc/grub-mkrescue.in'.  Remove
10740         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10741         `include/grub/i386/pc/util/biosdisk.h' and
10742         `include/grub/powerpc/ieee1275/multiboot.h'.
10744 2007-08-02  Bean  <bean123ch@gmail.com>
10746         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10747         (ntfs_mod_SOURCES): New variable.
10748         (ntfs_mod_CFLAGS): Likewise.
10749         (ntfs_mod_LDFLAGS): Likewise.
10751         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10752         (grub_probe_SOURCES): Likewise.
10753         (grub_emu_SOURCES): Likewise.
10755         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10756         (grub_emu_SOURCES): Likewise.
10758         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10759         (grub_emu_SOURCES): Likewise.
10761         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10763         * fs/ntfs.c: New file.
10765 2007-08-02  Bean  <bean123ch@gmail.com>
10767         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10769         * file.h (grub_file): Likewise.
10771         * fshelp.h (grub_fshelp_read_file): Likewise.
10773         * util/i386/pc/grub-setup.c (setup): Likewise.
10774         (save_first_sector): Likewise.
10775         (save_blocklists): Likewise.
10777         * fs/affs.c (grub_affs_read_file): Likewise.
10779         * fs/ext2.c (grub_ext2_read_file): Likewise.
10781         * fs/fat.c (grub_fat_read_data): Likewise.
10783         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10785         * fs/hfs.c (grub_hfs_read_file): Likewise.
10787         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10789         * fs/jfs.c (grub_jfs_read_file): Likewise.
10791         * fs/minix.c (grub_minix_read_file): Likewise.
10793         * fs/sfs.c (grub_sfs_read_file): Likewise.
10795         * fs/ufs.c (grub_ufs_read_file): Likewise.
10797         * fs/xfs.c (grub_xfs_read_file): Likewise.
10799         * command/blocklist.c (read_blocklist): Likewise.
10800         (print_blocklist): Likewise.
10802 2007-08-02  Marco Gerards  <marco@gnu.org>
10804         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10805         `util/hostfs.c'.
10807         * disk/host.c: New file.
10809         * util/hostfs.c: Likewise.
10811         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10812         return `GRUB_ERR_BAD_FS'.
10813         * fs/sfs.c (grub_sfs_mount): Likewise.
10814         * fs/xfs.c (grub_xfs_mount): Likewise.
10816         * include/grub/disk.h (enum grub_disk_dev_id): Add
10817         `GRUB_DISK_DEVICE_HOST_ID'.
10819         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10821 2007-07-24  Jerone Young  <jerone@gmail.com>
10823         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10824         modules for compilation.
10825         * conf/powerpc-ieee1275.rmk: Likewise.
10827         * include/multiboot.h: Move multiboot definitions to one file. Rename
10828         many definitions to not get grub specific.
10829         * include/multiboot2.h: Create header with multiboot 2 definitions.
10830         * include/grub/multiboot.h: Header for grub specific function
10831         prototypes and definitions.
10832         * include/grub/multiboot2.h: Likewise.
10833         * include/grub/multiboot_loader.h: Likewise.
10834         * include/grub/i386/pc/multiboot.h: Removed.
10835         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10837         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10838         and 2 to allow for one multiboot and module commands.
10839         * loader/multiboot2.c: Add multiboot2 functionality.
10840         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10841         and definition names.
10842         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10843         2 functions.
10844         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10845         ieee1275 specific multiboot2 code.
10847         * kern/i386/pc/startup.S: Change headers and definition names for
10848         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10850 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10852         * geninitheader.sh: Process file specified in first parameter rather
10853         than hardcoding grub_modules_init.lst.
10854         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10855         than hardcoding grub_modules_init.h.
10857         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10858         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10859         grub_probe_init.[ch] and grub_setup_init.[ch].
10861         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10862         grub_modules_init.h with grub_emu_init.h.
10863         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10864         grub_probe_init.[ch] files.
10865         * conf/i386-efi.rmk: Likewise.
10866         * conf/i386-pc.rmk: Likewise.
10867         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10868         grub_setup_init.[ch] files.
10870         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10871         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10872         to initialize modules rather than a list of hardcoded functions.
10873         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10874         grub_init_all() to initialize modules rather than a list of hardcoded
10875         functions.
10877 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10879         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10880         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10882 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10884         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10885         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10886         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10887         flag when running on SmartFirmware.
10888         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10889         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10890         was set.
10892         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10893         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10894         rather than decreasing it.
10896         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10897         there's not enough space to do it, fail in the same way as when it
10898         can't be done because there are no partitions.
10900         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10901         when nvsetenv failed.
10903 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10905         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10906         because this rule is automatically generated.
10907         (grub-mkrescue): Removed for the same reason as above.
10909 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10911         Migrate to GNU General Public License Version 3.
10913         * COPYING: Replaced with the plain text version of GPLv3.
10915         * config.guess: Updated from gnulib.
10916         * config.sub: Likewise.
10918         * geninit.sh: Output a GPLv3 copyright notice.
10919         * geninitheader.sh: Likewise.
10920         * genmodsrc.sh: Likewise.
10921         * gensymlist.sh.in: Likewise.
10923         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10924         * boot/i386/pc/diskboot.S: Likewise.
10925         * boot/i386/pc/pxeboot.S: Likewise.
10926         * commands/blocklist.c: Likewise.
10927         * commands/boot.c: Likewise.
10928         * commands/cat.c: Likewise.
10929         * commands/cmp.c: Likewise.
10930         * commands/configfile.c: Likewise.
10931         * commands/echo.c: Likewise.
10932         * commands/help.c: Likewise.
10933         * commands/ls.c: Likewise.
10934         * commands/search.c: Likewise.
10935         * commands/terminal.c: Likewise.
10936         * commands/test.c: Likewise.
10937         * commands/videotest.c: Likewise.
10938         * commands/i386/cpuid.c: Likewise.
10939         * commands/i386/pc/halt.c: Likewise.
10940         * commands/i386/pc/play.c: Likewise.
10941         * commands/i386/pc/reboot.c: Likewise.
10942         * commands/i386/pc/vbeinfo.c: Likewise.
10943         * commands/i386/pc/vbetest.c: Likewise.
10944         * commands/ieee1275/halt.c: Likewise.
10945         * commands/ieee1275/reboot.c: Likewise.
10946         * commands/ieee1275/suspend.c: Likewise.
10947         * disk/loopback.c: Likewise.
10948         * disk/lvm.c: Likewise.
10949         * disk/raid.c: Likewise.
10950         * disk/efi/efidisk.c: Likewise.
10951         * disk/i386/pc/biosdisk.c: Likewise.
10952         * disk/ieee1275/ofdisk.c: Likewise.
10953         * font/manager.c: Likewise.
10954         * fs/affs.c: Likewise.
10955         * fs/ext2.c: Likewise.
10956         * fs/fat.c: Likewise.
10957         * fs/fshelp.c: Likewise.
10958         * fs/hfs.c: Likewise.
10959         * fs/hfsplus.c: Likewise.
10960         * fs/iso9660.c: Likewise.
10961         * fs/jfs.c: Likewise.
10962         * fs/minix.c: Likewise.
10963         * fs/sfs.c: Likewise.
10964         * fs/ufs.c: Likewise.
10965         * fs/xfs.c: Likewise.
10966         * hello/hello.c: Likewise.
10967         * include/grub/acorn_filecore.h: Likewise.
10968         * include/grub/arg.h: Likewise.
10969         * include/grub/bitmap.h: Likewise.
10970         * include/grub/boot.h: Likewise.
10971         * include/grub/cache.h: Likewise.
10972         * include/grub/device.h: Likewise.
10973         * include/grub/disk.h: Likewise.
10974         * include/grub/dl.h: Likewise.
10975         * include/grub/elfload.h: Likewise.
10976         * include/grub/env.h: Likewise.
10977         * include/grub/err.h: Likewise.
10978         * include/grub/file.h: Likewise.
10979         * include/grub/font.h: Likewise.
10980         * include/grub/fs.h: Likewise.
10981         * include/grub/fshelp.h: Likewise.
10982         * include/grub/gzio.h: Likewise.
10983         * include/grub/hfs.h: Likewise.
10984         * include/grub/kernel.h: Likewise.
10985         * include/grub/loader.h: Likewise.
10986         * include/grub/lvm.h: Likewise.
10987         * include/grub/misc.h: Likewise.
10988         * include/grub/mm.h: Likewise.
10989         * include/grub/net.h: Likewise.
10990         * include/grub/normal.h: Likewise.
10991         * include/grub/parser.h: Likewise.
10992         * include/grub/partition.h: Likewise.
10993         * include/grub/pc_partition.h: Likewise.
10994         * include/grub/raid.h: Likewise.
10995         * include/grub/rescue.h: Likewise.
10996         * include/grub/script.h: Likewise.
10997         * include/grub/setjmp.h: Likewise.
10998         * include/grub/symbol.h: Likewise.
10999         * include/grub/term.h: Likewise.
11000         * include/grub/terminfo.h: Likewise.
11001         * include/grub/tparm.h: Likewise.
11002         * include/grub/types.h: Likewise.
11003         * include/grub/video.h: Likewise.
11004         * include/grub/efi/api.h: Likewise.
11005         * include/grub/efi/chainloader.h: Likewise.
11006         * include/grub/efi/console.h: Likewise.
11007         * include/grub/efi/console_control.h: Likewise.
11008         * include/grub/efi/disk.h: Likewise.
11009         * include/grub/efi/efi.h: Likewise.
11010         * include/grub/efi/pe32.h: Likewise.
11011         * include/grub/efi/time.h: Likewise.
11012         * include/grub/i386/linux.h: Likewise.
11013         * include/grub/i386/setjmp.h: Likewise.
11014         * include/grub/i386/types.h: Likewise.
11015         * include/grub/i386/efi/kernel.h: Likewise.
11016         * include/grub/i386/efi/loader.h: Likewise.
11017         * include/grub/i386/efi/time.h: Likewise.
11018         * include/grub/i386/pc/biosdisk.h: Likewise.
11019         * include/grub/i386/pc/boot.h: Likewise.
11020         * include/grub/i386/pc/chainloader.h: Likewise.
11021         * include/grub/i386/pc/console.h: Likewise.
11022         * include/grub/i386/pc/init.h: Likewise.
11023         * include/grub/i386/pc/kernel.h: Likewise.
11024         * include/grub/i386/pc/loader.h: Likewise.
11025         * include/grub/i386/pc/memory.h: Likewise.
11026         * include/grub/i386/pc/multiboot.h: Likewise.
11027         * include/grub/i386/pc/serial.h: Likewise.
11028         * include/grub/i386/pc/time.h: Likewise.
11029         * include/grub/i386/pc/vbe.h: Likewise.
11030         * include/grub/i386/pc/vbeblit.h: Likewise.
11031         * include/grub/i386/pc/vbefill.h: Likewise.
11032         * include/grub/i386/pc/vbeutil.h: Likewise.
11033         * include/grub/i386/pc/vga.h: Likewise.
11034         * include/grub/ieee1275/ieee1275.h: Likewise.
11035         * include/grub/ieee1275/ofdisk.h: Likewise.
11036         * include/grub/powerpc/libgcc.h: Likewise.
11037         * include/grub/powerpc/setjmp.h: Likewise.
11038         * include/grub/powerpc/types.h: Likewise.
11039         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
11040         * include/grub/powerpc/ieee1275/console.h: Likewise.
11041         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
11042         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
11043         * include/grub/powerpc/ieee1275/loader.h: Likewise.
11044         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
11045         * include/grub/powerpc/ieee1275/time.h: Likewise.
11046         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
11047         * include/grub/sparc64/libgcc.h: Likewise.
11048         * include/grub/sparc64/setjmp.h: Likewise.
11049         * include/grub/sparc64/types.h: Likewise.
11050         * include/grub/sparc64/ieee1275/console.h: Likewise.
11051         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
11052         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
11053         * include/grub/sparc64/ieee1275/time.h: Likewise.
11054         * include/grub/util/biosdisk.h: Likewise.
11055         * include/grub/util/getroot.h: Likewise.
11056         * include/grub/util/lvm.h: Likewise.
11057         * include/grub/util/misc.h: Likewise.
11058         * include/grub/util/raid.h: Likewise.
11059         * include/grub/util/resolve.h: Likewise.
11060         * io/gzio.c: Likewise.
11061         * kern/device.c: Likewise.
11062         * kern/disk.c: Likewise.
11063         * kern/dl.c: Likewise.
11064         * kern/elf.c: Likewise.
11065         * kern/env.c: Likewise.
11066         * kern/err.c: Likewise.
11067         * kern/file.c: Likewise.
11068         * kern/fs.c: Likewise.
11069         * kern/loader.c: Likewise.
11070         * kern/main.c: Likewise.
11071         * kern/misc.c: Likewise.
11072         * kern/mm.c: Likewise.
11073         * kern/parser.c: Likewise.
11074         * kern/partition.c: Likewise.
11075         * kern/rescue.c: Likewise.
11076         * kern/term.c: Likewise.
11077         * kern/efi/efi.c: Likewise.
11078         * kern/efi/init.c: Likewise.
11079         * kern/efi/mm.c: Likewise.
11080         * kern/i386/dl.c: Likewise.
11081         * kern/i386/efi/init.c: Likewise.
11082         * kern/i386/efi/startup.S: Likewise.
11083         * kern/i386/pc/init.c: Likewise.
11084         * kern/i386/pc/lzo1x.S: Likewise.
11085         * kern/i386/pc/startup.S: Likewise.
11086         * kern/ieee1275/ieee1275.c: Likewise.
11087         * kern/powerpc/cache.S: Likewise.
11088         * kern/powerpc/dl.c: Likewise.
11089         * kern/powerpc/ieee1275/cmain.c: Likewise.
11090         * kern/powerpc/ieee1275/crt0.S: Likewise.
11091         * kern/powerpc/ieee1275/init.c: Likewise.
11092         * kern/powerpc/ieee1275/openfw.c: Likewise.
11093         * kern/sparc64/cache.S: Likewise.
11094         * kern/sparc64/dl.c: Likewise.
11095         * kern/sparc64/ieee1275/init.c: Likewise.
11096         * kern/sparc64/ieee1275/openfw.c: Likewise.
11097         * loader/efi/chainloader.c: Likewise.
11098         * loader/efi/chainloader_normal.c: Likewise.
11099         * loader/i386/efi/linux.c: Likewise.
11100         * loader/i386/efi/linux_normal.c: Likewise.
11101         * loader/i386/pc/chainloader.c: Likewise.
11102         * loader/i386/pc/chainloader_normal.c: Likewise.
11103         * loader/i386/pc/linux.c: Likewise.
11104         * loader/i386/pc/linux_normal.c: Likewise.
11105         * loader/i386/pc/multiboot.c: Likewise.
11106         * loader/i386/pc/multiboot_normal.c: Likewise.
11107         * loader/powerpc/ieee1275/linux.c: Likewise.
11108         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
11109         * normal/arg.c: Likewise.
11110         * normal/cmdline.c: Likewise.
11111         * normal/command.c: Likewise.
11112         * normal/completion.c: Likewise.
11113         * normal/execute.c: Likewise.
11114         * normal/function.c: Likewise.
11115         * normal/lexer.c: Likewise.
11116         * normal/main.c: Likewise.
11117         * normal/menu.c: Likewise.
11118         * normal/menu_entry.c: Likewise.
11119         * normal/misc.c: Likewise.
11120         * normal/parser.y: Likewise.
11121         * normal/script.c: Likewise.
11122         * normal/i386/setjmp.S: Likewise.
11123         * normal/powerpc/setjmp.S: Likewise.
11124         * normal/sparc64/setjmp.S: Likewise.
11125         * partmap/acorn.c: Likewise.
11126         * partmap/amiga.c: Likewise.
11127         * partmap/apple.c: Likewise.
11128         * partmap/gpt.c: Likewise.
11129         * partmap/pc.c: Likewise.
11130         * partmap/sun.c: Likewise.
11131         * term/gfxterm.c: Likewise.
11132         * term/terminfo.c: Likewise.
11133         * term/efi/console.c: Likewise.
11134         * term/i386/pc/console.c: Likewise.
11135         * term/i386/pc/serial.c: Likewise.
11136         * term/i386/pc/vesafb.c: Likewise.
11137         * term/i386/pc/vga.c: Likewise.
11138         * term/ieee1275/ofconsole.c: Likewise.
11139         * util/biosdisk.c: Likewise.
11140         * util/console.c: Likewise.
11141         * util/genmoddep.c: Likewise.
11142         * util/getroot.c: Likewise.
11143         * util/grub-emu.c: Likewise.
11144         * util/grub-mkdevicemap.c: Likewise.
11145         * util/grub-probe.c: Likewise.
11146         * util/lvm.c: Likewise.
11147         * util/misc.c: Likewise.
11148         * util/raid.c: Likewise.
11149         * util/resolve.c: Likewise.
11150         * util/update-grub.in: Likewise.
11151         * util/update-grub_lib.in: Likewise.
11152         * util/grub.d/00_header.in: Likewise.
11153         * util/grub.d/10_hurd.in: Likewise.
11154         * util/grub.d/10_linux.in: Likewise.
11155         * util/i386/efi/grub-install.in: Likewise.
11156         * util/i386/efi/grub-mkimage.c: Likewise.
11157         * util/i386/pc/grub-install.in: Likewise.
11158         * util/i386/pc/grub-mkimage.c: Likewise.
11159         * util/i386/pc/grub-mkrescue.in: Likewise.
11160         * util/i386/pc/grub-setup.c: Likewise.
11161         * util/i386/pc/misc.c: Likewise.
11162         * util/powerpc/ieee1275/grub-install.in: Likewise.
11163         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11164         * util/powerpc/ieee1275/misc.c: Likewise.
11165         * video/bitmap.c: Likewise.
11166         * video/video.c: Likewise.
11167         * video/i386/pc/vbe.c: Likewise.
11168         * video/i386/pc/vbeblit.c: Likewise.
11169         * video/i386/pc/vbefill.c: Likewise.
11170         * video/i386/pc/vbeutil.c: Likewise.
11171         * video/readers/tga.c: Likewise.
11173 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11175         * conf/i386-efi.rmk: Replace obsolete reference to
11176         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11177         with util/getroot.c.
11178         * conf/powerpc-ieee1275.rmk: Likewise.
11179         * conf/sparc64-ieee1275.rmk: Likewise.
11181         * util/grub-emu.c (main): Fix unchecked pointer handling.
11183 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11185         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11186         invocation to fail, in order to support partition-less media.
11188         * util/i386/pc/grub-install.in: Likewise.
11190         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11191         which fs or partmap modules are needed (akin to its sister scripts).
11193         Also use grub-probe to get rid of unportable /proc/mounts check.
11195         Print the same informational message that the other scripts do, before
11196         exiting.
11198 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11200         * util/update-grub_lib.in (font_path): New function.  Determine whether
11201         a font file can be found and, if so, echo the GRUB path to it.
11203         * util/update-grub.in: Handle multiple terminals depending on user
11204         input, platform availability and font file presence.  Propagate
11205         variables of our findings to /etc/grub.d/ children.
11207         * util/grub.d/00_header.in: Handle multiple terminals, based on
11208         environment setup by update-grub.
11210 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11212         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11214 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11216         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11217         indicate end of data section in kernel image.
11218         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11219         GRUB_KERNEL_MACHINE_DATA_END.
11221         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11222         space for it.
11223         * kern/i386/efi/startup.S: Likewise.
11225         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11226         during image generation.  Implement --prefix option to override this
11227         patch.
11228         * util/i386/efi/grub-mkimage.c: Likewise.
11230         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11231         code to make path relative to its root into a separate function.
11233         * util/i386/pc/grub-install.in: Use newly provided
11234         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11235         pass the result to grub-install --prefix.
11237 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11239         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11240         DEFAULT_DEVICE_MAP.
11241         * util/grub-emu.c: Use above definitions from misc.h instead of
11242         defining them.
11243         * util/grub-mkdevicemap.c: Likewise.
11244         * util/i386/pc/grub-setup.c: Likewise.
11245         * util/grub-probe.c: Likewise.
11246         (probe): Abort with grub_util_error() when either
11247         grub_guess_root_device or grub_util_get_grub_dev fails.
11249 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11251         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11252         "pager" assignment.
11253         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11254         "pcdata".
11255         * util/grub-probe.c (probe): Likewise for "drive_name".
11257 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11259         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11260         not just the cdrom one.
11262 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11264         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11265         Add --pkglibdir=DIR option to override pkglibdir.
11266         Mention --image-type=TYPE in help output.
11267         Fix --grub-mkimage (it was a no-op).
11268         Abort gracefully when no parameter is given.
11270 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11272         * util/i386/pc/grub-mkrescue.in: New file.
11273         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11274         * Makefile.in: Handle bin_SCRIPTS.
11276 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11278         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11279         list of video modes.
11281 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11283         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11284         file doesn't exist, or if it is in a filesystem grub can't read.
11286         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11287         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11288         header comment to fit in 80 columns when the variables are resolved.
11290         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11291         could be identified by update-grub.  Remove redundant check for
11292         unifont.pff existence (since convert_system_path_to_grub_path now
11293         handles that).
11295 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11297         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11299         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11301         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11303 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11305         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11307         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11308         grub_apple_partition_map_fini.
11310         * util/biosdisk.c
11311         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11312         to access >2 TiB disks).
11314         Print disk->total_sectors with %llu instead of %lu, since this
11315         variable is always 64-bit (prevents wrong disk size from being displayed
11316         on either >2 TiB disk or big-endian CPU).
11318         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11319         into a generic case that supports all (sane) partition maps.
11321         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11322         breaks big-endian.
11324         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11325         and grub_apple_partition_map_fini() after that.
11327 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11329         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11331         * util/grub.d/00_header.in: Only enable gfxterm when
11332         convert_system_path_to_grub_path() succeeds.
11334 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11336         * util/update-grub_lib.in: New file.
11337         * DISTLIST: Add update-grub_lib.in.
11338         * conf/common.rmk: Generate update-grub_lib and install it in
11339         $(lib_DATA).
11340         * Makefile.in: Add install routine for $(lib_DATA).
11342         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11343         function provided by update-grub_lib to support arbitrary paths of
11344         unifont.pff.
11345         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11346         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11348 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11350         * commands/i386/cpuid.c: New module.
11351         * DISTLIST: Add it.
11352         * conf/i386-efi.rmk: Enable cpuid.mod.
11353         * conf/i386-pc.rmk: Likewise.
11355 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11357         * kern/disk.c (grub_disk_read): Check return value of
11358         grub_realloc().
11360 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11362         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11363         arrays.
11364         * disk/raid.c (grub_raid_open): Likewise.
11366 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11368         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11369         stack instead of on the heap.
11371         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11372         before doing a read on it.
11374         * configure.ac: Only use -fno-stack-protector for the target
11375         environment.
11377 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11379         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11380         __attribute_ ((unused)) to mode_type argument.
11382         * util/getroot.c (grub_guess_root_device): Fix #endif.
11384         * kern/misc.c (memcmp): Fix prototype.
11386         * include/grub/partition.h [GRUB_UTIL]
11387         (grub_gpt_partition_map_init): Add prototype.
11388         (grub_gpt_partition_map_fini): Likewise.
11390         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11391         at the right place.
11393         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11394         (grub_fat_read_data): Likewise.
11395         (grub_fat_find_dir): Likewise.
11397         * font/manager.c (find_glyph): Make table a const.
11398         (grub_font_get_glyph): Remove bitmap from if statement.
11400 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11402         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11403         code, first search for device in /dev/mapper, then in /dev.
11404         (grub_util_get_grub_dev): New function.
11405         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11406         prototype.
11407         * util/grub-probe.c (probe): Remove check for RAID, call
11408         grub_util_get_grub_dev() instead of
11409         grub_util_biosdisk_get_grub_dev().
11410         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11411         grub_util_biosdisk_get_grub_dev().
11412         * util/i386/pc/grub-setup.c (main): Likewise.
11414 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11416         * DISTLIST: Update for the latest changes.
11417         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11418         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11419         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11420         grub/util/biosdisk.h.
11421         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11422         grub/util/biosdisk.h.
11424 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11426         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11428 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11430         * util/i386/efi/grub-install.in: New.
11431         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11432         newly added grub-install.
11433         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11434         include.
11435         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11436         grub/util/biosdisk.h.
11437         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11438         grub/util/biosdisk.h.
11440 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11442         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11443         * include/grub/util/biosdisk.h: ... here.
11444         * util/i386/pc/biosdisk.c: Moved to ...
11445         * util/biosdisk.c: ... here.
11446         * util/i386/pc/getroot.c: Moved to ...
11447         * util/getroot.c: ... here.
11448         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11449         * util/grub-mkdevicemap.c: ... here.
11450         * util/i386/pc/grub-probe.c: Moved to ...
11451         * util/grub-probe.c: ... here.
11453 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11455         * util/update-grub.in: Remove duplicated line in grub.cfg header
11456         message.
11458 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11460         * util/update-grub.in: Fix a few assumptions about the devices holding
11461         /, /boot and /boot/grub being the same.
11462         * util/grub.d/00_header.in: Likewise.
11463         * util/grub.d/10_hurd.in: Likewise.
11464         * util/grub.d/10_linux.in: Likewise.
11466         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11467         patterns.  Use that to define the `.old' suffix as older than `'.
11469         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11471         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11472         the grub.cfg header message.
11474 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11476         * util/update-grub.in: Create device.map if it doesn't already exist,
11477         before attempting to run grub-probe.
11478         Check for grub-probe and grub-mkdevicemap with the same code
11479         grub-install is using.
11480         Remove test mode.
11482 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11484         * Makefile.in: Add the datarootdir autoconf variable.
11486 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11488         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11489         fail gracefully if dev->disk->partition == NULL.
11491 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11493         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11494         determine partition map module.
11495         * util/i386/pc/grub-install.in: Use this feature to decide which
11496         partition module to load, instead of hardcoding pc and gpt.
11498 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11500         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11501         source directory differs from build directory.
11503 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11505         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11506         initialisation.
11508 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11510         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11512 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11514         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11515         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11517 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11519         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11520         (grub_probe_SOURCES): Likewise.
11521         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11522         GPT and initialize dos_part and bsd_part accordingly.
11523         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11524         install_bsd_part.
11525         (main): Activate gpt module for use during partition identification,
11526         and deactivate it afterwards.
11527         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11528         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11529         partition identification, and deactivate it afterwards.
11531 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11533         * term/i386/pc/console.c (grub_console_fini): Call
11534         grub_term_set_current() before grub_term_unregister().
11536 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11538         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11539         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11540         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11541         and update-grub_DATA.
11542         * conf/common.rmk: Build and install update-grub components.
11543         * conf/common.mk: Regenerate.
11544         * util/update-grub.in: New.  Core of update-grub.
11545         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11546         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11547         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11548         * util/grub.d/README: New.  Document grub.d directory layout.
11550 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11552         * util/grub-emu.c: Move initialization functions
11553         grub_util_biosdisk_init() and grub_init_all() before
11554         grub_util_biosdisk_get_grub_dev(), which relies on them.
11556 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11558         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11559         it is used later.
11561 2007-04-18  Jerone Young  <jerone@gmail.com>
11563         * kernel/elf.c: Add missing parenthesis for conditional statement
11564         stanza.
11566 2007-04-10  Jerone Young  <jerone@gmail.com>
11568         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11569         continue on and look for device node with real device name.
11571 2007-04-10  Jerone Young  <jerone@gmail.com>
11573         * configure.ac: Add argument for autoconf to use transformation
11574         ability.
11575         * Makefile.in: Add autoconf package transformation code.
11576         * util/i386/pc/grub-install.in: Likewise.
11577         * util/powerpc/ieee1275/grub-install.in: Likewise.
11579 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11581         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11582         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11583         (EXT2_REVISION): Likewise.
11584         (EXT2_INODE_SIZE): Likewise.
11585         (struct grub_ext2_block_group): Added a missing member
11586         "used_dirs".
11587         (grub_ext2_read_inode): Divide by the inode size in a superblock
11588         instead of 128 to obtain INODES_PER_BLOCK.
11589         Use the macro EXT2_INODE_SIZE instead of directly using
11590         SBLOCK->INODE_SIZE.
11592 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11594         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11595         superblock instead of the structure size to compute an
11596         offset. This fixes the problem that GRUB could not read a
11597         filesystem when inode size is different from 128-byte.
11599 2007-03-05  Marco Gerards  <marco@gnu.org>
11601         * normal/main.c (read_config_file): When "menu" is not set, create
11602         an initial context.
11604 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11606         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11607         (HEAP_LIMIT): New macro.
11608         (grub_claim_heap): Claim memory up to `heaplimit'.
11610 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11612         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11613         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11614         (_start): Likewise.
11615         (grub_arch_modules_addr): Return address after `_end'.
11616         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11617         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11618         (add_segments): Calculate `_end' from phdr size and location.
11619         (ALIGN_UP): Moved to ...
11620         * include/grub/misc.h: here.
11621         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11622         New macro.
11623         (GRUB_IEEE1275_MODULE_BASE): Removed.
11625 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11627         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11628         loop boundary.
11630 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11632         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11633         All users updated.
11634         (grub_elf64_load_hook_t): Likewise.
11635         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11636         debug output.
11638 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11640         * kern/mm.c: Update copyright.
11641         (grub_mm_debug): Correct syntax error.
11642         (grub_mm_dump_free): New function.
11643         (grub_debug_free): Call `grub_free'.
11644         * include/grub/mm.h: Update copyright.
11645         (grub_mm_dump_free): Add declaration.
11647 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11649         * include/grub/ieee1275/ieee1275.h: Update copyright.
11650         * kern/powerpc/ieee1275/init.c: Likewise.
11651         * kern/powerpc/ieee1275/openfw.c: Likewise.
11653         * loader/powerpc/ieee1275/linux.c: Likewise.
11654         * include/grub/elfload.h: Likewise.
11655         * kern/elf.c: Likewise.
11656         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11657         callers.
11658         (grub_elf64_load): Likewise.
11659         (grub_elf32_load_segment): Move to a nested function.
11660         (grub_elf64_load_segment): Likewise.
11662 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11664         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11665         prototype.
11666         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11667         (grub_heap_len): Likewise.
11668         (HEAP_SIZE): New macro.
11669         (grub_claim_heap): New function.
11670         (grub_machine_init): Don't claim heap directly.  Call
11671         `grub_claim_heap'.
11672         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11673         (grub_available_iterate): New function.
11675 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11677         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11678         * configure.ac: Use it for testing the HOST and TARGET compilers.
11680 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11682         * Makefile.in (enable_grub_emu): New variable.
11683         * configure.ac (--enable-grub-emu): New option.
11684         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11685         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11686         * conf/i386-pc.rmk: Likewise.
11687         * conf/powerpc-ieee1275.rmk: Likewise.
11688         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11690 2006-12-12  Marco Gerards  <marco@gnu.org>
11692         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11694         * kern/env.c (grub_env_unset): Don't free the member `value' when
11695         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11696         pointer.
11698         * normal/main.c (current_menu): Removed.
11699         (free_menu): Unset the `menu' environment variable.
11700         (grub_normal_menu_addentry): Make use of the environment variable
11701         `menu', instead of using the global `current_menu'.  Allocate
11702         memory for the sourcecode of this entry.
11703         (read_config_file): New argument `nested', changed all callers.
11704         Only in the case of a new context, initialize a new menu.  Set the
11705         `menu' environment variable.
11706         (grub_normal_execute): Don't set and unset the environment
11707         variable `menu' here anymore.  Only free the menu when leaving the
11708         context.
11710         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11711         leak.
11713 2006-12-11  Marco Gerards  <marco@gnu.org>
11715         * normal/menu_entry.c (run): Fix off by one bug so the last line
11716         is executed.  Move the loader check to outside the loop.
11718 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11720         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11722 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11724         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11725         the number of sectors.  Reported by Andrey Shuvikov
11726         <mr_hyro@yahoo.com>.
11728 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11730         * kern/disk.c (grub_disk_read): When there is a read error, always
11731         try to read only the necessary data.
11733         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11734         disk/raid.c.
11735         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11736         prototype.
11737         [GRUB_UTIL] (grub_raid_fini): Likewise.
11738         [GRUB_UTIL] (grub_lvm_init): Likewise.
11739         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11740         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11741         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11742         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11743         and grub_raid_fini().
11745 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11747         * include/grub/types.h (__unused): Rename to UNUSED.
11748         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11749         (grub_elf64_size): Likewise.
11751 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11753         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11754         grub_error_push and grub_error_pop in the error-handling path.
11755         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11756         length.
11758 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11760         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11761         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11762         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11763         (kernel_elf_SOURCES): Likewise.
11764         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11765         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11766         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11767         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11768         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11769         (elf_mod_SOURCES): New variable.
11770         (elf_mod_CFLAGS): Likewise.
11771         (elf_mod_LDFLAGS): Likewise.
11772         * include/grub/types.h (__unused): New macro.
11773         * include/grub/elfload.h: New file.
11774         * kern/elf.c: Likewise.
11775         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11776         (ELF32_LOADMASK): New macro.
11777         (ELF64_LOADMASK): Likewise.
11778         (vmlinux): Removed.
11779         (grub_linux_load32): New function.
11780         (grub_linux_load64): Likewise.
11781         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11782         Use grub_elf_t instead of grub_file_t.
11784 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11786         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11787         `catch_result' to struct set_color_args.
11789 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11791         * normal/menu.c: Include grub/script.h.
11792         * normal/menu_entry.c: Likewise.
11793         * include/grub/normal.h: Do not include grub/script.h.
11795 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11797         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11799 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11801         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11802         disk.
11803         (grub_disk_close): Print debug messages when closing a disk.
11804         (grub_disk_read): Print debug messages when disk read fails.
11805         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11806         filesystem type.
11807         * kern/partition.c: Include misc.h.
11808         (grub_partition_iterate): Print debug messages when detecting
11809         partition type.
11811 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11813         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11814         is negative.
11815         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11817 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11819         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11820         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11822 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11824         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11825         instead of sizeof(lv). Patch by Michael Guntsche.
11827 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11829         * disk/lvm.c: Rename VGS to VG_LIST.
11830         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11831         (grub_lvm_open): Likewise.
11832         Thanks to Michael Guntsche for finding this bug.
11834 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11836         * configure.ac (AC_INIT): Bumped to 1.95.
11838 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11840         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11841         with "/dev/.static/dev/md".
11843 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11845         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11846         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11847         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11848         DRIVE_NAME are always freed.
11850         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11851         DOS_PART, as a DOS partition is counted from one instead of zero
11852         now. Reported by Robert Millan.
11854 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11856         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11857         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11858         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11859         string returned by grub_guess_root_device.
11860         * util/i386/pc/grub-setup.c: Likewise.
11861         * util/i386/pc/grub-probefs.c: Likewise.
11863         * util/i386/pc/grub-probefs.c: Rename to ...
11864         * util/i386/pc/grub-probe.c: ... this.
11865         * DISTLIST: Remove grub-probefs, add grub-probe.
11866         * conf/i386-efi.rmk: Likewise.
11867         * conf/i386-pc.rmk: Likewise.
11868         * util/i386/pc/grub-install.in: Likewise.
11870         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11871         choose which information we want to print.
11873 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11875         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11876         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11877         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11878         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11879         video/readers/tga.c and video/i386/pc/vbeutil.c.
11881 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11883         Added support for RAID and LVM.
11885         * disk/lvm.c: New file.
11886         * disk/raid.c: Likewise.
11887         * include/grub/lvm.h: Likewise.
11888         * include/grub/raid.h: Likewise.
11889         * include/grub/util/lvm.h: Likewise.
11890         * include/grub/util/raid.h: Likewise.
11891         * util/lvm.c: Likewise.
11892         * util/raid.c: Likewise.
11894         * include/grub/disk.h (grub_disk_dev_id): Add
11895         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11896         (grub_disk_get_size): New prototype.
11897         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11898         returns a partition.
11899         (grub_disk_get_size): New function.
11901         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11902         verbatim if grub_install_dos_part is -2.
11904         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11905         and LVM devices.
11907         * util/i386/pc/grub-setup.c (setup): New argument
11908         MUST_EMBED. Force embedding of GRUB when the argument is
11909         true. Close FILE before returning.
11910         (main): Add support for RAID and LVM.
11912         * conf/common.rmk: Add RAID and LVM modules.
11913         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11914         util/lvm.c.
11915         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11917         * kern/misc.c (grub_strstr): New function.
11918         * include/grub/misc.h (grub_strstr): New prototype.
11920 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11922         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11924 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11926         * kern/misc.c (grub_strtoull): Guess the base only if not
11927         specified.
11929 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11931         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11932         PowerMac support.
11934 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11936         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11938         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11939         Remove `flags' argument.  All callers changed.
11940         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11941         (IEEE1275_IHANDLE_INVALID): New variable.
11942         (IEEE1275_CELL_INVALID): New variable.
11943         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11944         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11945         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11946         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11947         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11948         codes from Open Firmware.  All callers updated.
11949         (grub_ieee1275_next_property): Directly return Open Firmware return
11950         code.
11951         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11952         Standardize error checking from `grub_ieee1275_get_property'.
11953         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11954         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11956 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11958         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11959         `instance_to_package_args' to `instance_to_path_args'.
11961         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11962         `grub_ieee1275_chosen'.
11964         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11965         `grub_ieee1275_interpret'.
11967 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11969         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11971 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11973         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11974         (__cmpdi): Likewise.
11976         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11977         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11978         `grub_ssize_t'.
11980         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11982         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11983         to type `grub_ssize_t'.
11984         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11986 2006-09-22  Marco Gerards  <marco@gnu.org>
11988         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11989         newlines.
11991 2006-09-22  Marco Gerards  <marco@gnu.org>
11993         * commands/echo.c: New file.
11995         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11997         * conf/common.rmk (echo_mod_SOURCES): New variable.
11998         (echo_mod_CFLAGS): Likewise.
11999         (echo_mod_LDFLAGS): Likewise.
12001 2006-09-22  Marco Gerards  <marco@gnu.org>
12003         * normal/main.c (get_line): Malloc memory instead of using
12004         preallocated memory.  Removed the arguments `cmdline' and
12005         `max_len'.  Updated all callers.
12007 2006-09-22  Marco Gerards  <marco@gnu.org>
12009         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
12010         (normal_mod_DEPENDENCIES): Likewise.
12012         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
12013         (normal_mod_DEPENDENCIES): Likewise.
12015         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
12017 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
12019         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
12020         programs.
12021         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
12022         (normal_mod_DEPENDENCIES): Likewise.
12023         * conf/i386-pc.mk: Regenerate.
12024         * conf/i386-efi.mk: Likewise
12025         * conf/common.mk: Likewise.
12026         * conf/powerpc-ieee1275.mk: Likewise.
12027         * conf/sparc64-ieee1275.mk: Likewise.
12029 2006-09-22  Robert Millan  <rmh@aybabtu.com>
12031         Sync with i386 version.
12032         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
12033         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
12035 2006-09-21  Robert Millan  <rmh@aybabtu.com>
12037         Import from GRUB Legacy (lib/device.c):
12038         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
12039         (init_device_map) [__linux__]: Add support for I2O devices.
12041 2006-09-14  Marco Gerards  <marco@gnu.org>
12043         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
12044         `-melf_i386'.
12046 2006-09-14  Robert Millan  <rmh@aybabtu.com>
12048         * util/i386/pc/grub-install.in: Skip menu.lst when removing
12049         /boot/grub/*.lst.
12051         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
12053         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
12054         before adding it to device.map.
12056 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
12058         * genmk.rb: Let GCC generate dependencies the first time it
12059         compiles a file; using the -MD option.
12060         * conf/common.mk: Regenerate.
12061         * conf/i386-pc.mk: Likewise.
12062         * conf/i386-efi.mk: Likewise.
12063         * conf/powerpc-ieee1275.mk: Likewise.
12064         * conf/sparc64-ieee1275.mk: Likewise.
12066 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
12068         Move the prototypes of grub_setjmp and grub_longjmp to
12069         cpu/setjmp.h, so that each architecture may specify different
12070         attributes.
12072         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
12073         (grub_longjmp): Likewise.
12074         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
12075         (grub_longjmp): Likewise.
12076         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
12077         (grub_longjmp): Likewise.
12079         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
12080         [!GRUB_UTIL] (grub_longjmp): Removed.
12082 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
12084         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
12085         "color!" method does not return any value.
12087 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12089         * include/grub/bitmap.h: New file.
12091         * include/grub/i386/pc/vbeutil.h: Likewise.
12093         * video/bitmap.c: Likewise.
12095         * video/readers/tga.c: Likewise.
12097         * video/i386/pc/vbeutil.c: Likewise.
12099         * commands/videotest.c: Code cleanup and updated to reflect to new
12100         video API.
12102         * term/gfxterm.c: Likewise.
12104         * video/video.c: Likewise.
12106         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
12107         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
12108         (bitmap_mod_SOURCES): New entry.
12109         (bitmap_mod_CFLAGS): Likewise.
12110         (bitmap_mod_LDFLAGS): Likewise.
12111         (tga_mod_SOURCES): Likewise.
12112         (tga_mod_CFLAGS): Likewise.
12113         (tga_mod_LDFLAGS): Likewise.
12115         * include/grub/video.h (grub_video_blit_operators): New enum type.
12116         (grub_video_render_target): Changed as forward declaration and moved
12117         actual definition to be video driver specific.
12118         (grub_video_adapter.blit_bitmap): Added blitting operator.
12119         (grub_video_adapter.blit_render_target): Likewise.
12120         (grub_video_blit_bitmap): Likewise.
12121         (grub_video_blit_render_target): Likewise.
12123         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12124         driver specific render target definition.
12125         (grub_video_vbe_map_rgba): Added driver internal helper.
12126         (grub_video_vbe_unmap_color): Updated to use
12127         grub_video_i386_vbeblit_info.
12128         (grub_video_vbe_get_video_ptr): Likewise.
12130         * include/grub/i386/pc/vbeblit.h
12131         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12132         grub_video_i386_vbeblit_info.
12133         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12134         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12135         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12136         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12137         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12138         (grub_video_i386_vbeblit_index_index): Likewise.
12139         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12140         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12141         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12142         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12143         operator.
12144         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12145         operator.
12147         * video/i386/pc/vbeblit.c: Updated to reflect changes on
12148         include/grub/i386/pc/vbeblit.h.
12150         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12151         Updated to use grub_video_i386_vbeblit_info.
12152         (grub_video_i386_vbefill_R8G8B8): Likewise.
12153         (grub_video_i386_vbefill_index): Likewise.
12154         (grub_video_i386_vbefill): Added generic filler.
12156         * video/i386/pc/vbefill.c: Updated to reflect changes on
12157         include/grub/i386/pc/vbefill.h.
12159         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12160         grub_video_i386_vbeblit_info.
12161         (grub_video_vbe_unmap_color): Likewise.
12162         (grub_video_vbe_blit_glyph): Likewise.
12163         (grub_video_vbe_scroll): Likewise.
12164         (grub_video_vbe_draw_pixel): Removed function.
12165         (grub_video_vbe_get_pixel): Likewise.
12166         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12167         updated code to use it.
12168         (common_blitter): Added common blitter for render target and bitmap.
12169         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12170         (grub_video_vbe_blit_render_target): Likewise.
12172 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12174         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12175         is in text mode if there is no console control protocol instance
12176         available.
12178 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12180         * include/grub/video.h: Code cleanup.
12182         * include/grub/i386/pc/vbe.h: Likewise.
12184         * video/i386/pc/vbe.c: Likewise.
12186         * video/i386/pc/vbeblit.c: Likewise.
12188         * video/i386/pc/vbefill.c: Likewise.
12190         * video/video.c: Likewise.  Also added more comments.
12192 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12194         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12195         (struct grub_biosdisk_dap): Likewise.
12197         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12198         linkage settings for all functions.
12200 2006-07-12  Marco Gerards  <marco@gnu.org>
12202         * configure.ac (--enable-mm-debug): Fix typo.
12204         * genkernsyms.sh.in: Use proper quoting for `CC'.
12206 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12208         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12209         (normal_mod_ASFLAGS): Remove "-m32".
12211 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12213         * util/misc.c: Include config.h.
12214         [!HAVE_MEMALIGN]: Do not include malloc.h.
12215         (grub_memalign): Use posix_memalign, if present. Then, use
12216         memalign, if present. Otherwise, emit an error.
12218         * util/grub-emu.c: Do not include malloc.h.
12220         * include/grub/util/misc.h: Include unistd.h. This is required for
12221         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12222         D. Eades III <hde@foobar-qux.org>.
12224         * configure.ac (AC_GNU_SOURCE): Added.
12225         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12226         type.
12228 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12230         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12231         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12233 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12235         * include/grub/types.h (grub_host_addr_t): Rename to
12236         grub_target_addr_t.
12237         (grub_host_off_t): Rename to grub_target_off_t.
12238         (grub_host_size_t): Rename to grub_target_size_t.
12239         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12240         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12242         * include/grub/kernel.h (struct grub_module_header): Change type
12243         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12244         (grub_module_info): Likewise.
12246 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12248         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12249         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12250         Velazquez <jesus.velazquez@gmail.com>.
12252 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12254         Count partitions from 1 instead of 0 in the string representation
12255         of partitions. Still use 0-based internally.
12257         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12258         (sun_partition_map_iterate): Use grub_partition_t instead of
12259         struct grub_partition *. Cast DESC->START_CYLINDER to
12260         grub_uint64_t after converting the endian.
12261         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12262         (sun_partition_map_get_name): Add 1 to P->INDEX.
12264         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12265         PCDATA->DOS_PART.
12266         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12268         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12269         zero instead of one.
12270         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12271         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12273         * partmap/apple.c (apple_partition_map_iterate): Change the type
12274         of POS to unsigned.
12275         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12276         (apple_partition_map_get_name): Add 1 into P->INDEX.
12278         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12279         of POS to unsigned.
12280         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12281         calculate the offset of a partition.
12282         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12283         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12285         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12286         SECTOR to grub_disk_addr_t.
12287         (acorn_partition_map_iterate): Likewise.
12288         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12289         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12290         top.
12291         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12293         * kern/i386/pc/init.c (make_install_device): Add 1 into
12294         GRUB_INSTALL_DOS_PART.
12296         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12297         conditional.
12299 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12301         Clean up the code to support 64-bit addressing in disks and
12302         files. This change is not enough for filesystems yet.
12304         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12305         type of "start" to grub_uint64_t.
12306         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12307         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12308         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12309         convert addresses.
12311         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12312         to grub_disk_addr_t.
12314         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12315         string.
12317         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12319         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12320         to char *.
12322         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12324         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12326         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12328         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12329         to grub_off_t, to detect an error from grub_file_seek.
12330         (grub_multiboot_load_elf32): Likewise.
12332         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12333         maximum unsigned long value when an overflow is detected.
12334         (grub_strtoull): New function.
12335         (grub_divmod64): Likewise.
12336         (grub_lltoa): use grub_divmod64.
12338         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12339         grub_disk_addr_t.
12340         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12341         the pointer to next character. Use grub_strtoull instead of
12342         grub_strtoul.
12343         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12344         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12345         respectively.
12347         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12348         return value is signed.
12349         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12350         test if OFFSET is less than zero, as OFFSET is unsigned now.
12352         * kern/disk.c (struct grub_disk_cache): Change the type of
12353         "sector" to grub_disk_addr_t.
12354         (grub_disk_cache_get_index): Change the type of SECTOR to
12355         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12356         unsigned after shifting.
12357         (grub_disk_cache_invalidate): Change the type of SECTOR to
12358         grub_disk_addr_t.
12359         (grub_disk_cache_unlock): Likewise.
12360         (grub_disk_cache_store): Likewise.
12361         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12362         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12363         grub_disk_addr_t and grub_uint64_t, respectively.
12364         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12365         body, as the value of OFFSET is tweaked by
12366         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12367         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12368         respectively.
12369         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12370         body, as the value of OFFSET is tweaked by
12371         grub_disk_check_range. Change the types of LEN and N to
12372         grub_size_t.
12374         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12375         and "saved_offset" to grub_off_t.
12376         (test_header): Cast BUF to char *.
12377         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12378         to char *.
12379         (grub_gzio_read): Change the types of OFFSET and SIZE to
12380         grub_off_t and grub_size_t, respectively.
12382         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12383         Removed.
12384         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12385         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12386         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12387         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12388         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12390         * include/grub/types.h (grub_off_t): Unconditionally set to
12391         grub_uint64_t.
12392         (grub_disk_addr_t): Changed to grub_uint64_t.
12394         * include/grub/partition.h (struct grub_partition): Change the
12395         types of "start", "len" and "offset" to grub_disk_addr_t,
12396         grub_uint64_t and grub_disk_addr_t, respectively.
12397         (grub_partition_get_start): Return grub_disk_addr_t.
12398         (grub_partition_get_len): Return grub_uint64_t.
12400         * include/grub/misc.h (grub_strtoull): New prototype.
12401         (grub_divmod64): Likewise.
12403         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12404         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12405         grub_off_t, respectively.
12406         All callers and references changed.
12408         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12409         grub_size_t in "read".
12410         All callers and references changed.
12412         * include/grub/file.h (struct grub_file): Change the types of
12413         "offset" and "size" to grub_off_t and grub_off_t,
12414         respectively. Change the type of SECTOR to grub_disk_addr_t in
12415         "read_hook".
12416         (grub_file_read): Change the type of LEN to grub_size_t.
12417         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12418         grub_off_t.
12419         (grub_file_size): Return grub_off_t.
12420         (grub_file_tell): Likewise.
12421         All callers and references changed.
12423         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12424         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12425         "write".
12426         (struct grub_disk): Change the type of "total_sectors" to
12427         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12428         "read_hook".
12429         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12430         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12431         (grub_disk_write): Likewise.
12432         All callers and references changed.
12434         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12435         char * for grub_strncmp to silence gcc.
12436         (grub_iso9660_mount): Likewise.
12437         (grub_iso9660_mount): Likewise.
12438         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12439         return statement.
12440         (grub_iso9660_iterate_dir): Likewise.
12441         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12443         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12444         LEN to grub_disk_addr_t and grub_size_t, respectively.
12446         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12448         * fs/jfs.c (grub_jfs_read_file): Likewise.
12450         * fs/minix.c (grub_jfs_read_file): Likewise.
12452         * fs/sfs.c (grub_jfs_read_file): Likewise.
12454         * fs/ufs.c (grub_jfs_read_file): Likewise.
12456         * fs/xfs.c (grub_jfs_read_file): Likewise.
12458         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12459         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12460         respectively.
12462         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12463         BLKNR to -1 instead of returning GRUB_ERRNO.
12464         (grub_ext2_read_file): Change the types of SECTOR and
12465         LEN to grub_disk_addr_t and grub_size_t, respectively.
12467         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12468         LEN to grub_disk_addr_t and grub_size_t, respectively.
12470         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12471         grub_file_read.
12473         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12474         string. Do not cast SECTOR explicitly.
12476         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12477         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12478         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12479         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12480         over 2TB and LBA mode is not supported, raise an error.
12481         (get_safe_sectors): New function.
12482         (grub_biosdisk_read): Use get_safe_sectors.
12483         (grub_biosdisk_write): Likewise.
12485         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12486         (grub_efidisk_write): Likewise.
12488         * disk/loopback.c (delete_loopback): Cosmetic changes.
12489         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12490         correctly.
12491         (grub_loopback_open): Likewise.
12492         (grub_loopback_read): Likewise. Also, change the type of POS to
12493         grub_off_t, and fix the usage of grub_memset.
12495         * commands/i386/pc/play.c: Include grub/machine/time.h.
12497         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12498         print FILE->SIZE.
12500         * commands/configfile.c: Include grub/env.h.
12502         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12503         GRUB_ERRNO directly instead. Change the type of POS to
12504         grub_off_t. Follow the coding standard.
12506         * commands/blocklist.c: Include grub/partition.h.
12507         (grub_cmd_blocklist): Return an error if the underlying device is
12508         not a disk. Take the starting sector of a partition into account,
12509         if a partition is used.
12511         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12512         a length field.
12513         (lba_mode): Support 64-bit addresses.
12514         (chs_mode): Likewise.
12515         (copy_buffer): Adapted to the new offsets of a length field and a
12516         segment field.
12517         (blocklist_default_start): Allocate 64-bit space.
12519         * boot/i386/pc/boot.S (force_lba): Removed.
12520         (boot_drive): Moved to under KERNEL_SECTOR.
12521         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12522         space.
12523         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12524         is useless.
12525         (lba_mode): Refactored to support a 64-bit address. More size
12526         optimization.
12527         (setup_sectors): Likewise.
12529 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12531         * DISTLIST: Added include/grub/i386/linux.h. Removed
12532         include/grub/i386/pc/linux.h
12534         * configure.ac (AC_INIT): Bumped to 1.94.
12536         * config.guess: Updated from gnulib.
12537         * config.sub: Likewise.
12538         * install-sh: Likewise.
12539         * mkinstalldirs: Likewise.
12541 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12543         * conf/common.rmk (grub_modules_init.lst): Depended on
12544         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12545         MODSRCFILES.
12547         * genmk.rb (PModule::rule): Reverted the previous change.
12549 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12551         * conf/common.rmk (grub_modules_init.lst): Depends on
12552         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12553         that the target does not exist before producing.
12554         (grub_modules_init.h): Remove the target before generating.
12555         (grub_emu_init.c): Likewise.
12557         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12559 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12561         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12562         for the target-specific tests. Make sure that we also have the
12563         up-to-date target variables for those tests.
12565 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12567         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12568         (PModule::rule): Likewise.
12570 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12572         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12573         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12574         target-specific flags should be prefixed.
12575         (PModule::rule): Likewise.
12577 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12579         * configure.ac (CMP): Check if cmp is available explicitly.
12581 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12583         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12584         (target_cpu): New variable.
12585         (pkglibdir): Use target_cpu instead of host_cpu.
12587         * util/i386/pc/grub-install.in (host_cpu): Removed.
12588         (target_cpu): New variable.
12589         (pkglibdir): Use target_cpu instead of host_cpu.
12591         * util/genmoddep.c: Removed.
12593         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12594         instead of GRUB_HOST_SIZEOF_VOID_P.
12595         * kern/dl.c: Likewise.
12597         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12598         ...
12599         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12600         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12601         (GRUB_TARGET_SIZEOF_LONG): ... this.
12602         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12603         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12604         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12605         to ...
12606         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12607         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12608         (GRUB_TARGET_SIZEOF_LONG): ... this.
12609         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12610         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12611         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12612         to ...
12613         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12614         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12615         (GRUB_TARGET_SIZEOF_LONG): ... this.
12616         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12617         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12619         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12620         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12621         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12622         instead of GRUB_HOST_SIZEOF_LONG.
12623         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12624         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12625         GRUB_CPU_WORDS_BIGENDIAN.
12626         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12627         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12628         grub_host_ssize_t.
12630         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12631         (genmoddep_SOURCES): Likewise.
12632         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12633         (genmoddep_SOURCES): Likewise.
12634         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12635         (genmoddep_SOURCES): Likewise.
12636         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12637         Likewise.
12638         (genmoddep_SOURCES): Likewise.
12640         * genmoddep.awk: New file.
12642         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12643         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12644         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12645         (PModule::rule): Likewise.
12646         (Program::rule): Likewise.
12647         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12648         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12649         respectively.
12651         * configure.ac: Rewritten intensively to use host and target
12652         instead of build and host, respectively.
12654         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12655         (host_cpu): Removed.
12656         (target_cpu): New variable.
12657         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12658         (BUILD_CC): Removed.
12659         (BUILD_CFLAGS): Likewise.
12660         (BUILD_CPPFLAGS): Likewise.
12661         (TARGET_CC): New variable.
12662         (TARGET_CFLAGS): Likewise.
12663         (TARGET_CPPFLAGS): Likewise.
12664         (TARGET_LDFLAGS): Likewise.
12665         (AWK): Likewise.
12666         (include): Use target_cpu instead of host_cpu.
12667         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12669         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12671 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12673         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12674         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12675         field 'false' to 'exec_on_false'.
12676         (grub_script_create_cmdif): Renamed argument names to reflect above
12677         changes.
12679         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12681         * normal/script.c (grub_script_create_cmdif): Likewise.
12683 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12685         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12686         top.
12687         (grub_hfsplus_btree_recptr): Likewise.
12688         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12689         FILEBLOCK both to pass a block number and store next block
12690         number.
12691         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12692         overflow file correctly. Specify errors appropriately, because
12693         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12694         grub_hfsplus_btree_recptr to get the pointer to a found key.
12695         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12696         is found.
12698         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12699         linux.mod.
12700         (_linux_mod_SOURCES): New variable.
12701         (_linux_mod_CFLAGS): Likewise.
12702         (_linux_mod_LDFLAGS): Likewise.
12703         (linux_mod_SOURCES): Likewise.
12704         (linux_mod_CFLAGS): Likewise.
12705         (linux_mod_LDFLAGS): Likewise.
12707         * DISTLIST: Added loader/i386/efi/linux.c,
12708         loader/i386/efi/linux_normal.c and
12709         include/grub/i386/efi/loader.h.
12711         * loader/i386/efi/linux.c: New file.
12712         * loader/i386/efi/linux_normal.c: Likewise.
12713         * include/grub/i386/efi/loader.h: Likewise.
12715 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12717         * commands/blocklist.c: New file.
12719         * DISTLIST: Added commands/blocklist.c.
12721         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12722         color for the background, and a darker color for the foreground.
12723         (grub_console_checkkey): Return READ_KEY.
12724         (grub_console_cls): Set the background to
12725         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12727         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12729         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12730         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12732         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12733         prototype.
12735         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12736         BG. The spec is wrong again.
12738         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12739         prototype.
12740         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12742         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12743         commands/blocklist.c.
12744         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12746         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12747         (blocklist_mod_SOURCES): New variable.
12748         (blocklist_mod_CFLAGS): Likewise.
12749         (blocklist_mod_LDFLAGS): Likewise.
12751 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12753         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12754         duplication.
12755         (lba_mode): Use %eax more intensively to reduce the code size.
12757 2006-05-20  Marco Gerards  <marco@gnu.org>
12759         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12761         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12762         for `menuentry'.
12763         (script): Accept leading newlines.
12764         (newlines): New rule to describe 0 or more newlines.
12765         (commands): Accept `command' with trailing newline.  Fixed the
12766         order in which arguments were passed to `grub_script_add_cmd'.
12767         Accept commands separated by newlines.
12768         (function): Changed to accept newlines.
12769         (menuentry) Rewritten.
12771         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12772         front of the list, instead of to the end.
12774 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12776         * util/i386/pc/grub-install.in (bindir): New variable.
12777         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12778         Shaver <lbgwjl@gmail.com>.
12780 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12782         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12783         grub/machine/linux.h
12784         * loader/i386/pc/linux.c: Likewise.
12786         * include/grub/i386/pc/linux.h: Moved to ...
12787         * include/grub/i386/linux.h: ... here.
12789         * include/grub/i386/linux.h (struct linux_kernel_params): New
12790         struct.
12792 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12794         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12795         checking.
12796         (grub_video_vbe_blit_glyph): Likewise.
12797         (grub_video_vbe_blit_bitmap): Likewise.
12798         (grub_video_vbe_blit_render_target): Likewise.
12800 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12802         * configure.ac (--with-platform): Properly quote the square
12803         brackets.
12805 2006-05-08  Marco Gerards  <marco@gnu.org>
12807         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12808         this...
12809         (kernel_elf_HEADERS): ...to this.  Updated all users.
12810         (grubof_symlist.c): Renamed from this...
12811         (kernel_elf_symlist.c): ...to this.  Updated all users.
12812         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12813         (grubof_SOURCES): Renamed from this...
12814         (kernel_elf_SOURCES): ...to this.
12815         (grubof_HEADERS): Renamed from this...
12816         (kernel_elf_HEADERS): ...to this.
12817         (grubof_CFLAGS): Renamed from this...
12818         (kernel_elf_CFLAGS): ...to this.
12819         (grubof_ASFLAGS): Renamed from this...
12820         (kernel_elf_ASFLAGS): ...to this.
12821         (grubof_LDFLAGS): Renamed from this...
12822         (kernel_elf_LDFLAGS): ...to this.
12824         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12825         this...
12826         (kernel_elf_HEADERS): ...to this.  Updated all users.
12827         (grubof_symlist.c): Renamed from this...
12828         (kernel_elf_symlist.c): ...to this.  Updated all users.
12829         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12830         (grubof_SOURCES): Renamed from this...
12831         (kernel_elf_SOURCES): ...to this.
12832         (grubof_HEADERS): Renamed from this...
12833         (kernel_elf_HEADERS): ...to this.
12834         (grubof_CFLAGS): Renamed from this...
12835         (kernel_elf_CFLAGS): ...to this.
12836         (grubof_ASFLAGS): Renamed from this...
12837         (kernel_elf_ASFLAGS): ...to this.
12838         (grubof_LDFLAGS): Renamed from this...
12839         (kernel_elf_LDFLAGS): ...to this.
12841         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12842         `kernel.elf' instead of `grubof'.
12844 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12846         Add --with-platform to configure. Use pkglibdir instead of
12847         pkgdatadir. This is reported by Roger Leigh.
12849         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12850         (host_vendor): Likewise.
12851         (host_os): Likewise.
12852         (pkgdatadir): Likewise.
12853         (platform): New variable.
12854         (pkglibdir): Likewise.
12855         Use PKGLIBDIR instead of PKGDATADIR.
12857         * util/i386/pc/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/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12866         instead of GRUB_DATADIR.
12867         (main): Likewise.
12868         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12869         (main): Likewise.
12870         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12871         (main): Likewise.
12873         * configure.ac (--with-platform): New option.
12874         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12876         * Makefile.in: Include a makefile based on PLATFORM instead of
12877         HOST_VENDOR.
12878         (pkgdatadir): Not appended by the machine type.
12879         (pkglibdir): Appended by the machine type.
12880         (host_vendor): Removed.
12881         (platform): New variable.
12882         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12883         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12884         (uninstall): Likewise.
12886 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12888         Use the environment context in the menu. Remove the commands
12889         "default" and "timeout", and use variables instead.
12891         * normal/menu.c: Include grub/env.h.
12892         (print_entry): Cast TITLE to silence gcc.
12893         (get_timeout): New function.
12894         (set_timeout): Likewise.
12895         (get_entry_number): Likewise.
12896         (run_menu): Use a default entry, a fallback entry and a timeout
12897         in the environment variables "default", "fallback" and
12898         "timeout". Also, tweak the default entry if it is not within the
12899         current menu entries.
12900         (grub_menu_run): Use a fallback entry in the environment variable
12901         "fallback".
12903         * normal/main.c (read_config_file): Do not initialize
12904         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12905         NEWMENU->TIMEOUT.
12906         (grub_normal_execute): Use a data slot to store the menu.
12908         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12909         fallback_entry and timeout.
12910         (struct grub_menu_list): Removed.
12911         (grub_menu_list_t): Likewise.
12912         (struct grub_context): Likewise.
12913         (grub_context_t): Likewise.
12914         (grub_context_get): Likewise.
12915         (grub_context_get_current_menu): Likewise.
12916         (grub_context_push_menu): Likewise.
12917         (grub_context_pop_menu): Likewise.
12918         (grub_default_init): Likewise.
12919         (grub_default_fini): Likewise.
12920         (grub_timeout_init): Likewise.
12921         (grub_timeout_fini): Likewise.
12923         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12924         and timeout.mod.
12925         (normal_mod_SOURCES): Removed normal/context.c.
12927         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12928         commands/default.c, commands/timeout.c and normal/context.c.
12929         (normal_mod_SOURCES): Removed normal/context.c.
12931         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12932         commands/timeout.c and normal/context.c.
12933         (normal_mod_SOURCES): Removed normal/context.c.
12935         * conf/i386-efi.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/common.rmk (pkgdata_MODULES): Removed default.mod and
12940         timeout.mod.
12941         (default_mod_SOURCES): Removed.
12942         (default_mod_CFLAGS): Likewise.
12943         (default_mod_LDFLAGS): Likewise.
12944         (timeout_mod_SOURCES): Removed.
12945         (timeout_mod_CFLAGS): Likewise.
12946         (timeout_mod_LDFLAGS): Likewise.
12948         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12949         normal/context.c.
12951         * commands/default.c: Removed.
12952         * commands/timeout.c: Likewise.
12953         * normal/context.c: Likewise.
12955 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12957         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12959 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12961         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12962         "next" to "prev" for readability.
12963         (struct grub_env_sorted_var): New struct.
12964         (grub_env_context): Renamed to ...
12965         (initial_context): ... this.
12966         (grub_env_var_context): Renamed to ...
12967         (current_context): ... this.
12968         (grub_env_find): Look only at CURRENT_CONTEXT.
12969         (grub_env_context_open): Rewritten to copy exported variables from
12970         previous context.
12971         (grub_env_context_close): Rewritten according to the new
12972         scheme. Also, add an assertion to prevent the initial context from
12973         removed.
12974         (grub_env_insert): Removed the code for the sorted list.
12975         (grub_env_remove): Likewise.
12976         (grub_env_export): Simply mark the variable with
12977         GRUB_ENV_VAR_GLOBAL.
12978         (grub_env_set): A cosmetic change for naming consistency.
12979         (grub_env_get): Likewise.
12980         (grub_env_unset): Likewise.
12981         (grub_env_iterate): Rewritten to sort variables within this
12982         function.
12983         (grub_register_variable_hook): Fixed for naming consistency. Call
12984         grub_env_find again, only if NAME is not found at the first time.
12985         (mangle_data_slot_name): New function.
12986         (grub_env_set_data_slot): Likewise.
12987         (grub_env_get_data_slot): Likewise.
12988         (grub_env_unset_data_slot): Likewise.
12990         * include/grub/env.h (grub_env_var_type): New enum.
12991         (GRUB_ENV_VAR_LOCAL): New constant.
12992         (GRUB_ENV_VAR_GLOBAL): Likewise.
12993         (GRUB_ENV_VAR_DATA): Likewise.
12994         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12995         "type".
12996         (grub_env_set): Replace VAR with NAME for consistency.
12997         (grub_register_variable_hook): Likewise.
12998         (grub_env_export): Specify the name of the argument.
12999         (grub_env_set_data_slot): New prototype.
13000         (grub_env_get_data_slot): Likewise.
13001         (grub_env_unset_data_slot): Likewise.
13003 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13005         Extend the loader so that GRUB can accept a loader which comes
13006         back to GRUB when a loaded image exits. Also, this change adds
13007         support for a chainloader on EFI.
13009         * term/efi/console.c: Include grub/misc.h.
13010         (grub_console_checkkey): Display a scan code on the top for
13011         debugging. This will be removed once the EFI port gets stable.
13012         Correct the scan code mapping.
13014         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
13015         allocate memory from larger regions, in order to reduce the number
13016         of allocated regions. Otherwise, the MacOSX loader panics.
13017         (filter_memory_map): Avoid less than 1MB for compatibility with
13018         other loaders.
13019         (add_memory_regions): Allocate from the tail of a region, if
13020         possible, to avoid allocating a region near to 1MB, for the MacOSX
13021         loader.
13023         * kern/efi/init.c (grub_efi_set_prefix): Specify
13024         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
13026         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
13027         argument IMAGE_HANDLE and specify it to get a loaded image.
13028         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
13029         grub_efi_get_loaded_image.
13030         (grub_efi_get_filename): Divide the length by the size of
13031         grub_efi_char16_t.
13032         (grub_efi_get_device_path): New function.
13033         (grub_efi_print_device_path): Print End Device Path nodes. Divide
13034         the length by the size of grub_efi_char16_t for a file path device
13035         path node.
13037         * kern/loader.c (grub_loader_noreturn): New variable.
13038         (grub_loader_set): Accept a new argument NORETURN. Set
13039         GRUB_LOADER_NORETURN to NORETURN.
13040         All callers changed.
13041         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
13042         grub_machine_fini.
13044         * include/grub/efi/efi.h (grub_efi_get_device_path): New
13045         prototype.
13046         (grub_efi_get_loaded_image): Take an argument to specify an image
13047         handle.
13049         * include/grub/loader.h (grub_loader_set): Added one more argument
13050         NORETURN.
13052         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
13053         instead of grub_efi_open_protocol.
13054         (grub_efidisk_get_device_name): Likewise.
13055         (grub_efidisk_close): Print a newline.
13056         (grub_efidisk_get_device_handle): Fixed to use
13057         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
13058         GRUB_EFI_DEVICE_PATH_TYPE.
13060         * disk/efi/efidisk.c (device_path_guid): Moved to ...
13061         * kern/efi/efi.c (device_path_guid): ... here.
13063         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
13064         chain.mod.
13065         (kernel_mod_HEADERS): Added efi/disk.h.
13066         (_chain_mod_SOURCES): New variable.
13067         (_chain_mod_CFLAGS): Likewise.
13068         (_chain_mod_LDFLAGS): Likewise.
13069         (chain_mod_SOURCES): Likewise.
13070         (chain_mod_CFLAGS): Likewise.
13071         (chain_mod_LDFLAGS): Likewise.
13073         * DISTLIST: Added include/grub/efi/chainloader.h,
13074         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
13076         * include/grub/efi/chainloader.h: New file.
13077         * loader/efi/chainloader.c: Likewise.
13078         * loader/efi/chainloader_normal.c: Likewise.
13080 2006-04-30  Marco Gerards  <marco@gnu.org>
13082         * commands/configfile.c (grub_cmd_source): New function.
13083         (GRUB_MOD_INIT): Register the commands `source' and `.'.
13084         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
13086 2006-04-30  Marco Gerards  <marco@gnu.org>
13088         * normal/execute.c (grub_script_execute_cmd): Change the return
13089         type to `grub_err_t'.  Correctly return the error.
13090         (grub_script_execute_cmdline): In case a command line is not a
13091         command or a function, try to interpret it as an assignment.
13093 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
13095         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
13096         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
13097         skip a node whose name is obviously invalid as UTF-16,
13098         i.e. contains a NUL character. Stop the iteration when the last
13099         directory entry is found. Instead of using the return value of
13100         grub_hfsplus_btree_iterate_node, store the value in RET and use
13101         it, because the iterator can be stopped by the last directory
13102         entry.
13104 2006-04-30  Marco Gerards  <marco@gnu.org>
13106         * include/grub/env.h (grub_env_export): New prototype.  Reported
13107         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
13109 2006-04-30  Marco Gerards  <marco@gnu.org>
13111         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13112         size of the extents in a catalog file record.
13114 2006-04-29  Marco Gerards  <marco@gnu.org>
13116         * commands/configfile.c (grub_cmd_configfile): Execute the
13117         configfile within its own context.
13119         * include/grub/env.h (grub_env_context_open): New prototype.
13120         (grub_env_context_close): Likewise.
13122         * kern/env.c (grub_env): Removed.
13123         (grub_env_sorted): Likewise.
13124         (grub_env_context): New variable.
13125         (grub_env_var_context): Likewise.
13126         (grub_env_find): Search both the active context and the global
13127         context.
13128         (grub_env_context_open): New function.
13129         (grub_env_context_close): Likewise.
13130         (grub_env_insert): Likewise.
13131         (grub_env_remove): Likewise.
13132         (grub_env_export): Likewise.
13133         (grub_env_set): Changed to use helper functions to avoid code
13134         duplication.
13135         (grub_env_iterate): Rewritten so both the current context and the
13136         global context are being used.
13138         * normal/command.c (export_command): New function.
13139         (grub_command_init): Register the `export' function.
13141 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
13143         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13144         explicitly to suppress gcc's warnings.
13145         * fs/fat.c (grub_fat_find_dir): Likewise.
13146         (grub_fat_label): Likewise.
13147         * fs/xfs.c (grub_xfs_read_inode): Likewise.
13148         (grub_xfs_mount): Likewise.
13149         (grub_xfs_label): Likewise.
13150         * fs/affs.c (grub_affs_mount): Likewise.
13151         (grub_affs_label): Likewise.
13152         (grub_affs_iterate_dir): Likewise.
13153         * fs/sfs.c (grub_sfs_mount): Likewise.
13154         (grub_sfs_iterate_dir): Likewise.
13155         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13156         * fs/hfs.c (grub_hfs_mount): Likewise.
13157         (grub_hfs_cmp_catkeys): Likewise.
13158         (grub_hfs_find_dir): Likewise.
13159         (grub_hfs_dir): Likewise.
13160         (grub_hfs_label): Likewise.
13161         * fs/jfs.c (grub_jfs_mount): Likewise.
13162         (grub_jfs_opendir): Likewise.
13163         (grub_jfs_getent): Likewise.
13164         (grub_jfs_lookup_symlink): Likewise.
13165         (grub_jfs_label): Likewise.
13166         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13167         (grub_hfsplus_iterate_dir): Likewise.
13168         (grub_hfsplus_btree_iterate_node): Made static.
13170         * util/grub-emu.c (prefix): New variable.
13171         (grub_machine_set_prefix): New function.
13172         (main): Do not set the environment variable "prefix" here. Only
13173         set PREFIX, which is used later by grub_machine_set_prefix.
13175         * include/grub/video.h: Do not include grub/symbol.h.
13176         (grub_video_register): Not exported. This symbol is not defined in
13177         the kernel.
13178         (grub_video_unregister): Likewise.
13179         (grub_video_iterate): Likewise.
13180         (grub_video_setup): Likewise.
13181         (grub_video_restore): Likewise.
13182         (grub_video_get_info): Likewise.
13183         (grub_video_get_blit_format): Likewise.
13184         (grub_video_set_palette): Likewise.
13185         (grub_video_get_palette): Likewise.
13186         (grub_video_set_viewport): Likewise.
13187         (grub_video_get_viewport): Likewise.
13188         (grub_video_map_color): Likewise.
13189         (grub_video_map_rgb): Likewise.
13190         (grub_video_map_rgba): Likewise.
13191         (grub_video_fill_rect): Likewise.
13192         (grub_video_blit_glyph): Likewise.
13193         (grub_video_blit_bitmap): Likewise.
13194         (grub_video_blit_render_target): Likewise.
13195         (grub_video_scroll): Likewise.
13196         (grub_video_swap_buffers): Likewise.
13197         (grub_video_create_render_target): Likewise.
13198         (grub_video_delete_render_target): Likewise.
13199         (grub_video_set_active_render_target): Likewise.
13201         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13202         Undefined.
13203         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13205         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13206         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13207         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13208         instead of $(srcdir)/genkernsyms.sh.
13210         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13211         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13212         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13213         instead of $(srcdir)/genkernsyms.sh.
13215         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13216         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13217         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13218         instead of $(srcdir)/genkernsyms.sh.
13220         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13221         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13222         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13223         instead of $(srcdir)/genkernsyms.sh.
13225         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13226         genkernsyms.sh.
13228         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13229         genkernsyms.sh.
13230         (gensymlist.sh): New target.
13231         (genkernsyms.sh): Likewise.
13233         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13234         genkernsyms.sh.in and gensymlist.sh.in.
13236         * genkernsyms.sh: Removed.
13237         * gensymlist.sh: Likewise.
13239         * genkernsyms.sh.in: New file.
13240         * gensymlist.sh.in: Likewise.
13242 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13244         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13245         clobber "prefix", since we may have already set it manually.
13247 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13249         * kern/misc.c (abort): New alias for grub_abort.
13251 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13253         A new machine-specific function "grub_machine_set_prefix" is
13254         defined. This is called after loading modules, so that a prefix
13255         initialization can use modules. Also, this change adds an
13256         intensive debugging feature for the memory manager via the
13257         configure option "--enable-mm-debug".
13259         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13260         PART.LEN.
13262         * kern/sparc64/ieee1275/init.c (abort): Removed.
13263         (grub_stop): Likewise.
13264         (grub_exit): New function.
13265         (grub_set_prefix): Renamed to ...
13266         (grub_machine_set_prefix): ... this.
13267         (grub_machine_init): Do not call grub_set_prefix.
13269         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13270         (grub_machine_set_prefix): ... this.
13271         (grub_machine_init): Do not call grub_set_prefix.
13273         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13274         (grub_machine_init): Do not set the prefix here.
13276         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13278         * kern/efi/init.c: Include grub/mm.h.
13279         (grub_efi_set_prefix): New function.
13281         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13282         (grub_efi_get_filename): New function.
13283         (grub_print_device_path): Renamed to ...
13284         (grub_efi_print_device_path): ... this.
13286         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13287         [MM_DEBUG] (grub_realloc): Likewise.
13288         [MM_DEBUG] (grub_free): Likewise.
13289         [MM_DEBUG] (grub_memalign): Likewise.
13290         [MM_DEBUG] (grub_mm_debug): New variable.
13291         [MM_DEBUG] (grub_debug_malloc): New function.
13292         [MM_DEBUG] (grub_debug_free): New function.
13293         [MM_DEBUG] (grub_debug_realloc): New function.
13294         [MM_DEBUG] (grub_debug_memalign): New function.
13296         * kern/misc.c (grub_abort): Print a newline to distinguish
13297         the message.
13299         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13300         grub_set_root_dev after loading modules. This is necessary when
13301         setting a prefix depends on modules.
13303         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13304         (grub_efi_print_device_path): ... this.
13305         (grub_efi_get_filename): New prototype.
13306         (grub_efi_set_prefix): Likewise.
13308         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13309         and grub/disk.h.
13310         (grub_efidisk_get_device_handle): New prototype.
13311         (grub_efidisk_get_device_name): Likewise.
13313         * include/grub/mm.h: Include config.h.
13314         (MM_DEBUG): Removed.
13315         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13316         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13317         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13318         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13319         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13320         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13321         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13322         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13323         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13325         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13327         * disk/efi/efidisk.c: Include grub/partition.h.
13328         (iterate_child_devices): New function.
13329         (add_device): First, compare only last device path nodes, so that
13330         devices are sorted by the types.
13331         (grub_efidisk_get_device_handle): New function.
13332         (grub_efidisk_get_device_name): Likewise.
13334         * configure.ac (--enable-mm-debug): New option to enable the
13335         memory manager debugging feature. This makes the binary much
13336         bigger, so is disabled by default.
13338 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13340         Use grub_abort instead of grub_stop, and grub_exit must be
13341         define in each architecture now. Also, this change adds support
13342         for EFI disks.
13344         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13345         (grub_getkey): New function.
13346         (grub_term_get_current): Likewise.
13348         * util/i386/pc/grub-setup.c: Include grub/term.h.
13349         (grub_getkey): New function.
13350         (grub_term_get_current): Likewise.
13352         * util/misc.c (grub_stop): Renamed to ...
13353         (grub_exit): ... this.
13355         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13356         (grub_exit): ... this.
13357         (grub_machine_init): Use grub_abort instead of abort.
13358         (grub_stop): Removed.
13360         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13361         abort.
13363         * kern/i386/pc/startup.S (grub_exit): New function.
13364         (cold_reboot): New label.
13366         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13367         (grub_efi_init): Call grub_efidisk_init.
13368         (grub_efi_fini): Call grub_efidisk_fini.
13370         * kern/efi/efi.c: Include grub/mm.h.
13371         (grub_efi_console_control_guid): Renamed to ...
13372         (console_control_guid): ... this.
13373         (grub_efi_loaded_image_guid): Renamed to ...
13374         (loaded_image_guid): ... this.
13375         (grub_efi_locate_handle): New function.
13376         (grub_efi_open_protocol): Likewise.
13377         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13378         GRUB_EFI_CONSOLE_CONTROL_GUID.
13379         (grub_efi_exit): Removed.
13380         (grub_stop): Likewise.
13381         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13382         (grub_exit): New function.
13383         (grub_print_device_path): Likewise.
13385         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13386         (grub_enter_rescue_mode): Register "exit".
13388         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13389         (grub_abort): New function.
13391         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13393         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13395         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13397         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13398         (grub_print_device_path): New prototype.
13399         (grub_efi_locate_handle): Likewise.
13400         (grub_efi_open_protocol): Likewise.
13402         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13403         * disk/efi/efidisk.c: Likewise.
13405         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13407         * include/grub/efi/console_control.h
13408         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13410         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13411         last 8 bytes as an array.
13412         (GRUB_EFI_DISK_IO_GUID): New macro.
13413         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13414         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13415         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13416         grub_uint8_t.
13417         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13418         (struct grub_efi_device_path): Rename the member "sub_type" to
13419         "subtype".
13420         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13421         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13422         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13423         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13424         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13425         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13426         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13427         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13428         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13429         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13430         (struct grub_efi_pci_device_path): New structure.
13431         (grub_efi_pci_device_path_t): New type.
13432         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13433         (struct grub_efi_pccard_device_path): New structure.
13434         (grub_efi_pccard_device_path_t): New type.
13435         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13436         (struct grub_efi_memory_mapped_device_path): New structure.
13437         (grub_efi_memory_mapped_device_path_t): New type.
13438         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13439         (struct grub_efi_vendor_device_path): New structure.
13440         (grub_efi_vendor_device_path_t): New type.
13441         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13442         (struct grub_efi_controller_device_path): New structure.
13443         (grub_efi_controller_device_path_t): New type.
13444         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13445         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13446         (struct grub_efi_acpi_device_path): New structure.
13447         (grub_efi_acpi_device_path_t): New type.
13448         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13449         (struct grub_efi_expanded_acpi_device_path): New structure.
13450         (grub_efi_expanded_acpi_device_path_t): New type.
13451         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13452         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13453         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13454         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13455         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13456         (struct grub_efi_atapi_device_path): New structure.
13457         (grub_efi_atapi_device_path_t): New type.
13458         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13459         (struct grub_efi_fibre_channel_device_path): New structure.
13460         (grub_efi_fibre_channel_device_path_t): New type.
13461         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13462         (struct grub_efi_1394_device_path): New structure.
13463         (grub_efi_1394_device_path_t): New type.
13464         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13465         (struct grub_efi_usb_device_path): New structure.
13466         (grub_efi_usb_device_path_t): New type.
13467         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13468         (struct grub_efi_usb_class_device_path): New structure.
13469         (grub_efi_usb_class_device_path_t): New type.
13470         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13471         (struct grub_efi_i2o_device_path): New structure.
13472         (grub_efi_i2o_device_path_t): New type.
13473         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13474         (struct grub_efi_mac_address_device_path): New structure.
13475         (grub_efi_mac_address_device_path_t): New type.
13476         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13477         (struct grub_efi_ipv4_device_path): New structure.
13478         (grub_efi_ipv4_device_path_t): New type.
13479         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13480         (struct grub_efi_ipv6_device_path): New structure.
13481         (grub_efi_ipv6_device_path_t): New type.
13482         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13483         (struct grub_efi_infiniband_device_path): New structure.
13484         (grub_efi_infiniband_device_path_t): New type.
13485         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13486         (struct grub_efi_uart_device_path): New structure.
13487         (grub_efi_uart_device_path_t): New type.
13488         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13489         (struct grub_efi_vendor_messaging_device_path): New structure.
13490         (grub_efi_vendor_messaging_device_path_t): New type.
13491         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13492         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13493         (struct grub_efi_hard_drive_device_path): New structure.
13494         (grub_efi_hard_drive_device_path_t): New type.
13495         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13496         (struct grub_efi_cdrom_device_path): New structure.
13497         (grub_efi_cdrom_device_path_t): New type.
13498         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13499         (struct grub_efi_vendor_media_device_path): New structure.
13500         (grub_efi_vendor_media_device_path_t): New type.
13501         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13502         (struct grub_efi_file_path_device_path): New structure.
13503         (grub_efi_file_path_device_path_t): New type.
13504         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13505         (struct grub_efi_protocol_device_path): New structure.
13506         (grub_efi_protocol_device_path_t): New type.
13507         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13508         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13509         (struct grub_efi_bios_device_path): New structure.
13510         (grub_efi_bios_device_path_t): New type.
13511         (struct grub_efi_disk_io): New structure.
13512         (grub_efi_disk_io_t): New type.
13513         (struct grub_efi_block_io_media): New structure.
13514         (grub_efi_block_io_media_t): New type.
13515         (struct grub_efi_block_io): New structure.
13516         (grub_efi_block_io_t): New type.
13518         * include/grub/misc.h (grub_stop): Removed.
13519         (grub_exit): New prototype.
13520         (grub_abort): Likewise.
13522         * include/grub/disk.h (enum grub_disk_dev_id): Added
13523         GRUB_DISK_DEVICE_EFIDISK_ID.
13525         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13526         disk/efi/efidisk.c.
13527         (kernel_syms.lst): Remove the target if an error occurs.
13529 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13531         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13532         as it was simply too buggy.
13534 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13536         * kern/misc.c (grub_lltoa): New function.
13537         (grub_vsprintf): Added support for the long long suffix,
13538         i.e. "ll".
13540 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13542         * Makefile.in (LDFLAGS): Add variable.
13543         (LD): Remove variable.
13544         * configure.ac: Add -m32 to LDFLAGS.
13545         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13546         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13547         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13548         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13549         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13550         variables.
13551         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13552         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13553         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13555 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13557         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13558         length for unknown glyph.
13560 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13562         Add support for pre-loaded modules into the EFI port.
13564         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13565         completely. Accept one more argument DIR. The caller has changed.
13567         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13569         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13570         (grub_efi_loaded_image_guid): New variable.
13571         (grub_efi_get_loaded_image): New function.
13572         (grub_arch_modules_addr): Likewise.
13574         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13575         prototype.
13577         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13578         (struct grub_efi_loaded_image): New structure.
13579         (grub_efi_loaded_image_t): New type.
13581 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13583         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13584         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13585         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13587 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13589         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13591 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13593         * DISTLIST: Added include/grub/efi/console.h,
13594         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13595         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13597         * include/grub/efi/console.h: New file.
13598         * include/grub/efi/time.h: Likewise.
13599         * include/grub/i386/efi/kernel.h: Likewise.
13600         * kern/efi/init.c: Likewise.
13601         * kern/efi/mm.c: Likewise.
13602         * term/efi/console.c: Likewise.
13604         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13605         (grub_stop): Removed.
13606         (grub_get_rtc): Likewise.
13607         (grub_machine_init): Simply call grub_efi_init.
13608         (grub_machine_fini): Call grub_efi_fini.
13610         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13611         (grub_efi_output_string): Removed.
13612         (grub_efi_stall): New function.
13613         (grub_stop): Likewise.
13614         (grub_get_rtc): Likewise.
13616         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13617         (grub_efi_stall): New prototype.
13618         (grub_efi_allocate_pages): Likewise.
13619         (grub_efi_free_pages): Likewise.
13620         (grub_efi_get_memory_map): Likewise.
13621         (grub_efi_mm_init): Likewise.
13622         (grub_efi_mm_fini): Likewise.
13623         (grub_efi_init): Likewise.
13624         (grub_efi_fini): Likewise.
13626         * include/grub/i386/efi/time.h: Do not include
13627         grub/symbol.h. Include grub/efi/time.h.
13628         (GRUB_TICKS_PER_SECOND): Removed.
13629         (grub_get_rtc): Likewise.
13631         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13632         Added padding. The EFI spec is buggy.
13633         (GRUB_EFI_BLACK): New macro.
13634         (GRUB_EFI_BLUE): Likewise.
13635         (GRUB_EFI_GREEN): Likewise.
13636         (GRUB_EFI_CYAN): Likewise.
13637         (GRUB_EFI_RED): Likewise.
13638         (GRUB_EFI_MAGENTA): Likewise.
13639         (GRUB_EFI_BROWN): Likewise.
13640         (GRUB_EFI_LIGHTGRAY): Likewise.
13641         (GRUB_EFI_BRIGHT): Likewise.
13642         (GRUB_EFI_DARKGRAY): Likewise.
13643         (GRUB_EFI_LIGHTBLUE): Likewise.
13644         (GRUB_EFI_LIGHTGREEN): Likewise.
13645         (GRUB_EFI_LIGHTCYAN): Likewise.
13646         (GRUB_EFI_LIGHTRED): Likewise.
13647         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13648         (GRUB_EFI_YELLOW): Likewise.
13649         (GRUB_EFI_WHITE): Likewise.
13650         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13651         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13652         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13653         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13654         (GRUB_EFI_BACKGROUND_RED): Likewise.
13655         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13656         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13657         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13658         (GRUB_EFI_TEXT_ATTR): Likewise.
13660         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13661         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13662         (kernel_mod_HEADERS): Added efi/time.h.
13664 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13666         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13667         include/grub/efi/api.h, include/grub/efi/console_control.h,
13668         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13669         include/grub/i386/efi/time.h, kern/efi/efi.c,
13670         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13671         and util/i386/efi/grub-mkimage.c.
13673         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13675         * genmk.rb (PModule#rule): Do not export symbols if
13676         #{prefix}_EXPORTS is set to "no".
13678         * conf/i386-efi.mk: New file.
13679         * conf/i386-efi.rmk: Likewise.
13680         * include/grub/efi/api.h: Likewise.
13681         * include/grub/efi/console_control.h: Likewise.
13682         * include/grub/efi/efi.h: Likewise.
13683         * include/grub/efi/pe32.h: Likewise.
13684         * include/grub/i386/efi/time.h: Likewise.
13685         * kern/efi/efi.c: Likewise.
13686         * kern/i386/efi/init.c: Likewise.
13687         * kern/i386/efi/startup.S: Likewise.
13688         * util/i386/efi/grub-mkimage.c: Likewise.
13690 2006-04-17  Marco Gerards  <marco@gnu.org>
13692         * include/grub/script.h: Include <grub/parser.h> and
13693         "grub_script.tab.h".
13694         (struct grub_lexer_param): New struct.
13695         (struct grub_parser_param): Likewise.
13696         (grub_script_create_arglist): Pass the state in an argument.
13697         (grub_script_add_arglist): Likewise.
13698         (grub_script_create_cmdline): Likewise.
13699         (grub_script_create_cmdblock): Likewise.
13700         (grub_script_create_cmdif): Likewise.
13701         (grub_script_create_cmdmenu): Likewise.
13702         (grub_script_add_cmd): Likewise.
13703         (grub_script_arg_add): Likewise.
13704         (grub_script_lexer_ref): Likewise.
13705         (grub_script_lexer_deref): Likewise.
13706         (grub_script_lexer_record_start): Likewise.
13707         (grub_script_lexer_record_stop): Likewise.
13708         (grub_script_mem_record): Likewise.
13709         (grub_script_mem_record_stop): Likewise.
13710         (grub_script_malloc): Likewise.
13711         (grub_script_yylex): Likewise.
13712         (grub_script_yyparse): Likewise.
13713         (grub_script_yyerror): Likewise.
13714         (grub_script_yylex): Likewise.
13715         (grub_script_lexer_init): Return the state.
13717         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13718         (grub_script_lexer_done): Likewise.
13719         (grub_script_lexer_getline): Likewise.
13720         (grub_script_lexer_refs): Likewise.
13721         (script): Likewise.
13722         (newscript): Likewise.
13723         (record): Likewise.
13724         (recording): Likewise.
13725         (recordpos): Likewise.
13726         (recordlen): Likewise.
13727         (grub_script_lexer_init): Return the state instead of setting
13728         global variables.
13729         (grub_script_lexer_ref): Use the newly added argument for state
13730         instead of globals.
13731         (grub_script_lexer_deref): Likewise.
13732         (grub_script_lexer_record_start): Likewise.
13733         (grub_script_lexer_record_stop): Likewise.
13734         (recordchar): Likewise.
13735         (nextchar): Likewise.
13736         (grub_script_yylex2): Likewise.
13737         (grub_script_yylex): Likewise.
13738         (grub_script_yyerror): Likewise.
13740         * normal/parser.y (func_mem): Removed variable.
13741         (menu_entry): Likewise.
13742         (err): Likewise.
13743         (%lex-param): New parser option.
13744         (%parse-param): Likewise.
13745         (script): Always return the AST.
13746         (argument): Pass the state around.
13747         (arguments): Likewise.
13748         (grubcmd): Likewise.
13749         (commands): Likewise.
13750         (function): Likewise.
13751         (menuentry): Likewise.
13752         (if_statement): Likewise.
13753         (if): Likewise.
13755         * normal/script.c (grub_script_memused): Removed variable.
13756         (grub_script_parsed): Likewise.
13757         (grub_script_malloc): Added a state argument.  Use that instead of
13758         global variables.
13759         (grub_script_mem_record): Likewise.
13760         (grub_script_mem_record_stop): Likewise.
13761         (grub_script_arg_add): Likewise.
13762         (grub_script_add_arglist): Likewise.
13763         (grub_script_create_cmdline): Likewise.
13764         (grub_script_create_cmdif): Likewise.
13765         (grub_script_create_cmdmenu): Likewise.
13766         (grub_script_add_cmd): Likewise.
13767         (grub_script_parse): Setup the state before calling the parser.
13769 2006-04-16  Marco Gerards  <marco@gnu.org>
13771         * normal/command.c (grub_command_init): Remove the title command.
13773         * normal/lexer.c (grub_script_yylex): Renamed from this...
13774         (grub_script_yylex2): ... to this.
13775         (grub_script_yylex): New function.  Temporary
13776         introduced to filter some tokens.
13777         (grub_script_yyerror): Print a newline.
13779         * normal/main.c (read_config_file): Output information about the
13780         lines that contain errors.  Wait for a key after all lines have
13781         been processed.  Don't return an empty menu.
13783         * normal/parser.y (func_mem): Don't initialize.
13784         (menu_entry): Likewise.
13785         (err): New variable.
13786         (script): Don't return anything when an error was encountered.
13787         (ws, returns): Removed rules.
13788         (argument): Disabled concatenated variable support.
13789         (arguments): Remove explicit separators.
13790         (grubcmd): Likewise.
13791         (function): Likewise.
13792         (menuentry): Likewise.
13793         (if): Likewise.
13794         (commands): Likewise.  Add error handling.
13796         * normal/script.c (grub_script_create_cmdline): If
13797         `grub_script_parsed' is 0, assume the parser encountered an error.
13799 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13801         * configure.ac: Add support for EFI. Fix the typo
13802         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13804 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13806         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13807         foreign multibyte characters should be shown correctly.
13809 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13811         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13812         calculation.
13813         (read_config_file): Made it to close file before returning.
13815 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13817         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13818         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13819         video/i386/pc/vbefill.c.
13821         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13822         video/i386/pc/vbefill.c.
13824         * include/grub/video.h (grub_video_blit_format): New enum.
13825         (grub_video_mode_info): Added new member blit_format.
13826         (grub_video_get_blit_format): New function prototype.
13828         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13829         function prototype.
13830         (grub_video_vbe_map_rgb): Likewise.
13831         (grub_video_vbe_unmap_color): Likewise.
13833         * include/grub/i386/pc/vbeblit.h: New file.
13835         * include/grub/i386/pc/vbefill.h: New file.
13837         * video/video.c (grub_video_get_blit_format): New function.
13838         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13839         (grub_video_vbe_map_rgb): Likewise.
13840         (grub_video_vbe_unmap_color): Likewise.
13842         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13843         optimized fills.
13844         (grub_video_vbe_blit_render_target): Changed to use more optimized
13845         blits.
13846         (grub_video_vbe_setup): Added detection for optimized settings.
13847         (grub_video_vbe_create_render_target): Likewise.
13849         * video/i386/pc/vbeblit.c: New file.
13851         * video/i386/pc/vbefill.c: New file.
13853 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13855         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13856         here...
13858         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13859         parsing to support both hex and dec ranges.  If filename was missing
13860         show usage information.
13862 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13864         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13865         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13867         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13868         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13869         (video_mod_SOURCES): Added.
13870         (video_mod_CFLAGS): Likewise.
13871         (video_mod_LDFLAGS): Likewise.
13872         (gfxterm_mod_SOURCES): Likewise.
13873         (gfxterm_mod_CFLAGS): Likewise.
13874         (gfxterm_mod_LDFLAGS): Likewise.
13875         (videotest_mod_SOURCES): Likewise.
13876         (videotest_mod_CFLAGS): Likewise.
13877         (videotest_mod_LDFLAGS): Likewise.
13878         (vesafb_mod_SOURCES): Removed.
13879         (vesafb_mod_CFLAGS): Likewise.
13880         (vesafb_mod_LDFLAGS): Likewise.
13881         (vga_mod_SOURCES): Likewise.
13882         (vga_mod_CFLAGS): Likewise.
13883         (vga_mod_LDFLAGS): Likewise.
13885         * commands/videotest.c: New file.
13887         * font/manager.c (fill_with_default_glyph): Modified to use
13888         grub_font_glyph.
13889         (grub_font_get_glyph): Likewise.
13890         (fontmanager): Renamed from this...
13891         (font_manager): ... to this.
13893         * include/grub/font.h (grub_font_glyph): Added new structure.
13894         (grub_font_get_glyph): Modified to use grub_font_glyph.
13896         * include/grub/misc.h (grub_abs): Added as inline function.
13898         * include/grub/video.h: New file.
13900         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13901         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13902         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13903         (grub_vbe_get_controller_info): Renamed from this...
13904         (grub_vbe_bios_get_controller_info): ... to this.
13905         (grub_vbe_get_mode_info): Renamed from this...
13906         (grub_vbe_bios_get_mode_info): ... to this.
13907         (grub_vbe_set_mode): Renamed from this...
13908         (grub_vbe_bios_set_mode): ... to this.
13909         (grub_vbe_get_mode): Renamed from this...
13910         (grub_vbe_bios_get_mode): ... to this.
13911         (grub_vbe_set_memory_window): Renamed from this...
13912         (grub_vbe_bios_set_memory_window): ... to this.
13913         (grub_vbe_get_memory_window): Renamed from this...
13914         (grub_vbe_bios_get_memory_window): ... to this.
13915         (grub_vbe_set_scanline_length): Renamed from this...
13916         (grub_vbe_set_scanline_length): ... to this.
13917         (grub_vbe_get_scanline_length): Renamed from this...
13918         (grub_vbe_bios_get_scanline_length): ... to this.
13919         (grub_vbe_set_display_start): Renamed from this...
13920         (grub_vbe_bios_set_display_start): ... to this.
13921         (grub_vbe_get_display_start): Renamed from this...
13922         (grub_vbe_bios_get_display_start): ... to this.
13923         (grub_vbe_set_palette_data): Renamed from this...
13924         (grub_vbe_bios_set_palette_data): ... to this.
13925         (grub_vbe_set_pixel_rgb): Removed.
13926         (grub_vbe_set_pixel_index): Likewise.
13928         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13929         from this...
13930         (grub_vbe_bios_get_controller_info): ... to this.
13931         (grub_vbe_get_mode_info): Renamed from this...
13932         (grub_vbe_bios_get_mode_info): ... to this.
13933         (grub_vbe_set_mode): Renamed from this...
13934         (grub_vbe_bios_set_mode): ... to this.
13935         (grub_vbe_get_mode): Renamed from this...
13936         (grub_vbe_bios_get_mode): ... to this.
13937         (grub_vbe_set_memory_window): Renamed from this...
13938         (grub_vbe_bios_set_memory_window): ... to this.
13939         (grub_vbe_get_memory_window): Renamed from this...
13940         (grub_vbe_bios_get_memory_window): ... to this.
13941         (grub_vbe_set_scanline_length): Renamed from this...
13942         (grub_vbe_set_scanline_length): ... to this.
13943         (grub_vbe_get_scanline_length): Renamed from this...
13944         (grub_vbe_bios_get_scanline_length): ... to this.
13945         (grub_vbe_set_display_start): Renamed from this...
13946         (grub_vbe_bios_set_display_start): ... to this.
13947         (grub_vbe_get_display_start): Renamed from this...
13948         (grub_vbe_bios_get_display_start): ... to this.
13949         (grub_vbe_set_palette_data): Renamed from this...
13950         (grub_vbe_bios_set_palette_data): ... to this.
13951         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13952         getting corrupted after calling it.  Added more pushes and pops.
13953         (grub_vbe_bios_set_mode): Likewise.
13954         (grub_vbe_bios_get_mode): Likewise.
13955         (grub_vbe_bios_get_memory_window): Likewise.
13956         (grub_vbe_bios_set_scanline_length): Likewise.
13957         (grub_vbe_bios_get_scanline_length): Likewise.
13958         (grub_vbe_bios_get_display_start): Likewise.
13959         (grub_vbe_bios_set_palette_data): Likewise.
13961         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13962         (cl_insert): Likewise.
13963         (cl_delete): Likewise.
13965         * term/gfxterm.c: New file.
13967         * term/i386/pc/vesafb.c: Removed file.
13969         * video/video.c: New file.
13971         * video/i386/pc/vbe.c (real2pm): Added new function.
13972         (grub_video_vbe_draw_pixel): Likewise.
13973         (grub_video_vbe_get_video_ptr): Likewise.
13974         (grub_video_vbe_get_pixel): Likewise
13975         (grub_video_vbe_init): Likewise.
13976         (grub_video_vbe_fini): Likewise.
13977         (grub_video_vbe_setup): Likewise.
13978         (grub_video_vbe_get_info): Likewise.
13979         (grub_video_vbe_set_palette): Likewise.
13980         (grub_video_vbe_get_palette): Likewise.
13981         (grub_video_vbe_set_viewport): Likewise.
13982         (grub_video_vbe_get_viewport): Likewise.
13983         (grub_video_vbe_map_color): Likewise.
13984         (grub_video_vbe_map_rgb): Likewise.
13985         (grub_video_vbe_map_rgba): Likewise.
13986         (grub_video_vbe_unmap_color): Likewise.
13987         (grub_video_vbe_fill_rect): Likewise.
13988         (grub_video_vbe_blit_glyph): Likewise.
13989         (grub_video_vbe_blit_bitmap): Likewise.
13990         (grub_video_vbe_blit_render_target): Likewise.
13991         (grub_video_vbe_scroll): Likewise.
13992         (grub_video_vbe_swap_buffers): Likewise.
13993         (grub_video_vbe_create_render_target): Likewise.
13994         (grub_video_vbe_delete_render_target): Likewise.
13995         (grub_video_vbe_set_active_render_target): Likewise.
13996         (grub_vbe_set_pixel_rgb): Remove function.
13997         (grub_vbe_set_pixel_index): Likewise.
13998         (index_color_mode): Remove static variable.
13999         (active_mode): Likewise.
14000         (framebuffer): Likewise.
14001         (bytes_per_scan_line): Likewise.
14002         (grub_video_vbe_adapter): Added new static variable.
14003         (framebuffer): Likewise.
14004         (render_target): Likewise.
14005         (initial_mode): Likewise.
14006         (mode_in_use): Likewise.
14007         (mode_list): Likewise.
14009 2006-03-10  Marco Gerards  <marco@gnu.org>
14011         * configure.ac (AC_INIT): Bumped to 1.93.
14013         * DISTLIST: Added `include/grub/hfs.h'.
14015 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
14017         * boot/i386/pc/boot.S (general_error): Before looping, try INT
14018         18H, which might help the BIOS falling back to next boot media.
14020 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
14022         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
14023         Poe Chen <poe.poechen@gmail.com>.
14025 2006-01-17  Marco Gerards  <marco@gnu.org>
14027         * include/grub/normal.h: Include <grub/script.h>.
14028         (grub_command_list): Removed struct.
14029         (grub_command_list_t): Removed type.
14030         (grub_menu_entry): Remove members `num' and `command_list'.  Add
14031         members `commands' and `sourcecode'.
14032         * include/grub/script.h: Add inclusion guards.
14033         (grub_script_cmd_menuentry): New struct.
14034         (grub_script_execute_menuentry): New prototype.
14035         (grub_script_lexer_record_start): Likewise.
14036         (grub_script_lexer_record_stop): Likewise.
14037         * normal/execute.c (grub_script_execute_menuentry): New function.
14038         * normal/lexer.c (record, recording, recordpos, recordlen): New
14039         variables.
14040         (grub_script_lexer_record_start): New function.
14041         (grub_script_lexer_record_stop): Likewise.
14042         (recordchar): Likewise.
14043         (nextchar): Likewise.
14044         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
14045         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
14046         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
14047         (current_menu): New variable.
14048         (free_menu): Mainly rewritten.
14049         (grub_normal_menu_addentry): New function.
14050         (read_config_file): Rewritten.
14051         * normal/menu.c (run_menu_entry): Mainly rewritten.
14052         * normal/menu_entry.c (make_screen): Rewritten the code to insert
14053         the menu entry.
14054         (run): Mainly rewritten.
14055         * normal/parser.y (menu_entry): New variable.
14056         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
14057         (menuentry): New rule.
14058         (command): Add `menuentry'.
14059         (if_statement): Allow additional returns before `fi'.
14060         * normal/script.c (grub_script_create_cmdmenu): New function.
14062 2006-01-03  Marco Gerards  <marco@gnu.org>
14064         * INSTALL: GNU Bison is required.
14065         * configure.ac: Rewritten the test to detect Bison.
14066         * Makefile.in (YACC): New variable.  Reported by Xun Sun
14067         <xun.sun.cn@gmail.com>.
14069 2006-01-03  Marco Gerards  <marco@gnu.org>
14071         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
14072         the HFS+ filesystem to filesystem blocks.
14073         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
14074         GCC warning is silenced.
14076 2006-01-03  Marco Gerards  <marco@gnu.org>
14078         * partmap/apple.c (apple_partition_map_iterate): Convert the data
14079         read from disk from big endian to host byte order.
14081 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
14083         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
14084         documentation.
14085         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
14086         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
14087         embedded HFS+ filesystem.
14088         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
14089         (grub_hfs_sblock): Move from here...
14090         * include/grub/hfs.h: To here...  New file.
14091         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
14092         documentation.
14093         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
14094         New macros.
14095         (grub_hfsplus_volheader): Change type of member `magic' to
14096         `grub_uint16_t'.
14097         (grub_hfsplus_data): Add new member `embedded_offset'.
14098         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
14099         returned block.
14100         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
14101         Calculate the offset.
14103 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14105         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
14106         Removed.
14107         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
14109 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14111         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14112         ENV->NAME is NULL after allocating ENV->VALUE.
14114 2005-12-25  Marco Gerards  <marco@gnu.org>
14116         * kern/env.c (grub_env_set): Rewritten the error handling code.
14118 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14120         * geninit.sh: Made more robust, and more portable.
14122 2005-12-25  Marco Gerards  <marco@gnu.org>
14124         Add support for Apple HFS+ filesystems.
14126         * fs/hfsplus.c: New file.
14128         * DISTLIST: Added `fs/hfsplus.c'.
14130         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14131         (hfsplus_mod_SOURCES): New variable.
14132         (hfsplus_mod_CFLAGS): Likewise.
14133         (hfsplus_mod_LDFLAGS): Likewise.
14134         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14135         (grub_setup_SOURCES): Likewise.
14136         (grub_mkdevicemap_SOURCES): Likewise.
14137         (grub_emu_SOURCES): Likewise.
14138         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14140         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14142         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14144 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14146         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14147         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14148         include/grub/parser.h, include/grub/script.h, kern/parser.c,
14149         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14150         normal/lexer.c, normal/parser.y, normal/script.c, and
14151         partmap/gpt.c.
14152         Removed kern/sparc64/cache.c.
14154         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14155         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14156         grub_emu_init.c.
14158         * configure.ac (AC_INIT): Bumped to 1.92.
14160 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
14162         * kern/err.c (grub_error_push): Added new function to support error
14163         stacks.
14164         (grub_error_pop): Likewise.
14165         (grub_error_stack_items): New local variable to support error stacks.
14166         (grub_error_stack_pos): Likewise.
14167         (grub_error_stack_assert): Likewise.
14168         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14169         stack depth.
14170         (grub_print_error): Added support to print errors from error stack.
14172         * include/grub/err.h (grub_error_push): Added function prototype.
14173         (grub_error_pop): Likewise.
14175 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14177         * configure.ac: Accept `powerpc64' as host_cpu.
14178         (amd64): Rename to `biarch32'.
14180         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14181         non-cacheline-aligned addresses.
14183         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14184         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14185         if `size' is non-zero.
14187 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14189         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14190         and `cd' to make sure the filename is not prefixed with a
14191         directory name.
14192         (pkgdata_MODULES): Add `gpt.mod'.
14193         (gpt_mod_SOURCES): New variable.
14194         (gpt_mod_CFLAGS): Likewise.
14195         (gpt_mod_LDFLAGS): Likewise.
14197         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14199         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14200         New macro.
14202         * partmap/gpt.c: New file.
14204         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14205         GPT partition map is detected.
14207 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14209         * commands/i386/pc/play.c: New file.
14210         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14211         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14212         macros.
14214 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14216         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14217         ((unused))' to silence gcc warning.
14219 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14221         * configure.ac: Correct `AC_PROG_YACC' test.
14223 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14225         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14226         check before installing files.
14228 2005-11-22  Mike Small  <smallm@panix.com>
14230         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14231         number regex so multidigit numbers are recognized correctly.
14233 2005-11-22  Mike Small  <smallm@panix.com>
14235         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14236         debugging message before attempting to claim memory.
14237         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14238         multiple addresses in case of failure.
14240 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14242         * term/tparm.c (get_space): Remove empty `if' statement.
14244         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14246         * kern/parser.c (check_varstate): Rename `state' to 's'.
14248 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14250         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14251         variable definitions to the beginning of each function.  Sort stack
14252         variables by size.
14253         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14254         `buf' argument to `char *'.
14256 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14258         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14259         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14260         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14261         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14262         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14263         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14264         configfile.mod, search.mod, gzio.mod and test.mod.
14265         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14266         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14267         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14268         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14269         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14270         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14271         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14272         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14273         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14274         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14275         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14276         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14277         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14278         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14279         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14280         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14281         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14282         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14283         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14284         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14285         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14286         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14287         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14289         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14290         `grep --include'.
14291         (pkgdata_MODULES): Add test.mod.
14293 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14295         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14296         appending to variables with "+=".
14297         (PModule): Use full pathname to generate *.lst filenames.
14299         * Makefile.in: Fixed list rules moved from genmk.rb.
14300         (.DELETE_ON_ERROR): New special target.
14301         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14303         * conf/i386-pc.rmk: Include conf/common.mk.
14304         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14305         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14306         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14307         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14308         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14309         configfile.mod, search.mod, gzio.mod and test.mod.
14310         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14311         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14312         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14313         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14314         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14315         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14316         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14317         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14318         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14319         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14320         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14321         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14322         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14323         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14324         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14325         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14326         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14327         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14328         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14329         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14330         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14331         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14332         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14333         here...
14334         * conf/common.rmk: ... to here.  New file.
14336         * conf/common.mk: New file.
14338 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14340         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14341         (grub_script.tab.c): ... here.
14343         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14344         (grub_script.tab.c): ... here.
14346         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14347         (grub_script.tab.c): ... here.
14349         * normal/command.c (grub_command_find): Fixed a memory leak of
14350         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14352 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14354         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14355         "@" which marks the start of a comment on ARM.
14356         (VARIABLE): Likewise.
14358 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14360         Add support for Linux/ADFS partition tables.
14362         * partmap/acorn.c: New file.
14364         * include/grub/acorn_filecore.h: Likewise.
14366         * DISTLIST: Added `partmap/acorn.c' and
14367         `include/grub/acorn_filecore.h'.
14369         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14370         `partmap/acorn.c'.
14371         (pkgdata_MODULES): Add `acorn.mod'.
14372         (acorn_mod_SOURCES): New variable.
14373         (acorn_mod_CFLAGS): Likewise.
14375         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14376         `partmap/acorn.c'.
14377         (pkgdata_MODULES): Add `acorn.mod'.
14378         (acorn_mod_SOURCES): New variable.
14379         (acorn_mod_CFLAGS): Likewise.
14381         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14382         (pkgdata_MODULES): Add `acorn.mod'.
14383         (acorn_mod_SOURCES): New variable.
14384         (acorn_mod_CFLAGS): Likewise.
14385         (acorn_mod_LDFLAGS): Likewise.
14387         * include/types.h (grub_disk_addr_t): New typedef.
14389 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14391         * geninit.sh: New file.
14393         * geninitheader.sh: Likewise.
14395         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14396         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14397         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14398         * commands/configfile.c (grub_configfile_init)
14399         (grub_configfile_fini): Likewise.
14400         * commands/default.c (grub_default_init, grub_default_fini):
14401         Likewise.
14402         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14403         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14404         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14405         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14406         Likewise.
14407         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14408         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14409         Likewise.
14410         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14411         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14412         Likewise.
14413         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14414         Likewise.
14415         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14416         Likewise.
14417         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14418         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14419         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14420         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14421         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14422         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14423         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14424         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14425         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14426         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14427         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14428         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14429         * partmap/amiga.c (grub_amiga_partition_map_init)
14430         (grub_amiga_partition_map_fini): Likewise.
14431         * partmap/apple.c (grub_apple_partition_map_init)
14432         (grub_apple_partition_map_fini): Likewise.
14433         * partmap/pc.c (grub_pc_partition_map_init)
14434         (grub_pc_partition_map_fini): Likewise.
14435         * partmap/sun.c (grub_sun_partition_map_init,
14436         grub_sun_partition_map_fini): Likewise.
14437         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14438         Likewise.
14440         * util/grub-emu.c: Include <grub_modules_init.h>.
14441         (main): Don't initialize and de-initialize any modules directly,
14442         use `grub_init_all' and `grub_fini_all' instead.
14444         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14445         `grub_vesafb_mod_init'.
14446         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14447         all users.
14448         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14449         `grub_vga_mod_init'.  Updated all users.
14450         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14452         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14453         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14454         rules.
14456         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14457         Generate a function to initialize the module in utilities.
14458         Updated all callers.
14459         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14460         initialize the module in utilities.  Updated all callers.
14462 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14464         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14465         escape sequence and a literal ^L to clear the screen.
14467         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14468         when returning from Open Firmware.
14470 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14472         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14473         (grub_ofconsole_height): Likewise.
14474         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14475         manually insert a '\n'.
14476         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14477         `grub_ofconsole_height'.  Return early if these are already set.
14479 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14481         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14482         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14483         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14484         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14485         and `normal/script.c'.
14486         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14487         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14488         (test_mod_SOURCES): New variable.
14489         (test_mod_CFLAGS): Likewise.
14490         (test_mod_LDFLAGS): Likewise.
14491         (pkgdata_MODULES): Add `test.mod'.
14492         (grub_script.tab.c): New rule.
14493         (grub_script.tab.h): Likewise.
14495 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14497         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14498         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14499         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14500         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14501         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14502         (test_mod_SOURCES): New variable.
14503         (test_mod_CFLAGS): Likewise.
14504         (pkgdata_MODULES): Add `test.mod'.
14505         (grub_script.tab.c): New rule.
14506         (grub_script.tab.h): Likewise.
14508 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14510         Add initial scripting support.
14512         * commands/test.c: New file.
14513         * include/grub/script.h: Likewise.
14514         * normal/execute.c: Likewise.
14515         * normal/function.c: Likewise.
14516         * normal/lexer.c: Likewise.
14517         * normal/parser.y: Likewise.
14518         * normal/script.c: Likewise.
14520         * configure.ac: Add `AC_PROG_YACC' test.
14522         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14523         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14524         `normal/function.c' and `normal/script.c'.
14525         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14526         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14527         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14528         variables.
14529         (pkgdata_MODULES): Add `test.mod'.
14530         (grub_script.tab.c): New rule.
14531         (grub_script.tab.h): Likewise.
14533         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14535         * include/grub/normal.h (grub_test_init): New prototype.
14536         (grub_test_fini): Likewise.
14538         * normal/command.c: Include <grub/script.h>.
14539         (grub_command_execute): Rewritten.
14541         * util/grub-emu.c (main): Call `grub_test_init' and
14542         `grub_test_fini'.
14544 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14546         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14547         to 0.
14548         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14549         there are no pending characters.
14551 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14553         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14554         `grub_strndup' to drop device arguments. Replace unnecessary
14555         `grub_strndup' with `grub_strdup'.
14557 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14559         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14560         `debug' environment variable has been set.
14562 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14564         * Makefile.in (install-local): Use $(DATA).
14565         (uninstall): Likewise.
14566         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14567         (sbin_UTILITIES): ... to here.
14568         (sbin_SCRIPTS): New variable.
14569         (grub_install_SOURCES): New variable.
14570         * util/powerpc/ieee1275/grub-install.in: New file.
14571         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14572         variable.
14573         (add_segments): Call `grub_util_get_path'.
14575 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14577         From Timothy Baldwin:
14578         * commands/ls.c (grub_ls_list_files): Close FILE with
14579         grub_file_close.
14580         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14582 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14584         * include/grub/parser.h: New file.
14586         * kern/parser.c: Likewise.
14588         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14589         (grub_setup_SOURCES): Likewise.
14590         (grub_probefs_SOURCES): Likewise.
14591         (grub_emu_SOURCES): Likewise.
14592         (kernel_img_HEADERS): Add `parser.h'.
14594         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14595         (grub_emu_SOURCES): Add `kern/parser.c'.
14596         (grubof_SOURCES): Likewise.
14598         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14599         (grubof_SOURCES): Add `kern/parser.c'.
14601         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14603         * kern/misc.c (grub_split_cmdline): Removed function.
14605         * kern/rescue.c: Include <grub/parser.h>.
14606         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14607         of `grub_split_cmdline'.
14609         * normal/command.c: Include <grub/parser.h>.
14610         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14611         of `grub_split_cmdline'.
14613         * normal/completion.c: Include <grub/parser.h>.
14614         (cmdline_state): New variable.
14615         (iterate_dir): End the filename with a quote depending on the
14616         command line state.
14617         (get_state): new function.
14618         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14619         split the arguments and determine the current argument.  When the
14620         argument string is not quoted, escape all spaces.
14622 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14624         * normal/sparc64/setjmp.S: New file.
14626 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14628         * include/grub/sparc64/libgcc.h: New file.
14629         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14630         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14631         normal/sparc64/setjmp.c.
14633 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14635         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14636         * kern/sparc64/cache.S: New file.
14637         * kern/sparc64/cache.c: Removed.
14638         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14639         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14640         -mtune=ultrasparc.
14641         (COMMON_LDFLAGS): Add -melf64_sparc.
14642         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14643         (grubof_SOURCES): Use cache.S instead of cache.c.
14644         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14645         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14646         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14647         commented though.
14648         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14649         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14650         (linux_mod_CFLAGS): Commented out.
14651         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14652         out because module isn't built.
14653         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14654         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14655         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14656         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14657         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14658         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14659         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14660         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14661         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14662         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14663         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14664         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14665         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14666         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14668 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14670         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14671         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14672         longer, because HFS should not be used on PC.
14674 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14676         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14677         consistently within the loop.
14679 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14681         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14682         directory can not be read.
14684 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14686         * configure.ac (AC_INIT): Increase the version number to 1.91.
14688         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14689         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14690         term/i386/pc/serial.c.
14692 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14694         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14695         file size must be permitted.
14697         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14698         between %ah and %al.
14700 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14702         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14703         grub_uint64_t.
14704         Call the hook with a NUL-terminated filename.
14705         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14706         grub_cpu_to_be32.
14708         * kern/term.c (cursor_state): New variable.
14709         (grub_term_set_current): Reset the cursor state on a new
14710         terminal.
14711         (grub_setcursor): Rewritten to use CURSOR_STATE.
14712         (grub_getcursor): New function.
14714         * include/grub/term.h (grub_getcursor): New prototype.
14716         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14717         integers on ARM. Reported by Timothy Baldwin
14718         <T.E.Baldwin99@members.leeds.ac.uk>.
14720 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14722         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14723         allocated.
14724         (grub_sfs_dir): Likewise.
14726 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14728         Add support for the SFS filesystem.
14730         * fs/sfs.c: New file.
14732         * DISTLIST: Added `fs/sfs.c'.
14734         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14735         (grub_probefs_SOURCES): Likewise.
14736         (grub_emu_SOURCES): Likewise.
14737         (pkgdata_MODULES): Add `sfs.mod'.
14738         (sfs_mod_SOURCES): New variable.
14739         (sfs_mod_CFLAGS): Likewise.
14740         (sfs_mod_LDFLAGS): Likewise.
14742         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14743         (pkgdata_MODULES): Add `sfs.mod'.
14744         (sfs_mod_SOURCES): New variable.
14745         (sfs_mod_CFLAGS): Likewise.
14747         * util/grub-emu.c (main): Call `grub_sfs_init' and
14748         `grub_sfs_fini'.
14750         * include/grub/fs.h (grub_sfs_init): New prototype.
14751         (grub_sfs_fini): Likewise.
14753 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14755         Add support for the AFFS filesystem.
14757         * fs/affs.c: New file.
14759         * DISTLIST: Added `fs/affs.c'.
14761         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14762         (grub_probefs_SOURCES): Likewise.
14763         (grub_emu_SOURCES): Likewise.
14764         (pkgdata_MODULES): Add `affs.mod'.
14765         (affs_mod_SOURCES): New variable.
14766         (affs_mod_CFLAGS): Likewise.
14767         (affs_mod_LDFLAGS): Likewise.
14769         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14770         (pkgdata_MODULES): Add `affs.mod'.
14771         (affs_mod_SOURCES): New variable.
14772         (affs_mod_CFLAGS): Likewise.
14774         * util/grub-emu.c (main): Call `grub_affs_init' and
14775         `grub_affs_fini'.
14777         * include/grub/fs.h (grub_affs_init): New prototype.
14778         (grub_affs_fini): Likewise.
14780 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14782         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14784 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14786         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14787         `-m32' to CFLAGS.
14789         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14790         linking.
14792         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14793         (COMMON_LDFLAGS): New variable.
14794         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14795         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14796         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14797         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14798         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14799         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14800         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14801         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14802         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14803         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14804         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14805         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14806         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14807         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14808         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14809         variables.
14810         (normal_mod_ASFLAGS): Add `-m32'.
14812         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14813         (grub_host_size_t, grub_host_ssize_t): New types.
14814         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14815         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14816         `GRUB_HOST_SIZEOF_VOID_P'.
14818         * include/grub/kernel.h (struct grub_module_header): Type of
14819         member offset changed to `grub_host_off_t'.  Type of member size
14820         changed to `grub_host_size_t'.
14821         (struct grub_module_info): Type of member offset changed to
14822         `grub_host_off_t'.  Type of member size changed to
14823         `grub_host_size_t'.
14825 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14827         Make GRUB's kernel compliant to Multiboot Specification.
14829         * kern/i386/pc/startup.S (multiboot_header): New label.
14830         (multiboot_entry): Likewise.
14831         (multiboot_trampoline): Likewise.
14833         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14834         Increased to 0x4A0.
14836         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14837         put parentheses after a question mark.
14838         [!GRUB_UTIL] (my_mod): New variable.
14840         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14842 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14844         Adds support for the XFS filesystem.  Btrees are not supported
14845         yet.
14847         * fs/xfs.c: New file.
14849         * DISTLIST: Added `fs/xfs.c'.
14851         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14852         (grub_probefs_SOURCES): Likewise.
14853         (grub_emu_SOURCES): Likewise.
14854         (pkgdata_MODULES): Add `xfs.mod'.
14855         (xfs_mod_SOURCES): New variable.
14856         (xfs_mod_CFLAGS): Likewise.
14858         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14859         (pkgdata_MODULES): Add `xfs.mod'.
14860         (xfs_mod_SOURCES): New variable.
14861         (xfs_mod_CFLAGS): Likewise.
14863         * util/grub-emu.c (main): Call `grub_xfs_init' and
14864         `grub_xfs_fini'.
14866         * include/grub/fs.h (grub_xfs_init): New prototype.
14867         (grub_xfs_fini): Likewise.
14870 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14872         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14873         color modes, allow greater than 16 colors to be configured as
14874         a default palette.
14876 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14878         * normal/completion.c (complete_arguments): Add the qualifier
14879         const into OPTIONS.
14881         From Omniflux <omniflux+lists@omniflux.com>:
14882         * include/grub/terminfo.h: New file.
14883         * include/grub/tparm.h: Likewise.
14884         * include/grub/i386/pc/serial.h: Likewise.
14885         * term/terminfo.c: Likewise.
14886         * term/tparm.c: Likewise.
14887         * term/i386/pc/serial.c: Likewise.
14888         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14889         serial.mod.
14890         (terminfo_mod_SOURCES): New variable.
14891         (terminfo_mod_CFLAGS): Likewise.
14892         (serial_mod_SOURCES): Likewise.
14893         (serial_mod_CFLAGS): Likewise.
14895 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14897         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14898         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14899         and kern/powerpc/ieee1275/cmain.c, respectively.
14901         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14902         * kern/powerpc/ieee1275/crt0.S: ... here.
14904         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14905         * kern/powerpc/ieee1275/cmain.c: ... here.
14907         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14908         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14909         instead of boot/powerpc/ieee1275/crt0.S and
14910         boot/powerpc/ieee1275/cmain.c, respectively.
14912         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14913         sectors. It was not used anyway.
14915 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14917         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14918         `unused parameter' warning.
14920 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14922         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14923         function.
14924         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14925         getcharwidth.
14927 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14929         * include/grub/normal.h (enum grub_completion_type): Added
14930         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14932         * normal/cmdline.c (print_completion): Handle
14933         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14934         * normal/menu_entry.c (store_completion): Likewise.
14936         * normal/completion.c (complete_arguments): New function.
14937         (grub_normal_do_completion): Call `complete_arguments' when the
14938         current words start with a dash.
14940 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14942         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14943         `gzio.mod' instead of `io.mod').
14945 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14947         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14948         (DISTDIRS): Added io and video.
14949         Rewrite the search routine to make an output consistently.
14951         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14952         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14953         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14954         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14955         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14956         util/powerpc/ieee1275/misc.c.
14958         * include/grub/gzio.h: New file.
14959         * io/gzio.c: Likewise.
14961         * kern/file.c (grub_file_close): Call grub_device_close only if
14962         FILE->DEVICE is not NULL.
14964         * include/grub/mm.h [!NULL] (NULL): New macro.
14966         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14968         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14969         (pkgdata_MODULES): Added gzio.mod.
14970         (gzio_mod_SOURCES): New variable.
14971         (gzio_mod_CFLAGS): Likewise.
14973         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14974         (pkgdata_MODULES): Added gzio.mod.
14975         (gzio_mod_SOURCES): New variable.
14976         (gzio_mod_CFLAGS): Likewise.
14978         * commands/cat.c: Include grub/gzio.h.
14979         (grub_cmd_cat): Use grub_gzfile_open instead of
14980         grub_file_open.
14982         * commands/cmp.c: Include grub/gzio.h.
14983         (grub_cmd_cmp): Use grub_gzfile_open instead of
14984         grub_file_open.
14986         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14987         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14988         grub_file_open.
14989         (grub_rescue_cmd_module): Likewise.
14991 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14993         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14994         kern/sparc64/ieee1275/init.c because it contains _start.
14995         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14997 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14999         * configure.ac: Add support for sparc64 host with ieee1275
15000         firmware.
15001         * configure: Generated from configure.ac.
15002         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
15003         instead of int.
15004         (grub_ofdisk_read): Likewise.
15005         (grub_ofdisk_open): Use %p to print pointer values, and cast the
15006         pointers as (void *) to remove a warning.
15007         (grub_ofdisk_close): Likewise.
15008         (grub_ofdisk_read): Likewise.
15009         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
15010         returns, so make it return void to remove a warning.
15011         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
15012         Corresponding prototype change.
15013         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
15014         values, and cast the pointers as (void *) to remove a warning.
15015         (grub_mm_dump): Likewise.
15016         * conf/sparc64-ieee1275.mk: New file.
15017         * conf/sparc64-ieee1275.rmk: Likewise.
15018         * include/grub/sparc64/setjmp.h: Likewise.
15019         * include/grub/sparc64/types.h: Likewise.
15020         * include/grub/sparc64/ieee1275/console.h: Likewise.
15021         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
15022         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
15023         * include/grub/sparc64/ieee1275/time.h: Likewise.
15024         * kern/sparc64/cache.c: Likewise.
15025         * kern/sparc64/dl.c: Likewise.
15026         * kern/sparc64/ieee1275/init.c: Likewise.
15027         * kern/sparc64/ieee1275/openfw.c: Likewise.
15029 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
15031         * util/console.c (grub_ncurses_putchar): If C is greater than
15032         0x7f, set C to a question mark.
15033         (grub_ncurses_getcharwidth): New function.
15034         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
15035         getcharwidth.
15037         * normal/menu.c (print_entry): Made aware of Unicode. First,
15038         convert TITLE to UCS-4, and predict the cursor position by
15039         grub_getcharwidth.
15041         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
15042         const to SRC.
15043         * kern/misc.c (grub_utf16_to_utf8): Likewise.
15045 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15047         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
15048         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15049         grub_strcat.
15051         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
15052         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
15053         grub_strcpy and grub_strlen. Take it into account that a space
15054         character is inserted as a delimiter.
15056 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15058         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
15059         invalid magic in the error.
15061         * commands/search.c: New file.
15063         * util/grub-emu.c (main): Call grub_search_init and
15064         grub_search_fini.
15066         * kern/rescue.c (grub_rescue_print_disks): Removed.
15067         (grub_rescue_print_devices): New function.
15068         (grub_rescue_cmd_ls): Use grub_device_iterate with
15069         grub_rescue_print_devices instead of grub_disk_dev_iterate with
15070         grub_rescue_print_disks.
15072         * kern/partition.c (grub_partition_iterate): Return the result of
15073         PARTMAP->ITERATE instead of GRUB_ERRNO.
15075         * kern/device.c: Include grub/partition.h.
15076         (grub_device_iterate): New function.
15078         * include/grub/partition.h (grub_partition_iterate): Return int
15079         instead of grub_err_t.
15081         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
15082         prototype.
15083         [GRUB_UTIL] (grub_search_fini): Likewise.
15085         * include/grub/device.h (grub_device_iterate): New prototype.
15087         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15088         commands/search.c.
15089         (pkgdata_MODULES): Added search.mod.
15090         (search_mod_SOURCES): New variable.
15091         (search_mod_CFLAGS): Likewise.
15093         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
15094         (pkgdata_MODULES): Added search.mod.
15095         (search_mod_SOURCES): New variable.
15096         (search_mod_CFLAGS): Likewise.
15098         * commands/ls.c (grub_ls_list_disks): Renamed to ...
15099         (grub_ls_list_devices): ... this, and use grub_device_iterate.
15100         All callers changed.
15102         * DISTLIST: Added commands/search.c.
15104 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
15106         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
15107         conversion.
15108         (grub_getcharwidth): New function.
15110         * kern/misc.c (grub_utf8_to_ucs4): New function.
15112         * include/grub/term.h (struct grub_term): Added a new member
15113         "getcharwidth".
15114         (grub_getcharwidth): New prototype.
15116         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15118         * term/i386/pc/console.c (map_char): New function. Segregated from
15119         grub_console_putchar.
15120         (grub_console_putchar): Use map_char.
15121         (grub_console_getcharwidth): New function.
15122         (grub_console_term): Specified grub_console_getcharwidth as
15123         getcharwidth.
15125         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15126         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15128         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15129         GRUB_ERRNO.
15130         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15131         on grub_strtoul completely.
15132         (write_char): Declare local variables in the beginning of the
15133         function.
15134         (grub_vesafb_getcharwidth): New function.
15135         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15136         getcharwidth.
15138 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
15140         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15141         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15142         commands/i386/pc/vbetest.c.
15144         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15145         call grub_vbe_get_controller_info again, because the returned
15146         information is volatile.
15147         (grub_vbe_set_video_mode): Mostly rewritten.
15148         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15149         grub_vbe_status_t correctly.
15150         (grub_vbe_get_video_mode_info): Likewise.
15151         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15152         several if statements.
15154         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15155         * commands/i386/pc/vbeinfo.c: ... this.
15157         * commands/i386/pc/vbe_test.c: Renamed to ...
15158         * commands/i386/pc/vbetest.c: ... this.
15160         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15161         ...
15162         (grub_cmd_vbeinfo): ... this. Save video modes before
15163         iterating. Skip a video mode, if it is not available, not enough
15164         information is given or it is monochrome. Show the memory
15165         model. Leave the interpretation of MODEVAR to grub_strtoul
15166         completely.
15167         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15168         (GRUB_MOD_FINI): Likewise.
15170         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15171         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15172         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15173         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15174         grub_strtoul completely.
15175         (real2pm): Removed.
15176         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15177         (GRUB_MOD_FINI): Likewise.
15179         * normal/misc.c: Include grub/mm.h.
15181         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15182         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15183         (vbe_list_modes_mod_SOURCES): Removed.
15184         (vbe_list_modes_mod_CFLAGS): Likewise.
15185         (vbe_test_mod_SOURCES): Likewise.
15186         (vbe_test_mod_CFLAGS): Likewise.
15187         (vbeinfo_mod_SOURCES): New variable.
15188         (vbeinfo_mod_CFLAGS): Likewise.
15189         (vbetest_mod_SOURCES): Likewise.
15190         (vbetest_mod_CFLAGS): Likewise.
15192 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15194         * normal/misc.c: New file.
15196         * DISTLIST: Added normal/misc.c.
15198         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15199         DISK to HOOK. Call HOOK with DISK.
15200         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15201         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15202         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15204         * normal/menu_entry.c (struct screen): Added a new member
15205         "completion_shown".
15206         (completion_buffer): New global variable.
15207         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15208         (store_completion): New function.
15209         (complete): Likewise.
15210         (clear_completions): Likewise.
15211         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15212         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15213         a tab, call complete.
15215         * normal/completion.c (disk_dev): Removed.
15216         (print_simple_completion): Likewise.
15217         (print_partition_completion): Likewise.
15218         (print_func): New global variable.
15219         (add_completion): Do not take the arguments WHAT or PRINT any
15220         longer. Added a new argument TYPE. Instead of printing directly,
15221         call PRINT_FUNC if not NULL.
15222         All callers changed.
15223         (complete_device): Use a local variable DEV instead of
15224         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15225         (grub_normal_do_completion): Take a new argument HOOK. Do not
15226         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15227         empty string, return NULL instead.
15228         All callers changed.
15230         * normal/cmdline.c (print_completion): New function.
15232         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15233         to HOOK.
15234         All callers changed.
15236         * kern/disk.c (grub_print_partinfo): Removed.
15238         * include/grub/partition.h (struct grub_partition_map): Add a new
15239         argument DISK into HOOK of ITERATE.
15240         (grub_partition_iterate): Add a new argument DISK to HOOK.
15242         * include/grub/normal.h (enum grub_completion_type): New enum.
15243         (grub_completion_type_t): New type.
15244         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15245         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15246         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15247         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15248         (grub_normal_do_completion): Added a new argument HOOK.
15249         (grub_normal_print_device_info): New prototype.
15251         * include/grub/disk.h (grub_print_partinfo): Removed.
15253         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15254         (normal_mod_SOURCES): Likewise.
15255         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15256         (normal_mod_SOURCES): Likewise.
15258         * commands/ls.c (grub_ls_list_disks): Use
15259         grub_normal_print_device_info instead of grub_print_partinfo. Free
15260         PNAME.
15261         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15262         duplicating the code.
15264 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15266         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15267         follow GCS more precisely.
15268         * commands/i386/pc/vbe_test.c: Likewise.
15269         * include/grub/i386/pc/vbe.h: Likewise.
15270         * term/i386/pc/vesafb.c: Likewise.
15271         * video/i386/pc/vbe.c: Likewise.
15273 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15275         * DISTLIST: Added term/i386/pc/vesafb.c
15276         DISTLIST: Added video/i386/pc/vbe.c
15277         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15278         DISTLIST: Added commands/i386/pc/vbe_test.c.
15279         * commands/i386/pc/vbe_list_modes.c: New file.
15280         * commands/i386/pc/vbe_test.c: Likewise.
15281         * term/i386/pc/vesafb.c: Likewise.
15282         * video/i386/pc/vbe.c: Likewise.
15283         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15284         (grub_vbe_probe) Added prototype.
15285         (grub_vbe_set_video_mode) Likewise.
15286         (grub_vbe_get_video_mode) Likewise.
15287         (grub_vbe_get_video_mode_info) Likewise.
15288         (grub_vbe_set_pixel_rgb) Likewise.
15289         (grub_vbe_set_pixel_index) Likewise.
15290         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15291         (pkgdata_MODULES): Added vesafb.mod.
15292         (pkgdata_MODULES): Added vbe_list_modes.mod.
15293         (pkgdata_MODULES): Added vbe_test.mod.
15294         (vbe_mod_SOURCES): Added.
15295         (vbe_mod_CFLAGS): Likewise.
15296         (vesafb_mod_SOURCES): Likewise.
15297         (vesafb_mod_CFLAGS): Likewise.
15298         (vbe_list_modes_mod_SOURCES): Likewise.
15299         (vbe_list_modes_mod_CFLAGS): Likewise.
15300         (vbe_test_mod_SOURCES): Likewise.
15301         (vbe_test_mod_CFLAGS): Likewise.
15303 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15305         * normal/command.c (grub_command_execute): If INTERACTIVE is
15306         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15307         CMDLINE. Disable the pager if INTERACTIVE is true.
15308         All callers are changed.
15310         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15311         before reading a config file.
15312         * normal/main.c (read_config_file): Even if a command is not
15313         found, register it if it is within an entry.
15315         * util/grub-emu.c: Include sys/types.h and unistd.h.
15316         (options): Added --hold.
15317         (struct arguments): Added a new member "hold".
15318         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15319         missing.
15320         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15321         cleared by a debugger, if it is not zero.
15323         * include/grub/normal.h (grub_command_execute): Add an argument
15324         INTERACTIVE.
15326 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15328         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15330 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15332         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15333         program with another one, because the old one didn't detect a bug
15334         in gcc-3.4. Always use regparm 2, because the new test is still
15335         not enough for gcc-4.0. Someone must investigate a simple test
15336         case which detects a bug in gcc-4.0.
15338 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15340         * DISTLIST: Added normal/completion.c.
15342         * normal/completion.c: New file.
15344         * term/i386/pc/console.c (grub_console_getwh): New function.
15345         (grub_console_term): Assign grub_console_getwh to getwh.
15347         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15348         function is defined in normal/completion.c as
15349         grub_normal_do_completion.
15350         (grub_cmdline_get): Use grub_normal_do_completion instead of
15351         grub_tab_complete.
15353         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15354         returns non-zero, otherwise return 0.
15355         (grub_partition_iterate): First, probe the partition map. Then,
15356         call ITERATE only for this partition map.
15358         * kern/misc.c (grub_strncmp): Rewritten.
15360         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15361         returns non-zero. Otherwise return 0.
15363         * include/grub/partition.h (grub_partition_map_iterate): Return
15364         int instead of void.
15366         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15368         * include/grub/misc.h (grub_strncmp): Change the type of N to
15369         grub_size_t.
15371         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15372         of void.
15374         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15375         unsigned explicitly before comparing it with I.
15377         * kern/main.c (grub_env_write_root): Add the attribute unused into
15378         VAR.
15380         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15381         normal/completion.c.
15382         (normal_mod_SOURCES): Likewise.
15383         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15384         (normal_mod_SOURCES): Likewise.
15386         * normal/command.c (grub_iterate_commands): If ITERATE returns
15387         non-zero, return one immediately.
15389 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15391         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15392         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15393         descriptions.
15394         (grub_vbe_get_controller_info): New function.
15395         (grub_vbe_get_mode_info): Likewise.
15396         (grub_vbe_set_mode): Likewise.
15397         (grub_vbe_get_mode): Likewise.
15398         (grub_vbe_set_memory_window): Likewise.
15399         (grub_vbe_get_memory_window): Likewise.
15400         (grub_vbe_set_scanline_length): Likewise.
15401         (grub_vbe_get_scanline_length): Likewise.
15402         (grub_vbe_set_display_start): Likewise.
15403         (grub_vbe_get_display_start): Likewise.
15404         (grub_vbe_set_palette_data): Likewise.
15405         * include/grub/i386/pc/vbe.h: New file.
15407 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15409         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15410         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15411         * DISTLIST: Likewise.
15412         * kern/ieee1275/of.c: Moved to ...
15413         * kern/ieee1275/ieee1275.c: ... here.
15415 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15417         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15418         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15419         Pass 0 as `end' parameter to grub_strtoul().
15421 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15423         * include/grub/powerpc/ieee1275/console.h: Do not include
15424         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15425         ifdef.
15426         (grub_console_cur_color): Remove i386-specific prototype.
15427         (grub_console_real_putchar): Likewise.
15428         (grub_console_checkkey): Likewise.
15429         (grub_console_getkey): Likewise.
15430         (grub_console_getxy): Likewise.
15431         (grub_console_gotoxy): Likewise.
15432         (grub_console_cls): Likewise.
15433         (grub_console_setcursor): Likewise.
15434         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15435         Include <grub/machine/console.h>.
15436         * term/ieee1275/ofconsole.c: Likewise.
15438 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15440         * Makefile.in (LIBLZO): New variable.
15442         * configure.ac: Check for LZO version 2.
15444         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15445         lzo/lzo1x.h instead of lzo1x.h.
15447         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15448         of -llzo.
15450         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15451         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15453         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15454         copying the data from PARTITION to P.
15456 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15458         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15459         negative, unload the module.
15461         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15462         map is "pc_partition_map" but not "pc".
15463         (usage): Fix the description. The options are --boot-image and
15464         --core-image but not --boot-file or --core-file.
15465         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15466         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15467         DEFAULT_DIRECTORY.
15469         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15470         --core-file. Specify INSTALL_DEVICE as an argument.
15472         * util/console.c: Include config.h.
15473         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15474         [HAVE_NCURSES_H]: Include ncurses.h.
15475         [HAVE_CURSES_H]: Include curses.h.
15476         [!A_NORMAL] (A_NORMAL): Defined as zero.
15477         [!A_STANDOUT] (A_STANDOUT): Likewise.
15479         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15480         -lncurses.
15481         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15483         * configure.ac: Check for curses libraries and headers.
15485         * Makefile.in (LIBCURSES): New variable.
15487         * genmk.rb (Script::rule): Set the executable bits.
15489         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15490         name of the PC partition map is "pc_partition_map" but not "pc".
15492 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15494         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15495         (modules): Likewise.
15496         (usage): Added descriptions for --modules and --grub-probefs.
15497         Handle --modules and --grub-probefs. Save the arguments in MODULES
15498         and GRUB_PROBEFS, respectively.
15499         Auto-detect a filesystem module against GRUBDIR. If the result is
15500         empty and modules are not specified explicitly, abort the
15501         installation. Add the result to MODULES.
15503         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15504         disk/powerpc/ieee1275/ofdisk.c,
15505         include/grub/powerpc/ieee1275/init.h and
15506         term/powerpc/ieee1275/ofconsole.c.
15507         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15508         term/ieee1275/ofconsole.c.
15510         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15512         * COPYING: Upgraded to the latest version. Only the address of the
15513         FSF office has changed.
15515 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15517         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15518         kern/ieee1275.c with kern/ieee1275/of.c.
15520         * kern/ieee1275.c: Moved to ...
15521         * kern/ieee1275/of.c: ... here.
15523 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15525         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15526         readability.
15528         * config.guess: Updated to the latest version from gnulib.
15529         * config.sub: Likewise.
15530         * install.sh: Likewise.
15531         * mkinstalldirs: Likewise.
15533         * include/grub/console.h: Removed. This file is arch-specific. Do
15534         not put this in include/grub.
15536         * include/grub/i386/pc/console.h: Resurrected.
15538         * util/console.c: Include grub/machine/console.h instead of
15539         grub/console.h.
15540         * util/grub-emu.c: Likewise.
15542 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15544         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15545         hardcoded value.
15547         From Vincent Pelletier  <subdino2004@yahoo.fr>
15548         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15549         Redefined to use grub_getwh.
15550         (grub_term): New member named getwh.
15551         (grub_getwh): New prototype.
15552         * kern/term.c (grub_getwh): New function.
15553         * term/i386/pc/console.c (grub_console_getwh): New function.
15554         (grub_console_term): New member `getwh'.
15555         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15556         (grub_vga_term): New member `getwh'.
15557         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15558         grub_ssize_t.
15559         (grub_ofconsole_getw): New function.
15560         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15561         (grub_ofconsole_term): New field named getwh and new initial
15562         value.
15564 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15566         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15567         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15568         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15569         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15570         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15571         of <grub/machine/ieee1275.h>.
15572         * commands/ieee1275/reboot.c: Likewise.
15573         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15574         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15575         parameter structs to use new type `grub_ieee1275_cell_t'.
15576         * term/powerpc/ieee1275/ofconsole.c: Move ...
15577         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15578         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15579         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15580         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15581         to return int.
15582         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15583         Remove unused prototypes.  All users updated.
15584         * include/grub/powerpc/ieee1275/console.h: Removed.
15585         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15586         `grub_ieee1275_cell_t'.
15587         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15588         Cast comparisons with -1 to the correct type.
15589         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15590         type to match `grub_ieee1275_entry_fn'.
15592 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15594         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15596         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15597         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15598         partmap/sun.c.
15599         (grub_probefs_SOURCES): New variable.
15601         * util/i386/pc/grub-probefs.c: New file.
15603         * util/i386/pc/grub-setup.c (main): Call
15604         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15605         grub_hfs_init and grub_jfs_init to initialize the system. Call
15606         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15607         grub_pc_partition_map_fini to finish the system.
15609 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15611         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15612         function.
15613         (grub_multiboot_load_elf32): Likewise.
15614         (grub_multiboot_is_elf64): Likewise.
15615         (grub_multiboot_load_elf64): Likewise.
15616         (grub_multiboot_load_elf): Likewise.
15617         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15618         an ELF32 or ELF64 file.
15619         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15621         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15622         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15623         NULL before calling FS->LABEL.
15624         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15625         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15626         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15627         before calling FS->LABEL.
15629 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15631         * util/i386/pc/grub-install.in (datadir): New variable.
15632         (libdir): Removed.
15633         (pkgdatadir): New variable.
15634         (pkglibdir): Removed.
15636 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15638         * DISTLIST: Added util/i386/pc/grub-install.in.
15640         * util/i386/pc/grub-install.in: New file.
15642         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15643         (grub_install_SOURCES): Likewise.
15645         * genmk.rb: Added support for scripts.
15646         (Script): New class.
15647         (scripts): New variable.
15649         * Makefile.in (install-local): Install sbin_SCRIPTS by
15650         INSTALL_SCRIPT.
15651         (uninstall): Remove sbin_SCRIPTS.
15653         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15654         device, try to get a GRUB device by
15655         grub_util_biosdisk_get_grub_dev.
15656         Free DEST_DEV.
15658         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15659         description for --device-map.
15661 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15663         Change the semantics of variable hooks. They now return strings
15664         instead of error values.
15666         * util/i386/pc/grub-setup.c: Include grub/env.h.
15667         (setup): Use grub_device_set_root instead of grub_env_set.
15669         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15670         grub_env_get instead of grub_device_set_root and
15671         grub_device_get_root, respectively.
15673         * kern/main.c (grub_env_write_root): New function.
15674         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15675         grub_env_set instead of grub_device_set_root.
15677         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15678         many variables.
15679         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15680         rather than calling ENV->WRITE_HOOK afterwards.
15681         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15682         passing a pointer of a pointer.
15683         (grub_register_variable_hook): Change the types of "read_hook" and
15684         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15685         respectively.
15686         Allocate the default empty string on the heap, because this string
15687         may be freed later.
15689         * kern/device.c: Include grub/env.h.
15690         (grub_device_set_root): Removed.
15691         (grub_device_get_root): Likewise.
15692         (grub_device_open): Use grub_env_get instead of
15693         grub_device_get_root.
15695         * include/grub/env.h (grub_env_read_hook_t): New type.
15696         (grub_env_write_hook_t): Likewise.
15697         (grub_env_var): Change the types of "read_hook" and "write_hook"
15698         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15699         (grub_register_variable_hook): Likewise.
15701         * include/grub/device.h (grub_device_set_root): Removed.
15702         (grub_device_set_root): Likewise.
15704         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15705         make sure that DIRNAME terminates with '/', so that
15706         grub_fat_find_dir will fail if PATH is not a directory.
15708         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15709         from DIRNAME.
15710         Use the qualifier auto for print_files and print_files_long.
15711         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15712         as a regular file.
15713         Put a newline only if there is no error.
15714         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15715         used.
15717 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15719         * kern/partition.c (grub_partition_probe): Initialize PART to
15720         NULL. Otherwise, when no partition map is registered, this returns
15721         a garbage.
15723 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15725         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15726         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15727         valid.
15729 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15731         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15732         information on each device, if it does not have partitions. Print
15733         "Device" instead of "Disk", because this function is not specific
15734         to disk devices.
15736         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15737         static to ensure that it is put on the memory rather than a
15738         register.
15740 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15742         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15743         (grub_cat_init): Likewise.
15744         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15745         (options): Likewise.
15746         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15747         (grub_configfile_init): Likewise.
15748         * font/manager.c (GRUB_MOD_INIT): Likewise.
15749         * commands/help.c (GRUB_MOD_INIT): Likewise.
15750         (grub_help_init): Likewise.
15751         * normal/command.c (grub_command_init): Likewise.
15752         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15753         * disk/loopback.c (grub_loop_init): Likewise.
15754         (GRUB_MOD_INIT): Likewise.
15755         * commands/ls.c (grub_ls_init): Likewise.
15756         (GRUB_MOD_INIT): Likewise.
15757         (options): Likewise.
15758         * commands/boot.c (grub_boot_init): Likewise.
15759         (GRUB_MOD_INIT): Likewise.
15760         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15761         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15762         (GRUB_MOD_INIT): Likewise.
15763         * commands/cmp.c (grub_cmp_init): Likewise.
15764         (GRUB_MOD_INIT): Likewise.
15766         * normal/arg.c: Use <> instead of "" to include header files.
15767         (SHORT_ARG_HELP): New macro.
15768         (SHORT_ARG_USAGE): Likewise.
15769         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15770         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15771         descriptions.
15772         (find_short): Check if C is 'h' or 'u' explicitly.
15773         (grub_arg_show_help): Use space characters instead of tabs. Treat
15774         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15775         are shown with --help and --usage only if they are not used for
15776         the command itself.
15777         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15778         'h' and 'u'.
15780         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15781         const into "longarg". Change the type of "shortarg" to int.
15783 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15785         * boot/i386/pc/boot.S (boot_drive_check): New label.
15787         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15788         macro.
15790         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15791         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15793 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15795         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15796         When turning off Gate A20, skip the check and return immediately,
15797         because this is not fatal usually.
15799 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15801         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15802         be 0x7C00 instead of 0x8000.
15804         * boot/i386/pc/pxeboot.S: Rewritten.
15806         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15807         EXT_C.
15808         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15809         result.
15811 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15813         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15814         robustness. This routine now supports a BIOS call and System
15815         Control Port A to modify the gate A20.
15817         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15818         Increased to 0x440.
15820 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15822         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15823         device path and resulting ihandle.
15824         (grub_ofdisk_close): dprintf the ihandle being closed.
15825         (grub_ofdisk_read): dprintf function parameters.
15826         * kern/mm.c (grub_mm_init_region): Likewise.
15827         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15828         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15829         size, and boot arguments.
15830         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15831         before loading into memory.
15832         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15833         before loading into memory.
15835 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15837         * kern/mm.c: Added much documentation.
15838         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15839         8, set to 5 instead of 8.
15841 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15843         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15845         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15846         (grub_mkdevicemap_SOURCES): New variable.
15848         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15849         lib/device.c of GRUB Legacy.
15851 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15853         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15854         instead of PATH is NULL.
15856 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15858         * commands/cmp.c (BUFFER_SIZE): New macro.
15859         (grub_cmd_cmp): Close the right file at the right time.  Compare
15860         only data just read.  Don't report files of different  size as
15861         identical.  Dynamically allocate buffers.  Move variable
15862         declarations at the beginning of function.
15864 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15866         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15867         reverse.
15869 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15871         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15872         when backspace is pressed at beginning of line.
15874 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15876         * DISTLIST: Added genfslist.sh.
15878         * normal/main.c (fs_module_list): New variable.
15879         (autoload_fs_module): New function.
15880         (read_fs_list): Likewise.
15881         (grub_normal_execute): Call read_fs_list.
15883         * kern/fs.c (grub_fs_autoload_hook): New variable.
15884         (grub_fs_probe): Added support for auto-loading.
15886         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15887         (grub_fs_module_list_t): New type.
15889         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15890         (grub_fs_autoload_hook): New prototype.
15892         * genfslist.sh: New file.
15894         * genmk.rb: Added a rule to generate a filesystem list.
15896 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15898         * configure.ac: Fix the test for cross-compiling.
15900         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15901         define GRUB_UTIL anymore.
15903         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15904         so this function works on other systems than just big endian.
15905         (load_modules): Likewise.
15906         (add_segments): Likewise.
15908 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15910         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15911         contains `l' modifier, get a long from va_arg().
15913 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15915         * kern/mm.c (grub_free): If the next free block which is being
15916         merged is the first free block, set the first block to the block
15917         being freed.
15918         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15920 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15922         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15923         `grub_ieee1275_chosen'.
15925 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15927         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15928         (grub_ieee1275_chosen): New variable.
15929         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15930         `chosen'.
15931         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15932         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15933         Rename first argument to `phandle' for consistency.
15934         (grub_ieee1275_get_property_length): Likewise.
15935         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15936         to grub_ieee1275_phandle_t.
15937         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15938         Move export next to declaration.
15939         (grub_ieee1275_chosen): New variable.
15940         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15941         Correct cosmetic typo.
15942         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15943         `grub_ieee1275_chosen'.
15944         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15945         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15946         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15947         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15948         `grub_ieee1275_chosen'.
15950 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15952         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15953         /chosen/bootargs.
15954         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15955         /chosen/bootargs as "variable=value" pairs.
15957 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15959         * include/grub/misc.h (grub_dprintf): New macro.
15960         (grub_real_dprintf): New prototype.
15961         (grub_strword): Likewise.
15962         (grub_iswordseparator): Likewise.
15963         * kern/misc.c (grub_real_dprintf): New function.
15964         (grub_strword): Likewise.
15965         (grub_iswordseparator): Likewise.
15967 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15969         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15970         (roundup): Remove macro.
15971         (grub_ieee1275_flags): Make static.
15972         (grub_ieee1275_realmode): Remove.
15973         (grub_ieee1275_test_flag): New function.
15974         (grub_ieee1275_set_flag): Likewise.
15975         (find_options): Rename to `grub_ieee1275_find_options'; update
15976         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15977         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15978         (cmain): New prototype.
15979         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15980         `grub_ieee1275_flags' directly.
15981         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15982         machine/biosdisk.h.
15983         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15984         Don't include grub/machine/init.h.
15985         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15986         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15987         Remove prototype.
15988         (grub_ieee1275_realmode): Likewise.
15989         (grub_ieee1275_flag): New enum.
15990         (grub_ieee1275_test_flag): New prototype.
15991         (grub_ieee1275_set_flag): New prototype.
15992         * include/grub/powerpc/ieee1275/init.h: Remove file.
15993         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15994         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15995         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15996         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15997         comment.
15998         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15999         `grub_ieee1275_test_flag'.
16000         (grub_ieee1275_encode_devname): Likewise.
16002 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
16004         * include/grub/powerpc/ieee1275/ieee1275.h
16005         (grub_ieee1275_encode_devname): New prototype.
16006         (grub_ieee1275_get_filename): Likewise.
16007         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
16008         function.
16009         (grub_set_prefix): Likewise.
16010         (grub_machine_init): Call grub_set_prefix.
16011         * kern/powerpc/ieee1275/openfw.c: Fix typos.
16012         (grub_parse_type): New enum.
16013         (grub_ieee1275_get_devargs): New function.
16014         (grub_ieee1275_get_devname): Likewise.
16015         (grub_ieee1275_parse_args): Likewise.
16016         (grub_ieee1275_get_filename): Likewise.
16017         (grub_ieee1275_encode_devname): Likewise.
16019 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
16021         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
16022         `grub_loader_unset'.
16024 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
16026         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
16027         instead of grub_ieee1275_interpret.
16028         (grub_halt_init): New function.
16029         (grub_halt_fini): Likewise.
16030         (GRUB_MOD_INIT): Correct message grammar.
16031         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
16032         instead of grub_ieee1275_interpret.
16033         (grub_reboot_init): New function.
16034         (grub_reboot_fini): Likewise.
16035         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
16036         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
16037         util/i386/pc/misc.c with commands/ieee1275/halt.c,
16038         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
16039         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
16040         function.
16041         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
16042         Add prototype.
16043         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
16044         prototype.
16045         (grub_halt): Likewise.
16046         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
16047         (cmain): Remove __attribute__((unused)).
16048         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
16049         (grub_heap_len): Likewise.
16050         (grub_machine_fini): New function.
16051         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
16052         (grub_halt): Likewise.
16053         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
16054         function.
16055         * util/powerpc/ieee1275/misc.c: New file.
16057 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
16059         * DISTLIST: New file.
16060         * gendistlist.sh: Likewise.
16062         * Makefile.in (COMMON_DISTFILES): Removed.
16063         (BOOT_DISTFILES): Likewise.
16064         (CONF_DISTFILES): Likewise.
16065         (DISK_DISTFILES): Likewise.
16066         (FS_DISTFILES): Likewise.
16067         (INCLUDE_DISTFILES): Likewise.
16068         (KERN_DISTFILES): Likewise.
16069         (LOADER_DISTFILES): Likewise.
16070         (TERM_DISTFILES): Likewise.
16071         (UTIL_DISTFILES): Likewise.
16072         (DISTFILES): Likewise.
16073         (uninstall): Uninstall files in $(pkgdata_DATA).
16074         (DISTLIST): New target.
16075         (distdir): Use the contents of the file DISTLIST to get a list of
16076         distributed files.
16078 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
16080         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
16081         descriptor. This is ported from GRUB Legacy.
16083         * gencmdlist.sh: Added an extra semicolon to make it work with
16084         old sed versions. Reported by Robert Bihlmeyer
16085         <robbe@orcus.priv.at>.
16087 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
16089         Automatic loading of commands is supported.
16091         * normal/main.c (read_command_list): New function.
16092         (grub_normal_execute): Call read_command_list.
16094         * normal/command.c (grub_register_command): Return zero or CMD.
16095         Allocate CMD->NAME from the heap.
16096         Initialize CMD->MODULE_NAME to zero.
16097         Find the same name as well. If the same command is found and it is
16098         a dummy command, overwrite members. If it is not a dummy command,
16099         return zero.
16100         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
16101         (grub_command_find): If a dummy command is found, load a module
16102         and retry to find a command only once.
16104         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
16105         make sure that each command is loaded.
16107         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
16108         macro.
16109         (struct grub_command): Remove const from the member `name'.
16110         Add a new member `module_name'.
16111         (grub_register_command): Return grub_command_t.
16113         * commands/help.c (grub_cmd_help): Call grub_command_find to make
16114         sure that each command is loaded.
16116         * genmk.rb (PModule::rule): Specify a module name without the
16117         suffix ".mod" to gencmdlist.sh.
16119 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16121         * gencmdlist.sh: New file.
16123         * genmk.rb (PModule::rule): Generate a rule for a command list.
16124         Clean command.lst.
16125         Generate command.lst from $(COMMANDFILES).
16127         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16128         (DATA): Added $(pkgdata_DATA).
16129         (install-local): Install files in $(pkgdata_DATA).
16131 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16133         * term/i386/pc/vga.c (debug_command): Removed.
16134         (GRUB_MOD_INIT): Do not register the command "debug".
16136         From Hollis Blanchard:
16137         * commands/configfile.c: New file.
16138         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16139         commands/configfile.c.
16140         (pkgdata_MODULES): Added configfile.mod.
16141         (configfile_mod_SOURCES): New variable.
16142         (configfile_mod_CFLAGS): Likewise.
16143         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16144         commands/configfile.c.
16145         (pkgdata_MODULES): Added configfile.mod.
16146         (configfile_mod_SOURCES): New variable.
16147         (configfile_mod_CFLAGS): Likewise.
16148         * util/grub-emu.c (main): Call grub_configfile_init and
16149         grub_configfile_fini.
16150         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16151         prototype.
16152         [GRUB_UTIL] (grub_configfile_fini): Likewise.
16154 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16156         * normal/arg.c (grub_arg_show_help): Do not show the bug report
16157         address.
16159         * commands/help.c (grub_cmd_help): Do not print newlines after
16160         the last command in print_command_help.
16162 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16164         * commands/default.h: New file.
16165         * commands/timeout.h: Likewise.
16166         * normal/context.c: Likewise.
16168         * util/misc.c: Do not include sys/times.h.
16169         Include sys/time.h and grub/machine/time.h.
16170         (grub_get_rtc): Rewritten with gettimeofday.
16172         * util/grub-emu.c (main): Call grub_default_init and
16173         grub_timeout_init before grub_normal_init, and call
16174         grub_timeout_fini and grub_default_fini after grub_main.
16176         * util/console.c (grub_ncurses_checkkey): Return the read
16177         character or -1.
16179         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16180         timeouts.
16182         * normal/main.c (read_config_file): Push MENU. If this fails,
16183         print an error and wait for a user input.
16184         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16185         If a menu is empty or an error occurs, pop MENU.
16186         (grub_normal_execute): Pop and free MENU after grub_menu_run
16187         returns.
16189         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16191         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16192         include time.h.
16193         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16194         without GRUB_UTIL.
16195         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16196         time.h.
16197         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16198         without GRUB_UTIL.
16200         * include/grub/normal.h (struct grub_menu_list): New struct.
16201         (grub_menu_list_t): New type.
16202         (struct grub_context): New struct.
16203         (grub_context_t): New type.
16204         (grub_register_command): Got rid of EXPORT_FUNC.
16205         (grub_unregister_command): Likewise.
16206         (grub_context_get): New prototype.
16207         (grub_context_get_current_menu): Likewise.
16208         (grub_context_push_menu): Likewise.
16209         (grub_context_pop_menu): Likewise.
16210         [GRUB_UTIL] (grub_default_init): Likewise.
16211         [GRUB_UTIL] (grub_default_fini): Likewise.
16212         [GRUB_UTIL] (grub_timeout_init): Likewise.
16213         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16215         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16216         commands/timeout.c and normal/context.c.
16217         (pkgdata_MODULES): Added default.mod and timeout.mod.
16218         (normal_mod_SOURCES): Added normal/context.c.
16219         (default_mod_SOURCES): New variable.
16220         (default_mod_CFLAGS): Likewise.
16221         (timeout_mod_SOURCES): Likewise.
16222         (timeout_mod_CFLAGS): Likewise.
16223         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16224         conf/i386-pc.rmk.
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.
16232         * Makefile.in (all-local): Added $(MKFILES).
16234 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16236         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16237         (grub_emu_SOURCES): Likewise.
16238         (pkgdata_MODULES): Add `sun.mod'.
16239         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16240         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16241         `partmap/sun.c'.
16242         (pkgdata_MODULES): Add `sun.mod'.
16243         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16244         * include/grub/partition.h (grub_sun_partition_map_init): New
16245         prototype.
16246         (grub_sun_partition_map_fini): Likewise.
16247         * partmap/sun.c: New file.
16248         * util/grub-emu.c (main): Initialize and de-initialize the sun
16249         partitionmap support.
16251 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16253         This implements an Emacs-like menu entry editor.
16255         * normal/menu_entry.c: New file.
16257         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16258         characters to ASCII.
16259         (saved_char): New variable.
16260         (grub_ncurses_checkkey): Rewritten completely.
16261         (grub_ncurses_getkey): Likewise.
16262         (grub_ncurses_init): Call raw instead of cbreak.
16264         * normal/menu.c (print_entry): Do not put a space.
16265         (init_page): Renamed to ...
16266         (grub_menu_init_page): ... this. All callers changed.
16267         (edit_menu_entry): Removed.
16268         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16270         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16272         * kern/misc.c (grub_vprintf): Call grub_refresh.
16274         * normal/menu.c (DISP_LEFT): Renamed to ...
16275         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16276         * normal/menu.c (DISP_UP): Renamed to ...
16277         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16278         * normal/menu.c (DISP_RIGHT): Renamed to ...
16279         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16280         * normal/menu.c (DISP_DOWN): Renamed to ...
16281         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16282         * normal/menu.c (DISP_HLINE): Renamed to ...
16283         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16284         * normal/menu.c (DISP_VLINE): Renamed to ...
16285         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16286         * normal/menu.c (DISP_UL): Renamed to ...
16287         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16288         * normal/menu.c (DISP_UR): Renamed to ...
16289         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16290         * normal/menu.c (DISP_LL): Renamed to ...
16291         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16292         * normal/menu.c (DISP_LR): Renamed to ...
16293         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16294         * normal/menu.c (TERM_WIDTH): Renamed to ...
16295         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16296         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16297         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16298         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16299         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16300         * normal/menu.c (TERM_MARGIN): Renamed to ...
16301         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16302         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16303         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16304         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16305         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16306         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16307         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16308         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16309         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16310         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16311         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16312         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16313         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16314         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16315         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16316         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16317         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16318         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16319         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16320         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16321         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16322         All callers changed.
16324         * include/grub/normal.h: New prototype.
16326         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16327         normal/menu_entry.c.
16328         (normal_mod_SOURCES): Likewise.
16329         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16330         (normal_mod_SOURCES): Likewise.
16332 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16334         * include/grub/normal.h (grub_halt_init): New prototype.
16335         (grub_halt_fini): Likewise.
16336         (grub_reboot_init): Likewise.
16337         (grub_reboot_fini): Likewise.
16339         * util/grub-emu.c: Include signal.h.
16340         (main_env): New global variable.
16341         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16342         catch C-c.
16343         (grub_machine_fini): New function.
16344         (main): Call grub_halt_init and grub_reboot_init before
16345         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16346         Call setjmp with MAIN_ENV to go back afterwards.
16347         Call grub_machine_fini right before return.
16349         * include/grub/util/misc.h: Include setjmp.h.
16350         (main_env): New prototype.
16352         * include/grub/kernel.h (grub_machine_fini): New prototype.
16353         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16354         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16356         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16357         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16358         * term/i386/pc/console.c (grub_console_fini): Likewise.
16360         * util/i386/pc/misc.c: New file.
16362         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16363         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16364         commands/i386/pc/reboot.c.
16366 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16368         * include/grub/dl.h (grub_dl_check_header): New prototype.
16369         (grub_arch_dl_check_header): Change return type to grub_err_t,
16370         remove size parameter and export function.  Update all callers.
16371         * kern/dl.c (grub_dl_check_header): New function.
16372         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16373         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16374         are inside the core.
16375         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16376         independent ELF header checks.
16377         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16378         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16379         `grub_dl_check_header' instead of explicit checks.  Check for the
16380         ELF type.
16381         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16382         `grub_dl_check_header' instead of explicit checks.  Remove arch
16383         specific ELF header checks.
16385         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16386         argument SIZE.
16388 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16390         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16391         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16393 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16395         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16396         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16397         (part_map_iterate): Clear `grub_errno' and return 0 if
16398         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16399         * partmap/amiga.c (amiga_partition_map_iterate): Return
16400         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16401         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16403 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16405         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16406         help info.
16408 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16410         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16411         Removed prototype.
16412         (grub_rescue_cmd_linux): New prototype.
16413         (grub_rescue_cmd_initrd): Likewise.
16414         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16415         `bi_rec'.
16416         (grub_linux_release_mem): Release the memory for the initrd.
16417         (grub_load_linux): Renamed from this...
16418         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16419         Changed `entry' not to be static.  Loop over memory regions to
16420         find another one when the default fails.
16421         (grub_rescue_cmd_initrd): New function.
16422         (grub_linux_init): Remove function.
16423         (grub_linux_fini): Likewise.
16424         (GRUB_MOD_INIT): Register `initrd'.
16425         (GRUB_MOD_FINI): Unregister `initrd'.
16426         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16427         Function removed.
16428         (grub_linux_normal_fini): Likewise.
16429         (GRUB_MOD_INIT): Register `initrd'.
16430         (GRUB_MOD_FINI): Unregister `initrd'.
16432 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16434         * commands/help.c: New file.
16435         * normal/arg.c (show_help): Renamed to...
16436         (grub_arg_show_help): ... this.
16437         * commands/i386/pc/halt.c: New file.
16438         * commands/i386/pc/reboot.c: Likewise.
16439         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16440         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16441         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16442         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16443         variables.
16444         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16445         `commands/help.c'.
16446         (pkgdata_MODULES): Add `help.mod'.
16447         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16448         * grub/i386/pc/init.h (grub_reboot): New prototype.
16449         (grub_halt): Likewise.
16450         * include/grub/normal.h (grub_arg_show_help): New prototype.
16451         (grub_help_init): Likewise.
16452         (grub_help_fini): Likewise.
16453         * util/grub-emu.c (main): Initialize and deinitialize the help
16454         command.
16456         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16458         * normal/command.c (grub_command_init): Fixed the description of
16459         the `set' and `unset' commands.
16461 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16463         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16464         function.
16465         * commands/ieee1275/halt.c: New file.
16466         * commands/ieee1275/reboot.c: Likewise.
16467         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16468         `__attribute__ ((unused))'.  Some GCS related fixed.
16469         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16470         (grub_suspend_fini): Likewise.
16471         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16472         and `halt.mod'.
16473         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16474         (halt_mod_CFLAGS): New variables.
16475         * include/grub/powerpc/ieee1275/ieee1275.h
16476         (grub_ieee1275_interpret): New prototype.
16478 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16480         * include/grub/misc.h (memmove): New prototype.
16481         (memcpy): Likewise.
16483 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16485         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16486         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16488 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16490         * kern/misc.c (grub_strndup): Function rewritten.
16492 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16494         * normal/menu.c (TERM_WIDTH): Macro redefined.
16495         (TERM_TOP_BORDER_Y): Likewise.
16496         (draw_border): Replaced while-loop by a for-loop.  Make the number
16497         of lines consistent with the number of lines displayed in
16498         print_entries.  Added a margin below the rectangle.
16499         (print_entry): Make the entry fit in the rectangle.
16500         (print_entries): Display the scroll arrows next to the right
16501         border.
16503 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16505         * fs/minix.c (grub_minix_find_file): Reserve more space for
16506         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16507         `grub_strncpy' to copy `path' into it.
16509 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16511         Add the loopback device, a device via which files can be accessed
16512         as devices.
16514         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16515         (pkgdata_MODULES): Add loopback.mod.
16516         (loopback_mod_SOURCES): New variable.
16517         (loopback_mod_CFLAGS): Likewise.
16518         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16519         `disk/loopback.c'.
16520         (pkgdata_MODULES): Add loopback.mod.
16521         (loopback_mod_SOURCES): New variable.
16522         (loopback_mod_CFLAGS): Likewise.
16523         * disk/loopback.c: new file.
16524         * include/grub/normal.h (grub_loop_init): New prototype.
16525         (grub_loop_fini): New prototype.
16526         * util/grub-emu.c (main): Initialize and de-initialize loopback
16527         support.
16528         * include/grub/disk.h (grub_disk_dev_id): Add
16529         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16531 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16533         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16534         function.
16535         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16536         (suspend_mod_SOURCES): New variable.
16537         (suspend_mod_CFLAGS): Likewise.
16538         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16539         New prototype.
16540         * commands/ieee1275/suspend.c: New file.
16542 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16544         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16545         ((unused))' to `__attribute__ ((used))'.
16546         (GRUB_MOD_FINI): Likewise.
16547         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16548         * genmk.rb (PModule): Assign space to common symbols when linking
16549         modules.
16551 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16553         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16554         `unsigned' arguments to `grub_size_t'.
16555         (grub_malloc): Likewise.
16556         (grub_realloc): Likewise.
16557         (grub_memalign): Likewise.
16558         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16559         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16560         * util/misc.c (grub_malloc): Likewise.
16561         (grub_realloc): Likewise.
16562         * kern/mm.c (get_header_from_pointer): Change the casts to
16563         `unsigned' into a cast to `grub_size_t'.
16565         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16566         point to `currnode' when `currnode' is changed.
16568         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16569         Schottelius <nico-linux@schottelius.org>.
16571 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16573         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16574         (note_path): Remove variable.
16575         (GRUB_IEEE1275_NOTE_NAME): New macro.
16576         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16577         (grub_ieee1275_note_hdr): New structure.
16578         (grub_ieee1275_note_desc): Likewise.
16579         (grub_ieee1275_note): Likewise.
16580         (load_note): Remove `dir' argument.  All callers updated.  Remove
16581         `note_img' and `path'.  Do not load a file from `note_path'.
16582         Initialize a struct grub_ieee1275_note and write that to `out'.
16583         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16585 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16587         * util/misc.c (grub_util_read_image): Revert last change.  It
16588         called `grub_util_read_at', which seeks from the beginning of the
16589         file.
16591 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16593         * TODO: Add note about endianness in grub-mkimage.
16594         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16595         section.
16596         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16597         (grub_mkimage_SOURCES): New target.
16598         * include/grub/kernel.h (grub_start_addr): Remove variable.
16599         (grub_end_addr): Likewise.
16600         (grub_total_module_size): Likewise.
16601         (grub_kernel_image_size): Likewise.
16602         (GRUB_MODULE_MAGIC): New constant.
16603         (grub_module_info): New structure.
16604         (grub_arch_modules_addr): New prototype.
16605         (grub_get_end_addr): Remove prototype.
16606         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16607         * include/grub/powerpc/ieee1275/kernel.h: New file.
16608         * include/grub/util/misc.h (grub_util_get_fp_size): New
16609         prototype.
16610         (grub_util_read_at): Likewise.
16611         (grub_util_write_image_at): Likewise.
16612         * kern/main.c (grub_get_end_addr): Remove function.
16613         (grub_load_modules): Call grub_arch_modules_addr instead of using
16614         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16615         the grub_module_info fields instead of calling grub_get_end_addr
16616         as loop conditions.  Move grub_add_unused_region code here.
16617         (grub_add_unused_region): Remove function.
16618         * kern/i386/pc/init.c: Include grub/cache.h.
16619         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16620         one call to add_mem_region.
16621         (grub_arch_modules_addr): New function.
16622         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16623         (grub_total_module_size): Likewise.
16624         Include grub/machine/kernel.h.
16625         (grub_arch_modules_addr): New function.
16626         * util/grub-emu.c (grub_end_addr): Remove variable.
16627         (grub_total_module_size): Likewise.
16628         (grub_arch_modules_addr): New function.
16629         * util/misc.c: Include unistd.h.
16630         (grub_util_get_fp_size): New function.
16631         (grub_util_read_at): Likewise.
16632         (grub_util_write_image_at): Likewise.
16633         (grub_util_read_image): Call grub_util_read_at.
16634         (grub_util_write_image): Call grub_util_write_image_at.
16635         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16636         additional memory in kernel_img for a struct grub_module_info.
16637         Fill in that grub_module_info.
16638         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16640 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16642         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16643         New function.
16644         * include/grub/powerpc/ieee1275/ieee1275.h
16645         (grub_ieee1275_milliseconds): New prototype.
16646         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16647         Change to 1000.
16648         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16649         grub_ieee1275_milliseconds.
16651 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16653         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16654         variable.
16655         (find_options): New function.
16656         (cmain): Call find_options.
16657         * include/grub/powerpc/ieee1275/ieee1275.h
16658         (grub_ieee1275_realmode): New extern variable.
16659         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16660         grub_map if grub_ieee1275_realmode is false.
16662 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16664         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16665         lines are inserted and make it work like readline.  Reported by
16666         Vincent Pelletier <subdino2004@yahoo.fr>.
16668 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16670         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16672         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16673         `kern/powerpc/cache.S'.
16675 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16677         * genmk.rb: Handle the `Program' class in the main loop.  Written
16678         by Johan Rydberg <jrydberg@gnu.org>.
16679         (Program): New class.
16680         (programs): New variable.
16681         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16682         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16683         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16684         (help_arch): Function removed.
16685         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16686         `powerpc/libgcc.h' and `loader.h'.
16687         (pkgdata_PROGRAMS): New variable.
16688         (sbin_UTILITIES): Variable removed.
16689         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16690         (grubof_SOURCES): Variable re-defined so it only includes the
16691         core functionality.
16692         (grubof_CFLAGS): Remove `-DGRUBOF'.
16693         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16694         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16695         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16696         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16697         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16698         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16699         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16700         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16701         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16702         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16703         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16704         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16705         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16706         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16707         (pc_mod_CFLAGS): New variables.
16708         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16709         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16710         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16711         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16712         Moved from here...
16713         * include/grub/i386/pc/init.h (grub_os_area_addr)
16714         (rub_os_area_size): ... to here.
16715         * include/grub/powerpc/ieee1275/ieee1275.h
16716         (grub_ieee1275_entry_fn): Export symbol.
16717         * include/grub/powerpc/ieee1275/init.h: New file.
16718         * include/grub/powerpc/libgcc.h: Likewise.
16719         * include/grub/cache.h: Likewise.
16720         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16721         <hollis@penguinppc.org>.
16722         * kern/dl.c: Include <grub/cache.h>.
16723         (grub_dl_flush_cache): New function.
16724         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16725         for this module.
16726         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16727         (grub_console_init): Removed prototypes.
16728         (grub_machine_init): Don't initialize the modules anymore.
16729         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16730         static.
16731         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16732         Macro undef removed.
16733         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16734         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16735         relocation `R_PPC_REL32'.  Return an error when the relocation is
16736         unknown.
16737         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16738         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16739         * util/misc.c (grub_arch_sync_caches): Likewise.
16741 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16743         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16744         `symlist.c', add `grubof_symlist.c'.
16745         (symlist.c): Variable removed.
16746         (grubof_HEADERS): Variable added.
16747         (grubof_symlist.c): New target.
16748         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16749         `kernel_img_HEADERS'.
16750         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16751         * kern/powerpc/dl.c: New file.
16752         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16753         Function removed.
16754         (grub_arch_dl_relocate_symbols): Likewise.
16755         (grub_register_exported_symbols): Likewise.
16757 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16759         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16760         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16761         to fail instead.  Reported by Vincent Pelletier
16762         <subdino2004@yahoo.fr>.
16764         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16765         it is not allocated.  Reported by Vincent Pelletier
16766         <subdino2004@yahoo.fr>.
16768         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16769         output so the output looks better.
16771 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16773         Modulize the partition map support and add support for the amiga
16774         partition map.
16776         * commands/ls.c: Include <grub/partition.h> instead of
16777         <grub/machine/partition.h>.
16778         * kern/disk.c: Likewise.
16779         * kern/rescue.c: Likewise.
16780         * loader/i386/pc/chainloader.c: Likewise.
16781         * normal/cmdline.c: Likewise.
16782         * kern/powerpc/ieee1275/init.c: Likewise.
16783         (grub_machine_init): Call `grub_pc_partition_map_init',
16784         `grub_amiga_partition_map_init' and
16785         `grub_apple_partition_map_init'.
16786         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16787         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16788         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16789         `partition.h' and `pc_partition.h'.
16790         (grub_setup_SOURCES): Remove
16791         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16792         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16793         (grub_emu_SOURCES): Likewise.
16794         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16795         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16796         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16797         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16798         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16799         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16800         (grubof_SOURCES): Likewise.
16801         * disk/i386/pc/partition.c: File removed.
16802         * disk/powerpc/ieee1275/partition.c: Likewise.
16803         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16804         * include/grub/i386/pc/partition.h: Likewise.
16805         * kern/partition.c: New file.
16806         * partmap/amiga.c: Likewise.
16807         * partmap/apple.c: Likewise.
16808         * partmap/pc.c: Likewise.
16809         * include/grub/partition.h: Likewise..
16810         * include/grub/pc_partition.h: Likewise.
16811         * util/grub-emu.c: Include <grub/partition.h> instead of
16812         <grub/machine/partition.h>.
16813         (main): Call `grub_pc_partition_map_init',
16814         `grub_amiga_partition_map_init' and
16815         `grub_apple_partition_map_init' and deinitialize afterwards.
16816         * util/i386/pc/biosdisk.c: Include `#include
16817         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16818         `<grub/machine/partition.h>'.
16819         * util/i386/pc/grub-setup.c: Likewise.
16820         * util/i386/pc/biosdisk.c: Likewise.
16821         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16822         partition information in case of a PC partition.
16823         * util/i386/pc/grub-setup.c: Include `#include
16824         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16825         `<grub/machine/partition.h>'.
16826         (setup): Only access the PC specific partition information in case
16827         of a PC partition.
16829 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16831         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16832         (grub_longjmp): Likewise.
16833         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16834         20.
16835         * normal/powerpc/setjmp.S: New file.
16836         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16837         `normal/powerpc/setjmp.S'.
16838         (grubof_CFLAGS): Add `-DGRUBOF'.
16839         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16840         [GRUB_UTIL && !GRUBOF].
16842 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16844         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16845         property named `name'.  Correctly handle the error returned by
16846         `grub_ieee1275_finddevice' if a device can not be opened.
16848 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16850         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16851         `actual' for negativity.
16852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16853         kern/fshelp.c.
16855 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16857         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16858         (PAGE_OFFSET): New macro.
16859         (CRTC_ADDR_PORT): Likewise.
16860         (CRTC_DATA_PORT): Likewise.
16861         (START_ADDR_HIGH_REGISTER): Likewise.
16862         (START_ADDR_LOW_REGISTER): Likewise.
16863         (GRAPHICS_ADDR_PORT): Likewise.
16864         (GRAPHICS_DATA_PORT): Likewise.
16865         (READ_MAP_REGISTER): Likewise.
16866         (INPUT_STATUS1_REGISTER): Likewise.
16867         (INPUT_STATUS1_VERTR_BIT): Likewise.
16868         (page): New variable.
16869         (wait_vretrace): New function.
16870         (set_read_map): Likewise.
16871         (set_start_address): Likewise.
16872         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16873         the right page.
16874         (check_vga_mem): Take the page into account.
16875         (write_char): Likewise.
16876         (write_cursor): Likewise.
16877         (scroll_up): Likewise.  Copy the page to the page that is not
16878         shown and switch between both pages.
16879         (grub_vga_putchar): Fix off by one error.
16880         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16881         account.
16883 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16885         Add support for iso9660 (including rockridge).
16887         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16888         (iso9660_mod_SOURCES): New variable.
16889         (iso9660_mod_CFLAGS): Likewise.
16890         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16891         * include/grub/fs.h (grub_iso9660_init): New prototype.
16892         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16893         * fs/iso9660.c: New file.
16895         * include/grub/misc.h (grub_strncat): New prototype.
16896         * kern/misc.c (grub_strncat): New function.
16898         * fs/hfs.c (grub_hfs_mount): Translate the error
16899         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16900         * fs/jfs.c (grub_jfs_mount): Likewise.
16901         * fs/ufs.c (grub_ufs_mount): Likewise.
16903 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16905         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16906         which initialized BAT registers.
16907         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16908         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16909         Move from here...
16910         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16911         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16912         ... to here.
16913         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16914         (grub_mapclaim): Likewise.
16915         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16916         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16917         hand.
16919 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16921         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16922         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16923         -ffreestanding and -msoft-float.
16925 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16927         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16928         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16929         set in grub_ieee1275_flags.
16931 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16933         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16934         prototype.
16935         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16936         grub_console_init first.
16937         Change the memory range used for grub_ieee1275_claim and
16938         grub_mm_init_region.
16939         Print an error message if the claim fails.
16940         Include <grub/misc.h>.
16942 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16944         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16945         Call grub_children_iterate for device nodes of type `scsi',
16946         `ide', or `ata'.
16947         (grub_ofdisk_open): Remove manual device alias resolution.
16948         Fix memory leak when device cannot be opened.
16949         * include/grub/powerpc/ieee1275/ieee1275.h
16950         (grub_children_iterate): New prototype.
16951         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16952         New function.
16953         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16954         Return -1 if args.size was -1.
16956 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16958         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16959         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16960         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16961         Open Firmware's memory for it; claim memory from _start to _end.
16962         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16963         (_end): New extern.
16964         (_start): Zero BSS from __bss_start to _end.
16965         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16966         New extern.
16967         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16969 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16971         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16972         -1 if args.base was -1.
16974 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16976         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16977         escape sequence instead of a literal ^L. Also call
16978         grub_ofconsole_gotoxy.
16980 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16982         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16983         void *  arguments to grub_addr_t.  All callers updated.  Also make
16984         the `result' argument optional.
16985         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16986         All callers updated.
16988 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16990         * commands/ls.c (grub_ls_list_files): Use the string following the
16991         initial ')', if present, as the filesystem path.
16992         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16994         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16996 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16998         Make the source code of the menu interface more readable.
17000         * normal/menu.c: Include grub/mm.h.
17001         (TERM_WIDTH): New macro.
17002         (TERM_HEIGHT): Likewise.
17003         (TERM_INFO_HEIGHT): Likewise.
17004         (TERM_MARGIN): Likewise.
17005         (TERM_SCROLL_WIDTH): Likewise.
17006         (TERM_TOP_BORDER_Y): Likewise.
17007         (TERM_LEFT_BORDER_X): Likewise.
17008         (TERM_BORDER_WIDTH): Likewise.
17009         (TERM_MESSAGE_HEIGHT): Likewise.
17010         (TERM_BORDER_HEIGHT): Likewise.
17011         (TERM_NUM_ENTRIES): Likewise.
17012         (TERM_FIRST_ENTRY_Y): Likewise.
17013         (TERM_ENTRY_WIDTH): Likewise.
17014         (TERM_CURSOR_X): Likewise.
17015         (draw_border): Use macros instead of magic numbers.
17016         (print_entry): Likewise.
17017         (print_entries): Likewise.
17018         (run_menu): Likewise. Also, handle the key 'e'.
17019         (run_menu_entry): Ignore empty command lines.
17020         (print_message): Added a new argument EDIT. If EDIT is true,
17021         print a different message.
17022         (init_page): Likewise.
17023         (edit_menu_entry): New function. Not implemented yet.
17025 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
17027         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
17028         can be loaded from normal mode.
17030         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
17031         `multiboot.mod'.
17032         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
17033         (multiboot_mod_CFLAGS): New variables.
17034         * loader/i386/pc/linux_normal.c: New file.
17035         * loader/i386/pc/multiboot_normal.c: Likewise.
17037         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
17038         attribute `unused'.
17040         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
17041         `fdiro' to read the mode information from instead of `diro'.
17043         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
17044         looking up a symlink.
17046         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
17047         macro.
17048         * normal/command.c (grub_command_execute): Don't parse the
17049         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
17050         flags of the command.
17052         * normal/menu.c (grub_menu_run): Fix typo.
17054 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
17056         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
17058         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
17059         `y + 1' instead of `y - 1'.
17061         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
17063 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
17065         From Hollis Blanchard <hollis@penguinppc.org>:
17066         * kern/misc.c (memmove): New alias for grub_memmove.
17067         (memcmp): New alias for grub_memcmp.
17068         (memset): New alias for grub_memset.
17069         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
17070         Change "int handle" to "grub_ieee1275_phandle_t handle".
17071         * include/grub/powerpc/ieee1275/ieee1275.h
17072         (grub_ieee1275_get_property): Likewise.
17074 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
17076         Added normal mode command `chainloader' as module chain.mod, which
17077         depends on normal.mod and _chain.mod.
17079         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
17080         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
17081         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
17082         Deleted prototype.
17083         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
17084         but arguments parsing moved to ...
17085         (grub_chainloader_cmd): ... here.  New function.
17086         * include/grub/i386/pc/chainloader.h: New file.
17087         * loader/i386/pc/chainloader_normal.c: Likewise.
17089 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
17091         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
17092         (grub_mkimage_LDFLAGS): Likewise.
17093         (grub_emu_SOURCES): Likewise.
17094         (kernel_img_HEADERS): Added fshelp.h.
17095         * fs/ext2.c: Include <grub/fshelp.h>.
17096         (FILETYPE_REG): New macro.
17097         (FILETYPE_INO_REG): Likewise.
17098         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
17099         Changed all users.
17100         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
17101         all users.
17102         (grub_fshelp_node): New struct.
17103         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
17104         to a pointer.
17105         (grub_ext2_get_file_block): Removed function.
17106         (grub_ext2_read_block): New function.
17107         (grub_ext2_read_file): Replaced parameter `data' by `node'.
17108         This function was written.
17109         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
17110         (grub_ext2_find_file): Removed function.
17111         (grub_ext2_read_symlink): New function.
17112         (grub_ext2_iterate_dir): Likewise.
17113         (grub_ext2_open): Rewritten.
17114         (grub_ext2_dir): Rewritten.
17115         * include/grub/fshelp.h: New file.
17116         * fs/fshelp.c: Likewise.
17118 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
17120         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17121         (print_message): Add a missing newline.
17122         (run_menu): Added timeout support.
17123         (run_menu_entry): New local function.
17124         (grub_menu_run): Added support for booting.
17126         * kern/loader.c (grub_loader_is_loaded): New function.
17128         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17129         (grub_get_rtc): Exported.
17131         * include/grub/i386/pc/time.h: Include grub/symbol.h.
17132         (grub_get_rtc): Exported.
17134         * include/grub/normal.h (struct grub_command_list): Remove
17135         constant from the member `command'.
17137         * include/grub/loader.h (grub_loader_is_loaded): Declared.
17139         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17141         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17143 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
17145         Add support for the JFS filesystem.
17147         * fs/jfs.c: New file.
17148         * include/grub/fs.h (grub_jfs_init): New prototype.
17149         (grub_jfs_fini): New prototype.
17150         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17151         (grub_emu_SOURCES): Likewise.
17152         (pkgdata_MODULES): Add jfs.mod.
17153         (jfs_mod_SOURCES): New variable.
17154         (jfs_mod_CFLAGS): Likewise.
17155         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17156         (grubof_SOURCES): Likewise.
17157         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17159         * fs/fat.c (grub_fat_find_dir): Convert the filename little
17160         endian to the host endian.
17161         (grub_fat_utf16_to_utf8): Move function from there...
17162         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
17163         the endianness of the source string anymore.
17164         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17166 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
17168         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17169         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17170         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17171         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17173         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17174         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17175         for `node_found' and `it_dir'.
17176         (grub_hfs_dir): Add prototype for `dir_hook'.
17178         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17179         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17180         and `indir32' to silence a gcc warning.
17182         * include/grub/fs.h (grub_hfs_init): New prototype.
17183         (grub_hfs_fini): Likewise.
17186 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17188         Each disk device has its own id now. This is useful to make use
17189         of multiple disk devices.
17191         * include/grub/disk.h (grub_disk_dev_id): New enum.
17192         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17193         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17195         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17196         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17198         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17199         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17201         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17202         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17204         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17205         "id" which is used by the cache manager.
17207         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17208         of just "GRUB".
17210 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17212         * fs/hfs.c: New file.
17213         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17214         (grub_emu_SOURCES): Likewise.
17215         (pkgdata_MODULES): Add hfs.mod.
17216         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17217         (grubof_SOURCES): Likewise.
17218         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17220         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17221         * kern/misc.c (grub_strncasecmp): Add function.
17223 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17225         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17226         with parentheses.
17228         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17229         (grub_ext2_dir): In case the directory entry type is unknown, read
17230         it from the inode.
17232 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17234         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17235         grub_load_linux instead of grub_rescue_cmd_linux as second
17236         argument of grub_rescue_register_command.
17238         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17240 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17242         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17243         function.
17244         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17245         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17246         `loader/powerpc/ieee1275/linux.c',
17247         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17248         * include/grub/powerpc/ieee1275/ieee1275.h
17249         (grub_ieee1275_release): New prototype.
17250         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17251         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17252         normal, boot, linux and linux_normal.
17253         * loader/powerpc/ieee1275/linux.c: New file.
17254         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17256 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17258         * normal/arg.c (grub_arg_parse): Correct error handling after
17259         reallocating the argumentlist (check if `argl' is not null instead
17260         of checking if `args' is not null).
17261         * kern/mm.c (grub_realloc): Return the same pointer when using the
17262         same region, instead of returning the header address.
17264 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17266         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17267         one block instead of two when looking for the initial partition.
17268         (grub_partition_probe): Initialize the local variable `p' with 0.
17269         Use base 10 for the grub_strtoul call.
17270         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17271         need for one local variable.
17272         (grub_strtoul): Don't add the new value to `num', instead of that
17273         just assign it.
17275 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17277         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17278         (pxeboot_img_SOURCES): New variable.
17279         (pxeboot_img_ASFLAGS): Likewise.
17280         (pxeboot_img_LDFLAGS): Likewise.
17281         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17282         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17283         <lode_leroy@hotmail.com>.
17285 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17287         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17288         there was no input.
17290 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17292         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17293         the history buffer logic.
17295 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17297         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17298         (FILETYPE_INO_SYMLINK): New macros.
17299         (grub_ext2_find_file): Check if the node is a directory using the
17300         inode stat information instead of using the filetype in the
17301         dirent.  Exclude the first character of an absolute symlink.
17302         (grub_ext2_dir): Mask out the filetype part of the mode member of
17303         the inode.
17305 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17307         Add support for UFS version 1 and 2.  Add support for the minix
17308         filesystem version 1 and 2, both the variants with 14 and 30 long
17309         filenames.
17311         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17312         fs/minix.c.
17313         (grub_emu_SOURCES): Likewise.
17314         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17315         (ufs_mod_SOURCES): New variable.
17316         (ufs_mod_CFLAGS): Likewise.
17317         (minix_mod_SOURCES): Likewise.
17318         (minix_mod_CFLAGS): Likewise.
17319         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17320         fs/minix.c.
17321         (grubof_SOURCES): Likewise.
17322         * fs/ufs.c: New file.
17323         * fs/minix.c: New file.
17324         * include/grub/fs.h (grub_ufs_init): New prototype.
17325         (grub_ufs_fini): Likewise.
17326         (grub_minix_init): Likewise.
17327         (grub_minix_fini): Likewise.
17328         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17329         minix fs.
17331 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17333         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17334         commands/ls.c, commands/terminal.c, commands/boot.c,
17335         commands/cmp.c and commands/cat.c.
17336         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17338         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17339         "env.h"
17341 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17343         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17344         and grub_, respectively. Because the conversion is trivial and
17345         mechanical, I omit the details here. Please refer to the CVS
17346         if you need more information.
17348 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17350         * include/pupa: Renamed to ...
17351         * include/grub: ... this.
17352         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17353         * util/i386/pc/grub-mkimage.c: ... this.
17354         * util/i386/pc/pupa-setup.c: Renamed to ...
17355         * util/i386/pc/grub-setup.c: ... this.
17356         * util/pupa-emu.c: Renamed to ...
17357         * util/grub-emu.c: ... this.
17359 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17361         Add support for the newworld apple macintosh (PPC).  This has been
17362         tested on the powerbook 2000 only.  It only adds support for
17363         generic ieee1275 functions, console and disk support.  This should
17364         be easy to port to other architectures with support for Open
17365         Firmware.
17367         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17368         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17369         specific tests are only executed while building for the i386.
17370         Inverse test for crosscompile.
17371         * genmk.rb (Utility): Allow assembler files.
17372         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17373         * conf/powerpc-ieee1275.rmk: New file.
17374         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17375         * disk/powerpc/ieee1275/partition.c: Likewise.
17376         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17377         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17378         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17379         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17380         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17381         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17382         * include/pupa/powerpc/ieee1275/loader.h
17383         * include/pupa/powerpc/setjmp.h: Likewise.
17384         * include/pupa/powerpc/types.h: Likewise.
17385         * kern/powerpc/ieee1275/init.c: Likewise.
17386         * kern/powerpc/ieee1275/openfw.c: Likewise.
17387         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17389         These files were written by Johan Rydberg
17390         (jrydberg@night.trouble.net) and I only modified them slightly.
17392         * boot/powerpc/ieee1275/cmain.c: New file.
17393         * boot/powerpc/ieee1275/crt0.S: Likewise.
17394         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17395         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17397 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17399         * Makefile.in: Update copyright.
17400         * genmodsrc.sh: Likewise.
17401         * gensymlist.sh: Likewise.
17402         * term/i386/pc/vga.c: Indent correctly.
17404         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17405         bugreporting address.
17406         * util/i386/pc/pupa-setup.c (usage): Likewise,
17407         (main): Call pupa_ext2_init and pupa_ext2_fini.
17409         * fs/fat.c (log2): Renamed to ...
17410         (fat_log2): ... this.
17411         All callers changed.
17412         * kern/misc.c (memcpy): Alias to pupa_memmove.
17413         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17414         lvalue cast.
17415         * util/console.c (pupa_ncurses_fini): Return 0.
17417         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17418         Move fail label here.
17419         [__GNU__]: Don't warn when using stat.
17420         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17421         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17422         long int. Use strtol instead of strtoul.
17424 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17426         * commands/boot.c: New file.
17427         * commands/cat.c: Likewise.
17428         * commands/cmp.c: Likewise.
17429         * commands/ls.c: Likewise.
17430         * commands/terminal.c: Likewise.
17431         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17432         (pupa_register_command): Changed interface to match the new
17433         argument parser.
17434         (pupa_command_execute): Changed (almost rewritten) so it uses
17435         pupa_split_command.  Added support for setting variables using the
17436         syntax `foo=bar'.
17437         (rescue_command): Changed to work with the new argument parser.
17438         (terminal_command): Moved from here to commands/terminal.c.
17439         (set_command): New function.
17440         (unset_command): New function.
17441         (insmod_command): New function.
17442         (rmmod_command): New function.
17443         (lsmod_command): New function.
17444         (pupa_command_init): Don't initialize the command terminal
17445         anymore.  Initialize the commands set, unset, insmod, rmmod and
17446         lsmod.
17447         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17448         (kernel_img_HEADERS): Add arg.h and env.h.
17449         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17450         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17451         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17452         normal/arg.c.
17453         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17454         terminal.mod.
17455         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17456         (boot_mod_SOURCES): New variable.
17457         (terminal_mod_SOURCES): Likewise.
17458         (ls_mod_SOURCES): Likewise.
17459         (cmp_mod_SOURCES): Likewise.
17460         (cat_mod_SOURCES): Likewise.
17462         * normal/arg.c: New file.
17463         * kern/env.c: Likewise.
17464         * include/pupa/arg.h: Likewise.
17465         * include/pupa/env.h: Likewise.
17466         * font/manager.c (font_command): Changed to match argument parsing
17467         interface changes.
17468         (PUPA_MOD_INIT): Likewise.
17469         * hello/hello.c (pupa_cmd_hello): Likewise.
17470         (PUPA_MOD_INIT): Likewise.
17471         * include/pupa/disk.h: Include <pupa/device.h>.
17472         (pupa_print_partinfo): New prototype.
17473         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17474         (pupa_dl_get_prefix): Likewise.
17475         * include/pupa/misc.h: Include <pupa/err.h>.
17476         (pupa_isgraph): New prototype.
17477         (pupa_isdigit): Likewise.
17478         (pupa_split_cmdline): Likewise.
17479         * include/pupa/normal.h: Include <pupa/arg.h>.
17480         (pupa_command): Changed the prototype of the member `func' to
17481         match the argument parsing interface.  Added member `options'.
17482         (pupa_register_command): Updated to match function.
17483         (pupa_arg_parse): New prototype.
17484         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17485         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17486         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17487         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17488         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17489         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17490         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17491         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17492         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17493         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17494         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17495         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17496         * kern/disk.c: Include <pupa/file.h>.
17497         (pupa_print_partinfo): New function.
17498         * kern/dl.c: Include <pupa/env.h>.
17499         (pupa_dl_dir): Variable removed.
17500         (pupa_dl_load): Use the environment variable `prefix' instead of
17501         the variable pupa_dl_dir.
17502         (pupa_dl_set_prefix): Function removed.
17503         (pupa_dl_get_prefix): Likewise.
17504         * kern/i386/pc/init.c: Include <pupa/env.h>.
17505         (pupa_machine_init): Use the environment variable `prefix' instead of
17506         using pupa_dl_set_prefix to set the prefix.
17507         * kern/main.c: Include <pupa/env.h>.
17508         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17509         using pupa_dl_get_prefix to get the prefix.
17510         * kern/misc.c: Include <pupa/env.h>.
17511         (pupa_isdigit): New function.
17512         (pupa_isgraph): Likewise.
17513         (pupa_ftoa): Likewise.
17514         (pupa_vsprintf): Added support for printing values of the type
17515         `double'.  Make it possible to format variable output when using
17516         formatting like `%1.2%f'.
17517         (pupa_split_cmdline): New function.
17518         * kern/rescue.c: Include <pupa/env.h>.
17519         (next_word): Removed function.
17520         (pupa_rescue_cmd_prefix): Likewise.
17521         (pupa_rescue_cmd_set): New function.
17522         (pupa_rescue_cmd_unset): New function.
17523         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17524         split the command line instead of splitting it here.  Added
17525         support for setting variables using the syntax `foo=bar'.  Don't
17526         initialize the prefix command anymore.  Initialized the set and
17527         unset commands.
17528         * normal/cmdline.c: Include <pupa/env.h>.
17529         (pupa_tab_complete): Added prototypes for print_simple_completion,
17530         print_partition_completion, add_completion, iterate_commands,
17531         iterate_dev, iterate_part and iterate_dir. Moved code to print
17532         partition information from here to kern/disk.c.
17533         (pupa_cmdline_run): Don't check if the function exists anymore.
17534         * normal/main.c: Include <pupa/env.h>.
17535         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17536         instead of using pupa_dl_get_prefix to get the prefix.
17537         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17538         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17539         warning.
17540         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17541         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17542         ((unused))' to silence a gcc warning.
17543         (pupa_vga_setcolor): Likewise.
17544         (debug_command): Changed to match argument parsing
17545         interface changes.
17546         * util/pupa-emu.c: Include <pupa/env.h>.
17547         (options): Added 0's for unused fields to silence a gcc warning.
17548         (argp): Likewise.
17549         (main): Use the environment variable `prefix' instead of using
17550         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17551         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17552         and terminal.
17554         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17555         * util/misc.c: Include <malloc.h>.
17556         (pupa_malloc): Rewritten so errors are correctly reported.
17557         (pupa_realloc): Likewise.
17558         (pupa_memalign): Likewise.
17559         (pupa_mm_init_region): Declare unused variables with
17560         `__attribute__ ((unused))' to silence a gcc warning.
17561         * normal/i386/setjmp.S: Remove tab at the end of the file to
17562         silence a gcc warning.
17563         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17564         variables with `__attribute__ ((unused))' to silence a gcc
17565         warning.
17566         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17567         local variable i unsigned to silence a gcc warning.
17569         * kern/term.c: Include <pupa/misc.h>.
17570         (pupa_more_lines): New variable.
17571         (pupa_more): Likewise.
17572         (pupa_putcode): When the pager is active pause at the end of every
17573         screen.
17574         (pupa_set_more): New function.
17575         * include/pupa/term.h (pupa_set_more): New prototype.
17578 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17580         Now this project is GRUB 2 rather than PUPA. The location of
17581         the CVS repository was moved to GRUB's.
17583         * configure.ac: Use bug-grub as the reporting address.
17584         Use GRUB instead of PUPA.
17585         Change the version number to 1.90.
17587 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17589         * genkernsyms.sh: Updated copyright information.
17590         * genmk.rb: Likewise.
17591         * genmodsrc.sh: Likewise.
17592         * gensymlist.sh: Likewise.
17593         * boot/i386/pc/boot.S: Likewise.
17594         * boot/i386/pc/diskboot.S: Likewise.
17595         * disk/i386/pc/biosdisk.c: Likewise.
17596         * disk/i386/pc/partition.c: Likewise.
17597         * font/manager.c: Likewise.
17598         * fs/ext2.c: Likewise.
17599         * fs/fat.c: Likewise.
17600         * include/pupa/boot.h: Likewise.
17601         * include/pupa/device.h: Likewise.
17602         * include/pupa/disk.h: Likewise.
17603         * include/pupa/dl.h: Likewise.
17604         * include/pupa/elf.h: Likewise.
17605         * include/pupa/err.h: Likewise.
17606         * include/pupa/file.h: Likewise.
17607         * include/pupa/font.h: Likewise.
17608         * include/pupa/fs.h: Likewise.
17609         * include/pupa/kernel.h: Likewise.
17610         * include/pupa/loader.h: Likewise.
17611         * include/pupa/misc.h: Likewise.
17612         * include/pupa/mm.h: Likewise.
17613         * include/pupa/net.h: Likewise.
17614         * include/pupa/normal.h: Likewise.
17615         * include/pupa/rescue.h: Likewise.
17616         * include/pupa/setjmp.h: Likewise.
17617         * include/pupa/symbol.h: Likewise.
17618         * include/pupa/term.h: Likewise.
17619         * include/pupa/types.h: Likewise.
17620         * include/pupa/i386/setjmp.h: Likewise.
17621         * include/pupa/i386/types.h: Likewise.
17622         * include/pupa/i386/pc/biosdisk.h: Likewise.
17623         * include/pupa/i386/pc/boot.h: Likewise.
17624         * include/pupa/i386/pc/console.h: Likewise.
17625         * include/pupa/i386/pc/init.h: Likewise.
17626         * include/pupa/i386/pc/kernel.h: Likewise.
17627         * include/pupa/i386/pc/linux.h: Likewise.
17628         * include/pupa/i386/pc/loader.h: Likewise.
17629         * include/pupa/i386/pc/memory.h: Likewise.
17630         * include/pupa/i386/pc/multiboot.h: Likewise.
17631         * include/pupa/i386/pc/partition.h: Likewise.
17632         * include/pupa/i386/pc/time.h: Likewise.
17633         * include/pupa/i386/pc/vga.h: Likewise.
17634         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17635         * include/pupa/util/getroot.h: Likewise.
17636         * include/pupa/util/misc.h: Likewise.
17637         * include/pupa/util/resolve.h: Likewise.
17638         * kern/device.c: Likewise.
17639         * kern/disk.c: Likewise.
17640         * kern/dl.c: Likewise.
17641         * kern/err.c: Likewise.
17642         * kern/file.c: Likewise.
17643         * kern/fs.c: Likewise.
17644         * kern/loader.c: Likewise.
17645         * kern/main.c: Likewise.
17646         * kern/misc.c: Likewise.
17647         * kern/mm.c: Likewise.
17648         * kern/rescue.c: Likewise.
17649         * kern/term.c: Likewise.
17650         * kern/i386/dl.c: Likewise.
17651         * kern/i386/pc/init.c: Likewise.
17652         * kern/i386/pc/lzo1x.S: Likewise.
17653         * kern/i386/pc/startup.S: Likewise.
17654         * loader/i386/pc/chainloader.c: Likewise.
17655         * loader/i386/pc/linux.c: Likewise.
17656         * loader/i386/pc/multiboot.c: Likewise.
17657         * normal/cmdline.c: Likewise.
17658         * normal/command.c: Likewise.
17659         * normal/main.c: Likewise.
17660         * normal/menu.c: Likewise.
17661         * normal/i386/setjmp.S: Likewise.
17662         * term/i386/pc/console.c: Likewise.
17663         * term/i386/pc/vga.c: Likewise.
17664         * util/console.c: Likewise.
17665         * util/genmoddep.c: Likewise.
17666         * util/misc.c: Likewise.
17667         * util/pupa-emu.c: Likewise.
17668         * util/resolve.c: Likewise.
17669         * util/unifont2pff.rb: Likewise.
17670         * util/i386/pc/biosdisk.c: Likewise.
17671         * util/i386/pc/getroot.c: Likewise.
17672         * util/i386/pc/pupa-mkimage.c: Likewise.
17673         * util/i386/pc/pupa-setup.c: Likewise.
17675 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17677         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17678         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17679         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17680         reading and reset it after reading.
17681         (pupa_ext2_close): Return PUPA_ERR_NONE.
17683         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17684         Correct value.
17685         (struct linux_kernel_header): Add kernel_version and
17686         initrd_addr_max.
17687         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17688         pupa_file_read succeeds.
17689         (pupa_rescue_cmd_initrd): Implement.
17691 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17693         * fs/ext2.c (pupa_ext2_label): New function.
17694         (pupa_ext2_fs): Added label.
17695         * fs/fat.c (pupa_fat_label): New function.
17696         (pupa_fat_fs): Added label.
17697         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17699         * kern/misc.c (pupa_strndup): New function.
17700         * include/pupa/misc.h (pupa_strndup): New prototype.
17702         * include/pupa/normal.h: Include <pupa/err.h>.
17703         (pupa_set_history): New prototype.
17704         (pupa_iterate_commands): New prototype.
17705         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17706         <pupa/disk.h>, <pupa/file.h>.
17707         (hist_size): New variable.
17708         (hist_lines): Likewise.
17709         (hist_end): Likewise.
17710         (hist_used): Likewise.
17711         (pupa_set_history): New function.
17712         (pupa_history_get): Likewise.
17713         (pupa_history_add): Likewise.
17714         (pupa_history_replace): Likewise.
17715         (pupa_tab_complete): Likewise.
17716         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17717         completion shows partitionnames while completing partitions, this
17718         feature was suggested by Jeff Bailey.
17719         * normal/command.c (pupa_iterate_commands): New function.
17720         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17721         (pupa_normal_init): Initialize history buffer.
17722         (PUPA_MOD_INIT): Likewise.
17723         (pupa_normal_fini): Free the history buffer.
17724         (PUPA_MOD_FINI): Likewise.
17726         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17727         key.
17729         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17730         * configure.ac [i386]: Check for regparam bug.
17731         (NESTED_FUNC_ATTR) [! i386]: Defined.
17733 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17735         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17736         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17737         (pupa_emu_SOURCES): New variable.
17738         (pupa_emu_LDFLAGS): Likewise.
17739         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17740         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17741         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17742         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17743         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17744         (pupa_jmp_buf): New typedef.
17745         (pupa_setjmp) [PUPA_UTIL]: New macro.
17746         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17747         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17748         (pupa_refresh): New prototype.
17749         * include/pupa/util/getroot.h: New file.
17750         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17751         it.
17752         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17753         (pupa_rescue_cmd_cat): Likewise.
17754         (pupa_rescue_cmd_ls): Likewise.
17755         (pupa_rescue_cmd_testload): Likewise.
17756         (pupa_rescue_cmd_lsmod): Likewise.
17757         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17758         * normal/menu.c (run_menu): Likewise.
17759         * kern/term.c (pupa_cls): Likewise.
17760         (pupa_refresh): New function.
17761         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17762         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17763         * util/console.c: New file.
17765         * util/i386/pc/getroot.c: New file.
17766         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17767         (pupa_putchar): New function.
17768         (pupa_refresh): Likewise.
17769         (xgetcwd): Function moved to ...
17770         (strip_extra_slashes): Likewise.
17771         (get_prefix): Likewise.
17772         * util/i386/pc/getroot.c: ... here.
17773         (find_root_device): Function moved and renamed to...
17774         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17775         Changed all callers.
17776         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17777         and renamed to...
17778         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17779         Changed all callers.
17780         * util/misc.c (pupa_memalign): New function.
17781         (pupa_mm_init_region): Likewise.
17782         (pupa_register_exported_symbols): Likewise.
17783         (pupa_putchar): Function removed.
17784         * util/pupa-emu.c: New file.
17786 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17788         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17789         (_multiboot_mod_SOURCES): New variable.
17790         (_multiboot_mod_CFLAGS): Likewise.
17791         * loader/i386/pc/multiboot.c: New file.
17792         * include/pupa/i386/pc/multiboot.h: Likewise.
17793         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17794         (pupa_multiboot_real_boot): New function.
17795         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17796         (pupa_multiboot_real_boot): New prototype.
17797         (pupa_rescue_cmd_multiboot): Likewise
17798         (pupa_rescue_cmd_module): Likewise.
17800         * kern/loader.c (pupa_loader_set): Continue when
17801         pupa_loader_unload_func() fails.
17802         (pupa_loader_unset): New function.
17803         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17805         * kern/misc.c (pupa_stpcpy): New function.
17806         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17808 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17810         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17811         for available extensions.
17813         * include/pupa/i386/pc/time.h: New file.
17814         * kern/disk.c: Include <pupa/machine/time.h>.
17815         (PUPA_CACHE_TIMEOUT): New macro.
17816         (pupa_last_time): New variable.
17817         (pupa_disk_open): Flush the cache when there was a timeout.
17818         (pupa_disk_close): Reset the timer.
17819         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17820         pupa_currticks.
17821         * util/misc.c: Include <sys/times.h>
17822         (pupa_get_rtc): New function.
17824 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17826         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17827         as blocks.
17828         (pupa_ext2_get_file_block): Use blocks member.
17830         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17831         first block. Return -1 instead of pupa_errno on error.
17833 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17835         * README: In the pupa-mkimage example use _chain instead of chain
17836         and ext2 instead of fat.
17837         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17838         adding journal playback for ext2fs.
17839         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17840         (pkgdata_MODULES): Added ext2.mod.
17841         (ext2_mod_SOURCES): New variable.
17842         (ext2_mod_CFLAGS): Likewise.
17843         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17844         * include/pupa/misc.h (pupa_strncpy): New prototype.
17845         (pupa_strcat): Likewise.
17846         (pupa_strncmp): Likewise.
17847         * kern/misc.c (pupa_strcat): Enable function.
17848         (pupa_strncpy): New function.
17849         (pupa_strncmp): Likewise.
17850         * fs/ext2.c: New file.
17852         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17853         when the read failed before retrying.
17854         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17855         (_FILE_OFFSET_BITS): Likewise.
17856         * configure.ac: Added AC_SYS_LARGEFILE.
17858 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17860         * genmk.rb (PModule#rule): Make sure to get only symbol names
17861         from the output of nm.
17862         Reported by Robert Millan <zeratul2@wanadoo.es>.
17864 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17866         I forgot to check in these changes for a long time. This adds
17867         incomplete support for VGA console, and this is still very
17868         buggy. Also, a lot of consideration is required for I18N,
17869         UNICODE, and VGA font issues. Therefore, assume that this is
17870         such that "better than nothing".
17872         * font/manager.c: New file.
17873         * include/pupa/font.h: Likewise.
17874         * include/pupa/i386/pc/vga.h: Likewise.
17875         * term/i386/pc/vga.c: Likewise.
17876         * util/unifont2pff.rb: Likewise.
17878         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17879         (pkgdata_MODULES): Added vga.mod and font.mod.
17880         (vga_mod_SOURCES): New variables.
17881         (vga_mod_CFLAGS): Likewise.
17882         (font_mod_SOURCES): Likewise.
17883         (font_mod_CFLAGS): Likewise.
17885         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17887         * include/pupa/term.h: Include pupa/err.h.
17888         (struct pupa_term): Added init and fini.
17889         Changed the argument of putchar to pupa_uint32_t.
17891         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17892         (pupa_console_real_putchar): New prototype.
17893         (pupa_console_putchar): Removed.
17894         (pupa_console_checkkey): Exported.
17895         (pupa_console_getkey): Likewise.
17897         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17898         characters.
17900         * kern/term.c (pupa_term_set_current): Rewritten.
17901         (pupa_putchar): Likewise.
17902         (pupa_putcode): New function.
17904         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17905         (pupa_console_real_putchar): ... this.
17906         (pupa_vga_set_mode): New function.
17907         (pupa_vga_get_font): Likewise.
17909         * normal/command.c: Include pupa/term.h.
17910         (terminal_command): New function.
17911         (pupa_command_init): Register the command "terminal".
17913         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17914         (DISP_UP): Likewise.
17915         (DISP_RIGHT): Likewise.
17916         (DISP_DOWN): Likewise.
17917         (DISP_HLINE): Likewise.
17918         (DISP_VLINE): Likewise.
17919         (DISP_UL): Likewise.
17920         (DISP_UR): Likewise.
17921         (DISP_LL): Likewise.
17922         (DISP_LR): Likewise.
17924         * term/i386/pc/console.c (pupa_console_putchar): New function.
17926 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17928         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17929         FIX. Reverse the path_list.
17931         * include/pupa/normal.h: Export pupa_register_command and
17932         pupa_unregister_command.
17934         * hello/hello.c (pupa_cmd_hello): New module.
17935         * conf/i386-pc.rmk: Added hello.mod.
17937 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17939         * kern/i386/pc/lzo1x.S: New file.
17941         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17942         (compress_kernel): New variable.
17943         (generate_image): Heavily modified to support compressing a
17944         large part of the core image.
17946         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17947         leak.
17948         (pupa_util_load_image): New function.
17950         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17951         (pupa_compressed_size): New variable.
17952         (codestart): Enable Gate A20 here.
17953         Decompress the compressed part of the core image.
17954         Rearrange the code to put functions and variables which are
17955         required for initialization in the non-compressed part.
17956         Include lzo1x.S.
17958         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17959         here.
17961         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17963         * include/pupa/i386/pc/kernel.h
17964         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17965         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17966         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17967         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17968         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17970         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17972         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17973         (Utility#rule): Likewise.
17975         * configure.ac: Check if LZO is available.
17977 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17979         * include/pupa/normal.h: New file.
17980         * include/pupa/setjmp.h: Likewise.
17981         * include/pupa/i386/setjmp.h: Likewise.
17982         * normal/cmdline.c: Likewise.
17983         * normal/command.c: Likewise.
17984         * normal/main.c: Likewise.
17985         * normal/menu.c: Likewise.
17986         * normal/i386/setjmp.S: Likewise.
17988         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17989         (pupa_rescue_cmd_initrd): Likewise.
17991         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17992         Likewise.
17994         * kern/i386/pc/startup.S (translation_table): New variable.
17995         (translate_keycode): New function.
17996         (pupa_console_getkey): Call translate_keycode.
17998         * kern/rescue.c (attempt_normal_mode): New function.
17999         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
18000         it failed, print a message.
18002         * kern/mm.c (pupa_real_malloc): Print more information when a
18003         free magic is broken.
18004         (pupa_free): If the first free header is not free actually, set
18005         it to P.
18007         * kern/main.c (pupa_load_normal_mode): Just load the module
18008         "normal".
18009         (pupa_main): Don't print the message
18010         "Entering into rescue mode..." here.
18012         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
18013         Declared.
18014         (pupa_rescue_cmd_initrd): Likewise.
18015         (pupa_rescue_cmd_initrd): Likewise.
18017         * include/pupa/symbol.h (FUNCTION): Specify the type.
18018         (VARIABLE): Likewise.
18020         * include/pupa/err.h (pupa_err_t): Added
18021         PUPA_ERR_UNKNOWN_COMMAND.
18023         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
18024         (pupa_dl_get_prefix): Likewise.
18026         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
18027         Added _chain.mod and _linux.mod instead of chain.mod and
18028         linux.mod.
18029         (chain_mod_SOURCES): Renamed to ...
18030         (_chain_mod_SOURCES): ... this.
18031         (chain_mod_CFLAGS): Renamed to ...
18032         (_chain_mod_CFLAGS): ... this.
18033         (linux_mod_SOURCES): Renamed to ...
18034         (_linux_mod_SOURCES): ... this.
18035         (linux_mod_CFLAGS): Renamed to ...
18036         (_linux_mod_CFLAGS): ... this.
18037         (normal_mod_SOURCES): New variable.
18038         (normal_mod_CFLAGS): Likewise.
18039         (normal_mod_ASFLAGS): Likewise.
18041 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
18043         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
18044         possible.
18046         * kern/dl.c (pupa_dl_ref): Refer depending modules
18047         recursively.
18048         (pupa_dl_unref): Unrefer depending modules recursively.
18049         Don't call pupa_dl_unload implicitly, because PUPA can crash if
18050         a module is unloaded before one depending on that module is
18051         unloaded.
18052         (pupa_dl_unload): Unload depending modules explicitly,
18053         if possible.
18055 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
18057         * include/pupa/i386/pc/linux.h: New file.
18058         * loader/i386/pc/linux.c: Likewise.
18060         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
18061         Removed.
18062         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
18063         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
18064         of PUPA_CHAINLOADER_BOOT_SECTOR.
18066         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
18067         (pupa_linux_prot_size): New variable.
18068         (pupa_linux_tmp_addr): Likewise.
18069         (pupa_linux_real_addr): Likewise.
18070         (pupa_linux_boot_zimage): New function.
18071         (pupa_linux_boot_bzimage): Likewise.
18073         * kern/i386/pc/init.c (struct mem_region): New structure.
18074         (MAX_REGIONS): New macro.
18075         (mem_regions): New variable.
18076         (num_regions): Likewise.
18077         (pupa_os_area_addr): Likewise.
18078         (pupa_os_area_size): Likewise.
18079         (pupa_lower_mem): Likewise.
18080         (pupa_upper_mem): Likewise.
18081         (add_mem_region): New function.
18082         (compact_mem_regions): Likewise.
18083         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
18084         the size of the conventional memory and that of so-called upper
18085         memory (before the first memory hole).
18086         Instead of adding each found region to free memory, use
18087         add_mem_region and add them after removing overlaps.
18088         Also, add only 1/4 of the upper memory to free memory. The rest
18089         is used for loading OS images. Maybe this is ad hoc, but this
18090         makes it much easier to relocate OS images when booting.
18092         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
18093         (pupa_enter_rescue_mode): Don't register initrd and module.
18095         * kern/mm.c: Include pupa/dl.h.
18097         * kern/main.c: Include pupa/file.h and pupa/device.h.
18099         * kern/loader.c (pupa_loader_load_module_func): Removed.
18100         (pupa_loader_load_module): Likewise.
18102         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
18103         ``.o''.
18105         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
18106         (pupa_linux_tmp_addr): Likewise.
18107         (pupa_linux_real_addr): Likewise.
18108         (pupa_linux_boot_zimage): Likewise.
18109         (pupa_linux_boot_bzimage): Likewise.
18111         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18112         (pupa_upper_mem): Likewise.
18113         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18114         module is too dangerous.
18116         * include/pupa/loader.h (pupa_os_area_addr): Declared.
18117         (pupa_os_area_size): Likewise.
18118         (pupa_loader_set): Remove the first argument. Loader doesn't
18119         manage modules or initrd any longer.
18120         (pupa_loader_load_module): Removed.
18122         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18123         (linux_mod_SOURCES): New variable.
18124         (linux_mod_CFLAGS): Likewise.
18126 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
18128         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18129         the length of a blocklist correctly.
18131         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18132         Use ioctl only if the OS file is a block device.
18133         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18134         not very useful for normal files.
18136         * kern/main.c (pupa_set_root_dev): New function.
18137         (pupa_load_normal_mode): Likewise.
18138         (pupa_main): Call those above.
18140         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18141         pupa_uint16_t.
18143         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18145 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
18147         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18148         (setup): Configure the installed partition information and the
18149         dl prefix.
18151         * loader/i386/pc/chainloader.c (my_mod): New variable.
18152         (pupa_chainloader_unload): New function.
18153         (pupa_rescue_cmd_chainloader): Refer itself.
18154         (PUPA_MOD_INIT): Save its own module in MY_MOD.
18156         * kern/i386/pc/startup.S (install_partition): Removed.
18157         (version_string): Likewise.
18158         (config_file): Likewise.
18159         (pupa_install_dos_part): New variable.
18160         (pupa_install_bsd_part): Likewise.
18161         (pupa_prefix): Likewise.
18162         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18164         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18165         and pupa/misc.h.
18166         (make_install_device): New function.
18167         (pupa_machine_init): Set the dl prefix.
18169         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18170         (buf): Renamed to ...
18171         (linebuf): ... this.
18172         (pupa_rescue_cmd_prefix): New function.
18173         (pupa_rescue_cmd_insmod): Likewise.
18174         (pupa_rescue_cmd_rmmod): Likewise.
18175         (pupa_rescue_cmd_lsmod): Likewise.
18176         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18177         rmmod and lsmod.
18179         * kern/mm.c (pupa_memalign): If failed even after invalidating
18180         disk caches, unload unneeded modules and retry.
18182         * kern/misc.c (pupa_memmove): New function.
18183         (pupa_memcpy): Removed.
18184         (pupa_strcpy): New function.
18185         (pupa_itoa): Made static.
18187         * kern/dl.c (pupa_dl_iterate): New function.
18188         (pupa_dl_ref): Likewise.
18189         (pupa_dl_unref): Likewise.
18190         (pupa_dl_unload): Return if succeeded or not.
18191         (pupa_dl_unload_unneeded): New function.
18192         (pupa_dl_unload_all): Likewise.
18193         (pupa_dl_init): Renamed to ...
18194         (pupa_dl_set_prefix): ... this.
18195         (pupa_dl_get_prefix): New function.
18197         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18198         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18199         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18200         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18201         (pupa_install_dos_part): Declared.
18202         (pupa_install_bsd_part): Likewise.
18203         (pupa_prefix): Likewise.
18204         (pupa_boot_drive): Likewise.
18206         * include/pupa/types.h: Fix a typo.
18208         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18209         pupa_memmove.
18210         (pupa_memmove): Declared.
18211         (pupa_strcpy): Likewise.
18213         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18214         pupa_mod_init takes one argument, its own module.
18215         (pupa_dl_unload_unneeded): Declared.
18216         (pupa_dl_unload_all): Likewise.
18217         (pupa_dl_ref): Likewise.
18218         (pupa_dl_unref): Likewise.
18219         (pupa_dl_iterate): Likewise.
18220         (pupa_dl_init): Renamed to ...
18221         (pupa_dl_set_prefix): ... this.
18222         (pupa_dl_get_prefix): Declared.
18224         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18225         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18226         unloaded.
18227         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18228         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18230         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18231         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18233 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18235         * util/i386/pc/pupa-setup.c (setup): Define the internal
18236         function find_first_partition_start at the top level, because GCC
18237         3.0.x cannot compile internal functions in deeper scopes
18238         correctly.
18239         (find_root_device): Use lstat instead of stat.
18240         Don't follow symbolic links.
18241         Fix the path-constructing code.
18243         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18244         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18245         by a BLKGETSIZE ioctl first, because block devices don't fill
18246         the member st_mode of the structure stat on Linux.
18247         [__linux__] (linux_find_partition): Use a temporary buffer
18248         REAL_DEV for the working space. Copy it to DEV before returning.
18249         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18250         buffer cache consistent.
18251         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18252         strncmp. The previous value was merely wrong.
18253         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18255         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18256         FAT size is 12. The previous value was merely wrong.
18258         * kern/main.c (pupa_main): Don't split the starting message from
18259         newlines.
18261         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18262         LF, because BIOS goes crazy about character attributes in this
18263         case.
18265 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18267         * include/i386/pc/util/biosdisk.h: New file.
18268         * util/i386/pc/biosdisk.c: Likewise.
18269         * util/i386/pc/pupa-setup.c: Likewise.
18271         * Makefile.in (INCLUDE_DISTFILES): Added
18272         include/pupa/i386/pc/util/biosdisk.h.
18273         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18274         directory util/i386/pc.
18275         (install-local): Added a rule for sbin_UTILITIES.
18276         (uninstall): Likewise.
18278         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18280         * util/misc.c (xrealloc): New function.
18281         (pupa_malloc): Likewise.
18282         (pupa_free): Likewise.
18283         (pupa_realloc): Likewise.
18284         (pupa_stop): Likewise.
18285         (pupa_putchar): Likewise.
18287         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18289         * include/pupa/util/misc.h (xrealloc): Declared.
18291         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18292         macro.
18293         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18294         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18296         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18297         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18299         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18300         way should be implemented.
18301         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18303         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18304         the size of NAME for safety.
18305         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18306         0x88.
18308         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18309         (pupa_setup_SOURCES): Likewise.
18311         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18313 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18315         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18316         bunch of pushl's from pusha, because this destroys the return
18317         value.
18319 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18321         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18322         This means that any missing prototypes could be fatal. Also, you
18323         must take care when writing assembly code. See the comments at
18324         the beginning of startup.S, for more details.
18326         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18327         compilation mechanism.
18328         (pupa_chainloader_real_boot): Likewise.
18329         (pupa_biosdisk_rw_int13_extensions): Likewise.
18330         (pupa_biosdisk_rw_standard): Likewise.
18331         (pupa_biosdisk_check_int13_extensions): Likewise.
18332         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18333         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18334         (pupa_get_memsize): Likewise.
18335         (pupa_get_mmap_entry): Likewise.
18336         (pupa_console_putchar): Likewise.
18337         (pupa_console_setcursor): Likewise.
18338         (pupa_getrtsecs): Use pushl instead of push.
18340         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18341         memory instead of the stack for a mmap entry, because some
18342         BIOSes may ignore the maximum size and overflow.
18344         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18346         * genmk.rb (PModule#rule): Compile automatically generated
18347         sources with module-specific CFLAGS as well as other sources.
18349 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18351         * configure.ac: Check ld.
18352         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18353         respectively, before checking endianness and sizes.
18355         * Makefile.in (LD): New variable.
18357 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18359         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18361 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18363         * Changelog: New file.