2009-07-01 Pavel Roskin <proski@gnu.org>
[grub2/bean.git] / ChangeLog
blob38d3a8a98b50fc00712f7c4c913cc1ba1b6897fb
1 2009-07-01  Pavel Roskin  <proski@gnu.org>
3         * kern/mm.c: Use correct format to print size_t.
5         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
6         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
7         * kern/powerpc/dl.c: Likewise.
8         * kern/sparc64/dl.c: Likewise.
9         * kern/x86_64/dl.c: Likewise.
11 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
13         Fix grub-emu build on sparc64-ieee1275.
15         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
16         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
18 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
20         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
21         (grub_reboot, grub_halt): New functions.
23         * util/i386/pc/misc.c: Delete.  Update all users.
24         * util/sparc64/ieee1275/misc.c: Likewise.
25         * util/powerpc/ieee1275/misc.c: Likewise.
27 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
29         * conf/i386.rmk (setjmp_mod_SOURCES)
30         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
31         * conf/common.rmk (setjmp_mod_SOURCES)
32         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
33         to use $(target_cpu).
34         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
35         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
36         * conf/powerpc-ieee1275.rmk: Likewise.
37         * conf/sparc64-ieee1275.rmk: Likewise.
39         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
40         $(target_cpu) for kern/$(target_cpu)/dl.c.
41         * conf/i386-efi.rmk: Likewise.
42         * conf/i386-ieee1275.rmk: Likewise.
43         * conf/x86_64-efi.rmk: Likewise.
44         * conf/i386-coreboot.rmk: Likewise.
45         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
46         $(target_cpu) for kern/$(target_cpu)/dl.c and for
47         kern/$(target_cpu)/cache.S.
48         * conf/sparc64-ieee1275.rmk: Likewise.
50 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
52         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
53         type to `grub_uint8_t', and adjust `padding9' accordingly.
55 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
57         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
59         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
60         assembly in final jump, using register constraints.
62         (grub_linux_boot): For text mode, initialize `have_vga' using
63         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
65         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
66         right before the final jump.
68         Set `video_mode' to 0x3.
70         Document initialization of `video_page', `video_mode' and
71         `video_ega_bx'.
73 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
75         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
76         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
77         and set GRUB_LINUX_FLAG_QUIET appropiately.
79 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
81         Fix build on Debian / sparc.
83         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
85 2009-06-28  Pavel Roskin  <proski@gnu.org>
87         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
88         fix a warning.
90         * util/grub.d/10_linux.in: Match SUSE style initrd names.
92 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
94         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
95         `err'.
97 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
99         Revert r2338.
101         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
102         file can't be opened.  grub_file_open() is already supposed to set
103         grub_errno / grub_errmsg appropiately.
104         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
106 2009-06-27  Pavel Roskin  <proski@gnu.org>
107 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
109         * include/grub/dl.h: Include grub/elf.h.
110         (struct grub_dl): Add symtab field.
111         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
112         GRUB_MODULES_MACHINE_READONLY.
113         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
114         of the header for read-only modules.
115         (grub_dl_unload): Free mod->symtab for read-only modules.
116         * kern/i386/dl.c: Use mod->symtab.
117         * kern/powerpc/dl.c: Likewise.
118         * kern/sparc64/dl.c: Likewise.
119         * kern/x86_64/dl.c: Likewise.
121         * conf/i386-qemu.rmk: New file.
122         * kern/i386/qemu/startup.S: Likewise.
123         * kern/i386/qemu/mmap.c: Likewise.
124         * boot/i386/qemu/boot.S: Likewise.
125         * include/grub/i386/qemu/time.h: Likewise.
126         * include/grub/i386/qemu/serial.h: Likewise.
127         * include/grub/i386/qemu/kernel.h: Likewise.
128         * include/grub/i386/qemu/console.h: Likewise.
129         * include/grub/i386/qemu/boot.h: Likewise.
130         * include/grub/i386/qemu/init.h: Likewise.
131         * include/grub/i386/qemu/machine.h: Likewise.
132         * include/grub/i386/qemu/loader.h: Likewise.
133         * include/grub/i386/qemu/memory.h: Likewise.
135         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
136         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
137         [qemu] (pkglib_IMAGES): Add `boot.img'.
138         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
139         [qemu] (boot_img_FORMAT): New variables.
140         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
141         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
142         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
143         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
144         [qemu] (kernel_img_FORMAT): New variables.
146         * configure.ac: Recognise `i386-qemu'.
148         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
149         (for no compression).
150         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
151         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
152         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
153         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
154         ifdefs).
156 2009-06-27  Pavel Roskin  <proski@gnu.org>
158         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
159         read.
160         * efiemu/prepare32.c: Likewise.
161         * efiemu/prepare64.c: Likewise.
163 2009-06-26  Pavel Roskin  <proski@gnu.org>
165         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
166         * include/grub/elf.h: Define symbols without "32" or "64" based
167         on GRUB_TARGET_WORDSIZE.
168         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
169         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
170         ELF definitions.
171         * efiemu/loadcore64.c: Likewise.
172         * loader/i386/bsd32.c: Likewise.
173         * loader/i386/bsd64.c: Likewise.
174         * kern/dl.c: Remove own ELF definitions.
175         * util/i386/efi/grub-mkimage.c: Likewise.
177 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
179         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
180         segment 0x0 unconditionally, because the reference generated by
181         GAS is an absolute address.
183 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
185         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
186         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
188 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
190         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
191         indexes.  Check for -f explicitly.
192         (search_file): Improve error message.
193         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
195 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
197         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
198         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
200 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
202         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
203         * conf/i386-ieee1275.rmk: Likewise.
204         * conf/i386-coreboot.rmk: Likewise.
206         * kern/i386/pc/startup.S (grub_stop): Remove function.
207         * kern/i386/ieee1275/startup.S: Likewise.
208         * kern/i386/coreboot/startup.S: Likewise.
209         * kern/i386/misc.S (grub_stop): New function.
211 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
213         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
214         * kern/i386/realmode.S (real_to_prot): ... to here.
216 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
218         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
219         with `kernel.img'.
220         (kernel_elf_SOURCES): Rename to ...
221         (kernel_img_SOURCES): ... this.
222         (kernel_elf_HEADERS): Rename to ...
223         (kernel_img_HEADERS): ... this.  Update all users.
224         (kernel_elf_ASFLAGS): Rename to ...
225         (kernel_img_ASFLAGS): ... this.
226         (kernel_elf_CFLAGS): Rename to ...
227         (kernel_img_CFLAGS): ... this.
228         (kernel_elf_LDFLAGS): Rename to ...
229         (kernel_img_LDFLAGS): ... this.
230         * conf/i386-coreboot.rmk: Likewise.
231         * conf/powerpc-ieee1275.rmk: Likewise.
233         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
234         with "kernel.img".
236 2009-06-21  Pavel Roskin  <proski@gnu.org>
238         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
239         to match nested functions.
240         * loader/sparc64/ieee1275/linux.c: Likewise.
242         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
244 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
246         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
247         all i386 platforms.
249 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
251         Fix asm file handling on ELF, and remove workarounds.
253         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
254         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
255         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
256         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
258 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
260         Load BSD ELF modules
262         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
263         and loader/i386/bsd64.c
264         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
265         (FREEBSD_MODTYPE_ELF_MODULE): New definition
266         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
267         (grub_freebsd_load_elfmodule32): New declaration
268         (grub_freebsd_load_elfmoduleobj64): Likewise
269         (grub_freebsd_load_elf_meta32): Likewise
270         (grub_freebsd_load_elf_meta64): Likewise
271         (grub_freebsd_add_meta): Likewise
272         (grub_freebsd_add_meta_module): Likewise
273         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
274         (grub_freebsd_add_meta_module): Likewise and move module-specific
275         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
276         (grub_cmd_freebsd): Add elf-kernel specific parts
277         based on grub_freebsd_add_meta_module
278         (grub_cmd_freebsd_module): Add type parsing moved from
279         grub_freebsd_add_meta_module
280         (grub_cmd_freebsd_module_elf): New function
281         (cmd_freebsd_module_elf): New variable
282         (GRUB_MOD_INIT): Register freebsd_module_elf
283         * loader/i386/bsd32.c: New file
284         * loader/i386/bsd64.c: Likewise
285         * loader/i386/bsdXX.c: Likewise
286         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
287         (grub_elf64_load): Likewise
288         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
289         All users updated
290         (grub_elf64_load_hook_t): Likewise
292 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
294         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
295         variable.
296         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
297         don't write a menu entry for recovery mode.
299 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
301         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
302         after it's no longer needed.
304 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
306         * include/grub/i386/loader.h (grub_linux_prot_size)
307         (grub_linux_tmp_addr, grub_linux_real_addr)
308         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
309         GRUB_MACHINE_PCBIOS.
310         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
311         common grub_util_info() call to ...
312         (generate_image): ... here.
313         Fix use of uninitialized memory, comparison of signed with
314         unsigned integers and memory leak.
315         Remove bogus module address message.
317 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
319         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
320         grub_raid_register
321         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
323 2009-06-19  Pavel Roskin  <proski@gnu.org>
325         * configure.ac: Remove stray AC_MSG_CHECKING.
327 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
329         * disk/scsi.c (grub_scsi_open): use continue instead of big if
331 2009-06-18  Pavel Roskin  <proski@gnu.org>
333         * conf/common.rmk: Add fs_file.mod.
334         * disk/fs_file.c: New file.
335         * include/grub/disk.h (enum grub_disk_dev_id): Add
336         GRUB_DISK_DEVICE_FILE_ID.
338 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
340         Fix build with Apple's toolchain. Part 2
342         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
343         a fake start
345 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
347         Fix build with Apple's toolchain. Part 1
349         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
350         for long calls
351         * configure.ac: remove a leftover AC_MSG_RESULT
352         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
353         Apple's toolchain
355 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
357         Fix warnings
359         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
360         (decomp_block): initialize ch
361         use grub_memcpy instead of memcpy
363 2009-06-17  Pavel Roskin  <proski@gnu.org>
365         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
366         version, use declarations needed to use vga_text as the startup
367         console.
369         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
370         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
371         the kernel.
372         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
373         and grub_at_keyboard_fini(), it's done on module load and
374         unload.
376 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
378         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
379         file can't be found.
380         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
382 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
384         Fix newline handling
386         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
387         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
388         (grub_script_yylex): don't segfault on unterminated script
389         newline terminates command and variable
391 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
393         avoid double grub_adjust_range call. Bug reported by David Simner
395         * kern/disk.c (grub_disk_write): change to raw disk access before
396         calling disk_read
398 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
400         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
401         spaces, for the benefit of help2man.
402         * util/i386/efi/grub-mkimage.c (usage): Likewise.
404 2009-06-16  Pavel Roskin  <proski@gnu.org>
406         * kern/i386/halt.c: Include grub/machine/init.h.
407         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
409 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
411         * util/grub.d/30_os-prober.in: Use ${root} in the generated
412         drivemap menuentry.
414 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
416         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
417         `echo' command.
419 2009-06-16  Pavel Roskin  <proski@gnu.org>
421         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
422         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
423         save %dx, we only need %dl and we never change it.
424         * boot/i386/pc/cdboot.S: Don't set the root drive.
425         * boot/i386/pc/pxeboot.S: Likewise.
426         * include/grub/i386/pc/boot.h: Remove
427         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
428         GRUB_BOOT_MACHINE_DRIVE_CHECK.
429         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
430         * kern/i386/pc/init.c (make_install_device): Remove references
431         to grub_root_drive.
432         * kern/i386/pc/startup.S: Likewise.
433         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
435 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
437         xnu_uuid command
439         * commands/xnu_uuid.c: new file
440         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
441         (xnu_uuid_mod_SOURCES): new variable
442         (xnu_uuid_mod_CFLAGS): likewise
443         (xnu_uuid_mod_LDFLAGS): likewise
444         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
445         * conf/i386-ieee1275.rmk: likewise
446         * conf/i386-pc.rmk: likewise
447         * conf/powerpc-ieee1275.rmk: likewise
448         * conf/sparc64-ieee1275.rmk: likewise
449         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
451 2009-06-16  Pavel Roskin  <proski@gnu.org>
453         * configure.ac: Avoid '==' in test command, it's not portable.
455 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
457         Probe command
459         * commands/probe.c: new file
460         * conf/common.rmk (pkglib_MODULES): add probe.mod
461         (probe_mod_SOURCES): new variable
462         (probe_mod_CFLAGS): likewise
463         (probe_mod_LDFLAGS): likewise
464         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
465         * conf/i386-ieee1275.rmk: likewise
466         * conf/i386-pc.rmk: likewise
467         * conf/powerpc-ieee1275.rmk: likewise
468         * conf/sparc64-ieee1275.rmk: likewise
470 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
472         Fix handling of string like \"hello\" and "a
473         b"
475         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
476         (grub_script_yylex): fix parsing of quoting, escaping and newline
478 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
480         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
481         handling
483 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
485         * util/grub-mkconfig.in: Fix parsing of --output option.
487 2009-06-12  Pavel Roskin  <proski@gnu.org>
489         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
490         genmk.rb don't need to be generated or installed.
492 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
494         * commands/i386/pc/drivemap_int13h.S: add more comments
496 2009-06-11  Pavel Roskin  <proski@gnu.org>
498         * Makefile.in (uninstall): Uninstall manuals.
500         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
501         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
502         and update-grub_lib in two places.
503         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
505         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
506         a compiler warning.
508         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
509         `entry_lo' to fix variable shadowing.
511 2009-06-11  Christian Franke  <franke@computer.org>
513         * kern/misc.c (__enable_execute_stack): Add missing return type
514         to prevent gcc warning.
516 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
518         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
520 2009-06-11  Pavel Roskin  <proski@gnu.org>
522         * Makefile.in: Don't rely on any scripts being executable.
523         Always use $(SHELL) to run shell scripts.
525         * configure.ac: Always define ___main if using -nostdlib.  This
526         fixes tests on Cygwin.
528 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
530         UDF fix
532         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
533         is in bytes and not in blocks
535 2009-06-11  Pavel Roskin  <proski@gnu.org>
537         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
538         warning.
540 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
542         * util/grub.d/30_os-prober.in: Fix a comment. Source
543         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
544         to set the root device.  Place drivemap command in the generated
545         chain entry.
547 2009-06-11  Pavel Roskin  <proski@gnu.org>
549         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
550         have long been resolved.
552 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
554         * util/grub.d/10_linux.in: Capitalise "Linux".
556         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
558 2009-06-11  Pavel Roskin  <proski@gnu.org>
560         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
561         fix a gcc warning and ensure that the function won't ever exit.
563         * kern/i386/ieee1275/init.c: Add missing prototype for
564         grub_stop_floppy().
566         * loader/ieee1275/multiboot2.c [__i386__]: Include
567         grub/cpu/multiboot.h.
569         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
570         casts to short - they are not portable and cause warnings.  Fix
571         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
573 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
575         Drivemap fixes
577         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
578         new function
579         (grub_get_root_biosnumber_saved): new variable
580         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
581         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
582         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
583         %dx after the call if necessary
584         * conf/common.rmk (pkglib_MODULES): remove boot.mod
585         (boot_mod_SOURCES): remove
586         (boot_mod_CFLAGS): remove
587         (boot_mod_LDFLAGS): remove
588         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
589         (boot_mod_SOURCES): new variable
590         (boot_mod_CFLAGS): likewise
591         (boot_mod_LDFLAGS): likewise
592         * conf/i386-efi.rmk: likewise
593         * conf/i386-ieee1275.rmk: likewise
594         * conf/i386-pc.rmk: likewise
595         * conf/powerpc-ieee1275.rmk: likewise
596         * conf/sparc64-ieee1275.rmk: likewise
597         * conf/x86_64-efi.rmk: likewise
598         * include/grub/i386/pc/biosnum.h: new file
599         * lib/i386/pc/biosnum.c: likewise
600         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
601         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
602         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
604 2009-06-10  Pavel Roskin  <proski@gnu.org>
606         * io/gzio.c (test_header): Don't reuse one buffer for all data.
607         Use separate variables.  Read only the file size at the end, but
608         not the checksum that we don't use.
610         * kern/file.c (grub_file_read): Use void pointer for the buffer.
611         Adjust all callers.
613         * kern/ieee1275/openfw.c: Remove libc includes.
614         * kern/ieee1275/cmain.c: Likewise.
615         * include/grub/ieee1275/ieee1275.h: Likewise.
617         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
618         compiler warnings.
620 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
622         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
623         `genparttoollist.sh'.
624         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
625         Add `*.sh' to the list find searches for and change `mdate.sh'
626         to `mdate-sh'.
628 2009-06-10  Pavel Roskin  <proski@gnu.org>
630         * include/grub/multiboot2.h: Provide compatibility defines for
631         multiboot2.h.
632         * include/multiboot2.h: Include stdint.h only if needed, using
633         angle brackets.
634         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
635         grub/multiboot2.h.
636         * loader/ieee1275/multiboot2.c: Likewise.
637         * loader/multiboot2.c: Likewise.
638         * loader/multiboot_loader.c: Likewise.
640         * configure.ac: Use -nostdlib when probing for the target.  It
641         should not be required to have libc for the target.
643         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
644         they fail without libc headers for the target.
645         * include/grub/powerpc/libgcc.h: Use weak attribute for all
646         exports.
647         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
648         preprocessor conditionals.
650         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
651         build system doesn't need to be aware of the tar.c internals.
653 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
655         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
657 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
659         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
660         disk limit to 26 for IDE, Virtio, Xen and SCSI.
662 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
664         * util/i386/pc/grub-install.in: Change the error message if UUIDs
665         aren't available if ata.mod gets used.
667 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
669         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
670         initialising controller.
671         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
673 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
675         * util/i386/pc/grub-install.in: Add a parameter --disk-module
676         to choose between ata and biosdisk module on i386-pc.
678 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
680         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
681         Subclass and Programming Interface fields in terms of the 3 byte
682         Class Code register.
683         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
685         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
686         interface is OHCI.  Add grub_dprintf for symmetry with
687         bus/usb/uhci.c.
688         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
689         interface is UHCI.  Add interf variable for programming
690         interface.  Print interface with class/subclass.
692         * bus/usb/ohci.c: Set interf with correct field.
694         * bus/usb/uhci.c: Remove unneeded doubled lines.
695         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
696         Remove whitespace inside comment.
698 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
700         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
701         as fallback an equivalent option without depth.
703 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
705         Not fail if unable to retrieve C/H/S on LBA disks
707         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
708         if unable to retrieve C/H/S on LBA disks
710 2009-06-08  Pavel Roskin  <proski@gnu.org>
712         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
713         about aliasing.
715 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
717         * Makefile.in (uninstall): Remove all $lib_DATA files.
719 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
721         Bugfix: install on partitionless device
723         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
724         is a whole disk
726 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
728         * Makefile.in (uninstall): Remove all $include_DATA files.
730 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
732         * commands/true.c: New file.  Implement the true and false commands.
733         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
734         (true_mod_SOURCES): New variable.
735         (true_mod_CFLAGS): Likewise.
736         (true_mod_LDFLAGS): Likewise.
738 2009-06-05  Colin D Bennett  <colin@gibibit.com>
740         Optimized font character lookup using binary search instead of linear
741         search.  Fonts now are required to have the character index ordered by
742         code point.
744         * font/font.c (load_font_index): Verify that fonts have ordered
745         character indices.
746         (find_glyph): Use binary search instead of linear search to find a
747         character in a font.
749 2009-06-05  Michael Scherer  <misc@mandriva.org>
751         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
752         uses case sensitive btree.
753         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
754         only for case insensitive filesystems.
756 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
758         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
759         * conf/common.rmk (search_mod_CFLAGS): likewise
761 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
763         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
764         compensate a compiler bug
766 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
768         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
769         instead of '\b'
771 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
773         Definitions for creating asm symbols with Apple's CC
775         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
776         [APPLE_CC] (VARIABLE): likewise
778 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
780         Disable lnxboot.img when compiled
781         with Apple's CC
783         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
784         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
785         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
786         [! APPLE_CC] (CODE_LENG): skip
787         [! APPLE_CC] (setup_sects): likewise
788         [! APPLE_CC]: skip filling
790 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
792         Address in trampolines based on 32-bit registers when compiled
793         with Apple's CC
795         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
796         for addresses
797         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
799 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
801         Avoid aliases when compiling with Apple's CC for PCBIOS machine
803         * kern/misc.c [APPLE_CC] (memcpy): new function
804         [APPLE_CC] (memmove): likewise
805         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
806         (memcpy): define alias conditionally on !APPLE_CC
807         (memset): likewise
808         (abort): likewise
809         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
810         APPLE_CC are defined
811         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
812         (grub_assert_fail): make prototype conditional
814 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
816         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
818         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
819         grub-macho2img
820         (CLEANFILES): add grub-macho2img
821         (grub_macho2img_SOURCES): new variable
822         * kern/i386/pc/startup.S (bss_start): new variable
823         (bss_end): likewise
824         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
825         * util/grub-macho2img.c: new file
827 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
829         Use objconv when compiling with Apple's CC
831         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
832         (efiemu64.o): likewise
833         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
834         when compiling with Apple's CC
835         (efiemu64_s.o): likewise
836         * configure.ac: check for objconv when compiling with Apple's CC
837         * genmk.rb: use objconv for modules when compiled with Apple's CC
839 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
841         Define segment as well as section when compiling with
842         Apple's CC
844         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
845         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
846         (efiemu_convert_pointer): likewise
847         (efiemu_set_virtual_address_map): likewise
848         (efiemu_convert_pointer): likewise
849         (efiemu_getcrc32): likewise
850         (init_crc32_table): likewise
851         (reflect): likewise
852         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
853         (GRUB_MOD_DEP): likewise
855 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
857         Allow a compilation without -mcmodel=large
859         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
860         when compiled without -mcmodel=large
861         (filter_memory_map): remove memory post 4 GiB when compiled
862         without -mcmodel=large
863         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
864         TARGET_CFLAGS when -mcmodel=large isn't supported
866 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
868         Remove nested functions in efiemu core
870         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
872 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
874         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
876         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
877         temporary storage
878         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
879         using Apple's CC
880         (grub_cpu_is_tsc_supported): likewise
881         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
883 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
885         Absolute addressing through constant with Apple's cc
887         * kern/i386/pc/startup.S: Define necessary constants
888         and address through it when using ABS with Apple's CC
889         * boot/i386/pc/diskboot.S: likewise
890         * boot/i386/pc/boot.S: likewise
891         * boot/i386/pc/lnxboot.S: likewise
892         * boot/i386/pc/cdboot.S: likewise
893         * mmap/i386/pc/mmap_helper.S: likewise
894         * commands/i386/pc/drivemap_int13h.S: likewise
896 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
898         Check if compiler is apple cc
900         * Makefile.in (ASFLAGS): new variable
901         (TARGET_ASFLAGS): likewise
902         (TARGET_MODULE_FORMAT): likewise
903         (TARGET_APPLE_CC): likewise
904         (OBJCONV): likewise
905         (TARGET_IMG_CFLAGS): likewise
906         (TARGET_CPPFLAGS): add includedir
907         * configure.ac: call grub_apple_cc and grub_apple_target_cc
908         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
909         Check for linker script only if compiler isn't Apple's CC
910         (TARGET_MODULE_FORMAT): set
911         (TARGET_APPLE_CC): likewise
912         (TARGET_ASFLAGS): likewise
913         (ASFLAGS): likewise
914         Check for objcopy only if compiler isn't Apple's CC
915         Check for BSS symbol only if compiler isn't Apple's CC
916         * genmk.rb: adapt nm options if we use Apple's utils
917         * aclocal.m4 (grub_apple_cc): new test
918         (grub_apple_target_cc): likewise
920 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
922         Simplify sed expressions and improve awk
924         * Makefile.in (install-local): simplify sed expression
925         * gencmdlist.sh: likewise
926         * genmoddep.awk: avoid adding module as a dependency of itself
928 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
930         Add missing start symbols
932         * boot/i386/pc/boot.S: add start
933         * boot/i386/pc/pxeboot.S: likewise
935 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
937         Fix wrong assumptions with grub-mkimage on EFI
939         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
940         (relocate_addresses): consider both r_addend and value at offset
941         (make_mods_section): zerofill modinfo and header
942         (convert_elf): write prefix here
944 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
946         Use .asciz instead of .string
948         * i386/pc/diskboot.S: use .asciz instead of .string
949         * i386/pc/boot.S: likewise
950         * include/grub/dl.h (GRUB_MOD_DEP): likewise
951         (GRUB_MOD_NAME): likewise
953 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
955         gfxpayload support
957         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
958         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
959         (grub_video_setup): remove
960         (grub_video_set_mode): new prototype
961         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
962         (vid_mode): remove
963         (linux_vesafb_res): compile only on PCBIOS
964         (grub_linux_boot): support gfxpayload
965         * loader/i386/pc/xnu.c (video_hook): new function
966         (grub_xnu_set_video): support gfxpayload
967         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
968         (DEFAULT_VIDEO_HEIGHT): likewise
969         (DEFAULT_VIDEO_FLAGS): likewise
970         (DEFAULT_VIDEO_MODE): new definition
971         (video_hook): new function
972         (grub_gfxterm_init): use grub_video_set_mode
973         * util/grub.d/30_os-prober.in: remove explicit modesetting before
974         loading xnu
975         * video/video.c (grub_video_setup): removed
976         (grub_video_set_mode): new function based on grub_gfxterm_init and
977         grub_video_setup
979 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
981         Avoid calling biosdisk in drivemap
983         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
984         (revparse_biosdisk): likewise
985         (list_mappings): derive name from id directly
986         (grub_cmd_drivemap): use tryparse_diskstring
988 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
990         Script fixes
992         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
993         (grub_lexer_param): add tokenonhold
994         (grub_script_create_cmdline): remove cmdline. All callers updated
995         (grub_script_function_create): make functionname
996         grub_script_arg. All callers updated
997         (grub_script_execute_argument_to_string): new prototype
998         * kern/parser.c (state_transitions): reorder
999         (grub_parser_cmdline_state): fix a bug and make more compact
1000         * script/sh/execute.c (grub_script_execute_argument_to_string):
1001         make global
1002         (grub_script_execute_cmdline): use new format
1003         * script/sh/function.c (grub_script_function_create): make functionname
1004         grub_script_arg. All callers updated
1005         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1006         (grub_script_yylex): remove
1007         (grub_script_yylex2): renamed to ...
1008         (grub_script_yylex): ...renamed
1009         parse the expressions like a${b}c
1010         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1011         (GRUB_PARSER_TOKEN_VAR): remove
1012         (GRUB_PARSER_TOKEN_NAME): likewise
1013         ("if"): declare as typeless
1014         ("while"): likewise
1015         ("function"): likewise
1016         ("else"): likewise
1017         ("then"): likewise
1018         ("fi"): likewise
1019         (text): remove
1020         (argument): likewise
1021         (script): accept empty scripts and make exit on error
1022         (arguments): use GRUB_PARSER_TOKEN_ARG
1023         (function): likewise
1024         (command): move error handling to script
1025         (menuentry): move grub_script_lexer_ref before
1026         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1027         argument. All callers updated
1029 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1031         Prevent GRUB from probing floppies during boot.
1033         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1034         * commands/search.c (options): Add --no-floppy.
1035         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1036         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1037         --no-floppy when searching for UUIDs.
1039 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1041         Simplify the code duplication in commands/search.c.
1043         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1044         (search_fs): ... this.  Update all users.
1046 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1048         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1050 2009-05-28  Pavel Roskin  <proski@gnu.org>
1052         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1053         Remove the original symlink explicitly.
1055         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1056         just one slash.  That's how grub_fshelp_find_file() does it.
1058 2009-05-26  Pavel Roskin  <proski@gnu.org>
1060         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1061         to `str'.
1063         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1064         possibly unused.
1066 2009-05-25  Christian Franke  <franke@computer.org>
1068         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1069         register.
1070         (grub_atapi_identify): Add wait after drive select.
1071         (grub_ata_identify): Do more strict status register check before
1072         calling grub_atapi_identify ().  Suppress error message if status
1073         register is 0x00 after command failure.  Add status register
1074         check after PIO read to avoid bogus identify due to stuck DRQ.
1075         Thanks to Pavel Roskin for testing.
1076         (grub_device_initialize): Remove unsafe status register check.
1077         Thanks to 'phcoder' for problem report and patch.
1078         Prevent sign extension in debug message.
1080 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1082         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1083         definition file, and functions defined in `normal/menu.c' have had
1084         their prototypes moved to `include/grub/menu.h' for consistency.
1086         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1087         from normal.h.
1088         (grub_menu_get_entry): Likewise.
1089         (grub_menu_get_timeout): Likewise.
1090         (grub_menu_set_timeout): Likewise.
1091         (grub_menu_execute_entry): Likewise.
1092         (grub_menu_execute_with_fallback): Likewise.
1093         (grub_menu_entry_run): Likewise.
1095         * include/grub/normal.h: Re-ordered and grouped function
1096         prototypes by file that the function is defined in.
1097         (grub_menu_execute_callback): Removed; moved to menu.h.
1098         (grub_menu_get_entry): Likewise.
1099         (grub_menu_get_timeout): Likewise.
1100         (grub_menu_set_timeout): Likewise.
1101         (grub_menu_execute_entry): Likewise.
1102         (grub_menu_execute_with_fallback): Likewise.
1103         (grub_menu_entry_run): Likewise.
1104         (grub_menu_addentry): Renamed from this ...
1105         (grub_normal_add_menu_entry): ... to this.
1107         * normal/main.c (grub_menu_addentry): Renamed from this ...
1108         (grub_normal_add_menu_entry): ... to this.
1110         * script/sh/execute.c (grub_script_execute_menuentry): Update
1111         reference to renamed grub_menu_addentry function.
1113 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1115         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1117 2009-05-22  Pavel Roskin  <proski@gnu.org>
1119         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1120         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1121         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1122         compiling for the i386 targets, but not for the utilities.
1124         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1125         to grub_uint8_t.
1126         (grub_root_drive): Likewise.
1127         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1128         remove alignment.
1129         (grub_root_drive): Change size to byte.
1130         (grub_start_addr): Remove.
1131         (grub_end_addr): Likewise.
1132         (grub_apm_bios_info): Likewise.
1134 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1136         * normal/i386: Remove.
1137         * normal/powerpc: Likewise.
1138         * normal/sparc64: Likewise.
1139         * normal/x86_64: Likewise.
1141 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1143         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1144         * loader/i386/linux_trampoline.S: Fix indentation
1145         * loader/i386/xnu_helper.S: Likewise
1147 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1149         Display error messages when parsing a Lua statement fails.
1150         Previously, executing a syntactically invalid statement like
1151         ")foo" or "bar;" would silently fail.
1153         * script/lua/grub_main.c (handle_lua_error): New function.
1154         (grub_lua_parse_line): Improved reporting of Lua parser and
1155         execution errors.
1157 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1159         Remove -Werror which causes build to fail on some systems
1161         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1162         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1163         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1165 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1167         trampoline for linux on 64-bit platform
1169         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1170         loader/i386/efi/linux_trampoline.S
1171         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1172         declaration
1173         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1174         here
1175         * loader/i386/linux_trampoline.S: moved here
1176         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1177         trampoline
1178         (jumpvector): removed
1179         (grub_linux_trampoline_start): new declaration
1180         (grub_linux_trampoline_end): likewise
1181         (grub_linux_boot): use trampoline when on 64-bit platform
1182         * loader/i386/linux.c: likewise
1184 2009-05-16  Pavel Roskin  <proski@gnu.org>
1186         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1187         const to avoid a warning.
1188         (grub_lua_setenv): Likewise.
1189         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1190         lmsg to fix a warning.
1192 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1194         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1195         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1196         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1197         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1198         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1199         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1200         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1201         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1203 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1205         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1207 2009-05-16  Bean  <bean123ch@gmail.com>
1209         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1210         (lua_mod_SOURCES): New variable.
1211         (lua_mod_CFLAGS): Likewise.
1212         (lua_mod_LDFLAGS): Likewise.
1214         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1215         (setjmp_mod_SOURCES): New variable.
1216         (setjmp_mod_CFLAGS): Likewise.
1217         (setjmp_LDFLAGS): Likewise.
1219         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1220         (setjmp_mod_SOURCES): New variable.
1221         (setjmp_mod_CFLAGS): Likewise.
1222         (setjmp_LDFLAGS): Likewise.
1224         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1225         (setjmp_mod_SOURCES): New variable.
1226         (setjmp_mod_CFLAGS): Likewise.
1227         (setjmp_LDFLAGS): Likewise.
1229         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1230         (setjmp_mod_SOURCES): New variable.
1231         (setjmp_mod_CFLAGS): Likewise.
1232         (setjmp_LDFLAGS): Likewise.
1234         * normal/i386/setjmp.S: Moved from here ...
1235         * lib/i386/setjmp.S: ... Moved here
1236         * normal/x86_64/setjmp.S: Moved from here ...
1237         * lib/x86_64/setjmp.S: ... Moved here
1238         * normal/powerpc/setjmp.S: Moved from here ...
1239         * lib/powerpc/setjmp.S: ... Moved here
1240         * normal/sparc64/setjmp.S: Moved from here ...
1241         * lib/sparc64/setjmp.S: ... Moved here
1243         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1244         returns_twice in mingw.
1246         * script/lua/grub_lib.c: New file.
1247         * script/lua/grub_lib.h: Likewise.
1248         * script/lua/grub_lua.h: Likewise.
1249         * script/lua/grub_main.c: Likewise.
1250         * script/lua/lapi.c: Likewise.
1251         * script/lua/lapi.h: Likewise.
1252         * script/lua/lauxlib.c: Likewise.
1253         * script/lua/lauxlib.h: Likewise.
1254         * script/lua/lbaselib.c: Likewise.
1255         * script/lua/lcode.c: Likewise.
1256         * script/lua/lcode.h: Likewise.
1257         * script/lua/ldblib.c: Likewise.
1258         * script/lua/ldebug.c: Likewise.
1259         * script/lua/ldebug.h: Likewise.
1260         * script/lua/ldo.c: Likewise.
1261         * script/lua/ldo.h: Likewise.
1262         * script/lua/ldump.c: Likewise.
1263         * script/lua/lfunc.c: Likewise.
1264         * script/lua/lfunc.h: Likewise.
1265         * script/lua/lgc.c: Likewise.
1266         * script/lua/lgc.h: Likewise.
1267         * script/lua/linit.c: Likewise.
1268         * script/lua/liolib.c: Likewise.
1269         * script/lua/llex.c: Likewise.
1270         * script/lua/llex.h: Likewise.
1271         * script/lua/llimits.h: Likewise.
1272         * script/lua/lmathlib.c: Likewise.
1273         * script/lua/lmem.c: Likewise.
1274         * script/lua/lmem.h: Likewise.
1275         * script/lua/loadlib.c: Likewise.
1276         * script/lua/lobject.c: Likewise.
1277         * script/lua/lobject.h: Likewise.
1278         * script/lua/lopcodes.c: Likewise.
1279         * script/lua/lopcodes.h: Likewise.
1280         * script/lua/loslib.c: Likewise.
1281         * script/lua/lparser.c: Likewise.
1282         * script/lua/lparser.h: Likewise.
1283         * script/lua/lstate.c: Likewise.
1284         * script/lua/lstate.h: Likewise.
1285         * script/lua/lstring.c: Likewise.
1286         * script/lua/lstring.h: Likewise.
1287         * script/lua/lstrlib.c: Likewise.
1288         * script/lua/ltable.c: Likewise.
1289         * script/lua/ltable.h: Likewise.
1290         * script/lua/ltablib.c: Likewise.
1291         * script/lua/ltm.c: Likewise.
1292         * script/lua/ltm.h: Likewise.
1293         * script/lua/lua.h: Likewise.
1294         * script/lua/luaconf.h: Likewise.
1295         * script/lua/lualib.h: Likewise.
1296         * script/lua/lundump.c: Likewise.
1297         * script/lua/lundump.h: Likewise.
1298         * script/lua/lvm.c: Likewise.
1299         * script/lua/lvm.h: Likewise.
1300         * script/lua/lzio.c: Likewise.
1301         * script/lua/lzio.h: Likewise.
1303 2009-05-16  Bean  <bean123ch@gmail.com>
1305         * include/grub/kernel.h (grub_module_header_types): Add type
1306         OBJ_TYPE_CONFIG.
1308         * kern/main.c (grub_load_config): New function.
1309         (grub_main): Call grub_load_config to read boot config.
1311         * grub-mkimage (generate_image): New parameter config_path.
1312         (options): New option --config.
1313         (main): Parse --config option, and pass it to generate_image.
1315 2009-05-14  Christian Franke  <franke@computer.org>
1317         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1318         This fixes build on Cygwin.
1320 2009-05-14  Pavel Roskin  <proski@gnu.org>
1322         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1323         jump.  This saves two bytes, so the typical case of 2 swapped
1324         drives would fit 32 bytes.
1326 2009-05-13  Pavel Roskin  <proski@gnu.org>
1328         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1329         grub_uint32_t to avoid a warning.
1331         * loader/i386/linux.c (allocate_pages): When assigning
1332         real_mode_mem, cast through grub_size_t to fix a warning.  The
1333         code already makes sure that the value would fit a pointer.
1334         (grub_linux_setup_video): Cast render_target->data to
1335         grub_size_t to fix a warning.
1337 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1339         * commands/i386/pc/drivemap.c: New file - implement drivemap
1340         command.
1341         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1342         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1344 2009-05-13  Pavel Roskin  <proski@gnu.org>
1346         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1347         embedding_area_exists.
1349 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1351         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1352         it easier to understand / work with.
1353         Improve warning messages for cases where there's no embedding area,
1354         or when it is too small (or core.img too large).
1356 2009-05-13  Pavel Roskin  <proski@gnu.org>
1358         * loader/i386/pc/multiboot2.c: Add necessary includes for
1359         grub_multiboot2_real_boot().
1361         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1362         PX record is always little-endian.  We only need the lower 2
1363         bytes of the mode.
1365         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1366         facilitate code reuse.
1367         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1368         fixes a warning reported by gcc 4.4.
1370         * kernel/disk.c (grub_disk_read): Use void pointer for the
1371         buffer.
1372         (grub_disk_write): Use const void pointer for the buffer.
1373         Adjust all callers.  Remove unnecessary casts.
1375 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1377         * util/i386/pc/grub-install.in: Update copyright year.
1379 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1381         gptsync
1383         * commands/gptsync.c: new file
1384         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1385         (gptsync_mod_SOURCES): new variable
1386         (gptsync_mod_CFLAGS): likewise
1387         (gptsync_mod_LDFLAGS): likewise
1388         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1389         new definition
1390         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1391         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1392         * conf/i386-ieee1275.rmk: likewise
1393         * conf/i386-pc.rmk: likewise
1394         * conf/powerpc-ieee1275.rmk: likewise
1396 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1398         Fixed grub-emu
1400         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1401         (grub_dl_ref): likewise
1403 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1405         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1406         split in two functions (one for msdos and one for gpt).
1408 2009-05-08  Pavel Roskin  <proski@gnu.org>
1410         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1411         not modified.
1413         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1414         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1415         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1416         nerr variable.
1418 2009-05-08  David S. Miller  <davem@davemloft.net>
1420         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1422 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1424         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1425         existence.
1427 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1429         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1430         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1432 2009-05-05  David S. Miller  <davem@davemloft.net>
1434         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1436 2009-05-05  Pavel Roskin  <proski@gnu.org>
1438         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1439         of grub_dl_ref() and grub_dl_unref().
1440         * commands/parttool.c: Remove preprocessor conditionals around
1441         grub_dl_ref() and grub_dl_unref().
1442         * fs/affs.c: Likewise.
1443         * fs/afs.c: Likewise.
1444         * fs/cpio.c: Likewise.
1445         * fs/ext2.c: Likewise.
1446         * fs/fat.c: Likewise.
1447         * fs/hfs.c: Likewise.
1448         * fs/hfsplus.c: Likewise.
1449         * fs/iso9660.c: Likewise.
1450         * fs/jfs.c: Likewise.
1451         * fs/minix.c: Likewise.
1452         * fs/ntfs.c: Likewise.
1453         * fs/reiserfs.c: Likewise.
1454         * fs/sfs.c: Likewise.
1455         * fs/udf.c: Likewise.
1456         * fs/ufs.c: Likewise.
1457         * fs/xfs.c: Likewise.
1458         * include/grub/dl.h: Likewise.
1459         * loader/xnu.c: Likewise.
1461 2009-05-04  Pavel Roskin  <proski@gnu.org>
1463         * commands/acpi.c: Remove unused variable my_mod.
1464         * partmap/amiga.c: Likewise.
1465         * partmap/apple.c: Likewise.
1466         * partmap/gpt.c: Likewise.
1467         * partmap/pc.c: Likewise.
1468         * partmap/sun.c: Likewise.
1469         * term/gfxterm.c: Likewise.
1470         * term/i386/pc/vesafb.c: Likewise.
1471         * term/i386/pc/vga.c: Likewise.
1473 2009-05-04  David S. Miller  <davem@davemloft.net>
1475         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1476         pointer args to grub_ieee1275_get_property().
1478         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1480         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1481         devices, and do not traverse down under controller nodes.
1483         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1484         (grub_ofdisk_open): Use it to un-escape "," characters.
1485         * kern/disk.c (find_part_sep): New.
1486         (grub_disk_open): Use it to find the first non-escaped ','
1487         character in the disk name.
1488         * util/ieee1275/devicemap.c (escape_of_path): New.
1489         (grub_util_emit_devicemap_entry): Use it.
1490         * util/sparc64/ieee1275/grub-install.in: Update script to
1491         strip partition specifiers properly by not triggering on
1492         '\' escaped ',' characters.
1494 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1496         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1497         to 0x300.
1498         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1499         resolutions.
1500         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1501         on documentation from Wikipedia).
1503 2009-05-04  Pavel Roskin  <proski@gnu.org>
1505         * disk/ata.c: Spelling fixes.
1506         * disk/raid.c: Likewise.
1507         * disk/usbms.c: Likewise.
1508         * disk/dmraid_nvidia.c: Likewise.
1509         * kern/ieee1275/openfw.c: Likewise.
1510         * kern/ieee1275/init.c: Likewise.
1511         * kern/ieee1275/cmain.c: Likewise.
1512         * boot/i386/pc/cdboot.S: Likewise.
1513         * video/readers/png.c: Likewise.
1514         * video/i386/pc/vbe.c: Likewise.
1515         * fs/udf.c: Likewise.
1516         * fs/hfs.c: Likewise.
1517         * fs/reiserfs.c: Likewise.
1518         * efiemu/runtime/efiemu.c: Likewise.
1519         * efiemu/main.c: Likewise.
1520         * efiemu/mm.c: Likewise.
1521         * include/grub/elf.h: Likewise.
1522         * include/grub/xnu.h: Likewise.
1523         * include/grub/usbdesc.h: Likewise.
1524         * include/grub/usb.h: Likewise.
1525         * include/grub/script_sh.h: Likewise.
1526         * include/grub/lib/LzmaEnc.h: Likewise.
1527         * include/grub/efiemu/efiemu.h: Likewise.
1528         * include/grub/command.h: Likewise.
1529         * normal/menu.c: Likewise.
1530         * normal/main.c: Likewise.
1531         * normal/datetime.c: Likewise.
1532         * bus/usb/uhci.c: Likewise.
1533         * mmap/i386/uppermem.c: Likewise.
1534         * mmap/mmap.c: Likewise.
1535         * commands/acpi.c: Likewise.
1536         * commands/test.c: Likewise.
1537         * partmap/apple.c: Likewise.
1538         * font/font.c: Likewise.
1539         * loader/sparc64/ieee1275/linux.c: Likewise.
1540         * loader/macho.c: Likewise.
1541         * loader/i386/bsd_trampoline.S: Likewise.
1542         * loader/i386/bsd.c: Likewise.
1543         * loader/xnu.c: Likewise.
1544         * term/i386/pc/vesafb.c: Likewise.
1545         * term/usb_keyboard.c: Likewise.
1546         * util/resolve.c: Likewise.
1547         * util/getroot.c: Likewise.
1549 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1551         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1553 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1555         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1556         build error.
1558 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1560         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1561         parameter only available on BIOS.
1563 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1565         Removed wrong semicolon in declaration
1567         * grub/misc.h (grub_dprintf): remove semicolon
1569 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1571         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1572         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1573         is done by grub_cmd_linux() now).
1574         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1575         restore video to text mode.
1576         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1577         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1578         `GRUB_LINUX_VID_MODE_NORMAL'.
1580 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1582         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1583         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1584         and `normal/script.c'.  Add `kern/rescue_reader.c',
1585         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1586         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1587         `grub_script.tab.c'.
1589         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1590         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1591         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1592         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1593         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1595         * Makefile.in: Remove duplicated 2008 in Copyright line.
1597 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1599         * util/misc.c (grub_util_warn): New function.  Emits a warning
1600         unconditionally.
1601         * include/grub/util/misc.h (grub_util_warn): New declaration.
1603         * util/i386/pc/grub-install.in: Understand --force and pass it down
1604         to grub-setup.
1606         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1607         down to setup().
1608         (setup): Improve error messages and add warnings when requested to
1609         install in odd layouts.  Refuse to install using blocklists unless
1610         --force was set.
1612 2009-05-04  martin f. krafft  <madduck@madduck.net>
1614         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1616 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1618         Updated copyright year
1620         * fs/hfsplus.c: updated copyright year
1622 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1624         HFS+ UUID
1626         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1627         in the space previously used by unused3
1628         (grub_hfsplus_uuid): new function
1629         (grub_hfsplus_fs): added uuid field
1631 2009-05-03  Pavel Roskin  <proski@gnu.org>
1633         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1634         suppress warnings.  It's no longer needed.
1635         * disk/host.c: Likewise.
1636         * disk/ata_pthru.c: Likewise.
1637         * disk/loopback.c: Likewise.
1638         * hook/datehook.c: Likewise.
1639         * parttool/pcpart.c: Likewise.
1640         * fs/i386/pc/pxe.c: Likewise.
1641         * fs/ntfscomp.c: Likewise.
1642         * efiemu/main.c: Likewise.
1643         * mmap/mmap.c: Likewise.
1644         * commands/crc.c: Likewise.
1645         * commands/hexdump.c: Likewise.
1646         * commands/hdparm.c: Likewise.
1647         * commands/acpi.c: Likewise.
1648         * commands/echo.c: Likewise.
1649         * commands/minicmd.c: Likewise.
1650         * commands/blocklist.c: Likewise.
1651         * commands/memrw.c: Likewise.
1652         * commands/loadenv.c: Likewise.
1653         * commands/usbtest.c: Likewise.
1654         * commands/lsmmap.c: Likewise.
1655         * commands/boot.c: Likewise.
1656         * commands/parttool.c: Likewise.
1657         * commands/configfile.c: Likewise.
1658         * commands/search.c: Likewise.
1659         * commands/ieee1275/suspend.c: Likewise.
1660         * commands/cat.c: Likewise.
1661         * commands/i386/pc/pxecmd.c: Likewise.
1662         * commands/i386/pc/play.c: Likewise.
1663         * commands/i386/pc/halt.c: Likewise.
1664         * commands/i386/pc/vbeinfo.c: Likewise.
1665         * commands/i386/pc/vbetest.c: Likewise.
1666         * commands/lspci.c: Likewise.
1667         * commands/date.c: Likewise.
1668         * commands/handler.c: Likewise.
1669         * commands/ls.c: Likewise.
1670         * commands/test.c: Likewise.
1671         * commands/cmp.c: Likewise.
1672         * commands/efi/loadbios.c: Likewise.
1673         * commands/efi/fixvideo.c: Likewise.
1674         * commands/halt.c: Likewise.
1675         * commands/help.c: Likewise.
1676         * commands/reboot.c: Likewise.
1677         * hello/hello.c: Likewise.
1678         * script/sh/main.c: Likewise.
1679         * loader/xnu.c: Likewise.
1680         * term/terminfo.c: Likewise.
1681         * term/i386/pc/serial.c: Likewise.
1682         * term/usb_keyboard.c: Likewise.
1684 2009-05-03  David S. Miller  <davem@davemloft.net>
1686         * normal/menu.c: Include grub/parser.h
1688 2009-05-03  Pavel Roskin  <proski@gnu.org>
1690         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1691         not char*.
1692         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1693         Suggested by Javier Martín <lordhabbit@gmail.com>
1695         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1696         efiemu??.o doesn't exist.
1697         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1698         copying.
1700 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1702         FreeBSD 64-bit support
1704         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1705         and loader/i386/bsd_trampoline.S
1706         (bsd_mod_ASFLAGS): new variable
1707         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1708         (FREEBSD_MODTYPE_KERNEL64): likewise
1709         (grub_bsd64_trampoline_start): likewise
1710         (grub_bsd64_trampoline_end): likewise
1711         (grub_bsd64_trampoline_selfjump): likewise
1712         (grub_bsd64_trampoline_gdt): likewise
1713         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1714         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1715         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1716         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1717         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1718         of "attrib" member
1719         * loader/i386/bsd_pagetable.c: new file
1720         * loader/i386/bsd_trampoline.S: likewise
1721         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1722         (ALIGN_VAR): likewise
1723         (entry_hi): new variable
1724         (kern_end_mdofs): likewise
1725         (is_64bit): likewise
1726         (grub_freebsd_add_meta): use ALIGN_VAR
1727         (grub_e820_mmap): new declaration
1728         (grub_freebsd_add_mmap): new function
1729         (grub_freebsd_add_meta_module): support 64 bit kernels
1730         (grub_freebsd_list_modules): use ALIGN_VAR
1731         (gdt_descriptor): new declaration
1732         (grub_freebsd_boot): support 64 bit kernels
1733         (grub_bsd_elf64_hook): new function
1734         (grub_bsd_load_elf): support elf64
1736 2009-05-03  Bean  <bean123ch@gmail.com>
1738         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1739         after we get the result of if statement.
1741 2009-05-03  Bean  <bean123ch@gmail.com>
1743         * Makefile.in (enable_efiemu): New variable.
1745         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1746         set.
1747         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1748         path.
1749         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1750         path, add -mno-red-zone option.
1751         (efiemu64_s.o): Likewise.
1752         (efiemu64.o): Use macro $^ for source file.
1754         * configure.ac (--enable-efiemu): New option.
1756 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1758         xnu support
1760         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1761         (pkglib_MODULES): add xnu.mod
1762         (xnu_mod_SOURCES): new variable
1763         (xnu_mod_CFLAGS): likewise
1764         (xnu_mod_LDFLAGS): likewise
1765         (xnu_mod_ASFLAGS): likewise
1766         * conf/i386-pc.rmk: likewise
1767         * conf/x86_64-efi.rmk: likewise
1768         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1769         new declaration
1770         * include/grub/i386/macho.h: new file
1771         * include/grub/i386/xnu.h: likewise
1772         * include/grub/macho.h: likewise
1773         * include/grub/machoload.h: likewise
1774         * include/grub/x86_64/macho.h: likewise
1775         * include/grub/x86_64/xnu.h: likewise
1776         * include/grub/xnu.h: likewise
1777         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1778         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1779         * loader/i386/efi/xnu.c: new file
1780         * loader/i386/pc/xnu.c: likewise
1781         * loader/i386/xnu.c: likewise
1782         * loader/i386/xnu_helper.S: likewise
1783         * loader/macho.c: likewise
1784         * loader/xnu.c: likewise
1785         * loader/xnu_resume.c: likewise
1786         * util/grub-dumpdevtree: likewise
1787         * include/grub/i386/pit.h: include grub/err.h
1788         (grub_pit_wait): export
1789         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1791 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1793         Efiemu
1795         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1796         _linux_efi, linux_efi.
1797         new files in grub-emu
1798         new targets efiemu32.o and efiemu64.o
1799         * loader/linux_normal_efiemu.c: likewise
1800         * loader/i386/efi/linux.c: added preliminary efiemu support
1801         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1802         files to copy
1803         * include/grub/autoefi.h: new file
1804         * include/grub/i386/efiemu.h: likewise
1805         * include/grub/i386/pc/efiemu.h: likewise
1806         * include/grub/efi/api.h: add LL suffix when necessary
1807         new definitions relating to tables
1808         * include/grub/efiemu/efiemu.h: new file
1809         * include/grub/efiemu/runtime.h: likewise
1810         * efiemu/prepare.c: likewise
1811         * efiemu/loadcore_common.c: likewise
1812         * efiemu/loadcore64.c: likewise
1813         * efiemu/runtime/efiemu.sh: likewise
1814         * efiemu/runtime/efiemu.S: likewise
1815         * efiemu/runtime/efiemu.c: likewise
1816         * efiemu/runtime/config.h: likewise
1817         * efiemu/prepare32.c: likewise
1818         * efiemu/main.c: likewise
1819         * efiemu/modules/pnvram.c: likewise
1820         * efiemu/modules/i386: likewise
1821         * efiemu/modules/i386/pc: likewise
1822         * efiemu/modules/acpi.c: likewise
1823         * efiemu/i386/pc/cfgtables.c: likewise
1824         * efiemu/i386/loadcore64.c: likewise
1825         * efiemu/i386/loadcore32.c: likewise
1826         * efiemu/prepare64.c: likewise
1827         * efiemu/loadcore.c: likewise
1828         * efiemu/symbols.c: likewise
1829         * efiemu/mm.c: likewise
1830         * efiemu/loadcore32.c: likewise
1832 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1834         ACPI spoofing
1836         * commands/acpi.c: new file
1837         * commands/i386/pc/acpi.c: likewise
1838         * commands/efi/acpi.c: likewise
1839         * include/grub/acpi.h: likewise
1840         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1841         (acpi_mod_SOURCES): new variable
1842         (acpi_mod_CFLAGS): likewise
1843         (acpi_mod_LDFLAGS): likewise
1844         * conf/i386-efi.rmk: likewise
1845         * conf/x86_64-efi.rmk: likewise
1847 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1849         Missing part from mmap patch
1851         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1852         (grub_mmap_unregister)
1853         (grub_mmap_free_and_unregister): use grub_mmap_register
1855 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1857         Mmap services
1859         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1860         * loader/i386/linux.c (find_mmap_size): likewise
1861         (allocate_pages): likewise
1862         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1863         (grub_fill_multiboot_mmap): likewise
1864         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1865         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1866         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1867         (OPENBSD_MMAP_RESERVED): likewise
1868         * include/grub/i386/pc/memory.h: include grub/memory.h
1869         (grub_lower_mem): removed
1870         (grub_upper_mem): likewise
1871         (GRUB_MACHINE_MEMORY_ACPI): new definition
1872         (GRUB_MACHINE_MEMORY_NVS): likewise
1873         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1874         (GRUB_MACHINE_MEMORY_HOLE): likewise
1875         (grub_machine_mmap_register): likewise
1876         (grub_machine_mmap_unregister): likewise
1877         (grub_machine_get_upper): likewise
1878         (grub_machine_get_lower): likewise
1879         (grub_machine_get_post64): likewise
1880         * include/grub/i386/efi/memory.h: new file
1881         * include/grub/x86_64/efi/memory.h: likewise
1882         * include/grub/efi/memory.h: likewise
1883         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1884         (mmap_mod_SOURCES): new variable
1885         (mmap_mod_LDFLAGS): likewise
1886         (mmap_mod_ASFLAGS): likewise
1887         * conf/i386-coreboot.rmk: likewise
1888         * conf/i386-ieee1275.rmk: likewise
1889         * conf/i386-efi.rmk: likewise
1890         * conf/x86_64-efi.rmk: likewise
1891         * include/grub/types.h (UINT_TO_PTR): new macro
1892         (PTR_TO_UINT32): likewise
1893         (PTR_TO_UINT64): likewise
1894         * include/grub/memory.h: new file
1895         * mmap/i386/pc/mmap.c: likewise
1896         * mmap/i386/pc/mmap_helper.S: likewise
1897         * mmap/i386/uppermem.c: likewise
1898         * mmap/mmap.c: likewise
1899         * mmap/efi/mmap.c: likewise
1900         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1901         grub_upper_mem
1902         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1903         (grub_upper_mem): likewise
1904         (grub_machine_init): don't use grub_upper_mem,
1905         make grub_lower_mem local
1906         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1907         grub_mmap_iterate and grub_mmap_get_upper
1908         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1910 2009-05-02  Bean  <bean123ch@gmail.com>
1912         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1913         script/sh/parser.y.
1914         (pkglib_MODULES): Add normal.mod and sh.mod.
1915         (normal_SOURCES): New variable.
1916         (normal_mod_CFLAGS): Likewise.
1917         (normal_mod_LDFLAGS): Likewise.
1918         (sh_mod_SOURCES): Likewise.
1919         (sh_mod_CFLAGS): Likewise.
1920         (sh_mod_LDFLAGS): Likewise.
1922         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1923         script/sh/lexer.c_DEPENDENCIES.
1924         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1925         kern/rescue_reader.c and kern/rescue_parser.c.
1926         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1927         (grub_emu_SOURCES): Change source files.
1928         (pkglib_MODULES): Remove normal.mod.
1929         (normal_SOURCES): Removed.
1930         (normal_mod_CFLAGS): Likewise.
1931         (normal_mod_LDFLAGS): Likewise.
1932         * conf/i386-coreboot.rmk: Likewise.
1933         * conf/i386-efi.rmk: Likewise.
1934         * conf/i386-ieee1276.rmk: Likewise.
1935         * conf/powerpc-ieee1275.rmk: Likewise.
1936         * conf/sparc64-ieee1275.rmk: Likewise.
1937         * conf/x86_64-efi.rmk: Likewise.
1939         * include/grub/command.h (grub_command_execute): New inline function.
1941         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1943         * include/grub/normal.h: Remove <grub/setjmp.h>.
1944         (grub_fs_module_list): Moved to normal/autofs.c.
1945         (grub_exit_env): Removed.
1946         (grub_command_execute): Likewise.
1947         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1948         parameter script.
1949         (read_command_list): New function declaration.
1950         (read_fs_list): Likewise.
1952         * include/parser.h: Include <grub/reader.h>.
1953         (grub_parser_split_cmdline): Change type of getline parameter.
1954         (grub_parser): New structure.
1955         (grub_parser_class): New variable.
1956         (grub_parser_execute): New function declaration.
1957         (grub_register_rescue_parser): Likewise.
1958         (grub_parser_register): New inline function.
1959         (grub_parser_unregister): Likewise.
1960         (grub_parser_get_current): Likewise.
1961         (grub_parser_set_current): Likewise.
1963         * include/grub/reader.h: New file.
1964         * kern/reader.c: Likewise.
1965         * kern/rescue_parser.c: Likewise.
1966         * kern/rescue_reader.c: Likewise.
1967         * normal/autofs.c: Likewise.
1968         * normal/dyncmd.c: Likewise.
1970         * include/grub/rescue.h: Removed.
1971         * normal/command.h: Likewise.
1973         * include/grub/script.h: Moved to ...
1974         * include/grub/script_sh.h: ... Moved here.
1975         * normal/execute.c: Moved to ...
1976         * script/sh/execute.c: ... Moved here.
1977         * normal/function.c: Moved to ...
1978         * script/sh/function.c: ... Moved here.
1979         * normal/lexer.c: Moved to ...
1980         * script/sh/lexer.c: ... Moved here.
1981         * normal/parser.y: Moved to ...
1982         * script/sh/parser.y: ... Moved here.
1983         * normal/script.c: Moved to ...
1984         * script/sh/script.c: ... Moved here.
1986         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1987         <grub/reader.h>.
1988         (grub_exit_env): Removed.
1989         (fs_module_list): Moved to normal/autofs.c.
1990         (grub_file_getline): Don't handle comment here.
1991         (free_menu): Skip removed field entry->commands.
1992         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1993         script parameter.
1994         (read_config_file): Removed nested parameter, change getline function.
1995         (grub_enter_normal_mode): Removed.
1996         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1997         (read_command_list): Likewise.
1998         (autoload_fs_module): Moved to normal/autofs.c.
1999         (read_fs_list): Likewise.
2000         (reader_nested): New variable.
2001         (grub_normal_execute): Run parser.sh to switch to sh parser.
2002         (grub_cmd_rescue): Removed.
2003         (cmd_normal): Removed.
2004         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2005         rescue command.
2006         (grub_cmdline_run): New function.
2007         (grub_normal_reader_init): Likewise.
2008         (grub_normal_read_line): Likewise.
2009         (grub_env_write_pager): Likewise.
2010         (cmdline): New variable.
2011         (grub_normal_reader): Likewise.
2012         (GRUB_MOD_INIT): Register normal reader and set as current, register
2013         pager hook, register normal command with grub_register_command_prio,
2014         so that it won't show up in command.lst.
2015         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2016         grub_fs_autoload_hook.
2018         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2019         (grub_menu_execute_entry): Replace grub_script_execute with
2020         grub_parser_execute, change parameter to grub_command_execute.
2022         * normal/menu_text.c: Remove <grub/script.h>.
2024         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2025         and <grub/parser.h>.
2026         (run): Change editor_getline to use new parser interface. Change
2027         parameter to grub_command_execute.
2029         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2030         <grub/reader.h> and <grub/parser.h>.
2031         (grub_load_normal_mode): Execute normal command.
2032         (grub_main): Call grub_register_core_commands,
2033         grub_register_rescue_parser and grub_register_rescue_reader, use
2034         grub_reader_loop to enter input loop.
2036         * kern/parser.c (grub_parser_split_cmdline): Change type of
2037         getline parameter.
2038         (grub_parser_class): New variable.
2039         (grub_parser_execute): New function.
2041         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2042         * loader/multiboot2.c: Likewise.
2043         * loader/sparc64/ieee1275/linux.c: Likewise.
2045         * util/grub-emu.c (read_command_list): New dummy function.
2047 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2049         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2050         count to 16 for CCISS and IDA.
2052 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2054         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2055         after waiting for user input.
2057         * loader/i386/linux.c: Include `<grub/normal.h>'.
2058         (grub_cmd_linux): Improve the error message about `ask' mode, by
2059         waiting for user input so it's not missed (we can do this, since
2060         user requested interaction).
2062 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2064         Added missing lst to grub-mkrescue
2066         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2067         and ${input_dir}/parttool.lst
2069 2009-04-30  David S. Miller  <davem@davemloft.net>
2071         * util/hostdisk.c (device_is_wholedisk): New function.
2072         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2073         zero only if device_is_wholedisk() returns true.
2075         * util/hostdisk.c (convert_system_partition_to_system_disk):
2076         Handle virtual disk devices named /dev/vdiskX as found on sparc
2077         and powerpc.
2079         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2080         lettered partition specifier is found, convert to numbered.
2082 2009-04-29  David S. Miller  <davem@davemloft.net>
2084         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2085         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2087         * normal/command.c: Add missing newline at end of file.
2089         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2090         warnings.
2091         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2092         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2093         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2094         ihandles have a 32-bit type but need to be stored in a "void *".
2096 2009-04-28  Pavel Roskin  <proski@gnu.org>
2098         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2099         not disk.  Adjust all dependencies.
2100         (grub_fs_uuid_close): Use grub_device_close(), not
2101         grub_disk_close().
2103         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2104         parent's partition, don't copy it by reference, as it gets freed
2105         on close.
2107 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2109         Preboot hooks support
2111         * commands/boot.c (struct grub_preboot_t): new declaration
2112         (preboots_head): new variable
2113         (preboots_tail): likewise
2114         (grub_loader_register_preboot_hook): new function
2115         (grub_loader_unregister_preboot_hook): likewise
2116         (grub_loader_set): launch preboot hooks
2117         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2118         (grub_loader_register_preboot_hook): new declaration
2119         (grub_loader_unregister_preboot_hook): likewise
2121 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2123         Warning fix
2125         * disk/scsi.c (grub_scsi_open): added missing cast when
2126         calling grub_dprintf
2128 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2130         Bug and warning fixes
2132         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2133         declaration
2134         * commands/test.c (test_parse): fixed bug with file tests and corrected
2135         declaration of find_file
2137 2009-04-26  Pavel Roskin  <proski@gnu.org>
2139         * Makefile.in: Don't install empty manual pages if help2man is
2140         missing.  Use help2man option for output, not shell redirection.
2142 2009-04-26  David S. Miller  <davem@davemloft.net>
2144         * util/grub-mkdevicemap.c (make_device_map): Add missing
2145         NESTED_FUNC_ATTR to process_device().
2147 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2149         Test command
2151         * commands/test.c: rewritten to use bash-like test
2153 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2155         Parttool autoloading and improvements
2157         * Makefile.in (pkglib_DATA): add parttool.lst
2158         (parttool.lst): new target
2159         * genmk.rb: generate parttool-*
2160         (CLEANFILES): add #{parttool}
2161         (PARTTOOLFILES): new variable
2162         * genparttoollist.sh: new file
2163         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2164         (grub_pcpart_type): likewise
2165         * commands/parttool.c (helpmsg): new variable
2166         (grub_cmd_parttool): output help if not enough arguments are supplied
2167         autoload modules
2168         (GRUB_MOD_INIT(parttool)): use helpmsg
2170 2009-04-24  David S. Miller  <davem@davemloft.net>
2172         Avoiding opening same device multiple times in device iterator.
2174         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2175         and use it to build a list of partitions in iterate_disk() and
2176         iterate_partition().
2178         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2179         on disk->data.
2181         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2182         grub_devalias_iterate() result instead of unconditional 0.
2183         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2184         Also, capture hook return value, either directly or via
2185         grub_children_iterate(), and propagate to caller.
2186         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2187         grub_children_iterate): Return value is now 'int' instead of
2188         'grub_err_t'.
2189         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2190         like a proper iterator, stopping when hooks return non-zero.
2191         (grub_devalias_iterate): Likewise.
2193 2009-04-23  David S. Miller  <davem@davemloft.net>
2195         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2197 2009-04-22  David S. Miller  <davem@davemloft.net>
2199         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2200         is larger than address_cells, use that value for address_cells too.
2202         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2203         IEEE1275_MAX_PATH_LEN): Define.
2204         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2205         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2206         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2207         'devtype'.  Explicitly NULL terminate devalias expansion.
2209         * util/sparc64/ieee1275/misc.c: New file.
2210         * util/sparc64/ieee1275/grub-setup.c: New file.
2211         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2212         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2213         * util/sparc64/ieee1275/grub-install.in: New file.
2214         * util/ieee1275/ofpath.c: New file.
2215         * util/ieee1275/devicemap.c: New file.
2216         * util/devicemap.c: New file.
2217         * util/deviceiter.c: New file.
2218         * kern/sparc64/ieee1275/init.c: New file.
2219         * include/grub/util/ofpath.h: New file.
2220         * include/grub/util/deviceiter.h: New file.
2221         * util/grub-mkdevicemap.c: Include deviceiter.h.
2222         Implement using grub_util_emit_devicemap_entry and
2223         grub_util_iterate_devices.
2224         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2225         util/devicemap.c into grub-mkdevicemap
2226         * conf/i386-efi.rmk: Likewise.
2227         * conf/i386-ieee1275.rmk: Likewise.
2228         * conf/i386-pc.rmk: Likewise.
2229         * conf/powerpc-ieee1275.rmk: Likewise.
2230         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
2231         images and installation utilities.  Build kernel as image
2232         instead of as elf binary.  Use common rules as much as possible.
2234 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2236         Correct GPT definition
2238         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2239         of "attrib" member
2241 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2243         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2245 2009-04-19  David S. Miller  <davem@davemloft.net>
2247         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2248         (grub_rescue_cmd_linux): Rename to...
2249         (grub_cmd_linux): and fix prototype.
2250         (grub_rescue_cmd_initrd): Rename to...
2251         (grub_cmd_initrd): and fix prototype.
2252         (cmd_linux, cmd_initrd): New.
2253         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2254         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2256 2009-04-17  Pavel Roskin  <proski@gnu.org>
2258         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2259         format.
2260         (grub_ohci_transfer): Likewise.
2262         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2264         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2265         return without a value.  Fix inconsistent indentation.
2267         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2268         match struct grub_fs.
2270         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2271         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2272         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2273         * commands/lspci.c (grub_lspci_iter): Likewise.
2275 2009-04-16  Bean  <bean123ch@gmail.com>
2277         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2278         value.
2280 2009-04-15  Pavel Roskin  <proski@gnu.org>
2282         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2283         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2284         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2285         definitions.
2287 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2289         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2290         that no multiple data or metadata areas are supported and `Unknown
2291         metadata header'.
2293 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2295         Move loader out of the kernel
2297         * kern/loader.c: moved to ...
2298         * commands/boot.c: ... moved here
2299         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2300         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2301         * include/grub/kernel.h (grub_machine_fini): export
2302         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2303         (grub_loader_set): likewise
2304         (grub_loader_unset): likewise
2305         (grub_loader_boot): likewise
2306         * conf/common.rmk: new module boot.mod
2307         (pkglib_MODULES): add boot.mod
2308         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2309         (grub_emu_SOURCES): likewise
2310         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2311         (grub_emu_SOURCES): likewise
2312         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2313         (grub_emu_SOURCES): likewise
2314         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2315         (grub_emu_SOURCES): likewise
2316         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2317         (grub_emu_SOURCES): likewise
2318         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2319         (grub_emu_SOURCES): likewise
2320         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2321         (grub_emu_SOURCES): likewise
2323 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2325         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2327         * kern/misc.c (grub_itoa): Removed function
2328         (grub_ltoa): likewise
2329         (grub_vsprintf): use grub_lltoa
2331 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2333         Restore grub-emu
2335         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2336         * conf/i386-coreboot.rmk: likewise
2337         * conf/i386-ieee1275.rmk: likewise
2338         * conf/powerpc-ieee1275.rmk: likewise
2340 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2342         * INSTALL: Add that `./autogen.sh' needs to be run before
2343         `./configure.'.
2345 2009-04-14  Bean  <bean123ch@gmail.com>
2347         * Makefile.in (pkglib_DATA): Add handler.lst.
2348         (handler.lst): New rule.
2350         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2351         * conf/i386-coreboot.rmk: Likewise.
2352         * conf/i386-ieee1275.rmk: Likewise.
2353         * conf/i386-efi.rmk: Likewise.
2354         * conf/x86_64-efi.rmk: Likewise.
2355         * conf/powerpc-ieee1275.rmk: Likewise.
2356         * conf/sparc64-ieee1275.rmk: Likewise.
2358         * genhandlerlist.sh: New file.
2360         * genmk.rb: Add rules to generate handler.lst.
2362         * include/grub/normal.h (grub_file_getline): New function definition.
2363         (read_handler_list): Likewise.
2364         (free_handler_list): Likewise.
2366         * include/grub/term.h (grub_term_register_input): Add name parameter
2367         for auto generation of handler.lst.
2368         (grub_term_register_output): Likewise.
2370         * normal/handler.c: New file.
2372         * normal/main.c (get_line): Renamed to grub_file_getline.
2373         (read_config_file): Use the newly renamed grub_file_getline.
2374         (read_command_list): Likewise.
2375         (read_fs_list): Likewise.
2376         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2377         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2379         * term/efi/console.c (grub_console_init): Add name parameter for auto
2380         generation of handler.lst.
2381         * term/gfxterm.c: Likewise.
2382         * term/i386/pc/at_keyboard.c: Likewise.
2383         * term/i386/pc/console.c: Likewise.
2384         * term/i386/pc/serial.c: Likewise.
2385         * term/i386/pc/vesafb.c: Likewise.
2386         * term/i386/pc/vga.c: Likewise.
2387         * term/i386/pc/vga_text.c: Likewise.
2388         * term/ieee1275/ofconsole.c: Likewise.
2389         * term/usb_keyboard.c: Likewise.
2391 2009-04-14  Bean  <bean123ch@gmail.com>
2393         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2394         properly with null character.
2396 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2398         * configure: Remove.
2399         * config.h.in: Likewise.
2400         * stamp-h.in: Likewise.
2401         * DISTLIST: Likewise.
2402         * conf/common.mk: Likewise.
2403         * conf/i386-coreboot.mk: Likewise.
2404         * conf/i386-efi.mk: Likewise.
2405         * conf/i386-ieee1275.mk: Likewise.
2406         * conf/i386.mk: Likewise.
2407         * conf/i386-pc.mk: Likewise.
2408         * conf/powerpc-ieee1275.mk: Likewise.
2409         * conf/sparc64-ieee1275.mk: Likewise.
2410         * conf/x86_64-efi.mk: Likewise.
2412         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2413         develop on GRUB.
2415 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2416             David S. Miller  <davem@davemloft.net>
2418         * util/hostdisk.c (make_device_name): Fix buffer length
2419         calculations.
2421 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2423         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2424         <sys/param.h> and <sys/sysctl.h>.
2425         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2426         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2427         opening the device and reset them afterwards.
2429 2009-04-13  Pavel Roskin  <proski@gnu.org>
2431         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2432         Reported by John Stanley <jpsinthemix@verizon.net>
2434 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2436         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2437         that name for menuentries when appropriate.
2439 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2441         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2443 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2445         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2446         to Linux, simply abort telling the user it's no longer supported.
2448 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2450         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2451         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2452         `freebsd_loadenv' only when devices.hints exist.
2454 2009-04-13  Pavel Roskin  <proski@gnu.org>
2456         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2458 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2460         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2461         partition number.
2462         (grub_drive): Likewise.
2464 2009-04-13  David S. Miller  <davem@davemloft.net>
2466         * kern/sparc64/ieee1275/ieee1275.c: New file.
2467         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2468         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2469         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2470         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2471         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2472         grub_ieee1275_alloc_physmem): Declare new exported functions.
2474         * include/grub/sparc64/ieee1275/loader.h: New file.
2475         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2476         * include/grub/sparc64/kernel.h: Likewise.
2477         * loader/sparc64/ieee1275/linux.c: Likewise.
2479         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2480         (grub_fstest_SOURCES): Likewise.
2482         * util/hostdisk.c (make_device_name): Do not make any assumptions
2483         about the length of drive names.
2485         * kern/dl.c (grub_dl_load_file): Close file immediately when
2486         we are done using it.
2488 2009-04-12  David S. Miller  <davem@davemloft.net>
2490         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2491         values.  Noticed by Pavel Roskin.
2493         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2494         target compiler.
2496         * genmk.rb: Add more flexible image type specification, also
2497         pass --strip-unneeded to objcopy.
2498         * conf/i386-pc.rmk: Use *_FORMAT.
2499         * conf/i386-pc.mk: Rebuilt.
2501         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2502         (OFDISK_HASH_SZ): Define.
2503         (ofdisk_hash): New hash table.
2504         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2505         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2506         instead of device phandle which is not unique.
2508         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2509         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2510         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2511         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2512         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2513         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2514         GRUB_KERNEL_MACHINE_DATA_END): Define.
2515         (grub_kernel_image_size, grub_total_module_size): Declare.
2517 2009-04-12  Pavel Roskin  <proski@gnu.org>
2519          * configure.ac: Change the logic when we check for target tools.
2520          Do it when the target is specified and it's different from the
2521          specified value of the host.
2523 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2525         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2526         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2527         GNU/kFreeBSD. Check if a device is a character device. Use
2528         DIOCGMEDIASIZE to get the size.
2529         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2530         support for GNU/kFreeBSD.
2531         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2532         is a character device instead of a block device. Add support for
2533         FreeBSD device names.
2535         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2536         is a character device instead of a block device.
2538         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2539         is a character device instead of a block device.
2541 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2543         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2544         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2545         FreeBSD. Check if a device is a character device. Use
2546         DIOCGMEDIASIZE to get the size.
2547         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2548         support for FreeBSD.
2549         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2550         is a character device instead of a block device. Add support for
2551         FreeBSD device names.
2553         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2554         a character device instead of a block device.
2555         (grub_util_check_char_device): New function.
2557         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2558         a character device instead of a block device.
2560         * include/grub/util/getroot.h (grub_util_check_char_device): New
2561         prototype.
2563 2009-04-11  David S. Miller  <davem@davemloft.net>
2565         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2566         static libgcc.
2567         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2568         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2569         function, if present.
2570         (__bswapdi2): Likewise.
2572         * include/grub/sparc64/ieee1275/boot.h: New file.
2573         * boot/sparc64/ieee1275/boot.S: Likewise.
2574         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2576         * kern/misc.c (grub_ltoa): New function.
2577         (grub_vsprintf): Use it to format 'long' integers.
2579 2009-04-10  David S. Miller  <davem@davemloft.net>
2581         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2582         slots are of type grub_ieee1275_cell_t.
2583         (grub_nand_read): Likewise.
2584         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2585         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2586         macros are used to compare values in arg/ret block of the call.
2587         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2588         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2589         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2590         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2591         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2592         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2593         grub_ieee1275_close, grub_ieee1275_set_property,
2594         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2595         grub_ieee1275_cell_t.
2596         * kern/ieee1275/openfw.c (grub_map): Likewise.
2597         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2598         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2600         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2601         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2602         (grub_devalias_iterate): Likewise.
2604 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2606         UFS improvements
2608         * fs/ufs.c (INODE_NBLOCKS): new definition
2609         (struct grub_ufs_dirent): added fields for non-BSD dirents
2610         (grub_ufs_get_file_block): fixed double indirect handling
2611         (grub_ufs_lookup_symlink): use more robust way to determine whether
2612         symlink is inline
2613         (grub_ufs_find_file): support for non-BSD dirents
2614         (grub_ufs_dir): support for non-BSD dirents
2616 2009-04-10  Bean  <bean123ch@gnail.com>
2618         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2619         attribute, otherwise the size would be wrong for i386 platform.
2621         * include/grub/pci.h (grub_pci_read_word): New inline function.
2622         (grub_pci_read_byte): Likewise.
2623         (grub_pci_write): Likewise.
2624         (grub_pci_write_word): Likewise.
2625         (grub_pci_write_byte): Likewise.
2627         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2629         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2630         (find_framebuf): Scan pci to locate the frame buffer address.
2632         * commands/efi/fixvideo.c: New file.
2634         * commands/efi/loadbios.c: Likewise.
2636         * commands/memrw.c: Likewise.
2638         * util/grub-dumpbios.in: Likewise.
2640         * conf/common.rmk (grub-dumpbios): New utility.
2641         (pkglib_MODULES): New module memrw.mod.
2642         (memrw_mod_SOURCE): New macro.
2643         (memrw_mod_CFLAGS): Likewise.
2644         (memrw_mod_LDFLAGS): Likewise.
2646         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2647         fixvideo.mod.
2648         (loadbios_mod_SOURCE): New macro.
2649         (loadbios_mod_CFLAGS): Likewise.
2650         (loadbios_mod_LDFLAGS): Likewise.
2651         (fixvideo_mod_SOURCE): Likewise.
2652         (fixvideo_mod_CFLAGS): Likewise.
2653         (fixvideo_mod_LDFLAGS): Likewise.
2655         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2656         fixvideo.mod.
2657         (loadbios_mod_SOURCE): New macro.
2658         (loadbios_mod_CFLAGS): Likewise.
2659         (loadbios_mod_LDFLAGS): Likewise.
2660         (fixvideo_mod_SOURCE): Likewise.
2661         (fixvideo_mod_CFLAGS): Likewise.
2662         (fixvideo_mod_LDFLAGS): Likewise.
2664 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2666         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2668 2009-04-07  David S. Miller  <davem@davemloft.net>
2670         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2671         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2672         R_SPARC_WDISP30 case.
2673         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2675 2009-04-06  Pavel Roskin  <proski@gnu.org>
2677         * include/grub/misc.h (ARRAY_SIZE): New macro.
2678         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2679         New macro.
2680         * loader/i386/linux.c (allocate_pages): Use free_pages().
2681         (grub_linux_unload): Don't use free_pages().
2682         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2683         wrong index.  Treat all other modes as text modes.
2684         (grub_cmd_linux): Initialize vid_mode unconditionally to
2685         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2687         * commands/help.c (print_command_help): Use cmd->prio, not
2688         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2690 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2692         Parttool
2694         * parttool/pcpart.c: new file
2695         * commands/parttool.c: likewise
2696         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2697         (parttool_mod_SOURCES): new variable
2698         (parttool_mod_CFLAGS): likewise
2699         (parttool_mod_LDFLAGS): likewise
2700         (pcpart_mod_SOURCES): likewise
2701         (pcpart_mod_CFLAGS): likewise
2702         (pcpart_mod_LDFLAGS): likewise
2703         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2704         and parttool/pcpart.c
2705         * conf/i386-efi.rmk: likewise
2706         * conf/i386-ieee1275.rmk: likewise
2707         * conf/i386-pc.rmk: likewise
2708         * conf/powerpc-ieee1275.rmk: likewise
2709         * conf/sparc64-ieee1275.rmk: likewise
2710         * conf/x86_64-ieee1275.rmk: likewise
2712 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2714         Support for mtime and further expandability of dir command
2716         * include/grub/lib/datetime.h: moved to ...
2717         * include/grub/datetime.h: ... moved here and added
2718         declaration of grub_unixtime2datetime. All users updated
2719         * include/grub/fs.h: new syntax for dir and mtime functions in
2720         struct grub_fs
2721         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2722         and GRUB_FSHELP_FLAGS_MASK
2723         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2724         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2725         (grub_ext2_mtime): new function
2726         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2727         (grub_hfsplus_mtime): new function
2728         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2729         (GRUB_UFS_ATTR_FILE): likewise
2730         (GRUB_UFS_ATTR_LNK): likewise
2731         (struct grub_ufs_sblock): new fields mtime
2732         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2733         all users updated
2734         (grub_ufs_dir): mtime support
2735         (grub_ufs_mtime): new function
2736         * fs/affs.c (grub_affs_dir): use new dir syntax
2737         * fs/afs.c (grub_afs_dir): likewise
2738         * fs/cpio.c (grub_cpio_dir): likewise
2739         * fs/fat.c (grub_fat_find_dir): likewise
2740         * fs/hfs.c (grub_hfs_dir): likewise
2741         * fs/iso9660.c (grub_iso9660_dir): likewise
2742         * fs/jfs.c (grub_jfs_dir): likewise
2743         * fs/minix.c (grub_minix_dir): likewise
2744         * fs/ntfs.c (grub_ntfs_dir): likewise
2745         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2746         * fs/sfs.c (grub_sfs_dir): likewise
2747         * fs/xfs.c (grub_xfs_dir): likewise
2748         * util/hostfs.c (grub_hostfs_dir): likewise
2749         * lib/datetime.c: moved to ...
2750         * normal/datetime.c: ... moved here
2751         (grub_unixtime2datetime): new function
2752         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2753         * normal/completion.c (iterate_dir): use new dir syntax
2754         * normal/misc.c (grub_normal_print_device_info): tell the
2755         last modification time of a volume
2756         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2757         * conf/common.rmk: added lib/datetime.c to ls.mod
2758         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2759         (normal_mod_SOURCES): likewise
2760         (datetime_mod_SOURCES): Removed lib/datetime.c
2761         * conf/i386-efi.rmk: likewise
2762         * conf/i386-ieee1275.rmk: likewise
2763         * conf/i386-pc.rmk: likewise
2764         * conf/powerpc-ieee1275.rmk: likewise
2765         * conf/sparc64-ieee1275.rmk: likewise
2766         * conf/x86_64-efi.rmk: likewise
2768 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2770         Trim trailing spaces in FAT label and support mtools-like labels
2772         * fs/fat.c (grub_fat_iterate_dir): New function based
2773         on grub_fat_find_dir
2774         (grub_fat_find_dir): use grub_fat_iterate_dir
2775         (grub_fat_label): likewise
2777 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2779         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2780         and command.h
2781         remove extraneous kernel_elf_HEADERS
2783 2009-04-04  Bean  <bean123ch@gnail.com>
2785         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2787         * util/misc.c: Likewise.
2789 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2791         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2792         instead of grub_printf.
2794 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2796         * loader/i386/linux.c (grub_linux_setup_video): Fill
2797         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2798         values from `mode info' structure instead of hardcoded
2799         values.
2801 2009-04-01  Pavel Roskin  <proski@gnu.org>
2803         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2804         unused now.
2805         * genmk.rb: Likewise.
2806         * configure.ac: Likewise.
2808 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2810         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2811         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2813 2009-04-01  David S. Miller  <davem@davemloft.net>
2815         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2816         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2817         (grub_setjmp): Mark with 'returns_twice' attribute.
2818         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2819         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2820         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2822 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2824         Reapply fix from 2008-07-28 which was accidentally reverted; also
2825         perform the same fix to a similar check in same function.
2827         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2828         with the same number are found, just use issue a warning with
2829         grub_dprintf(), as this error has been reported to be non-fatal.
2831 2009-03-31  Pavel Roskin  <proski@gnu.org>
2833         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2834         for cross-compilation.
2836 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2838         Fix i386-ieee1275 build.
2840         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2841         Remove declaration.
2843 2009-03-30  Pavel Roskin  <proski@gnu.org>
2845         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2846         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2847         zero-terminated, rely only on the strlen value.  Fix comparison
2848         of strings differing in length.
2850 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2852         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2853         checking for abi version.  Improve error messages on BIOS to notify
2854         user about `linux16' command.
2856 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2858         Leak fixes
2860         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2861         in case of collision
2862         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2864 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2866         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2867         set `vid_mode' accordingly.
2868         (grub_linux_boot): Process `vid_mode' and set video mode.
2870 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2872         * util/grub.d/10_linux.in (linux_entry): New function.
2873         Factorize generation of Linux boot entries.
2875 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2877         Make the format of Environment Block plain text. The boot loader
2878         part is not tested well yet.
2880         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2881         (buffer): Removed.
2882         (envblk): Likewise.
2883         (usage): Remove "info" and "clear". Add "unset". Update the
2884         description of "set", as this does not delete variables any
2885         longer.
2886         (create_envblk_file): Complete rewrite.
2887         (open_envblk_file): Likewise.
2888         (cmd_info): Removed.
2889         (cmd_list): Likewise.
2890         (cmd_set): Likewise.
2891         (cmd_clear): Likewise.
2892         (list_variables): New function.
2893         (write_envblk): Likewise.
2894         (set_variables): Likewise.
2895         (unset_variables): Likewise.
2896         (main): Complete rewrite.
2898         * commands/loadenv.c (buffer): Removed.
2899         (envblk): Likewise.
2900         (open_envblk_file): New function.
2901         (read_envblk_file): Complete rewrite.
2902         (grub_cmd_load_env): Likewise.
2903         (grub_cmd_list_env): Likewise.
2904         (struct blocklist): New struct.
2905         (free_blocklists): New function.
2906         (check_blocklists): Likewise.
2907         (write_blocklists): Likewise.
2908         (grub_cmd_save_env): Complete rewrite.
2910         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2911         a plain text signature.
2912         (GRUB_ENVBLK_MAXLEN): Removed.
2913         (struct grub_envblk): Complete rewrite.
2914         (grub_envblk_find): Removed.
2915         (grub_envblk_insert): Likewise.
2916         (grub_envblk_open): New prototype.
2917         (grub_envblk_set): Likewise.
2918         (grub_envblk_delete): Put const to VALUE.
2919         (grub_envblk_iterate): Put const to NAME and VALUE.
2920         (grub_envblk_close): New prototype.
2921         (grub_envblk_buffer): New inline function.
2922         (grub_envblk_size): Likewise.
2924         * lib/envblk.c: Include grub/mm.h.
2925         (grub_env_find): Removed.
2926         (grub_envblk_open): New function.
2927         (grub_envblk_close): Likewise.
2928         (escaped_value_len): Likewise.
2929         (find_next_line): Likewise.
2930         (grub_envblk_insert): Removed.
2931         (grub_envblk_set): New function.
2932         (grub_envblk_delete): Complete rewrite.
2933         (grub_envblk_iterate): Likewise.
2935 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2937         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2938         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2939         variables.  Use 16-bit loader.
2940         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2941         loader.
2942         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2943         (grub_linux16_boot): ... this.  Update all users.
2944         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2945         (grub_linux_boot): ... this.  Update all users.
2947         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2948         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2949         commands to `linux16' and `initrd16'.
2950         (GRUB_MOD_FINI(linux)): Rename to ...
2951         (GRUB_MOD_FINI(linux16)): ... this.
2953 2009-03-24  Pavel Roskin  <proski@gnu.org>
2955         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2956         not just for compilation.
2958 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2960         Move multiboot helper out of kernel
2962         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2963         `loader/i386/multiboot_helper.S'.
2964         * conf/i386-coreboot.rmk: Likewise
2965         * conf/i386-ieee1275.rmk: Likewise
2967         * kern/i386/loader.S: Move multiboot helpers from here...
2968         * loader/i386/multiboot_helper.S: ...moved here
2969         * include/grub/i386/loader.h: Move declarations of multiboot
2970         helpers from here...
2971         * include/grub/i386/multiboot.h: ...moved here
2972         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2974 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2976         * kern/env.c (grub_env_context_open): Added an argument to specify
2977         whether a new context inherits exported variables from current
2978         one. This is useful when making a sandbox to interpret a config
2979         file.
2980         All callers updated.
2982         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2984 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2986         * kern/env.c (grub_env_context_close): Fix memory leaks.
2988 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2990         * normal/main.c (grub_normal_execute): Added an argument
2991         BATCH to specify if an interactive interface should be provided
2992         after reading a config file.
2993         All callers updated.
2994         (read_command_list): Prevent being executed twice.
2995         (read_fs_list): Likewise.
2997         * include/grub/normal.h (grub_normal_execute): Updated the
2998         prototype.
3000 2009-03-22  Pavel Roskin  <proski@gno.org>
3002         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3003         _start.
3004         * kern/i386/pc/startup.S: Likewise.
3005         * kern/i386/efi/startup.S: Likewise.
3006         * kern/i386/ieee1275/startup.S: Likewise.
3007         * kern/i386/coreboot/startup.S: Likewise.
3008         * kern/x86_64/efi/startup.S: Likewise.
3010         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3011         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3012         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3014 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3016         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3018         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3019         limit detection.
3020         Use vaddr of correct segment for entry_point.
3022 2009-03-21  Bean  <bean123ch@gmail.com>
3024         * commands/blocklist.c: Add include file <grub/command.h>, remove
3025         <grub/normal.h> and <grub/arg.h>.
3026         (grub_cmd_blocklist): Use the new command interface.
3027         (GRUB_MOD_INIT): Likewise.
3028         (GRUB_MOD_FINI): Likewise.
3029         * commands/boot.c: Likewise.
3030         * commands/cat.c: Likewise.
3031         * commands/cmp.c: Likewise.
3032         * commands/configfile.c: Likewise.
3033         * commands/crc.c: Likewise.
3034         * commands/echo.c: Likewise.
3035         * commands/halt.c: Likewise.
3036         * commands/handler.c: Likewise.
3037         * commands/hdparm.c: Likewise.
3038         * commands/help.c: Likewise.
3039         * commands/hexdump.c: Likewise.
3040         * commands/loadenv.c: Likewise.
3041         * commands/ls.c: Likewise.
3042         * commands/lsmmap.c: Likewise.
3043         * commands/lspci.c: Likewise.
3044         * commands/loadenv.c: Likewise.
3045         * commands/read.c: Likewise.
3046         * commands/reboot.c: Likewise.
3047         * commands/search.c: Likewise.
3048         * commands/sleep.c: Likewise.
3049         * commands/test.c: Likewise.
3050         * commands/usbtest.c: Likewise.
3051         * commands/videotest.c: Likewise.
3052         * commands/i386/cpuid.c: Likewise.
3053         * commands/i386/pc/halt.c: Likewise.
3054         * commands/i386/pc/play.c: Likewise.
3055         * commands/i386/pc/pxecmd.c: Likewise.
3056         * commands/i386/pc/vbeinfo.c: Likewise.
3057         * commands/i386/pc/vbetest.c: Likewise.
3058         * commands/ieee1275/suspend.c: Likewise.
3059         * disk/loopback.c: Likewise.
3060         * font/font_cmd.c: Likewise.
3061         * hello/hello.c: Likewise.
3062         * loader/efi/appleloader.c: Likewise.
3063         * loader/efi/chainloader.c: Likewise.
3064         * loader/i386/bsd.c: Likewise.
3065         * loader/i386/efi/linux.c: Likewise.
3066         * loader/i386/ieee1275/linux.c: Likewise.
3067         * loader/i386/linux.c: Likewise.
3068         * loader/i386/pc/chainloader.c: Likewise.
3069         * loader/i386/pc/linux.c: Likewise.
3070         * loader/powerpc/ieee1275/linux.c: Likewise.
3071         * loader/multiboot_loader.c: Likewise.
3072         * term/gfxterm.c: Likewise.
3073         * term/i386/pc/serial.c: Likewise.
3074         * term/terminfo.c: Likewise.
3076         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3077         * term/i386/pc/vga.c: Likewise.
3078         * video/readers/jpeg.c: Likewise.
3079         * video/readers/png.c: Likewise.
3080         * video/readers/tga.c: Likewise.
3082         * util/grub-fstest (cmd_loopback): Removed.
3083         (cmd_blocklist): Likewise.
3084         (cmd_ls): Likewise.
3085         (grub_register_command): Likewise.
3086         (grub_unregister_command): Likewise.
3087         (execute_command): Use grub_command_find to locate command and execute
3088         it.
3090         * include/grub/efi/chainloader.h: Removed.
3091         * loader/efi/chainloader_normal.c: Likewise.
3092         * loader/i386/bsd_normal.c: Likewise.
3093         * loader/i386/pc/chainloader_normal.c: Likewise.
3094         * loader/i386/pc/multiboot_normal.c: Likewise.
3095         * loader/linux_normal.c: Likewise.
3096         * loader/multiboot_loader_normal.c: Likewise.
3097         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3099         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3100         and grub_register_command_p1.
3102         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3103         kern/command.c, lib/arg.c and commands/extcmd.c.
3104         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3105         (minicmd_mod_SOURCES): New variable.
3106         (minicmd_mod_CFLAGS): Likewise.
3107         (minicmd_mod_LDFLAGS): Likewise.
3108         (extcmd_mod_SOURCES): Likewise.
3109         (extcmd_mod_CFLAGS): Likewise.
3110         (extcmd_mod_LDFLAGS): Likewise.
3111         (boot_mod_SOURCES): Removed.
3112         (boot_mod_CFLAGS): Likewise.
3113         (boot_mod_LDFLAGS): Likewise.
3115         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3116         kern/corecmd.c.
3117         (kernel_img_HEADERS): Add command.h.
3118         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3119         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3120         and lib/arg.c.
3121         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3122         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3123         remove the corresponding normal mode command.
3124         (normal_mod_SOURCES): Remove normal/arg.c.
3125         * conf/i386-coreboot.rmk: Likewise.
3126         * conf/i386-efi.rmk: Likewise.
3127         * conf/i386-ieee1275.rmk: Likewise.
3128         * conf/powerpc-ieee1275.rmk: Likewise.
3129         * conf/x86_64-efi.rmk: Likewise.
3131         * include/grub/arg.h: Move from here ...
3132         * include/grub/lib/arg.h: ... to here.
3134         * normal/arg.c: Move from here ...
3135         * lib/arg.c: ... to here.
3137         * commands/extcmd.c: New file.
3138         * commands/minicmd.c: Likewise.
3139         * include/grub/command.h: Likewise.
3140         * include/grub/extcmd.h: Likewise.
3141         * kern/command.c: Likewise.
3142         * kern/corecmd.c: Likewise.
3144         * kern/list.c (grub_list_iterate): Return int instead of void.
3145         (grub_list_insert): New function.
3146         (grub_prio_list_insert): Likewise.
3148         * kern/rescue.c (grub_rescue_command): Removed.
3149         (grub_rescue_command_list): Likewise.
3150         (grub_rescue_register_command): Likewise.
3151         (grub_rescue_unregister_command): Likewise.
3152         (grub_rescue_cmd_boot): Move to minicmd.c
3153         (grub_rescue_cmd_help): Likewise.
3154         (grub_rescue_cmd_info): Likewise.
3155         (grub_rescue_cmd_boot): Likewise.
3156         (grub_rescue_cmd_testload): Likewise.
3157         (grub_rescue_cmd_dump): Likewise.
3158         (grub_rescue_cmd_rmmod): Likewise.
3159         (grub_rescue_cmd_lsmod): Likewise.
3160         (grub_rescue_cmd_exit): Likewise.
3161         (grub_rescue_print_devices): Moved to corecmd.c.
3162         (grub_rescue_print_files): Likewise.
3163         (grub_rescue_cmd_ls): Likewise.
3164         (grub_rescue_cmd_insmod): Likewise.
3165         (grub_rescue_cmd_set): Likewise.
3166         (grub_rescue_cmd_unset): Likewise.
3167         (attempt_normal_mode): Use grub_command_find to get normal module.
3168         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3169         commands, remove grub_rescue_register_command calls.
3171         * normal/command.c (grub_register_command): Removed.
3172         (grub_unregister_command): Likewise.
3173         (grub_command_find): Likewise.
3174         (grub_iterate_commands): Likewise.
3175         (rescue_command): Likewise.
3176         (export_command): Moved to corecmd.c.
3177         (set_command): Removed.
3178         (unset_command): Likewise.
3179         (insmod_command): Likewise.
3180         (rmmod_command): Likewise.
3181         (lsmod_command): Likewise.
3182         (grub_command_init): Likewise.
3184         * normal/completion.c (iterate_command): Use cmd->prio to check for
3185         active command.
3186         (complete_arguments): Use grub_extcmd_t structure to find options.
3187         (grub_normal_do_completion): Change function grub_iterate_commands to
3188         grub_command_iterate.
3190         * normal/execute.c (grub_script_execute_cmd): No need to parse
3191         argument here.
3193         * normal/main.c (grub_dyncmd_dispatcher): New function.
3194         (read_command_list): Register unload commands as dyncmd.
3195         (grub_cmd_normal): Use new command interface, register rescue,
3196         unregister normal at entry, register normal, unregister rescue at exit.
3198         * include/grub/list.h (grub_list_test_t): New type.
3199         (grub_list_iterate): Return int instead of void.
3200         (grub_list_insert): New function.
3201         (GRUB_AS_NAMED_LIST_P): New macro.
3202         (GRUB_AS_PRIO_LIST): Likewise.
3203         (GRUB_AS_PRIO_LIST_P): Likewise.
3204         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3205         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3206         (grub_prio_list): New structure.
3207         (grub_prio_list_insert): New function.
3208         (grub_prio_list_remove): New inline function.
3210         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3211         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3212         (GRUB_COMMAND_FLAG_MENU): Likewise.
3213         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3214         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3215         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3216         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3217         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3218         (grub_command): Likewise.
3219         (grub_register_command): Likewise.
3220         (grub_command_find): Likewise.
3221         (grub_iterate_commands): Likewise.
3222         (grub_command_init): Likewise.
3223         (grub_arg_parse): Likewise.
3224         (grub_arg_show_help): Likewise.
3226         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3227         (grub_rescue_unregister_command): Likewise.
3229         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3230         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3231         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3233         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3234         grub_rescue_cmd_initrd.
3235         * include/grub/i386/loader.h: Likewise.
3236         * include/grub/x86_64/loader.h: Likewise.
3238         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3240 2009-03-21  Bean  <bean123ch@gmail.com>
3242         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3243         instead of stat in mingw environment.
3245         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3247         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3249         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3250         AC_CONFIG_LINKS.
3252 2009-03-21  Bean  <bean123ch@gmail.com>
3254         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3255         out of range error.
3257 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3259         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3260         checking inode flags for EXT4_EXTENTS_FLAG.
3262 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3264         * loader/i386/linux.c: Include `<grub/video.h>' and
3265         `<grub/i386/pc/vbe.h>'..
3266         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3267         (grub_linux32_boot): Attempt to configure video settings with
3268         grub_linux_setup_video().
3269         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3270         to avoid grub_console_fini() which would step out of graphical mode
3271         unconditionally.
3273 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3275         Fix build on powerpc.
3276         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3278 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3280         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3281         background image command.
3283 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3285         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3286         (grub_gfxterm_putchar): Extract pairs of identical calls to
3287         draw_cursor out of conditional blocks.
3289 2009-03-11  Pavel Roskin  <proski@gnu.org>
3291         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3292         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3294 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3296         * loader/i386/multiboot_elfxx.c
3297         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3299 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3301         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3302         `kern/handler.c'.
3304 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3306         * loader/i386/multiboot.c (code_size): New variable.
3307         (grub_multiboot): Define offsets by adding to `code_size' rather
3308         than subtracting from `grub_multiboot_payload_size'.  Provide
3309         4-byte alignment to MBI and others by increasing
3310         `boot_loader_name_length' appropriately.
3312         * loader/i386/multiboot_elfxx.c
3313         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3315 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3317         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3318         `fs/ext2.c'.
3320 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3322         Make loader/i386/linux.c usable on i386-pc again.
3324         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3325         memory to heap.
3326         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3327         `#error' stanza.
3329 2009-03-07  Bean  <bean123ch@gmail.com>
3331         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3332         allocation.
3334 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3336         Fix display issue on terminals with screen size other than 80x25
3337         (e.g. gfxterm with resolution higher than 640x480).
3339         * normal/main.c (grub_normal_init_page): Display title text in a
3340         position relative to the center of the terminal instead of relying
3341         on a hardcoded offset.
3343 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3345         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3346         installed.
3348         * Makefile.in (host_kernel): New variable.
3349         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3350         scripts instead of just the windows one.
3351         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3353 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3355         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3356         `kern/handler.c'.
3357         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3358         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3359         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3360         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3361         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3362         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3364 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3366         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3367         or if there's no space for the disk label and print the partition number on a
3368         invalid magic.
3370 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3372         * util/misc.c: Include <time.h>.
3373         (grub_millisleep): New function.
3375 2009-03-04  Bean  <bean123ch@gmail.com>
3377         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3378         another option -mno-red-zone.
3380         * commands/handler.c: Change module description.
3382         * kern/handler.c: Add missing space at the end of description line.
3384         * kern/list.c: Likewise.
3386 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3388         Move more components to the relocation area, and fix mbi pointer
3389         handling to use the destination rather than the origin (thanks to
3390         Vladimir Serbinenko for spotting).
3392         * loader/i386/multiboot.c (mbi_dest): New variable.
3393         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3394         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3395         relocation area.
3397 2009-03-01  Bean  <bean123ch@gmail.com>
3399         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3400         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3401         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3402         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3404         * loader/i386/efi/linux.c (acpi_guid): New variable.
3405         (acpi_guid): Likewise.
3406         (EBDA_SEG_ADDR): New constant.
3407         (LOW_MEM_ADDR): Likewise.
3408         (FAKE_EBDA_SEG): Likewise.
3409         (fake_bios_data): New function.
3410         (grub_linux_boot): Call fake_bios_data.
3412 2009-03-01  Bean  <bean123ch@gmail.com>
3414         * commands/terminal.c: Removed.
3416         * commands/handler.c: New file.
3418         * include/grub/list.h: Likewise.
3420         * include/grub/handler.h: Likewise.
3422         * kern/list.c: Likewise.
3424         * kern/handler.c: Likewise.
3426         * kern/term.h: Include header file <grub/handler.h>.
3427         (grub_term_input): Move next field to the beginning.
3428         (grub_term_output): Likewise.
3429         (grub_term_input_class): New variable.
3430         (grub_term_output_class): Likewise.
3431         (grub_term_register_input): Changed to inline function.
3432         (grub_term_register_output): Likewise.
3433         (grub_term_unregister_input): Likewise.
3434         (grub_term_unregister_output): Likewise.
3435         (grub_term_set_current_input): Likewise.
3436         (grub_term_set_current_output): Likewise.
3437         (grub_term_get_current_input): Likewise.
3438         (grub_term_get_current_output): Likewise.
3439         (grub_term_iterate_input): Removed.
3440         (grub_term_iterate_output): Likewise.
3442         * kern/term.c (grub_term_list_input): Removed.
3443         (grub_term_list_output): Likewise.
3444         (grub_term_input_class): New variable.
3445         (grub_term_output_class): Likewise.
3446         (grub_cur_term_input): Change variable as macro.
3447         (grub_cur_term_output): Likewise.
3448         (grub_term_register_input): Removed.
3449         (grub_term_register_output): Likewise.
3450         (grub_term_unregister_input): Likewise.
3451         (grub_term_unregister_output): Likewise.
3452         (grub_term_set_current_input): Likewise.
3453         (grub_term_set_current_output): Likewise.
3454         (grub_term_iterate_input): Likewise.
3455         (grub_term_iterate_output): Likewise.
3456         (grub_term_get_current_input): Likewise.
3457         (grub_term_get_current_output): Likewise.
3459         * util/grub-editenv.c: Include header file <grub/handler.h>.
3460         (grub_term_get_current_input): Removed.
3461         (grub_term_get_current_output): Likewise.
3462         (grub_term_input_class): New variable.
3463         (grub_term_output_class): Likewise.
3465         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3466         (grub_term_get_current_output): Likewise.
3467         (grub_term_input_class): New variable.
3468         (grub_term_output_class): Likewise.
3470         * util/grub-probe.c (grub_term_get_current_input): Removed.
3471         (grub_term_get_current_output): Likewise.
3472         (grub_term_input_class): New variable.
3473         (grub_term_output_class): Likewise.
3475         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3476         (grub_term_get_current_output): Likewise.
3477         (grub_term_input_class): New variable.
3478         (grub_term_output_class): Likewise.
3480         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3481         (terminal_mod_SOURCES): Likewise.
3482         (terminal_mod_CFLAGS): Likewise.
3483         (terminal_mod_LDFLAGS): Likewise.
3485         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3486         handler.c.
3487         (kernel_img_SOURCES): Add list.c and handler.c.
3488         (kernel_img_HEADERS): Add list.h and handler.h.
3490         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3491         handler.c.
3492         (kernel_mod_SOURCES): Add list.c and handler.c.
3493         (kernel_mod_HEADERS): Add list.h and handler.h.
3495         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3496         handler.c.
3497         (kernel_elf_SOURCES): Add list.c and handler.c.
3498         (kernel_elf_HEADERS): Add list.h and handler.h.
3500         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3501         handler.c.
3502         (kernel_elf_SOURCES): Add list.c and handler.c.
3503         (kernel_elf_HEADERS): Add list.h and handler.h.
3505         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3506         handler.c.
3507         (kernel_mod_SOURCES): Add list.c and handler.c.
3508         (kernel_mod_HEADERS): Add list.h and handler.h.
3510         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3511         handler.c.
3512         (kernel_elf_SOURCES): Add list.c and handler.c.
3513         (kernel_elf_HEADERS): Add list.h and handler.h.
3515 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3517         Factorize elf32 / elf64 code in Multiboot loader.  This will
3518         prevent it from getting out of sync again.
3520         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3521         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3522         grub_multiboot_load_elf64): Move from here ...
3523         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3524         grub_multiboot_load_elf): ... to here (new file).
3526 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3528         * util/grub.d/10_linux.in: Rename "single-user mode" to
3529         "recovery mode".
3531 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3533         Don't leak in SCSI code.
3534         * disk/scsi.c (grub_scsi_close): free `scsi'.
3536 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3538         * loader/i386/pc/multiboot.c: Move from here ...
3539         * loader/i386/multiboot.c: ... to here.  Update all users.
3541 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3543         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3544         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3546 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3548         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3549         b-tree.
3551 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3553         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3554         `0x' qualifier as 0 when base is specified as parameter).
3556 2009-02-24  Bean  <bean123ch@gmail.com>
3558         * configure.ac: Check for -mcmodel=large in x86_64 target.
3560         * include/grub/efi/api.h (efi_call_10): New macro.
3561         (efi_wrap_10): New function.
3563         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3564         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3565         (GRUB_PE32_REL_BASED_LOW): Likewise.
3566         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3567         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3568         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3569         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3570         (GRUB_PE32_REL_BASED_REL): Likewise.
3571         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3572         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3573         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3575         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3576         issue.
3578         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3579         (efi_wrap_10): New function.
3581         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3583         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3584         MB/MBP model (NV chipset).
3585         (devdata_devs): Add devpath_5 to the list.
3587         * load/i386/efi/linux.c (video_base): Remove variable.
3588         (RGB_MASK): New macro.
3589         (RGB_MAGIC): Likewise.
3590         (LINE_MIN): Likewise.
3591         (LINE_MAX): Likewise.
3592         (FBTEST_STEP): Likewise.
3593         (FBTEST_COUNT): Likewise.
3594         (fb_list): New variable.
3595         (grub_find_video_card): Remove function.
3596         (find_framebuf): New function.
3597         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3598         line length.
3600         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3601         problem for x86_64.
3603 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3605         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3607         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3608         coding tool name.
3610 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3612         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3613         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3614         in our relocation, instead of using it directly from heap.  Also
3615         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3617 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3619         Implement USB keyboard support (based on patch by Marco Gerards)
3621         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3622         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3623         (usb_keyboard_mod_LDFLAGS): New variables.
3625         * term/usb_keyboard.c: New file.
3627 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3629         Corrected wrong declaration
3631         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3633 2009-02-14  Christian Franke  <franke@computer.org>
3635         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3636         (grub_lspci_iter): Print class code and programming interface byte.
3638 2009-02-14  Christian Franke  <franke@computer.org>
3640         * gendistlist.sh: Ignore `.svn' directories.
3642 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3644         * fs/fat.c: Add 2009 to Copyright line.
3646 2009-02-14  Christian Franke  <franke@computer.org>
3648         * commands/hdparm.c: New file.  Provides `hdparm' command
3649         which sends ATA commands via grub_disk_ata_pass_through ().
3651         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3653         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3654         and <grub/cpu/io.h> to include/grub/ata.h.
3655         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3656         (GRUB_CDROM_SECTOR_SIZE): Remove.
3657         (GRUB_ATA_*): Move to include/grub/ata.h.
3658         (GRUB_ATAPI_*): Likewise.
3659         (enum grub_ata_commands): Likewise.
3660         (enum grub_ata_timeout_milliseconds): Likewise.
3661         (struct grub_ata_device): Likewise.
3662         (grub_ata_regset): Likewise.
3663         (grub_ata_regget): Likewise.
3664         (grub_ata_regset2): Likewise.
3665         (grub_ata_regget2): Likewise.
3666         (grub_ata_check_ready): Likewise.
3667         (grub_ata_wait_not_busy): Remove static, exported in
3668         include/grub/ata.h.
3669         (grub_ata_wait_drq): Likewise.
3670         (grub_ata_pio_read): Likewise.
3672         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3673         function for hdparm.mod.
3675         * include/grub/ata.h: New file, contains declarations from
3676         disk/ata.c.
3677         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3679         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3680         (grub_disk_ata_pass_through): New exported variable.
3682         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3684 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3686         Support multiple fallback entries, and provide an API to support
3687         executing default+fallback menu entries.  Renamed the `terminal' menu
3688         viewer to `text'.
3690         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3691         variable declaration.
3692         (grub_menu_execute_callback): New structure declaration.
3693         (grub_menu_execute_callback_t): New typedef.
3694         (grub_menu_execute_with_fallback): New function declaration.
3695         (grub_menu_get_entry): Likewise.
3696         (grub_menu_get_timeout): Likewise.
3697         (grub_menu_set_timeout): Likewise.
3699         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3701         * normal/menu.c (grub_wait_after_message): Moved to
3702         `normal/menu_text.c'.
3703         (draw_border): Likewise.
3704         (print_message): Likewise.
3705         (print_entry): Likewise.
3706         (print_entries): Likewise.
3707         (grub_menu_init_page): Likewise.
3708         (get_entry_number): Likewise.
3709         (print_timeout): Likewise.
3710         (run_menu): Likewise.
3711         (grub_menu_execute_entry): Likewise.
3712         (show_text_menu): Likewise.
3713         (get_and_remove_first_entry_number): New function.
3714         (grub_menu_execute_with_fallback): Likewise.
3715         (get_entry): Renamed to ...
3716         (grub_menu_get_entry): .. this and made it global.
3717         (get_timeout): Renamed to ...
3718         (grub_menu_get_timeout): ... this and made it global.
3719         (set_timeout): Renamed to ...
3720         (grub_menu_set_timeout): ... this and made it global.
3721         (grub_normal_terminal_menu_viewer): Renamed to ...
3722         (grub_normal_text_menu_viewer): ... this.
3724         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3725         from normal/menu.c.
3727         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3728         (normal_mod_SOURCES): Likewise.
3730         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3731         (normal_mod_SOURCES): Likewise.
3733         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3734         (normal_mod_SOURCES): Likewise.
3736         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3737         (normal_mod_SOURCES): Likewise.
3739         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3740         (normal_mod_SOURCES): Likewise.
3742         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3743         (normal_mod_SOURCES): Likewise.
3745         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3746         (normal_mod_SOURCES): Likewise.
3748 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3750         * util/grub.d/00_header.in: Update old reference to `font' command.
3752 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3754         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3756         Based on patch from Javier Martín.
3758 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3760         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3761         to avoid false positives with FAT.
3762         (grub_fstest_SOURCES): Likewise.
3763         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3764         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3765         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3766         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3767         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3768         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3770 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3772         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3773         bpb.version_specific.fat12_or_fat16.fstype and
3774         bpb.version_specific.fat32.fstype.
3776 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3778         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3780 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3782         * Makefile.in (host_os, host_cpu): New variables.
3783         (target_os): Remove.  Update all users.
3785 2009-02-08  Marco Gerards  <marco@gnu.org>
3787         * Makefile.in (enable_grub_emu_usb): New variable.
3788         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3789         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3790         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3791         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3792         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3793         `usbtest.mod' and `usbms.mod'.
3794         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3795         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3796         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3797         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3798         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3799         variables.
3801         * disk/usbms.c: New file.
3803         * include/grub/usb.h: Likewise.
3805         * include/grub/usbtrans.h: Likewise.
3807         * include/grub/usbdesc.h: Likewise.
3809         * bus/usb/usbtrans.c: Likewise.
3811         * bus/usb/ohci.c: Likewise.
3813         * bus/usb/uhci.c: Likewise.
3815         * bus/usb/usbhub.c: Likewise.
3817         * bus/usb/usb.c: Likewise.
3819         * commands/usbtest.c: Likewise.
3821         * util/usb.c: Likewise.
3823         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3825         * configure.ac: Test for libusb presence.
3827         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3829 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3831         * kern/mm.c: Add more comments.
3833 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3835         Patch from Javier Martín.
3836         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3837         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3839 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3841         * fs/cpio.c: Split tar functionality to ...
3842         * fs/tar.c: ... here (new file).  Update all users.
3844 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3846         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3847         backward-incompatible features.
3849         Based on patch from Javier Martín, with some adjustments.
3851 2009-02-07  Michael Scherer  <misc@mandriva.org>
3853         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3855 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3857         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3858         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3859         after the RAID stuff.
3861 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3863         Fixes problem when running vbetest command as reported by
3864         Vladimir Serbinenko <phcoder@gmail.com>.
3866         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3868 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3870         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3871         /dev/md/NpN style mdraid devices.
3873 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3875         * util/unifont2pff.rb: Remove.
3877 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3879         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3880         `#'.
3882 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3884         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3885         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3886         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3887         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3888         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3889         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3890         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3892 2009-02-02  Christian Franke  <franke@computer.org>
3894         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3896 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3898         * INSTALL: Note that we now require at least autoconf 2.59 and
3899         that LZO is optional.
3901 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3903         Base on patch on bug #24154 created by Tomas Tintera
3904         <trosos@seznam.cz>.
3906         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3908 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3910         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3911         <bero@arklinux.org>.
3913         * normal/parser.y (script_init): Add missing semicolon.
3915 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3917         * normal/main.c: Add include to grub/menu_viewer.h.
3918         (free_menu_entry_classes): Added.
3919         (grub_normal_menu_addentry): Added class property handling.
3920         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3921         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3923         * normal/menu_viewer.c: New file.
3925         * normal/menu.c (run_menu_entry): Renamed to ...
3926         (grub_menu_execute_entry): ... this and made it as global.
3927         (grub_menu_run): Renamed to ...
3928         (show_text_menu): ... this and made it local.
3929         (show_text_menu): Adapt to new function names.
3930         (grub_normal_terminal_menu_viewer): New global variable.
3932         * include/grub/menu.h: New file.
3934         * include/grub/menu_viewer.h: New file.
3936         * include/grub/normal.h: Added include to grub/menu.h.
3937         (grub_menu_entry): Moved to include/grub/menu.h.
3938         (grub_menu_entry_t): Likewise.
3939         (grub_menu): Likewise.
3940         (grub_menu_t): Likewise.
3941         (grub_normal_terminal_menu_viewer): Added.
3942         (grub_menu_execute_entry): Likewise.
3943         (grub_menu_run): Removed.
3945         * DISTLIST: Added include/grub/menu.h.
3946         Added include/grub/menu_viewer.h.
3947         Added normal/menu_viewer.c.
3949 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3951         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3952         arglist for menutitle arguments.
3954         * normal/main.c (grub_normal_menu_addentry): Likewise.
3956         * normal/parser.y (menuentry): Likewise.
3958         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3960         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3961         (grub_script_create_cmdmenu): Likewise.
3963         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3965         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3966         changes.
3968         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3970         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3972         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3974         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3976         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3978         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3980 2009-01-30  Christian Franke  <franke@computer.org>
3982         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3983         in option help text.
3985 2009-01-27  Pavel Roskin  <proski@gnu.org>
3987         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3989 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3991         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3993         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3995         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3996         unregister function.
3998 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4000         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4002         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4004         * util/grub-mkfont.c (usage): Fix typo.
4006         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4008 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4010         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4012         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4014         * kern/misc.c (grub_strcasecmp): New function.
4015         (grub_strcasecmp): Use grub_size_t instead of int for length.
4016         Fix return value.
4017         * include/grub/misc.h: Update function prototypes.
4019 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4021         * configure.ac: Fix cross-compilation check.
4023 2009-01-22  Christian Franke  <franke@computer.org>
4025         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4026         (precision) digit string.  Allow `.format2' without `format1' (width).
4027         Limit input chars for `%s' output to `format2' if specified.  This is
4028         compatible with standard printf ().
4030 2009-01-22  Christian Franke  <franke@computer.org>
4032         * disk/ata.c (grub_ata_wait_status): Replace by ...
4033         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4034         other status bits may be invalid while BSY is asserted.
4035         (grub_ata_check_ready): New function.
4036         (grub_ata_cmd): Removed.
4037         (grub_ata_wait_drq): New function.
4038         (grub_ata_strncpy): Remove inline.
4039         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4040         and error check now done by grub_ata_wait_drq ().
4041         (grub_ata_pio_write): Likewise.
4042         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4043         grub_ata_wait_drq () to wait for data.
4044         (grub_ata_device_initialize): Add status register check to
4045         detect missing SATA slave devices.  Add debug messages.
4046         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4047         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4048         transfer loop by grub_ata_pio_write ().
4049         (grub_ata_identify): Set DEV before check for !BSY. Use
4050         grub_ata_wait_drq () to wait for data.
4051         (grub_ata_setaddress): Set DEV before check for !BSY.
4052         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4053         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4054         command on (size % batch) == 0.  Add missing error check after write of
4055         last block.  Add debug messages.
4056         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4058 2009-01-19  Christian Franke  <franke@computer.org>
4060         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4061         (GRUB_ATAPI_IREASON_*): Likewise.
4062         (grub_ata_pio_write): Fix timeout error return.
4063         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4064         (grub_atapi_wait_drq): New function.
4065         (grub_atapi_packet): New parameter `size'.
4066         Use grub_atapi_wait_drq () and direct write instead of
4067         grub_ata_pio_write ().
4068         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4069         reads the number of bytes requested by the device for each DRQ
4070         assertion.
4071         (grub_atapi_write): Remove old implementation, return not
4072         implemented instead.
4074 2009-01-19  Christian Franke  <franke@computer.org>
4076         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4077         of 512 to calculate data size.
4078         (grub_scsi_read12): Likewise.
4079         (grub_scsi_write10): Likewise.
4080         (grub_scsi_write12): Likewise.
4081         (grub_scsi_read): Adjust size according to blocksize.
4082         Add checks for invalid blocksize and unaligned transfer.
4084 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4086         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4088         * term/gfxterm.c (write_char): Fix background rendering for wide
4089         width glyphs.
4091 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4093         * config.guess: Update to latest version from config git.
4094         * config.sub: Likewise.
4096 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4098         * Makefile.in: Change font compilation to use new grub-mkfont instead
4099         of java version.
4101         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4102         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4103         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4104         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4105         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4106         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4107         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4108         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4109         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4111 2009-01-16  Christian Franke  <franke@computer.org>
4113         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4114         (enum grub_ata_timeout_milliseconds): New enum.
4115         (grub_ata_wait_status): Add parameter milliseconds.
4116         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4117         recovery from timed-out commands.
4118         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4119         return grub_errno instead of REG_ERROR.
4120         (grub_ata_pio_write): Add parameter milliseconds.
4121         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4122         Pass milliseconds to grub_ata_wait_status () and
4123         grub_ata_pio_read ().
4124         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4125         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4126         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4127         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4128         It is not suitable for device detection, because DEV bit is ignored,
4129         the command may run too long, and not all devices set the signature
4130         properly.
4131         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4132         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4133         Fix device selection, DEV bit must be set first to address the registers
4134         of the correct device.
4135         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4136         grub_ata_pio_read/write ().
4137         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4138         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4140 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4142         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4144 2009-01-13  Bean  <bean123ch@gmail.com>
4146         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4148 2009-01-13  Bean  <bean123ch@gmail.com>
4150         * Makefile.in: (enable_grub_mkfont): New variable.
4151         (freetype_cflags): Likewise.
4152         (freetype_libs): Likewise.
4154         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4155         (grub_mkfont_SOURCES): New variable.
4156         (grub_mkfont_CFLAGS): Likewise.
4157         (grub_mkfont_LDFLAGS): Likewise.
4159         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4160         library if `--enable-grub-mkfont' is requested.
4161         (enable_grub_mkfont): New variable.
4162         (freetype_cflags): Likewise.
4163         (freetype_libs): Likewise.
4165         * util/grub-mkfont.c: New file.
4167 2009-01-12  Christian Franke  <franke@computer.org>
4169         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4170         mode check.  Fix setting of compat_use[].
4172 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4174         Update a few copyright years which we forgot to do in 2008 (only for
4175         files whose changes made in 2008 were copyright-significant)
4177         * Makefile.in: Add 2008 to Copyright line.
4178         * disk/ieee1275/ofdisk.c: Likewise.
4179         * disk/efi/efidisk.c: Likewise.
4180         * kern/dl.c: Likewise.
4181         * kern/sparc64/ieee1275/init.c: Likewise.
4182         * kern/mm.c: Likewise.
4183         * kern/efi/mm.c: Likewise.
4184         * boot/i386/pc/boot.S: Likewise.
4185         * genfslist.sh: Likewise.
4186         * fs/iso9660.c: Likewise.
4187         * fs/hfs.c: Likewise.
4188         * fs/jfs.c: Likewise.
4189         * fs/minix.c: Likewise.
4190         * fs/ufs.c: Likewise.
4191         * gensymlist.sh.in: Likewise.
4192         * genkernsyms.sh.in: Likewise.
4193         * include/grub/misc.h: Likewise.
4194         * include/grub/types.h: Likewise.
4195         * include/grub/symbol.h: Likewise.
4196         * include/grub/elf.h: Likewise.
4197         * include/grub/kernel.h: Likewise.
4198         * include/grub/disk.h: Likewise.
4199         * include/grub/dl.h: Likewise.
4200         * include/grub/i386/linux.h: Likewise.
4201         * include/grub/i386/pc/biosdisk.h: Likewise.
4202         * include/grub/efi/api.h: Likewise.
4203         * include/grub/efi/pe32.h: Likewise.
4204         * include/grub/util/misc.h: Likewise.
4205         * normal/execute.c: Likewise.
4206         * normal/arg.c: Likewise.
4207         * normal/completion.c: Likewise.
4208         * normal/lexer.c: Likewise.
4209         * normal/parser.y: Likewise.
4210         * normal/misc.c: Likewise.
4211         * commands/i386/pc/vbeinfo.c: Likewise.
4212         * commands/hexdump.c: Likewise.
4213         * commands/terminal.c: Likewise.
4214         * commands/ls.c: Likewise.
4215         * commands/help.c: Likewise.
4216         * partmap/pc.c: Likewise.
4217         * loader/efi/chainloader.c: Likewise.
4218         * loader/multiboot_loader.c: Likewise.
4219         * loader/i386/pc/multiboot2.c: Likewise.
4220         * term/efi/console.c: Likewise.
4221         * term/i386/pc/serial.c: Likewise.
4222         * util/lvm.c: Likewise.
4223         * util/console.c: Likewise.
4224         * util/i386/efi/grub-mkimage.c: Likewise.
4225         * util/raid.c: Likewise.
4227 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4229         * commands/videotest.c: Removed include to grub/machine/memory.h.
4231         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4232         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4233         (video_mod_SOURCES): Removed.
4234         (video_mod_CFLAGS): Likewise.
4235         (video_mod_LDFLAGS): Likewise.
4236         (gfxterm_mod_SOURCES): Likewise.
4237         (gfxterm_mod_CFLAGS): Likewise.
4238         (gfxterm_mod_LDFLAGS): Likewise.
4239         (videotest_mod_SOURCES): Likewise.
4240         (videotest_mod_CFLAGS): Likewise.
4241         (videotest_mod_LDFLAGS): Likewise.
4242         (bitmap_mod_SOURCES): Likewise.
4243         (bitmap_mod_CFLAGS): Likewise.
4244         (bitmap_mod_LDFLAGS): Likewise.
4245         (tga_mod_SOURCES): Likewise.
4246         (tga_mod_CFLAGS): Likewise.
4247         (tga_mod_LDFLAGS): Likewise.
4248         (jpeg_mod_SOURCES): Likewise.
4249         (jpeg_mod_CFLAGS): Likewise.
4250         (jpeg_mod_LDFLAGS): Likewise.
4251         (png_mod_SOURCES): Likewise.
4252         (png_mod_CFLAGS): Likewise.
4253         (png_mod_LDFLAGS): Likewise.
4255         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4256         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4257         (video_mod_SOURCES): Added.
4258         (video_mod_CFLAGS): Likewise.
4259         (video_mod_LDFLAGS): Likewise.
4260         (videotest_mod_SOURCES): Likewise.
4261         (videotest_mod_CFLAGS): Likewise.
4262         (videotest_mod_LDFLAGS): Likewise.
4263         (bitmap_mod_SOURCES): Likewise.
4264         (bitmap_mod_CFLAGS): Likewise.
4265         (bitmap_mod_LDFLAGS): Likewise.
4266         (tga_mod_SOURCES): Likewise.
4267         (tga_mod_CFLAGS): Likewise.
4268         (tga_mod_LDFLAGS): Likewise.
4269         (jpeg_mod_SOURCES): Likewise.
4270         (jpeg_mod_CFLAGS): Likewise.
4271         (jpeg_mod_LDFLAGS): Likewise.
4272         (png_mod_SOURCES): Likewise.
4273         (png_mod_CFLAGS): Likewise.
4274         (png_mod_LDFLAGS): Likewise.
4275         (gfxterm_mod_SOURCES): Likewise.
4276         (gfxterm_mod_CFLAGS): Likewise.
4277         (gfxterm_mod_LDFLAGS): Likewise.
4279         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4280         grub/machine/console.h.
4282 2009-01-04  Jerone Young  <jerone@gmail.com>
4284         Make on screen instructions clearer
4286         Based on patch created by Jidanni <jidanni@jidanni.org>
4288         * normal/menu.c: print clearer instructions on the screen
4290 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4292         New font engine.
4294         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4295         build system and fixed gfxterm.c to work with different sized fonts.
4297         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4299         * configure: Re-generated.
4301         * DISTLIST: Removed font/manager.c.
4302         Added font/font.c.
4303         Added font/font_cmd.c.
4305         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4306         compilation.
4308         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4310         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4312         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4314         * normal/menu.c: Likewise.
4316         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4317         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4319         * include/grub/font.h: Replaced with new file.
4321         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4322         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4323         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4324         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4325         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4326         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4327         fg_red, fg_green, fg_blue, fg_alpha.
4328         (grub_video_adapter): Removed blit_glyph.
4329         (grub_video_blit_glyph): Removed.
4331         * font/manager.c: Removed file.
4333         * font/font.c: New file.
4335         * font/font_cmd.c: Likewise.
4337         * video/video.c (grub_video_blit_glyph): Removed.
4339         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4340         (grub_video_vbe_map_rgba): Likewise.
4341         (grub_video_vbe_unmap_color_int): Likewise.
4342         (grub_video_vbe_blit_glyph): Removed.
4343         (grub_video_vbe_adapter): Removed blit_glyph.
4345         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4346         (get_pixel): Likewise.
4347         (set_pixel): Likewise.
4349         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4351         * term/gfxterm.c: Adapted to new font engine.
4353         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4355         * term/i386/pc/vga.c: Likewise.
4357         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4359         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4361         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4363         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4365         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4367         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4369         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4371         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4373         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4375         * util/grub.d/00_header.in: Changed to use new loadfont command.
4377         * util/grub-mkconfig_lib.in: Changed font extension.
4379 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4381         * util/getroot.c (grub_util_get_grub_dev): Add support for
4382         /dev/md/dNNpNN style partitionable mdraid devices.
4384 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4386         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4387         at a time limit of the PXE TFTP API correctly.
4388         (grub_pxefs_close): Likewise.
4390 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4392         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4393         grub_ata_device_initialize() calls.
4395 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4397         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4398         iteration failed.
4399         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4401 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4403         Fix build on powerpc-ieee1275.  Based on patch created by
4404         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4405         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4406         `kern/ieee1275/mmap.c'.
4407         * include/grub/powerpc/ieee1275/memory.h: New file.
4409         Provide grub-install on coreboot.
4410         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4411         (grub_install_SOURCES): New variable.
4412         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4413         usable on coreboot.
4415 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4417         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4418         to `grub_term_input_t'.
4419         (grub_term_get_current_output): Change return type to
4420         `grub_term_output_t'.
4422 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4424         Fix breakage on coreboot due to declaration mismatch.
4425         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4426         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4427         grub_vga_text_cls().
4429         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4430         comments.  Avoid copying one more byte than necessary (just in case).
4432         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4433         to 0x200000 (avoids trouble with some OFW implementations, and matches
4434         with the one in Yaboot).
4435         Reported by Manoel Abranches
4437 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4439         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4440         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4442         * util/grub-mkconfig_lib.in (grub_warn): New function.
4443         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4444         warnings, to obtain consistent formatting.
4445         * util/grub.d/00_header.in: Likewise.
4446         * util/update-grub_lib.in: Likewise.
4448         * loader/i386/linux.c (allocate_pages): Fix a warning.
4449         Move comment text to `#error' stanza.
4451         Harmonize ieee1275's grub_available_iterate() with the generic
4452         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4453         build problem on i386-ieee1275):
4454         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4455         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4456         parameter `type'.  Update all users of this function.
4457         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4458         `kern/ieee1275/mmap.c'.
4459         * kern/ieee1275/init.c
4460         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4461         with ...
4462         (grub_machine_mmap_iterate): ... this.
4463         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4464         return type to `grub_err_t'.  Update all implementations of this
4465         function prototype.
4466         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4467         Likewise.
4469         Add `lsmmap' command (lists firmware-provided memory map):
4470         * commands/lsmmap.c: New file.
4471         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4472         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4473         variables.
4474         * conf/powerpc-ieee1275.rmk: Likewise.
4475         * conf/i386-coreboot.rmk: Likewise.
4476         * conf/i386-ieee1275.rmk: Likewise.
4478 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4480         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4481         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4482         constraints to initrd allocation (based on code from
4483         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4484         for Linux to find it.
4486 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4488         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4489         order to cope with duplicate slashes.
4491 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4493         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4494         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4495         don't want to mess with lower memory, because it is used in the Linux
4496         loader.
4498         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4499         an appropriate place in lower memory, between 0x10000 and 0x90000,
4500         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4501         is in our heap (probably as a result of it being corrupted during
4502         decompression).  Add #error instance with comment to explain why this
4503         loader isn't currently usable on PC/BIOS.
4505 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4507         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4508         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4510 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4512         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4514         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4515         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4516         from here ...
4517         * include/grub/i386/pc/memory.h: ... to here.
4519 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4521         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4522         split).
4524         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4525         (grub_console_cur_color, grub_console_real_putchar)
4526         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4527         (grub_console_setcolorstate, grub_console_setcolor)
4528         (grub_console_getcolor): Move from here ...
4529         * include/grub/i386/vga_common.h: ... to here (new file).
4531         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4532         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4533         `<grub/i386/io.h>'.
4534         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4535         `<grub/i386/vga_common.h>'.
4537 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4539         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4540         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4541         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4542         variables.
4543         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4544         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4546         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4547         grub_console_init() with call to grub_vga_text_init().
4548         (grub_machine_fini): Replace call to
4549         grub_console_fini() with call to grub_vga_text_fini() and
4550         grub_at_keyboard_fini().
4552         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4553         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4554         (grub_console_setcolorstate, grub_console_setcolor)
4555         (grub_console_getcolor): New function prototypes.
4557         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4558         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4559         (grub_vga_text_setcursor): Static-ize.
4560         (grub_vga_text_term): New structure.
4561         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4563         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4564         (grub_console_cur_color, grub_console_standard_color)
4565         (grub_console_normal_color, grub_console_highlight_color)
4566         (map_char, grub_console_putchar, grub_console_getcharwidth)
4567         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4568         (grub_console_getcolor): Move from here ...
4569         * term/i386/vga_common.c: ... to here (same function names).
4571 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4573         Use newly-added Multiboot support in coreboot.
4575         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4576         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4578         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4579         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4580         (codestart): Store the MBI in `startup_multiboot_info' when we're
4581         being loaded using Multiboot.
4583         * kern/i386/coreboot/init.c (grub_machine_init): Move
4584         grub_at_keyboard_init() call to beginning of function (useful for
4585         debugging).  Call grub_machine_mmap_init() before attempting to use
4586         grub_machine_mmap_iterate().
4587         (grub_lower_mem, grub_upper_mem): Move from here ...
4588         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4589         here (new file).
4591         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4592         function prototype.
4594 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4596         Fix a regression introduced by the at_keyboard.mod split.  Because
4597         some terminals are default on some platforms and non-default on
4598         others, the first terminal being registered determines which is
4599         going to be default.
4601         * kern/term.c (grub_term_register_input): If this is the first
4602         terminal being registered, set it as the current one.
4603         (grub_term_register_output): Likewise.
4605         * term/efi/console.c (grub_console_init): Do not call
4606         grub_term_set_current_output() or grub_term_set_current_input().
4607         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4608         * term/i386/pc/console.c (grub_console_init): Likewise.
4609         (grub_console_fini): Do not call grub_term_set_current_input()
4610         (but leave grub_term_set_current_output() to restore text mode).
4612 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4614         * util/grub.d/00_header.in: Add backward compatibility check for
4615         versions of terminal.mod that don't understand `terminal_input' or
4616         `terminal_output'.
4618 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4620         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4621         `terminal_input' / `terminal_output', not `terminal'.
4623 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4625         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4626         (DISTCLEANFILES): Add `build_env.mk'.
4628 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4630         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4631         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4632         members.  Update all users.
4633         * util/console.c (grub_ncurses_term): Split in ...
4634         (grub_ncurses_term_input): ... this, and ...
4635         (grub_ncurses_term_output): ... this.  Update all users.
4636         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4638 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4640         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4641         (PKGDATA): Add $(pkgdata_SRCDIR).
4642         (pkglib_BUILDDIR): New variable.
4643         (pkgdata_SRCDIR): New variable.
4644         (build_env.mk): New target.
4645         (include_DATA): New variable.
4646         (install-local): Install $(include_DATA) files in $(includedir).
4648 2008-11-07  Pavel Roskin  <proski@gnu.org>
4650         * gendistlist.sh: Use C locale for sorting to ensure consistent
4651         output on all systems.
4653         * util/grub.d/00_header.in: Remove incorrect space before
4654         "serial".
4656 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4658         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4659         per specification.
4660         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4661         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4662         (based on find_multi_boot1_header).
4663         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4664         using find_multi_boot2_header(), and abort if neither Multiboot or
4665         Multiboot headers were found.
4667 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4669         Modularize at_keyboard.mod:
4671         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4672         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4673         (at_keyboard_mod_LDFLAGS): New variables.
4675         Actual terminal split:
4677         * include/grub/term.h (struct grub_term): Split in ...
4678         (struct grub_term_input): ... this, and ...
4679         (struct grub_term_output): ... this.  Update all users.
4680         (grub_term_set_current): Split in ...
4681         (grub_term_set_current_input): ... this, and ...
4682         (grub_term_set_current_output): ... this.
4683         (grub_term_get_current): Split in ...
4684         (grub_term_get_current_input): ... this, and ...
4685         (grub_term_get_current_output): ... this.
4686         (grub_term_register): Split in ...
4687         (grub_term_register_input): ... this, and ...
4688         (grub_term_register_output): ... this.
4689         (grub_term_unregister): Split in ...
4690         (grub_term_unregister_input): ... this, and ...
4691         (grub_term_unregister_output): ... this.
4692         (grub_term_iterate): Split in ...
4693         (grub_term_iterate_input): ... this, and ...
4694         (grub_term_iterate_output): ... this.
4696         * kern/term.c (grub_term_list): Split in ...
4697         (grub_term_list_input): ... this, and ...
4698         (grub_term_list_output): ... this.  Update all users.
4699         (grub_cur_term): Split in ...
4700         (grub_cur_term_input): ... this, and ...
4701         (grub_cur_term_output): ... this.  Update all users.
4702         (grub_term_set_current): Split in ...
4703         (grub_term_set_current_input): ... this, and ...
4704         (grub_term_set_current_output): ... this.
4705         (grub_term_get_current): Split in ...
4706         (grub_term_get_current_input): ... this, and ...
4707         (grub_term_get_current_output): ... this.
4708         (grub_term_register): Split in ...
4709         (grub_term_register_input): ... this, and ...
4710         (grub_term_register_output): ... this.
4711         (grub_term_unregister): Split in ...
4712         (grub_term_unregister_input): ... this, and ...
4713         (grub_term_unregister_output): ... this.
4714         (grub_term_iterate): Split in ...
4715         (grub_term_iterate_input): ... this, and ...
4716         (grub_term_iterate_output): ... this.
4718         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4719         a check for input and one for output (and only attempt to get keys
4720         from user when input works).
4722         * util/grub-probe.c (grub_term_get_current): Split in ...
4723         (grub_term_get_current_input): ... this, and ...
4724         (grub_term_get_current_output): ... this.
4725         * util/grub-fstest.c: Likewise.
4726         * util/i386/pc/grub-setup.c: Likewise.
4727         * util/grub-editenv.c: Likewise.
4729         Portability adjustments:
4731         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4732         `term/i386/pc/at_keyboard.c'.
4733         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4734         grub_keyboard_controller_init() (now handled by terminal .init).
4735         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4736         grub_at_keyboard_init().
4737         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4738         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4739         at_keyboard.mod via input terminal interface).
4740         * include/grub/i386/coreboot/console.h: Convert into a stub for
4741         `<grub/i386/pc/console.h>'.
4743         Migrate full terminals to new API:
4745         * term/efi/console.c (grub_console_term): Split into ...
4746         (grub_console_term_input): ... this, and ...
4747         (grub_console_term_output): ... this.  Update all users.
4748         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4749         (grub_ofconsole_init): Split into ...
4750         (grub_ofconsole_init_input): ... this, and ...
4751         (grub_ofconsole_init_output): ... this.
4752         (grub_ofconsole_term): Split into ...
4753         (grub_ofconsole_term_input): ... this, and ...
4754         (grub_ofconsole_term_output): ... this.  Update all users.
4755         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4756         (grub_serial_term_input): ... this, and ...
4757         (grub_serial_term_output): ... this.  Update all users.
4758         * term/i386/pc/console.c (grub_console_term): Split into ...
4759         (grub_console_term_input): ... this, and ...
4760         (grub_console_term_output): ... this.  Update all users.
4761         (grub_console_term_input): Only enable it on PC/BIOS platform.
4762         (grub_console_init): Remove grub_keyboard_controller_init() call.
4764         Migrate input terminals to new API:
4766         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4767         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4768         i386-specific anyway).
4769         (grub_console_checkkey): Rename to ...
4770         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4771         users.
4772         (grub_keyboard_controller_orig): New variable.
4773         (grub_console_getkey): Rename to ...
4774         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4775         users.
4776         (grub_keyboard_controller_init): Static-ize.  Save original
4777         controller value so that it can be restored ...
4778         (grub_keyboard_controller_fini): ... here (new function).
4779         (grub_at_keyboard_term): New structure.
4780         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4781         functions.
4783         Migrate output terminals to new API:
4785         * term/i386/pc/vga.c (grub_vga_term): Change type to
4786         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4787         members.  Update all users.
4788         * term/gfxterm.c (grub_video_term): Change type to
4789         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4790         members.  Update all users.
4791         * include/grub/i386/pc/console.h (grub_console_checkkey)
4792         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4793         etc).
4795         Migrate `terminal' command and userland tools to new API:
4797         * commands/terminal.c (grub_cmd_terminal): Split into ...
4798         (grub_cmd_terminal_input): ... this, and ...
4799         (grub_cmd_terminal_output): ... this.
4800         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4801         `terminal_input' and `terminal_output'.
4802         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4803         `terminal_input' / `terminal_output' API.
4804         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4805         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4806         provided ${GRUB_TERMINAL}, convert it).
4808 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4810         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4811         for FreeBSD.
4812         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4814 2008-11-03  Bean  <bean123ch@gmail.com>
4816         * kern/elf.c (grub_elf32_load): Revert to previous code.
4817         (grub_elf64_load): Likewise.
4819         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4821 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4823         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4824         (TARGET_CPPFLAGS): Likewise.
4825         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4827 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4829         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4831 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4833         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4834         addition of objects until the code is not going to be able to fail.
4836 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4838         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4839         (add a missing NULL check, and correct them by moving the pointer
4840         operations after the actual check).
4842 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4844         * util/i386/pc/grub-install.in: Handle empty string as output from
4845         make_system_path_relative_to_its_root().
4847 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4849         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4850         circular metadata worst case scenario. If the metadata is circular
4851         then copy the wrap in place.
4852         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4853         project lib/format_text/layout.h
4854         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4856 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4858         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4860 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4862         * util/update-grub_lib.in: Mention filename in warning message.
4864 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4866         * NEWS: Update for rename of update-grub to grub-mkconfig.
4868 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4870         * util/update-grub_lib.in: Copy to ...
4871         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4872         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4873         * util/update-grub.in: Rename to ...
4874         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4875         option. Add `--output' option to allow users to specify the generated
4876         configuration file.  Default to stdout.
4877         (update_grub_dir): Rename to ...
4878         (grub_mkconfig_dir): ... this.
4879         (grub_cfg): Default to an empty string.
4880         * conf/common.rmk (update-grub): Rename to ...
4881         (grub-mkconfig): ... this.
4882         (update-grub_lib): Copy to ...
4883         (grub-mkconfig_lib): ... this.
4884         (update-grub_SCRIPTS): Copy to ...
4885         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4886         (update-grub_DATA): Rename to ...
4887         (grub-mkconfig_DATA): ... this.
4889 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4891         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4892         to `modified'.  Add the real `created' field.
4893         (grub_iso9660_uuid): Use `modified' rather than `created' for
4894         constructing the UUID.
4896 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4898         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4899         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4901 2008-09-28  Bean  <bean123ch@gmail.com>
4903         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4904         Thanks to Christian Franke for finding this bug.
4906 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4908         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4909         instances of grub_util_get_disk_name() (see previous commit).
4911 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4913         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4914         `util/i386/get_disk_name.c'.
4915         * conf/i386-efi.rmk: Likewise.
4916         * conf/x86_64-efi.rmk: Likewise.
4917         * conf/i386-coreboot.rmk: Likewise.
4918         * conf/i386-ieee1275.rmk: Likewise.
4919         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4920         `util/ieee1275/get_disk_name.c'.
4921         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4922         * util/ieee1275/get_disk_name.c: Remove file.
4923         * util/i386/get_disk_name.c: Remove file.
4924         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4925         "hd%d" for device.map entries, rather than using
4926         grub_util_get_disk_name().
4928 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4930         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4931         warning.
4932         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4934 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4936         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4937         Changed to 0x5100.
4938         (GRUB_TERM_PPAGE): Changed to 0x4900.
4940 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4942         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4943         macros (they were i386-pc specific).
4944         * include/grub/sparc64/ieee1275/console.h: Likewise.
4945         * include/grub/efi/console.h: Likewise.
4947 2008-09-22  Bean  <bean123ch@gmail.com>
4949         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4950         resident and in attribute list.
4952         * include/grub/ntfs.h (BMP_LEN): Removed.
4954 2008-09-22  Bean  <bean123ch@gmail.com>
4956         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4957         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4959         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4960         error occurs, as grub_disk_open will call grub_disk_close, which will
4961         call p->close (scsi).
4963 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4965         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4966         (AC_PREREQ): Bumped to 2.59.
4967         (AC_TRY_COMPILE): Replace obsolete macro with ...
4968         (AC_COMPILE_IFELSE): ... this.
4969         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4970         (AC_LINK_IFELSE): ... this.
4972 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4974         * autogen.sh: Add a call to `gendistlist.sh'.
4976 2008-09-19  Christian Franke  <franke@computer.org>
4978         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4979         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4980         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4981         Export __enable_execute_stack() to modules.
4982         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4983         New function.
4985 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4987         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4988         Sort the list.
4990 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4992         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4993         #include <grub/util/hostdisk.h>.
4995 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4997         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4998         segments when their filesz is zero (grub_file_read() interprets
4999         zero-size as "read until EOF", which results in memory corruption).
5000         Use `lowest_segment' rather than 0 for calculating the current
5001         segment load address.
5003 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5005         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5006         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5007         clobbered useful information.
5009 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5011         * include/grub/util/biosdisk.h: Move to ...
5012         * include/grub/util/hostdisk.h: ... here.  Update all users.
5013         * util/biosdisk.c: Move to ...
5014         * util/hostdisk.c: ... here.  Update all users.
5016 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5018         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5019         variables.
5020         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5021         and length can be stored directly in the `mbi->mmap_addr' and
5022         `mbi->mmap_length' struct fields.
5024 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5026         * conf/i386.rmk: New file.  Provides declaration for building
5027         `cpuid.mod'.
5028         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5029         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5030         variables.
5031         Include `conf/i386.mk'.
5032         * conf/i386-efi.rmk: Likewise.
5033         * conf/x86_64-efi.rmk: Likewise.
5034         * conf/i386-coreboot.rmk: Likewise.
5035         * conf/i386-ieee1275.rmk: Likewise.
5037 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5039         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5040         Adds optimization support for BGR based modes.
5042         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5043         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5044         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5045         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5046         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5047         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5048         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5049         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5050         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5051         (grub_video_i386_vbeblit_index_index): Likewise.
5052         (grub_video_i386_vbeblit_replace_directN): Added.
5053         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5054         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5055         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5056         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5057         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5058         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5059         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5060         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5061         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5062         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5063         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5064         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5065         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5067         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5068         (grub_video_i386_vbefill_R8G8B8): Likewise.
5069         (grub_video_i386_vbefill_index): Likewise.
5070         (grub_video_i386_vbefill_direct32): Added.
5071         (grub_video_i386_vbefill_direct24): Likewise.
5072         (grub_video_i386_vbefill_direct16): Likewise.
5073         (grub_video_i386_vbefill_direct8): Likewise.
5075         * include/grub/video.h (grub_video_blit_format): Removed
5076         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5077         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5078         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5079         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5080         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5082         * video/video.c (grub_video_get_blit_format): Updated to use new
5083         blit formats.  Added handling for 16 bit color modes.
5085         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5086         fillers.
5087         (common_blitter): Updated to use new blitters.
5089         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5090         Removed.
5091         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5092         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5093         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5094         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5095         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5096         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5097         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5098         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5099         (grub_video_i386_vbeblit_index_index): Likewise.
5100         (grub_video_i386_vbeblit_replace_directN): Added.
5101         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5102         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5103         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5104         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5105         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5106         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5107         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5108         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5109         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5110         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5111         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5112         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5113         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5115         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5116         (grub_video_i386_vbefill_R8G8B8): Likewise.
5117         (grub_video_i386_vbefill_index): Likewise.
5118         (grub_video_i386_vbefill_direct32): Added.
5119         (grub_video_i386_vbefill_direct24): Likewise.
5120         (grub_video_i386_vbefill_direct16): Likewise.
5121         (grub_video_i386_vbefill_direct8): Likewise.
5123         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5124         types.
5126         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5127         types.
5129         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5130         blitter types.
5132         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5133         types.
5135 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5137         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5138         RAID level 1.
5140 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5142         * fs/iso9660.c (grub_iso9660_date): New structure.
5143         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5144         (grub_iso9660_uuid): New function.
5146 2008-09-05  Bean  <bean123ch@gmail.com>
5148         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5150         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5151         insensitive bit for names in Win32 and Win32 & DOS namespace.
5153         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5155         * include/grub/types.h (LONG_MAX): Likewise.
5157 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5159         * util/getroot.c: Include <config.h>.
5160         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5161         add support for /dev/md/N devices and handle LVM double dash escaping.
5163 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5165         * config.guess: Update to latest version from config git.
5166         * config.sub: Likewise.
5168 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5170         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5171         `disk->total_sectors'.
5173 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5175         * include/grub/normal.h: Fixed incorrect comment for
5176         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5178 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5180         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5181         values with defines.
5183         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5184         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5185         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5186         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5187         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5188         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5189         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5190         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5191         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5192         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5193         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5194         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5195         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5196         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5197         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5198         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5199         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5200         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5201         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5203 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5205         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5206         declaration.
5207         (grub_multiboot): Fix a few warnings.
5209 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5211         * loader/i386/pc/multiboot.c: Update comment not to say that
5212         boot_device support is unimplemented.
5214 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5216         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5217         or memory map support are unimplemented.
5219 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5221         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5223 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5225         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5226         total video memory in 'vbeinfo' output; show color format details for
5227         each video mode.
5229 2008-08-30  Pavel Roskin  <proski@gnu.org>
5231         * util/genmoddep.c: Remove for real this time.
5232         * DISTLIST: Remove util/genmoddep.c.
5234 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5236         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5237         as required by Multiboot spec (it was already 4-byte aligned, but
5238         only by chance).
5240 2008-08-29  Pavel Roskin  <proski@gnu.org>
5242         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5243         * kern/powerpc/ieee1275/startup.S: ... this.
5244         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5245         * DISTLIST: Likewise.
5247         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5248         grub/cpu/kernel.h.  Add start label for consistency with other
5249         platforms.  Add grub_prefix immediately after start.  Add jump
5250         to the code after grub_prefix.
5251         * include/grub/powerpc/kernel.h: Provide valid values for
5252         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5254 2008-08-29  Bean  <bean123ch@gmail.com>
5256         * configure.ac: Change host_os to cygwin for mingw.
5257         (asprintf): New check for function.
5259         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5260         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5262         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5263         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5264         sync, sleep and grub_util_get_disk_size for mingw.
5266         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5267         to get size in mingw.
5268         (open_device): Use flag O_BINARY if it's defined.
5269         (find_root_device): Add dummy code for mingw.
5271         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5272         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5273         (get_scsi_disk_name): Return 0 for mingw.
5275         * util/hostfs.c: #include <grub/util/misc.h>.
5276         (grub_hostfs_open): Use "rb" flag to open file, use
5277         grub_util_get_disk_size to get disk size for mingw.
5279         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5280         (asprintf): New function if HAVE_ASPRINTF is not set.
5281         (sync): New function for mingw.
5282         (sleep): Likewise.
5283         (grub_util_get_disk_size): Likewise.
5285 2008-08-28  Pavel Roskin  <proski@gnu.org>
5287         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5288         kern/time.c.
5290 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5292         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5294 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5296         Change find_grub_drive() syntax so it doesn't prevent it from
5297         detecting NULL names as errors.
5299         * util/biosdisk.c (find_grub_drive): Move free slot search code
5300         from here ...
5301         (find_free_slot): ... to here.
5302         (read_device_map): Use find_free_slot() to search for free slots.
5304 2008-08-27  Marco Gerards  <marco@gnu.org>
5306         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5307         (scsi_mod_SOURCES): New variable.
5308         (scsi_mod_CFLAGS): Likewise
5309         (scsi_mod_LDFLAGS): Likewise.
5311         * disk/scsi.c: New file.
5313         * include/grub/scsi.h: Likewise.
5315         * include/grub/scsicmd.h: Likewise.
5317         * disk/ata.c: Include <grub/scsi.h>.
5318         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5319         instead.
5320         (grub_ata_iterate): Skip ATAPI devices.
5321         (grub_ata_open): Only handle ATAPI devices.
5322         (struct grub_atapi_read): Removed.
5323         (grub_atapi_readsector): Likewise.
5324         (grub_ata_read): No longer handle ATAPI devices.
5325         (grub_ata_write): Likewise.
5326         (grub_atapi_iterate): New function.
5327         (grub_atapi_read): Likewise.
5328         (grub_atapi_write): Likewise.
5329         (grub_atapi_open): Likewise.
5330         (grub_atapi_close): Likewise.
5331         (grub_atapi_dev): New variable.
5332         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5333         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5335         * include/grub/disk.h (enum grub_disk_dev_id): Add
5336         `GRUB_DISK_DEVICE_SCSI_ID'.
5338 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5340         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5341         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5342         descriptive.
5344 2008-08-23  Bean  <bean123ch@gmail.com>
5346         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5347         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5348         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5349         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5350         dm_nv.mod.
5351         (raid5rec_mod_SOURCES): New macro.
5352         (raid5rec_mod_CFLAGS): Likewise.
5353         (raid5rec_mod_LDFLAGS): Likewise.
5354         (raid6rec_mod_SOURCES): Likewise.
5355         (raid6rec_mod_CFLAGS): Likewise.
5356         (raid6rec_mod_LDFLAGS): Likewise.
5357         (mdraid_mod_SOURCES): Likewise.
5358         (mdraid_mod_CFLAGS): Likewise.
5359         (mdraid_mod_LDFLAGS): Likewise.
5360         (dm_nv_mod_SOURCES): Likewise.
5361         (dm_nv_mod_CFLAGS): Likewise.
5362         (dm_nv_mod_LDFLAGS): Likewise.
5364         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5365         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5366         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5368         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5369         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5371         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5373         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5375         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5377         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5379         * disk/raid5_recover.c: New file.
5381         * disk/raid6_recover.c: Likewise.
5383         * disk/mdraid_linux.c: Likewise.
5385         * disk/dmraid_nvidia.c: Likewise.
5387         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5388         ULONG_MAX.
5390         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5391         calculate the size of raid device.
5392         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5393         different layout of raid5.
5394         (grub_raid_scan_device): Remove code specific to mdraid.
5395         (grub_raid_list): New variable.
5396         (free_array): New function.
5397         (grub_raid_register): Likewise.
5398         (grub_raid_unregister): Likewise.
5399         (grub_raid_rescan): Likewise.
5400         (GRUB_MOD_INIT): Don't iterate device here.
5401         (GRUB_MOD_FINI): Use free_array to release resource.
5403         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5404         (grub_raid5_recover_func_t): New function variable type.
5405         (grub_raid6_recover_func_t): Likewise.
5406         (grub_raid5_recover_func): New variable.
5407         (grub_raid6_recover_func): Likewise.
5408         (grub_raid_register): New function.
5409         (grub_raid_unregister): Likewise.
5410         (grub_raid_rescan): Likewise.
5411         (grub_raid_block_xor): Likewise.
5413         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5414         (CMD_CRC): New macro.
5415         (part): Removed.
5416         (read_file): Handle device as well as file.
5417         (cmd_crc): New function.
5418         (fstest): Handle multiple disks.
5419         (options): Remove part, raw and long, add root and diskcount.
5420         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5421         (main): Find the first non option entry and ignore subsequent options,
5422         add handling for the new options, support multiple disks.
5424         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5426 2008-08-23  Bean  <bean123ch@gmail.com>
5428         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5430         * genfslist.sh: Ignore kernel.mod.
5432         * genpartmaplist.sh: Likewise.
5434 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5436         * util/getroot.c (find_root_device): Skip anything that starts with
5437         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5439 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5441         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5442         * util/grub.d/00_header.in: Allow the administrator to change default
5443         gfxmode via ${GRUB_GFXMODE}.
5445 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5447         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5449 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5451         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5452         loader.
5453         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5454         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5456 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5458         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5459         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5461 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5463         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5464         (struct grub_virtual_screen): Remove `cursor_color'.
5465         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5466         initialization.
5467         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5469 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5471         Unify (identical) linux_normal.c files.
5472         * loader/i386/efi/linux_normal.c: Move from here ...
5473         * loader/linux_normal.c: ... to here.  Update all users.
5474         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5475         * loader/i386/ieee1275/linux_normal.c: Likewise.
5477 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5479         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5480         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5481         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5482         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5483         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5484         New macros.
5485         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5486         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5487         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5488         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5489         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5490         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5491         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5492         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5493         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5494         portably using grub_getxy().
5495         Replace `-EFI' with `-bzImage' in boot message.
5497 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5499         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5501 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5503         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5505         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5506         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5507         (grub_machine_mmap_iterate): New function declaration.
5508         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5509         structure.
5510         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5511         macros.
5513         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5514         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5515         Move e820 parsing from here ...
5516         * kern/i386/pc/mmap.c: New file.
5517         (grub_machine_mmap_iterate): ... to here.
5519         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5520         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5521         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5522         (grub_available_iterate): Redeclare to return `void', and redeclare
5523         its hook to use grub_uint64_t as addr and size parameters, and rename
5524         to ...
5525         (grub_machine_mmap_iterate): ... this.  Update all users.
5527         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5528         to make it more readable.  Rename to ...
5529         (grub_machine_mmap_iterate): ... this.
5531         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5532         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5533         (grub_multiboot): Allocate an extra region after the payload, and fill
5534         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5535         with the extra space.
5536         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5537         with the extra space.
5539 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5541         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5543 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5545         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5546         mdate-sh to the list `find' searches for.
5547         * DISTLIST: Regenerated.
5549 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5551         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5552         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5553         genmoddep.awk, gensymlist.sh.in.
5554         (DISTDIRS): Add bus, docs, hook, lib.
5555         * DISTLIST: Regenerated.
5556         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5558 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5560         * disk/raid.c (grub_raid_init): Handle/report errors set by
5561         grub_device_iterate().
5562         * disk/lvm.c (grub_lvm_init): Likewise.
5564 2008-08-15  Bean  <bean123ch@gmail.com>
5566         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5567         and datehook.mod.
5568         (datetime_mod_SOURCES): New macro.
5569         (datetime_mod_CFLAGS): Likewise.
5570         (datetime_mod_LDFLAGS): Likewise.
5571         (date_mod_SOURCES): Likewise.
5572         (date_mod_CFLAGS): Likewise.
5573         (date_mod_LDFLAGS): Likewise.
5574         (datehook_mod_SOURCES): Likewise.
5575         (datehook_mod_CFLAGS): Likewise.
5576         (datehook_mod_LDFLAGS): Likewise.
5578         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5579         and datehook.mod.
5580         (datetime_mod_SOURCES): New macro.
5581         (datetime_mod_CFLAGS): Likewise.
5582         (datetime_mod_LDFLAGS): Likewise.
5583         (date_mod_SOURCES): Likewise.
5584         (date_mod_CFLAGS): Likewise.
5585         (date_mod_LDFLAGS): Likewise.
5586         (datehook_mod_SOURCES): Likewise.
5587         (datehook_mod_CFLAGS): Likewise.
5588         (datehook_mod_LDFLAGS): Likewise.
5590         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5591         and datehook.mod.
5592         (datetime_mod_SOURCES): New macro.
5593         (datetime_mod_CFLAGS): Likewise.
5594         (datetime_mod_LDFLAGS): Likewise.
5595         (date_mod_SOURCES): Likewise.
5596         (date_mod_CFLAGS): Likewise.
5597         (date_mod_LDFLAGS): Likewise.
5598         (datehook_mod_SOURCES): Likewise.
5599         (datehook_mod_CFLAGS): Likewise.
5600         (datehook_mod_LDFLAGS): Likewise.
5602         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5603         and datehook.mod.
5604         (datetime_mod_SOURCES): New macro.
5605         (datetime_mod_CFLAGS): Likewise.
5606         (datetime_mod_LDFLAGS): Likewise.
5607         (date_mod_SOURCES): Likewise.
5608         (date_mod_CFLAGS): Likewise.
5609         (date_mod_LDFLAGS): Likewise.
5610         (datehook_mod_SOURCES): Likewise.
5611         (datehook_mod_CFLAGS): Likewise.
5612         (datehook_mod_LDFLAGS): Likewise.
5614         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5615         and datehook.mod.
5616         (datetime_mod_SOURCES): New macro.
5617         (datetime_mod_CFLAGS): Likewise.
5618         (datetime_mod_LDFLAGS): Likewise.
5619         (date_mod_SOURCES): Likewise.
5620         (date_mod_CFLAGS): Likewise.
5621         (date_mod_LDFLAGS): Likewise.
5622         (datehook_mod_SOURCES): Likewise.
5623         (datehook_mod_CFLAGS): Likewise.
5624         (datehook_mod_LDFLAGS): Likewise.
5626         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5628         * commands/date.c: New file.
5630         * hook/datehook.c: Likewise.
5632         * include/grub/lib/datetime.h: Likewise.
5634         * include/grub/i386/cmos.h: Likewise.
5636         * lib/datetime.c: Likewise.
5638         * lib/i386/datetime.c: Likewise.
5640         * lib/efi/datetime.c: Likewise.
5642 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5644         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5645         (grub_mkelfimage_SOURCES): New variable.
5646         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5648         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5649         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5650         * conf/powerpc-ieee1275.rmk: Likewise.
5651         * conf/i386-ieee1275.rmk: Likewise.
5653         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5654         * kern/i386/coreboot/init.c: Likewise.
5656         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5657         with `<grub/cpu/kernel.h>'.
5658         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5659         to ...
5660         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5661         * kern/i386/coreboot/startup.S: Likewise.
5663         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5664         (GRUB_MOD_GAP): Remove.
5665         * include/grub/powerpc/kernel.h: New file.
5666         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5667         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5668         * include/grub/i386/kernel.h: New file.
5669         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5670         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5671         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5673         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5674         `grub-mkelfimage'.
5675         Use --directory when invoking grub_mkimage.
5677         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5678         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5679         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5680         and GRUB_KERNEL_CPU_PREFIX.
5682 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5684         * include/grub/err.h (grub_err_printf): New function prototype.
5685         * util/misc.c (grub_err_printf): New function.
5686         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5687         grub_printf.
5688         * kern/err.c (grub_print_error): Use grub_err_printf.
5690 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5692         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5694 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5696         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5697         boot entry.
5699 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5701         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5702         of the relocation code from here ...
5703         (grub_multiboot): ... to here.
5704         (forward_relocator, backward_relocator): Move from here ...
5705         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5706         (grub_multiboot_backward_relocator): ... to here.
5707         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5708         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5709         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5710         (grub_multiboot_forward_relocator_end)
5711         (grub_multiboot_backward_relocator)
5712         (grub_multiboot_backward_relocator_end): New variables.
5714 2008-08-12  Bean  <bean123ch@gmail.com>
5716         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5718 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5720         * kern/i386/linuxbios/startup.S: Move from here ...
5721         * kern/i386/coreboot/startup.S: ... to here.
5723         * kern/i386/linuxbios/init.c: Move from here ...
5724         * kern/i386/coreboot/init.c: ... to here.
5726         * kern/i386/linuxbios/table.c: Move from here ...
5727         * kern/i386/coreboot/mmap.c: ... to here.
5729         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5731 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5733         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5734         errors.  Leave it to the upper layer to handle them.
5736 2008-08-09  Christian Franke  <franke@computer.org>
5738         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5739         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5740         Install `grub.d/10_windows' only on Cygwin.
5741         * configure.ac: Add subst of `target_os'.
5742         Check `target_os' also before setting TARGET_OBJ2ELF.
5743         Add `--enable-grub-pe2elf'.
5745 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5747         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5748         (grub_last_time): Change type to grub_uint64_t.
5749         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5750         (grub_disk_close): Likewise.
5752         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5753         (run_menu): Migrate code from to using grub_get_time_ms().
5755         * util/misc.c (grub_get_time_ms): New function.
5757 2008-08-08  Marco Gerards  <marco@gnu.org>
5759         * disk/ata.c (grub_ata_regget): Change return type to
5760         `grub_uint8_t'.
5761         (grub_ata_regget2): Likewise.
5762         (grub_ata_wait_status): New function.
5763         (grub_ata_wait_busy): Removed function, updated all users to use
5764         `grub_ata_wait_status'.
5765         (grub_ata_wait_drq): Likewise.
5766         (grub_ata_cmd): New function.
5767         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5768         error handling.
5769         (grub_ata_pio_write): Add error handling.
5770         (grub_atapi_identify): Likewise.
5771         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5772         handling.
5773         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5774         handling.  Actually use the detected registers.  Reorder the
5775         detection logic such that it is easier to read.
5776         (grub_ata_pciinit): Do not assign the same ID to each controller.
5777         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5778         handling.
5779         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5781         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5783 2008-08-08  Marco Gerards  <marco@gnu.org>
5785         * NEWS: Update.
5787 2008-08-07  Bean  <bean123ch@gmail.com>
5789         * include/grub/x86_64/pci.h: New file.
5791 2008-08-07  Christian Franke  <franke@computer.org>
5793         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5794         (TIMER2_GATE): Likewise.
5795         (grub_pit_wait): Add enable/disable of the timer2 gate
5796         bit of port 0x61.  This fixes a possible infinite loop.
5798 2008-08-07  Bean  <bean123ch@gmail.com>
5800         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5801         kern/i386/tsc.c and kern/i386/pit.c.
5803         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5804         x86_64 platform.
5806         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5807         <grub/i386/tsc.h>.
5809         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5811 2008-08-07  Bean  <bean123ch@gmail.com>
5813         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5815         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5817         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5818         multiple inclusion. Add #include <grub/types.h>.
5820 2008-08-06  Christian Franke  <franke@computer.org>
5822         * conf/common.rmk: Build and install `10_windows'.
5823         * util/grub.d/10_windows.in: New script.
5825 2008-08-06  Pavel Roskin  <proski@gnu.org>
5827         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5829 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5831         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5832         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5834 2008-08-06  Bean  <bean123ch@gmail.com>
5836         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5837         (grub_pxefs_fs_int): Remove dummy definition.
5838         (grub_pxefs_open): Use data->block_size to store the current block
5839         size setting.
5840         (grub_pxefs_read): Use block size stored in data->block_size. As the
5841         value of grub_pxe_blksize can be changed after the file is opened.
5843 2008-08-06  Bean  <bean123ch@gmail.com>
5845         * fs/i386/pc/pxe.c (curr_file): new variable.
5846         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5847         require the dummy internal file system anymore.
5848         (grub_pxefs_read): Removed.
5849         (grub_pxefs_close): Likewise.
5850         (grub_pxefs_fs_int): Likewise.
5851         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5852         connection when we switch file.
5853         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5855 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5857         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5858         `halt.mod'.
5859         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5860         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5862         * kern/i386/halt.c: New file.
5863         * kern/i386/reboot.c: Likewise.
5864         * include/grub/i386/reboot.h: Likewise.
5865         * include/grub/i386/halt.h: Likewise.
5867         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5868         Include `<grub/cpu/halt.h>'.
5869         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5870         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5872         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5873         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5874         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5875         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5876         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5877         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5878         from here ...
5879         * include/grub/i386/at_keyboard.h: ... to here.
5881 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5883         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5884         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5885         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5886         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5887         `kern/generic/millisleep.c'.
5889         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5890         instead of grub_get_rtc().
5891         (grub_tsc_init): Initialize `tsc_boot_time'.
5893         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5894         (grub_machine_init): Use grub_tsc_init() rather than
5895         installing an RTC-based handler via grub_install_get_time_ms().
5897         * kern/i386/pit.c: New file.
5898         * include/grub/i386/pit.h: Likewise.
5900 2008-08-05  Bean  <bean123ch@gmail.com>
5902         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5904         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5905         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5906         (pxe_mod_SOURCES): New macro.
5907         (pxe_mod_CFLAGS): Likewise.
5908         (pxe_mod_LDFLAGS): Likewise.
5909         (pxecmd_mod_SOURCES): Likewise.
5910         (pxecmd_mod_CFLAGS): Likewise.
5911         (pxecmd_mod_LDFLAGS): Likewise.
5913         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5914         (grub_pxe_call): Likewise.
5916         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5918         * commands/i386/pc/pxecmd.c: New file.
5920         * fs/i386/pc/pxe.c: Likewise.
5922         * include/grub/i386/pc/pxe.h: Likewise.
5924 2008-08-05  Bean  <bean123ch@gmail.com>
5926         * util/console.c (grub_console_cur_color): New variable.
5927         (grub_console_standard_color): Likewise.
5928         (grub_console_normal_color): Likewise.
5929         (grub_console_highlight_color): Likewise.
5930         (color_map): Likewise.
5931         (use_color): Likewise.
5932         (NUM_COLORS): New macro.
5933         (grub_ncurses_setcolorstate): Handle color properly.
5934         (grub_ncurses_setcolor): Don't change color here, just remember the
5935         settings, color will be set in grub_ncurses_setcolorstate.
5936         (grub_ncurses_getcolor): New function.
5937         (grub_ncurses_init): Initialize color pairs.
5938         (grub_ncurses_term): New member grub_ncurses_getcolor.
5940 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5942         High resolution timer support.  Implemented for x86 CPUs using TSC.
5943         Extracted generic grub_millisleep() so it's linked in only as needed.
5944         This requires a Pentium compatible CPU; if the RDTSC instruction is
5945         not supported, then it falls back on the generic grub_get_time_ms()
5946         implementation that uses the machine's RTC.
5948         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5949         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5950         `kern/generic/millisleep.c'.
5952         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5953         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5955         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5956         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5958         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5960         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5961         `kern/generic/millisleep.c'.
5963         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5965         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5967         * kern/generic/rtc_get_time_ms.c: New file.
5969         * kern/generic/millisleep.c: New file.
5971         * kern/misc.c: Don't include
5972         <kern/time.h> anymore.
5973         (grub_millisleep_generic): Removed.
5975         * commands/sleep.c (grub_interruptible_millisleep): Uses
5976         grub_get_time_ms() instead of grub_get_rtc().
5978         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5979         function.
5980         (grub_cpu_is_cpuid_supported): New inline function.
5981         (grub_cpu_is_tsc_supported): New inline function.
5982         (grub_tsc_init): New function prototype.
5983         (grub_tsc_get_time_ms): New function prototype.
5985         * kern/i386/tsc.c (grub_get_time_ms): New file.
5987         * include/grub/time.h: Include <grub/types.h.
5988         (grub_millisleep_generic): Removed.
5989         (grub_get_time_ms): New prototype.
5990         (grub_install_get_time_ms): New prototype.
5991         (grub_rtc_get_time_ms): New prototype.
5993         * kern/time.c (grub_get_time_ms): New function.
5994         (grub_install_get_time_ms): New function.
5996         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5997         <grub/time.h> anymore.
5998         (grub_millisleep): Removed.
5999         (grub_machine_init): Call grub_tsc_init.
6001         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6002         get_time_ms() implementation.
6004         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6005         (ieee1275_get_time_ms): New function.
6006         (grub_machine_init): Install get_time_ms() implementation.
6008         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6009         (grub_machine_init): Call grub_tsc_init().
6010         (grub_millisleep): Removed.
6012         * kern/ieee1275/init.c (grub_millisleep): Removed.
6013         (grub_machine_init): Install ieee1275_get_time_ms()
6014         implementation.
6015         (ieee1275_get_time_ms): New function.
6016         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6017         real work.
6019 2008-08-05  Marco Gerards  <marco@gnu.org>
6021         * disk/ata.c: Include <grub/pci.h>.
6022         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6023         (grub_ata_initialize): Rewritten.
6024         (grub_ata_device_initialize): New function.
6026 2008-08-04  Pavel Roskin  <proski@gnu.org>
6028         * kern/main.c: Include grub/mm.h.
6030 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6032         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6033         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6034         corruption problem).
6036 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6038         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6039         warnings introduced in my last commit.
6041 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6043         Make PCI available on all i386 architectures.
6045         * include/grub/i386/pc/pci.h: Move from here ...
6046         * include/grub/i386/pci.h: ... to here.
6048         * include/grub/i386/pc/pci.h: Remove.
6049         * include/grub/i386/efi/pci.h: Remove.
6050         * include/grub/x86_64/efi/pci.h: Remove.
6052         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6053         `<grub/cpu/pci.h>'.
6055         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6056         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6057         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6059         * conf/i386-ieee1275.rmk: Likewise.
6061 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6063         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6064         (grub_console_setcursor): Make it possible to set cursor off.
6066 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6068         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6069         of modules instead of assuming which platform provides what.
6070         * util/update-grub.in: Likewise.
6072 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6074         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6075         instead of `grub_install_dos_part' to determine whether a drive needs
6076         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6077         because it can be overridden when loading GRUB via Multiboot).
6079 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6081         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6083 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6085         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6086         of informational grub_dprintf() calls.
6088 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6090         * disk/memdisk.c (memdisk_size): Don't initialize.
6091         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6093         * include/grub/i386/pc/kernel.h
6094         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6095         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6096         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6097         (grub_arch_memdisk_size): Remove.
6099         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6100         field (was only used to transfer a constant).  Add `type' field to
6101         support multiple module types.
6102         (grub_module_iterate): New function.
6104         * kern/device.c (grub_device_open): Do not hide error messages
6105         when grub_disk_open() fails.  Use grub_print_error() instead.
6107         * kern/i386/pc/init.c (grub_arch_modules_addr)
6108         (grub_arch_memdisk_size): Remove functions.
6109         (grub_arch_modules_addr): Return the module address in high memory
6110         (now that it isn't copied anymore).
6112         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6113         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6114         decompression routine (grub_total_module_size already includes that
6115         now).  Don't copy modules back to low memory.
6117         * kern/main.c: Include `<grub/mm.h>'.
6118         (grub_load_modules): Split out (and use) ...
6119         (grub_module_iterate): ... this function, which iterates through
6120         module objects and runs a hook.
6121         Comment out grub_mm_init_region() call, as it would cause non-ELF
6122         modules to be overwritten.
6124         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6125         the memdisk image in its own region, make it part of the module list.
6126         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6127         (main): Parse --memdisk|-m option, and pass user-provided path as
6128         parameter to generate_image().
6129         (add_segments): Pass `memdisk_path' down to load_modules().
6130         (load_modules): Embed memdisk image in module section when requested.
6131         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6132         `header.type' instead of `header.offset'.
6134         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6135         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6136         (memdisk_mod_LDFLAGS): New variables.
6137         * conf/i386-coreboot.rmk: Likewise.
6138         * conf/i386-ieee1275.rmk: Likewise.
6140 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6142         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6143         (backward_relocator): New variables.  Used to allocate and relocate
6144         the payload, respectively.
6145         (grub_multiboot_load_elf32): Load into heap instead of requested
6146         address, install the appropriate relocator code in each bound of
6147         the payload, and set the entry point such that
6148         grub_multiboot_real_boot() will jump to one of them.
6150         * kern/i386/loader.S (grub_multiboot_payload_size)
6151         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6152         (grub_multiboot_payload_entry_offset): New variables.
6153         (grub_multiboot_real_boot): Set cpu context to what the relocator
6154         expects, and jump to the relocator instead of the payload.
6156         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6157         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6158         (grub_multiboot_payload_entry_offset): Export.
6160 2008-08-01  Bean  <bean123ch@gmail.com>
6162         * normal/menu_entry.c (editor_getline): Don't return the original
6163         string as result, as it will be released by lexer once it has done
6164         using it.
6166 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6168         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6169         within menuentries, not before them.
6170         util/grub.d/10_hurd.in: Likewise.
6172 2008-08-01  Bean  <bean123ch@gmail.com>
6174         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6175         (bufio_mod_SOURCES): New macro.
6176         (bufio_mod_CFLAGS): Likewise.
6177         (bufio_mod_LDFLAGS): Likewise.
6179         * include/grub/bufio.h: New file.
6181         * io/bufio.c: Likewise.
6183         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6184         (grub_video_reader_png): Use grub_buffile_open to open file.
6186         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6187         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6189         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6190         (grub_video_reader_tga): Use grub_buffile_open to open file.
6192         * font/manager.c: Include <grub/bufio.h>.
6193         (add_font): Use grub_buffile_open to open file.
6195 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6197         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6198         ELF segments, use a macro for arbitrarily accessing any of them instead
6199         of preparing a pointer that allows access to one at a time.
6200         (grub_multiboot_load_elf64): Likewise.
6202 2008-07-31  Bean  <bean123ch@gmail.com>
6204         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6205         GRUB_KERNEL_MACHINE_DATA_END.
6207 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6209         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6210         Increase from 0x50 to 0x60.
6211         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6212         use UUIDs to identify the root drive for them.  If that's not
6213         possible, abort.
6214         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6215         check, for cross-disk installs.
6217 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6219         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6220         is non-empty, use it to set the `prefix' environment variable instead
6221         of the usual approach.
6222         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6223         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6224         environment variable instead of dummy make_install_device().
6226         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6227         (start): Insert a data section, with `grub_prefix' variable.
6228         * kern/i386/linuxbios/startup.S: Likewise.
6230         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6231         New variable reference.
6232         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6233         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6234         to `start').
6235         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6236         section within startup.S (relative to `start').
6237         * include/grub/i386/coreboot/kernel.h: Likewise.
6239         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6240         Overwrite grub_prefix with its contents, at the beginning of the
6241         first segment.
6242         (main): Understand -p|--prefix.
6244 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6246         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6248 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6250         * term/i386/pc/vga_text.c (grub_console_cls): Use
6251         grub_console_gotoxy() to go back to beginning of the screen.
6252         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6254 2008-07-29  Christian Franke  <franke@computer.org>
6256         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6257         Add conversion of emulated mount points on Cygwin.
6259 2008-07-29  Christian Franke  <franke@computer.org>
6261         * util/update-grub.in: Add a check for admin
6262         group on Cygwin.
6263         Remove old `grub.cfg.new' before creation.
6264         Add `-f' to `mv' to handle the different filesystem
6265         semantics of Windows.
6267 2008-07-29  Bean  <bean123ch@gmail.com>
6269         * normal/main.c (get_line): Fix buffer overflow bug.
6271 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6273         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6274         (struct grub_apple_header): New struct.  Describes the layout of
6275         the partmap header.
6276         (apple_partition_map_iterate): Check the header magic as well as the
6277         partition magic (which was already being checked).
6279 2008-07-28  Pavel Roskin  <proski@gnu.org>
6281         * genmk.rb: Add a warning to the beginning of the output that
6282         it's a generated file and should not be edited.
6284 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6286         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6287         with the same number are found, just use issue a warning with
6288         grub_dprintf(), as this error has been reported to be non-fatal.
6290 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6292         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6293         information.
6295 2008-07-27  Bean  <bean123ch@gmail.com>
6297         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6298         (grub_fat_find_dir): Ignore case when comparing filename.
6300 2008-07-27  Bean  <bean123ch@gmail.com>
6302         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6303         smallino, as it's more descriptive, and i8count can be confused with
6304         the other field count.
6305         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6306         inode type.
6308 2008-07-27  Bean  <bean123ch@gmail.com>
6310         * commands/crc.c: New file.
6312         * lib/crc.c: Likewise.
6314         * include/grub/lib/crc.h: Likewise.
6316         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6318         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6319         (hexdump): Move this function to ...
6321         * lib/hexdump.c: ... here.
6323         * include/grub/hexdump.h: Renamed to ...
6325         * include/grub/lib/hexdump.h: ... this.
6327         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6329         * util/grub-editenv.c: Likewise.
6331         * include/envblk.h: Renamed to ...
6333         * include/lib/envblk.h: ... this.
6335         * util/envblk.c: Renamed to ...
6337         * lib/envblk.c: ... this.
6339         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6340         lib/hexdump.c.
6341         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6342         (pkglib_MODULES): Add crc.mod.
6343         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6344         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6345         (crc_mod_SOURCES): New macro.
6346         (crc_mod_CFLAGS): Likewise.
6347         (crc_mod_LDFLAGS): Likewise.
6349         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6351         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6353         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6355         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6357         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6359 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6361         * commands/help.c: Include <grub/term.h>.
6362         (TERM_WIDTH): Removed.  Updated all users.
6364 2008-07-27  Pavel Roskin  <proski@gnu.org>
6366         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6367         spurious warnings about a comment within a comment.
6369 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6371         * util/getroot.c (find_root_device): Skip devices that match
6372         /dev/dm-[0-9].  This lets the real device be found for any type of
6373         abstraction (LVM, EVMS, RAID..).
6374         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6375         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6376         device is found first, find_root_device() will now skip it.
6378 2008-07-24  Pavel Roskin  <proski@gnu.org>
6380         * include/grub/types.h: Use __builtin_bswap32() and
6381         __builtin_bswap64() with gcc 4.3 and newer.
6383 2008-07-24  Christian Franke  <franke@computer.org>
6385         * util/i386/pc/grub-install.in: If `--debug' is specified,
6386         pass `--verbose' to grub-setup.
6387         Abort script if make_system_path_relative_to_its_root() fails.
6389 2008-07-24  Bean  <bean123ch@gmail.com>
6391         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6392         variable `target_platform' should be `platform'.
6394 2008-07-24  Bean  <bean123ch@gmail.com>
6396         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6397         (grub_png_init_fixed_block): New function.
6398         (grub_png_decode_image_data): Handle fixed huffman code compression.
6400 2008-07-24  Bean  <bean123ch@gmail.com>
6402         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6403         (grub_pe2elf_SOURCES): New macro.
6404         (CLEANFILES): Add grub-pe2elf.
6406         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6407         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6408         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6409         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6410         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6411         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6412         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6413         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6414         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6415         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6416         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6417         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6418         (GRUB_PE32_DT_FUNCTION): Likewise.
6419         (GRUB_PE32_REL_I386_DIR32): Likewise.
6420         (GRUB_PE32_REL_I386_REL32): Likewise.
6421         (grub_pe32_symbol): New structure.
6422         (grub_pe32_reloc): Likewise.
6424         * util/grub-pe2elf.c: New file.
6426         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6427         start symbol in non pc platform.
6429         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6431         The following patches are from Christian Franke.
6433         * include/grub/dl.h: Remove .previous, gas supports this only
6434         for ELF format.
6436         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6437         Remove .type, gas supports this only for ELF format.
6439         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6440         nullbytes in symbol table. This fixes an infinite loop if table is
6441         zero filled.
6443         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6444         TARGET_IMG_LDFLAGS and EXEEXT.
6446         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6447         TARGET_IMG_LDFLAGS_AC.
6448         (grub_CHECK_STACK_ARG_PROBE): New function.
6450         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6452         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6454         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6455         to set TARGET_IMG_LD* accordingly.
6456         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6457         Add call to grub_CHECK_STACK_ARG_PROBE.
6458         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6460         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6462         * genmk.rb: Add EXEEXT to CLEANFILES.
6464 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6466         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6467         define the codes for arrows and lines used for the menu).
6468         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6469         as well.
6471         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6472         fonts, because the latter are too slow.
6474 2008-07-21  Bean  <bean123ch@gmail.com>
6476         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6477         a20. Run keyboard test last, as it will cause macbook to halt.
6479 2008-07-18  Pavel Roskin  <proski@gnu.org>
6481         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6482         load foreign architecture modules correctly anyway.  Keep
6483         support for loading host architecture modules, whether we
6484         compile them or not.
6486 2008-07-17  Pavel Roskin  <proski@gnu.org>
6488         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6489         change target_cpu.  The compiler default can mismatch target_cpu
6490         in any case.
6492         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6493         * kern/efi/efi.c: Likewise.
6495         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6496         target compiler is functional.
6497         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6498         are set up.
6500         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6501         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6502         adjustments from the rest, only do them if target is not
6503         explicitly given.  Merge other adjustments with the final sanity
6504         check.  Remove an extraneous check for supported CPU.  Be
6505         specific which CPU and which platform is not supported.
6507         * configure.ac: Default to pc platform for x86_64.
6509 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6511         Partial LinuxBIOS -> Coreboot rename.
6513         * conf/i386-linuxbios.rmk: Renamed to ...
6514         * conf/i386-coreboot.rmk: ... this.
6515         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6516         * configure.ac: Accept "coreboot" as input platform (but maintain
6517         compatibility with "linuxbios").
6518         * include/grub/i386/linuxbios: Renamed to ...
6519         * include/grub/i386/coreboot: ... this.
6521 2008-07-17  Bean  <bean123ch@gmail.com>
6523         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6524         (appleldr_mod_SOURCE): New variable.
6525         (appleldr_mod_CFLAGS): Likewise.
6526         (appleldr_mod_LDFLAGS): Likewise.
6527         (pci_mod_SOURCES): Likewise.
6528         (pci_mod_CFLAGS): Likewise.
6529         (pci_mod_LDFLAGS): Likewise.
6530         (lspci_mod_SOURCES): Likewise.
6531         (lspci_mod_CFLAGS): Likewise.
6532         (lspci_mod_LDFLAGS): Likewise.
6534         * conf/x86_64-efi.rmk: New file.
6536         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6537         macro.
6538         (grub_efidisk_write): Likewise.
6540         * include/efi/api.h (efi_call_0): New macro.
6541         (efi_call_1): Likewise.
6542         (efi_call_2): Likewise.
6543         (efi_call_3): Likewise.
6544         (efi_call_4): Likewise.
6545         (efi_call_5): Likewise.
6546         (efi_call_6): Likewise.
6548         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6549         grub_rescue_cmd_chainloader.
6551         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6552         (grub_pe32_optional_header): Change some fields based on i386 or
6553         x86_64 platform.
6554         (GRUB_PE32_PE32_MAGIC): Likewise.
6556         * include/grub/efi/uga_draw.h: New file.
6558         * include/grub/elf.h (STN_ABS): New constant.
6559         (R_X86_64_NONE): Relocation constant for x86_64.
6560         (R_X86_64_64): Likewise.
6561         (R_X86_64_PC32): Likewise.
6562         (R_X86_64_GOT32): Likewise.
6563         (R_X86_64_PLT32): Likewise.
6564         (R_X86_64_COPY): Likewise.
6565         (R_X86_64_GLOB_DAT): Likewise.
6566         (R_X86_64_JUMP_SLOT): Likewise.
6567         (R_X86_64_RELATIVE): Likewise.
6568         (R_X86_64_GOTPCREL): Likewise.
6569         (R_X86_64_32): Likewise.
6570         (R_X86_64_32S): Likewise.
6571         (R_X86_64_16): Likewise.
6572         (R_X86_64_PC16): Likewise.
6573         (R_X86_64_8): Likewise.
6574         (R_X86_64_PC8): Likewise.
6576         * include/grub/i386/efi/pci.h: New file.
6578         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6579         Change it value based on platform.
6580         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6581         (GRUB_E820_RAM): Likewise.
6582         (GRUB_E820_RESERVED): Likewise.
6583         (GRUB_E820_ACPI): Likewise.
6584         (GRUB_E820_NVS): Likewise.
6585         (GRUB_E820_EXEC_CODE): Likewise.
6586         (GRUB_E820_MAX_ENTRY): Likewise.
6587         (grub_e820_mmap): New structure.
6588         (linux_kernel_header): Change the efi field according to different
6589         kernel version, also field from linux_kernel_header.
6591         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6593         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6594         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6595         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6596         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6597         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6598         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6599         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6600         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6601         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6602         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6604         * include/grub/x86_64/efi/kernel.h: New file.
6606         * include/grub/x86_64/efi/loader.h: Likewise.
6608         * include/grub/x86_64/efi/machine.h: Likewise.
6610         * include/grub/x86_64/efi/pci.h: Likewise.
6612         * include/grub/x86_64/efi/time.h: Likewise.
6614         * include/grub/x86_64/linux.h: Likewise.
6616         * include/grub/x86_64/setjmp.h: Likewise.
6618         * include/grub/x86_64/time.h: Likewise.
6620         * include/grub/x86_64/types.h: Likewise.
6622         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6623          GRUB_TARGET_SIZEOF_VOID_P.
6625         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6626         (grub_efi_locate_handle): Likewise.
6627         (grub_efi_open_protocol): Likewise.
6628         (grub_efi_set_text_mode): Likewise.
6629         (grub_efi_stall): Likewise.
6630         (grub_exit): Likewise.
6631         (grub_reboot): Likewise.
6632         (grub_halt): Likewise.
6633         (grub_efi_exit_boot_services): Likewise.
6634         (grub_get_rtc): Likewise.
6636         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6637         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6638         (grub_efi_allocate_pages): Wrap efi calls.
6639         (grub_efi_free_pages): Wrap efi calls.
6640         (grub_efi_get_memory_map): Wrap efi calls.
6642         * kern/x86_64/dl.c: New file.
6644         * kern/x86_64/efi/callwrap.S: Likewise.
6646         * kern/x86_64/efi/startup.S: Likewise.
6648         * loader/efi/appleloader.c: Likewise.
6650         * loader/efi/chainloader.c (cmdline): New variable.
6651         (grub_chainloader_unload): Wrap efi calls.
6652         (grub_chainloader_boot): Likewise.
6653         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6654         command line.
6656         * loader/efi/chainloader_normal.c (chainloader_command):
6657         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6658         command line.
6660         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6661         method.
6662         (grub_e820_add_region): New function.
6663         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6664         booting.
6665         (grub_find_video_card): New function.
6666         (grub_linux_setup_video): New function.
6667         (grub_rescue_cmd_linux): Probe for video information.
6669         * normal/x86_64/setjmp.S: New file.
6671         * term/efi/console.c (map_char): New function.
6672         (grub_console_putchar): Map unicode char.
6673         (grub_console_checkkey): Wrap efi calls.
6674         (grub_console_getkey): Likewise.
6675         (grub_console_getwh): Likewise.
6676         (grub_console_gotoxy): Likewise.
6677         (grub_console_cls): Likewise.
6678         (grub_console_setcolorstate): Likewise.
6679         (grub_console_setcursor): Likewise.
6681         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6683 2008-07-16  Pavel Roskin  <proski@gnu.org>
6685         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6686         format strings.
6688         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6689         pointer, not an integer.  This fixes a warning and prevents
6690         precision loss on 64-bit systems.
6691         (relocate_addresses): Remove unneeded cast.
6693 2008-07-15  Pavel Roskin  <proski@gnu.org>
6695         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6697         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6699         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6700         Fix comparison between signed and unsigned.
6702         * include/grub/i386/ieee1275/console.h: Declare
6703         grub_console_init() and grub_console_fini().
6705         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6706         It's empty and unused.
6708         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6709         beginning to avoid warnings with some compilers.
6711         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6712         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6714 2008-07-14  Pavel Roskin  <proski@gnu.org>
6716         * kern/env.c (grub_register_variable_hook): Don't copy empty
6717         string, it leaks memory.  Pass "" to grub_env_set(), it should
6718         handle constant strings.
6720         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6721         * commands/cmp.c (grub_cmd_cmp): Likewise.
6722         * kern/dl.c (grub_dl_flush_cache): Likewise.
6723         (grub_dl_load_core): Likewise.
6724         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6725         (grub_elf64_load_phdrs): Likewise.
6727 2008-07-13  Pavel Roskin  <proski@gnu.org>
6729         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6730         between signed and unsigned.
6731         (LzmaEnc_Finish): Fix warning about an unused parameter.
6733 2008-07-13  Bean  <bean123ch@gmail.com>
6735         * Makefile.in (enable_lzo): New rule.
6737         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6739         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6741         * boot/i386/pc/lnxboot.S: #include <config.h>.
6743         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6744         its value according to the compression algorithm used, lzo or lzma.
6746         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6747         compression algorithm according to configure macro.
6749         * kern/i386/pc/startup.S (codestart): Likewise.
6751         * kern/i386/pc/lzma_decode.S: New file.
6753         * include/grub/lib/LzFind.h: Likewise.
6755         * include/grub/lib/LzHash.h: Likewise.
6757         * include/grub/lib/LzmaDec.h: Likewise.
6759         * include/grub/lib/LzmaEnc.h: Likewise.
6761         * include/grub/lib/LzmaTypes.h: Likewise.
6763         * lib/LzFind.c: Likewise.
6765         * lib/LzmaDec.c: Likewise.
6767         * lib/LzmaEnc.c: Likewise.
6769 2008-07-13  Bean  <bean123ch@gmail.com>
6771         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6772         (grub_ext4_extent_header): New structure.
6773         (grub_ext4_extent): Likewise.
6774         (grub_ext4_extent_idx): Likewise.
6775         (grub_ext4_find_leaf): New function.
6776         (grub_ext2_read_block): Handle extents.
6778 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6780         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6782 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6784         * util/grub.d/40_custom.in: New file. Example on how to add custom
6785         entries to /etc/grub.d.
6786         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6787         40_custom (implicitly, by merging all the grub.d rules).
6789 2008-07-11  Pavel Roskin  <proski@gnu.org>
6791         * commands/read.c (grub_getline): Fix invalid memory access.
6792         Don't add newline to the variable value.
6794         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6795         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6796         (serial_hw_get_port): Check validity of the port number.
6797         (grub_cmd_serial): Check return value of serial_hw_get_port().
6799 2008-07-07  Pavel Roskin  <proski@gnu.org>
6801         * boot/i386/pc/diskboot.S (notification_string): Replace
6802         "Loading kernel" with just "loading".  This is shorter, less
6803         confusing and saves a few bytes for possible future changes.
6805 2008-07-05  Pavel Roskin  <proski@gnu.org>
6807         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6808         size for ATAPI devices, they are undefined.  Output sector
6809         number in decimal form.
6811         * disk/ata.c: Use named constants for status bits.
6813 2008-07-04  Pavel Roskin  <proski@gnu.org>
6815         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6816         grub_addr_t before casting it to the void pointer to fix a
6817         warning.  Non-addressable regions are discarded earlier.
6818         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6819         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6820         (check_signature): Don't shadow table_header.
6821         (grub_linuxbios_table_iterate): Cast numeric constants to
6822         grub_linuxbios_table_header_t.
6823         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6824         grub_stop().
6826         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6827         prevent warnings.
6829         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6830         pointer, which can cause warnings.  Support 64-bit addresses.
6832         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6833         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6835 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6837         This fixes a performance issue when pc & gpt partmap iterators
6838         didn't abort iteration even after our hook found what it was
6839         looking for (often causing expensive probes of non-existent drives).
6841         Some callers relied on previous buggy behaviour, since they would
6842         raise an error when their own hooks caused early abortion of its
6843         iteration.
6845         * kern/device.c (grub_device_open): Improve error message.
6846         * disk/lvm.c (grub_lvm_open): Likewise.
6847         * disk/raid.c (grub_raid_open): Likewise.
6849         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6850         when hook requests it, independently of grub_errno.
6851         (pc_partition_map_probe): Do not fail when find_func() caused
6852         early abortion of pc_partition_map_iterate().
6854         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6855         when hook requests it, independently of grub_errno.
6856         (gpt_partition_map_probe): Do not fail when find_func() caused
6857         early abortion of gpt_partition_map_iterate().
6859         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6860         when hook requests it, independently of grub_errno.  Do not fail when
6861         part_map_iterate_hook() caused early abortion of p->iterate().
6863         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6864         when grub_partition_iterate() returned with non-zero.
6866 2008-07-03  Pavel Roskin  <proski@gnu.org>
6868         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6869         like we do in grub_ata_pio_read().
6870         (grub_ata_readwrite): Always write individual sectors.  Fix the
6871         sector count for the remainder.
6872         (grub_ata_write): Enable writing to ATA devices.  Correctly
6873         report error for ATAPI devices.
6875 2008-07-02  Pavel Roskin  <proski@gnu.org>
6877         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6878         warning.
6880         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6881         for every read sector, we already increment it for the whole
6882         batch.  This fixes reading more than 256 sectors at once.
6884         * util/grub-editenv.c (cmd_info): Cast argument to long
6885         explicitly.  ptrdiff_t reduces to int on i386.
6887         * util/grub-editenv.c (main): Be specific which parameter is
6888         missing.
6890         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6891         (memdisk): Make memdisk_orig_addr a pointer.
6893         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6894         for file offsets, use grub_off_t instead.  Fix printf format
6895         warnings.
6897         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6898         there.  Real unexpected warnings should not drown in the noise
6899         about known problems.
6901         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6902         grub_disk_addr_t for memory addresses.
6904         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6905         explicitly to fix a warning.
6907         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6909         * Makefile.in (MODULE_LDFLAGS): New variable.
6910         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6911         the linker accepts --build-id=none.
6912         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6913         MODULE_LDFLAGS.
6914         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6916         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6917         those in Linux XFS code.  Provide a way to access 64-bit parent
6918         inode.
6919         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6920         the end of struct grub_xfs_dir_header.
6922 2008-07-02  Bean  <bean123ch@gmail.com>
6924         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6925         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6926         and GRUB_IEEE1275_FLAG_NO_ANSI.
6928         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6929         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6930         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6932         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6933         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6935         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6936         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6938         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6939         esc sequence on non ANSI terminal.
6940         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6942         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6943         beginning of file.
6945 2008-07-02  Bean  <bean123ch@gmail.com>
6947         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6948         (grub_editenv_SOURCES): New variable.
6949         (pkglib_MODULES): Add loadenv.mod.
6950         (loadenv_mod_SOURCES): New variable.
6951         (loadenv_mod_CFLAGS): Likewise.
6952         (loadenv_mod_LDFLAGS): Likewise.
6954         * include/grub/envblk.h: New file.
6956         * util/envblk.c: New file.
6958         * util/grub-editenv.c: New file.
6960         * commands/loadenv.c: New file.
6962 2008-07-01  Pavel Roskin  <proski@gnu.org>
6964         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6965         not unsigned char.  This fixes warnings and is consistent with
6966         other tags.
6968         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6970         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6972         * term/tparm.c (analyze): Always set *popcount.
6974         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6975         cast to fix a warning.
6977         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6978         cast to suppress a warning.
6980         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6981         grub_fshelp_read_file() expects.
6983         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6984         write uuid as a 32-bit value in CPU byte order, so declare and
6985         use it as such.
6987         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6988         long if the format specifier expects it.
6989         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6990         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6991         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6992         long to fix a warning.
6993         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6994         grub_dprintf() arguments to fix warnings.
6996 2008-06-30  Pavel Roskin  <proski@gnu.org>
6998         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6999         install_bsd_part immediately before core.img is embedded or
7000         modified on disk.  This fixes core.img verification if core.img
7001         cannot be embedded.
7003         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7004         core_path to calculate the blocklist.
7005         Patch from Javier Martín <lordhabbit@gmail.com>
7007 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7009         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7010         block to disk block.
7011         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7012         Patch from Niels Böhm <bitbucket@arcor.de>
7014 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7016         * util/update-grub_lib.in (font_path): Search for fonts in
7017         /boot/grub first, which is more likely to be readable (we aren't
7018         deciding where fonts live, just looking for them).
7020 2008-06-26  Pavel Roskin  <proski@gnu.org>
7022         * util/biosdisk.c (read_device_map): Don't leave dead map
7023         entries for devices failing stat() check.
7025         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7026         core_path_dev for the core.img path on the target device.
7028 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7030         * disk/fs_uuid.c: New file.
7031         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7032         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7033         (fs_uuid_mod_LDFLAGS): New variables.
7034         * include/grub/disk.h (grub_disk_dev_id): Add
7035         `GRUB_DISK_DEVICE_UUID_ID'.
7036         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7037         implement iterate().
7039 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7041         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7042         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7043         Linux image includes no initrd.
7045 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7047         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7048         call to resolve the core image location that effectively appended the
7049         name twice.
7051 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7053         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7054         call from here ...
7056         * util/grub.d/10_hurd.in: ... to here ...
7057         * util/grub.d/10_linux.in: ... and here.
7059 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7061         * kern/main.c (grub_main): Export `prefix' variable immediately
7062         after it has been set by grub_machine_set_prefix().
7064 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7066         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7067         search result when not saving to variable, not the other way around.
7068         When saving to variable, abort iteration as soon as a match is found.
7070 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7072         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7073         check for partition that provides /boot/grub.  Its logic is flawed,
7074         as it prevents prepare_grub_to_access_device() from being called
7075         multiple times.
7077 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7079         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7080         "insmod" command directly when abstraction modules are needed,
7081         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7082         since it had already been processed).
7084 2008-06-19  Pavel Roskin  <proski@gnu.org>
7086         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7087         changed.  This is needed in case GRUB_LIBDIR changes.
7088         * conf/i386-ieee1275.rmk: Likewise.
7089         * conf/i386-linuxbios.rmk: Likewise.
7090         * conf/i386-pc.rmk: Likewise.
7091         * conf/powerpc-ieee1275.rmk: Likewise.
7093 2008-06-18  Pavel Roskin  <proski@gnu.org>
7095         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7096         kernel_elf_symlist.c to symlist.c for consistency with other
7097         architectures.  Update all users.
7098         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7100 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7102         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7103         it in prefix.
7105         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7106         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7107         a RAID device, run setup() for all members independently on whether
7108         LVM abstraction is being used.
7109         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7110         If grub-mkimage has set `*install_dos_part == -2', don't override this
7111         value.
7112         Perform *install_dos_part adjustments independently on whether
7113         we're embedding or not.
7114         Clarify error message when image is too big for embedding.
7115         Remove duplicate *install_dos_part stanza.
7117 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7119         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7120         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7121         variables.
7122         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7123         values in grub_ofconsole_normal_color and
7124         grub_ofconsole_highlight_color (they're not directly related to
7125         background and foreground).
7126         (grub_ofconsole_setcolorstate): Extract background and foreground
7127         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7129 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7131         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7132         /boot/grub for the check in last commit, not /boot (they could be
7133         different partitions).
7135 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7137         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7138         asked to setup access for the same partition that provides /boot,
7139         don't bother using UUIDs since our root already has the value we
7140         want.
7142 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7144         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7145         I2O devices.
7146         Patch from Sven Mueller <sven@debian.org>.
7148 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7150         * util/update-grub.in: Check for $EUID instead of $UID.
7151         Reported by Vincent Zweije.
7153 2008-06-16  Bean  <bean123ch@gmail.com>
7155         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7156         (grub_ext2_read_block): Likewise.
7157         (grub_ext2_read_inode): Likewise.
7158         (grub_ext2_mount): Likewise.
7159         (grub_ext2_close): Likewise.
7160         (grub_ext3_get_journal): Removed.
7162         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7163         (grub_reiserfs_read_symlink): Likewise.
7164         (grub_reiserfs_mount): Likewise.
7165         (grub_reiserfs_open): Likewise.
7166         (grub_reiserfs_read): Likewise.
7167         (grub_reiserfs_close): Likewise.
7168         (grub_reiserfs_get_journal): Removed.
7170         * fs/fshelp.c (grub_fshelp_read): Removed.
7171         (grub_fshelp_map_block): Likewise.
7173         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7174         (grub_fshelp_journal): Likewise.
7175         (grub_fshelp_read): Likewise.
7176         (grub_fshelp_map_block): Likewise.
7178 2008-06-16  Pavel Roskin  <proski@gnu.org>
7180         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7181         floating point anymore.
7182         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7184 2008-06-15  Pavel Roskin  <proski@gnu.org>
7186         * commands/ls.c (grub_ls_list_files): Use integer calculations
7187         for human readable format, avoid floating point use.
7188         * kern/misc.c (grub_ftoa): Remove.
7189         (grub_vsprintf): Remove floating point support.
7191 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7193         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7194         devices.
7195         Reported by Max Vozeler.
7197 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7199         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7200         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7201         skipped later.
7202         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7203         the beginning of the prefix.
7205         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7206         It is assumed that if we have a memdisk, grub-mkimage has set
7207         grub_prefix to include the "(memdisk)" drive in it.
7209 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7211         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7212         Initialize keyboard controller after registering the terminal, so that
7213         grub_printf() can be called from grub_keyboard_controller_init().
7215 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7217         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7218         extent-btree which is written as big endian on disk.
7219         Reported by Alain Greppin  <al@chilibi.org>.
7221 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7223         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7224         * util/i386/pc/grub-install.in (modules): Likewise.
7226 2008-06-13  Pavel Roskin  <proski@gnu.org>
7228         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7230 2008-06-13  Bean  <bean123ch@gmail.com>
7232         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7234         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7236         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7237         to indicate sparse block.
7239 2008-06-12  Pavel Roskin  <proski@gnu.org>
7241         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7242         number, grub_fshelp_read() does it for us.
7244         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7245         linear disk read with journal translation.
7246         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7247         * include/grub/fshelp.h: Declare grub_fshelp_read().
7249 2008-06-09  Pavel Roskin  <proski@gnu.org>
7251         * fs/minix.c (grub_minix_mount): Handle error reading
7252         superblock.
7254 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7256         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7257         don't append the RAID prefix afterwards.
7258         Reported by Clint Adams.
7260 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7262         Based on description from Pavel:
7263         * kern/disk.c (grub_disk_check_range): Rename to ...
7264         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7265         tasks performed by this function.
7267 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7269         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7270         `num_serial' (for consistency with other variables).
7271         (struct grub_ntfs_data): Add `uuid' member.
7272         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7273         (grub_ntfs_uuid): New function.
7274         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7276 2008-06-07  Pavel Roskin  <proski@gnu.org>
7278         * util/biosdisk.c (open_device): Revert last change to the
7279         function, it broke installation.  The sector needs to be
7280         different dependent on which device is opened.
7282 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7284         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7285         rest of GRUB, and breakage doesn't happen if its value were modified.
7287         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7288         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7289         a constant (same value).
7290         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7291         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7293 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7295         * util/biosdisk.c (open_device): Do not modify sector offset when
7296         accessing a partition.  kern/disk.c already handles this for us.
7298 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7300         * util/grub-emu.c (grub_machine_init): Move code in this function from
7301         here ...
7302         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7303         segfault in case grub_printf() is called).
7305         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7306         grub_probe.  Update all users not to explicitly add it again.
7307         (grub_device): New variable; contains corresponding device for grubdir.
7308         (fs_module, partmap_module, devabstraction_module): Pass
7309         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7310         every time.
7312 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7314         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7315         is found, print it (same layout as with labels).
7317 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7319         * util/biosdisk.c (get_drive): Rename to ...
7320         (find_grub_drive): ... this.  Update all users.
7322         (get_os_disk): Rename to ...
7323         (convert_system_partition_to_system_disk): ... this.  Update all users.
7325         (find_drive): Rename to ...
7326         (find_system_device): ... this.  Update all users.
7328 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7330         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7331         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7332         (make_device_map): Likewise.
7334 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7336         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7337         before dereferencing it.
7339         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7340         union with fat12/fat16-specific ones.  Add some new fields, including
7341         `num_serial' for both versions.
7342         (struct grub_fat_data): Add `uuid' member.
7343         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7344         names.  Initialize `data->uuid' using `num_serial'.
7345         (grub_fat_uuid): New function.
7346         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7348         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7349         (grub_reiserfs_uuid): New function.
7350         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7351         member.
7353         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7354         (grub_xfs_uuid): New function.
7355         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7357 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7359         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7360         code that is backward compatible with pre-uuid search command.
7362 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7364         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7365         floppies after everything else, to ensure floppy drive isn't accessed
7366         unnecessarily (patch from Bean).
7368 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7370         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7371         not print device names when we were asked to set a variable.
7373 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7375         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7376         using "cursor-on" and "cursor-off" commands (understood at least by
7377         the Open Firmware flavour on OLPC).
7379 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7381         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7382         on and off sequences.
7384 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7386         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7387         * util/update-grub.in: Likewise.
7389 2008-05-30  Pavel Roskin  <proski@gnu.org>
7391         * util/biosdisk.c (linux_find_partition): Simplify logic and
7392         make the code more universal.  Keep special processing for
7393         devfs, but use a simple rule for all other devices.  If the
7394         device ends with a number, append 'p' and the partition number.
7395         Otherwise, append only the partition number.
7397 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7399         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7400         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7401         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7402         the `root' parameter to Linux.
7404 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7406         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7407         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7408         --fs_uuid with --fs-uuid.
7409         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7410         all filesystems support them).
7412 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7414         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7415         grub_printf() flags, since we're printing in units of 2 bytes.
7417 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7419         * util/grub.d/00_header.in: Remove obsolete comment referencing
7420         convert_system_path_to_grub_path().
7421         * util/update-grub.in: Likewise.
7422         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7423         (convert_system_path_to_grub_path): Add a warning message explaining
7424         that this function is deprecated.  Rely on is_path_readable_by_grub()
7425         for the readability checks.
7426         (font_path): Use is_path_readable_by_grub() for the readability
7427         check rather than convert_system_path_to_grub_path().
7429 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7431         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7432         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7433         converting it first.
7434         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7435         grub.cfg for access to font file, and afterwards call it again to set
7436         the root device.
7438 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7440         * commands/search.c (options): Add --fs_uuid option.
7441         (search_fs_uuid): New function.
7442         (grub_cmd_search): Fix --set argument passing.
7443         Use search_fs_uuid() when requested via --fs_uuid.
7444         (grub_search_init): Update help message.
7445         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7446         and redeclare it as an array of 16-bit words.
7447         (grub_ext2_uuid): New function.
7448         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7449         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7450         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7451         (GRUB_DEVICE_BOOT_UUID): New variables.
7452         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7453         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7454         whenever possible.
7455         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7456         just assume `root' variable has the right value.
7457         * util/grub.d/10_linux.in: Likewise.
7458         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7459         via PRINT_FS_UUID.
7460         (main): Recognise `-t fs_uuid' argument.
7462 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7464         * util/biosdisk.c (map): Redefine structure to hold information
7465         about GRUB drive name.
7466         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7467         drive names.
7468         (call_hook): Remove.
7469         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7470         member.  Assume drive has partitions.
7471         (grub_util_biosdisk_open): Access device names via `.device' struct
7472         member.
7473         (open_device): Likewise.
7474         (find_drive): Likewise.
7475         (read_device_map): Adjust map[] usage to match the new struct
7476         definition.  Don't check for duplicates (still possible, but not cheap
7477         anymore).
7478         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7479         (make_device_name): Remove assumption of BIOS-like drive names.
7481 2008-05-30  Pavel Roskin  <proski@gnu.org>
7483         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7484         compiling execute.c doesn't need grub_script.tab.h anymore.
7485         (normal/command.c_DEPENDENCIES): Likewise.
7486         (normal/function.c_DEPENDENCIES): Likewise.
7487         * conf/i386-ieee1275.rmk: Likewise.
7488         * conf/i386-linuxbios.rmk: Likewise.
7489         * conf/i386-pc.rmk: Likewise.
7490         * conf/powerpc-ieee1275.rmk: Likewise.
7491         * conf/sparc64-ieee1275.rmk: Likewise.
7493 2008-05-29  Pavel Roskin  <proski@gnu.org>
7495         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7496         when scanning metadata for volume group name.
7498         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7499         a generated file, which may only be included from the files with
7500         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7501         use union YYSTYPE, as the later allows forward declaration.
7502         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7504 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7506         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7507         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7508         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7509         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7510         scan codes.
7512 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7514         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7515         control key combinations.
7517 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7519         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7520         * util/ieee1275/grub-install.in: ... to here.
7521         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7522         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7523         (grub_install_SOURCES): Likewise.
7525 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7527         * fs/affs.c: Update copyright year.
7528         * fs/ext2.c: Likewise.
7529         * fs/fshelp.c: Likewise.
7530         * fs/hfsplus.c: Likewise.
7531         * fs/ntfs.c: Likewise.
7532         * fs/xfs.c: Likewise.
7533         * include/grub/fshelp.h: Likewise.
7534         * util/grub-mkdevicemap.c: Likewise.
7536 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7538         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7539         might need to be fatfs to support some firmware implementations
7540         (e.g. OFW or EFI).
7542 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7544         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7545         devices.
7546         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7547         (make_device_map): Likewise.
7549 2008-05-20  Bean  <bean123ch@gmail.com>
7551         * fs/fshelp.c (grub_fshelp_map_block): New function.
7552         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7553         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7555         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7556         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7557         (grub_fshelp_journal): New structure.
7558         (grub_fshelp_map_block): New function prototype.
7559         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7560         (grub_fshelp_map_block): Likewise.
7562         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7563         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7564         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7565         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7566         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7567         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7568         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7569         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7570         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7571         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7572         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7573         (grub_ext2_sblock): New members for journal support.
7574         (grub_ext3_journal_header): New structure.
7575         (grub_ext3_journal_revoke_header): Likewise.
7576         (grub_ext3_journal_block_tag): Likewise.
7577         (grub_ext3_journal_sblock): Likewise.
7578         (grub_fshelp_node): New members logfile and journal.
7579         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7580         grub_fshelp_map_block to get real block number.
7581         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7582         number.
7583         (grub_ext2_read_inode): Likewise.
7584         (grub_ext3_get_journal): New function.
7585         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7586         (grub_ext2_close): Release memory used by journal.
7588         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7589         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7590         (grub_reiserfs_transaction_header): Renamed to
7591         grub_reiserfs_description_block, replace field data with real_blocks.
7592         (grub_reiserfs_commit_block): New structure.
7593         (grub_reiserfs_data): New member journal.
7594         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7595         number.
7596         (grub_reiserfs_read_symlink): Likewise.
7597         (grub_reiserfs_iterate_dir): Likewise.
7598         (grub_reiserfs_open): Likewise.
7599         (grub_reiserfs_read): Likewise.
7600         (grub_reiserfs_get_journal): New function.
7601         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7602         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7603         using grub_reiserfs_get_journal.
7604         (grub_reiserfs_close): Release memory used by journal.
7606         * fs/affs.c (grub_affs_read_block): Change block type to
7607         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7609         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7611         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7613         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7615         * fs/udf.c (grub_udf_read_block): Change block type to
7616         grub_disk_addr_t. Use type cast to avoid warning.
7618         * fs/xfs.c (grub_xfs_read_block): Likewise.
7620 2008-05-16  Christian Franke  <franke@computer.org>
7622         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7623         to ensure that break with ESC will always work.
7624         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7625         Remove ESC from keyboard queue.
7627 2008-05-16  Christian Franke  <franke@computer.org>
7629         * util/biosdisk.c: [__CYGWIN__] Add includes.
7630         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7631         (get_os_disk): Move variable declarations to OS specific
7632         parts to avoid warning.
7633         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7634         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7635         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7636         Cygwin.
7637         * util/getroot.c: [__CYGWIN__] Add includes.
7638         (strip_extra_slashes): Fix "/" case.
7639         [__CYGWIN__] (get_win32_path): New function.
7640         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7641         [__CYGWIN__] (find_root_device): Disable.
7642         [__CYGWIN__] (get_bootsec_serial): New function.
7643         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7644         [__linux__] (grub_guess_root_device): Add early returns to simplify
7645         structure.
7646         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7647         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7648         check for Linux only.
7650 2008-05-15  Bean  <bean123ch@gmail.com>
7652         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7653         keyboard hang problem in apple's intel mac.
7655 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7657         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7658         devices.
7659         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7660         (make_device_map): Likewise.
7661         Reported by Aurelien Jarno <aurel32@debian.org>
7663 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7665         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7666         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7667         (make_device_map): Output entries for xvd type disks.
7669 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7671         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7672         devices.
7673         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7674         (make_device_map): Likewise.
7675         Reported by Roland Dreier <rdreier@cisco.com>
7677 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7679         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7680         grub_strstr() call.  Correct a few mistakes in failure path handling.
7682 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7684         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7685         Do not print a trailing slash (therefore, the root directory is an
7686         empty string).
7687         (convert_system_path_to_grub_path): Do not remove trailing slash
7688         from make_system_path_relative_to_its_root() output.
7690         * util/i386/pc/grub-install.in: Add trailing slash to output from
7691         make_system_path_relative_to_its_root().
7693 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7695         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7696         ensures that output lines aren't intermangled with those sent to
7697         stderr (via grub_util_info()).
7698         * util/grub-probe.c (grub_refresh): Likewise.
7699         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7701 2008-05-05  Christian Franke  <franke@computer.org>
7703         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7704         Add Cygwin device names.
7705         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7706         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7707         (check_device): Return error instead of success on empty name.
7708         (make_device_map): Move label inside linux specific code to
7709         prevent compiler warning.
7711 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7713         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7714         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7715         first boot option.
7716         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7718 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7720         * docs/grub.cfg: New file (example GRUB configuration).
7722 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7724         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7725         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7726         and `disk/ieee1275/nand.c'.
7728 2008-04-25  Bean  <bean123ch@gmail.com>
7730         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7731         i386-linuxbios.
7733         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7734         change the buffer size to 4096 for cdrom device.
7736         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7737         and nand.mod.
7738         (_linux_mod_SOURCES): New variable.
7739         (_linux_mod_CFLAGS): Likewise.
7740         (_linux_mod_LDFLAGS): Likewise.
7741         (linux_mod_SOURCES): Likewise.
7742         (linux_mod_CFLAGS): Likewise.
7743         (linux_mod_LDFLAGS): Likewise.
7744         (nand_mod_SOURCES): Likewise.
7745         (nand_mod_CFLAGS): Likewise.
7746         (nand_mod_LDFLAGS): Likewise.
7748         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7749         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7750         type property. (nand device in olpc don't have this property)
7752         * include/grub/disk.h (grub_disk_dev_id): New macro
7753         GRUB_DISK_DEVICE_NAND_ID.
7755         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7756         function prototype.
7757         (grub_rescue_cmd_initrd): Likewise.
7759         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7760         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7761         ofw_cif_handler and ofw_idt, adjust padding number.
7763         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7764         GRUB_MACHINE_IEEE1275 is defined.
7766         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7767         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7769         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7770         on nested function heap_init.
7771         (grub_upper_mem): New variable for i386-ieee1275.
7772         (grub_get_extended_memory): New function for i386-ieee1275.
7773         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7775         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7776         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7777         property.
7779         * loader/i386/ieee1275/linux.c: New file.
7781         * loader/i386/ieee1275/linux_normal.c: New file.
7783         * disk/ieee1275/nand.c: New file.
7785 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7787         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7788         value.
7789         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7791 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7793         Restructures early code path on ieee1275 to unify grub_main() as
7794         the first C function that is executed in every platform.
7796         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7797         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7798         cmain().
7799         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7800         * kern/ieee1275/cmain.c (cmain): Rename to ...
7801         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7802         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7803         at the beginning.
7805 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7807         * util/update-grub.in: Fix syntax error when setting
7808         `GRUB_PRELOAD_MODULES'.
7809         Reported by Stephane Chazelas <stephane@artesyncp.com>
7811 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7813         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7814         section into account, newer toolchains generate unique build ids
7815         * configure.ac: remove the test for --build-id=none acceptance,
7816         we want build ids to be preserved
7817         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7818         far from other sections don't cause the raw binary images grow
7819         size
7821 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7823         * disk/lvm.c: Update copyright year.
7824         * kern/misc.c: Likewise.
7826 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7828         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7829         there is no memory left for physical volume name.
7831 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7833         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7834         volume name mapping to support bigger than 9 character names properly.
7836 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7838         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7839         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7841 2008-04-13  Christian Franke  <franke@computer.org>
7843         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7844         to create a floppy emulation boot CD when non emulation mode
7845         does not work.
7846         Enable Joliet CD filesystem extension.
7848 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7850         * kern/misc.c (grub_strncat): Fix off-by-one error.
7851         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7853         * kern/env.c (grub_env_context_close): Clear current context, not
7854         previous one.
7855         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7857         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7859 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7861         Improve robustness when handling LVM.
7863         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7864         (and leave `*p' unmodified).
7865         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7866         through it.
7867         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7868         iterating through it.
7869         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7870         through it.
7871         (grub_lvm_scan_device): Check the return value (and fail gracefully
7872         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7873         Don't assume `vg->pvs != NULL' when iterating through it.
7875 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7877         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7878         * genmk.rb (partmap): New variable.
7879         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7880         (#{partmap}): New target rule.
7881         * genpartmaplist.sh: New file.
7882         * Makefile.in (pkglib_DATA): Add partmap.lst.
7883         (partmap.lst): New target rule.
7884         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7885         modules (including all partition maps), instead of preloading them.
7887 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7889         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7890         `linux-boot-prober' (if installed) to detect other operating
7891         systems which are installed on the computer and add them to
7892         the boot menu.
7893         * conf/common.rmk: Build and install 30_os-prober.
7895 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7897         * kern/powerpc/ieee1275/init.c: Move from here ...
7898         * kern/ieee1275/init.c: ... to here.  Update all users.
7900         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7901         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7903         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7904         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7906         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7907         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7909 2008-04-10  Pavel Roskin  <proski@gnu.org>
7911         * configure.ac: Always use "_cv_" in cache variables for
7912         compatibility with Autoconf 2.62.
7914 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7916         Revert grub/machine/init.h addition by Pavel (since it breaks on
7917         i386-ieee1275 and others):
7918         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7919         * util/powerpc/ieee1275/misc.c: Likewise.
7921 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7923         * util/grub-probe.c (probe): Improve error message.
7925 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7927         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7928         (this prevents the presence of a bogus entry from ruining the whole
7929         thing).
7931 2008-04-06  Pavel Roskin  <proski@gnu.org>
7933         * util/biosdisk.c: Include grub/util/biosdisk.h.
7934         * util/grub-fstest.c (execute_command): Make static.
7935         * util/grub-mkdevicemap.c (check_device): Likewise.
7936         * util/i386/pc/misc.c: Include grub/machine/init.h.
7937         * util/powerpc/ieee1275/misc.c: Likewise.
7938         * util/lvm.c: Include grub/util/lvm.h.
7939         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7940         grub/cache.h.
7941         * util/raid.c: Include grub/util/raid.h.
7942         (grub_util_getdiskname): Make static.
7944         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7945         grub_hostfs_fini(), as they are called from grub_init_all() and
7946         grub_fini_all() respectively.  This fixes an infinite loop in
7947         grub-fstest due to double registration of hostfs.
7948         Reported by Christian Franke <Christian.Franke@t-online.de>
7950 2008-04-05  Pavel Roskin  <proski@gnu.org>
7952         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7953         all 8 functions.  Otherwise, probe function 0 only.
7955 2008-04-04  Pavel Roskin  <proski@gnu.org>
7957         * commands/lspci.c (grub_lspci_iter): Print the bus number
7958         correctly.
7960         * commands/lspci.c (grub_pci_classes): Fix typos.
7961         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7962         before device ID, as it's normally done.
7964         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7965         Fix signedness warnings.
7966         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7967         Likewise.
7968         * util/ieee1275/get_disk_name.c: Include config.h so that
7969         _GNU_SOURCE is defined and getline() is declared.  Mark an
7970         unused argument as such.  Fix a signedness warning.
7972 2008-04-02  Pavel Roskin  <proski@gnu.org>
7974         * genkernsyms.sh.in: Use more robust assignments for CC and
7975         srcdir.  Quote srcdir.
7976         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7977         the symbol table is not empty.
7979         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7980         * fs/cpio.c (grub_cpio_read): Likewise.
7982 2008-04-01  Pavel Roskin  <proski@gnu.org>
7984         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7985         * disk/host.c (grub_host_open): Likewise.
7986         * disk/loopback.c (grub_loopback_open): Likewise.
7987         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7988         disk->id as in disk/host.c, not a multi-character constant.
7990         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7991         later is obsolete, potentially dangerous and sets a bad example.
7992         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7993         * util/misc.c (grub_util_get_image_size): Likewise.
7995         * disk/loopback.c (options): Improve help for "--partitions".
7997         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7998         options to align them with the short options, e.g. "echo -e".
8000 2008-03-31  Bean  <bean123ch@gmail.com>
8002         * video/reader/png.c (grub_png_data): New member is_16bit and
8003         image_data.
8004         (grub_png_decode_image_header): Detect 16 bit png image.
8005         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8006         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8007         (grub_video_reader_png): Release memory occupied by image_data.
8009         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8010         4096 bytes.
8011         (grub_nfs_mount): Skip the test for sector per cluster.
8013         * include/grub/ntfs.h (MAX_SPC): Removed.
8015 2008-03-31  Bean  <bean123ch@gmail.com>
8017         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8018         (grub_probe_SOURCES): Add fs/afs.c.
8019         (grub_fstest_SOURCES): Likewise.
8020         (afs_mod_SOURCES): New variable.
8021         (afs_mod_CFLAGS): Likewise.
8022         (afs_mod_LDFLAGS): Likewise.
8024         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8025         (grub_emu_SOURCES): Likewise.
8027         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8029         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8031         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8033         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8035         * fs/afs.c: New file.
8037 2008-03-30  Pavel Roskin  <proski@gnu.org>
8039         * disk/host.c: Include grub/misc.h to fix a warning.
8040         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8041         warnings about implicit declarations.
8043         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8044         variable.
8045         * include/grub/i386/loader.h: Change declaration of
8046         grub_linux_boot() to match what grub_loader_set() expects.
8047         * util/getroot.c (grub_guess_root_device): Return const char* to
8048         fix a warning.
8049         * util/grub-probe.c (probe): Fix a warning about uninitialized
8050         abstraction_name variable.
8051         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8052         second argument as unused to fix a warning.
8054         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8055         missing grub_error() call.
8057         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8058         2.60 and newer uses it to define datadir.
8060         * commands/sleep.c: Fix warning about implicit declaration.
8061         * disk/memdisk.c: Likewise.
8062         * loader/aout.c: Likewise.
8063         * loader/i386/bsd_normal.c: Likewise.
8064         * util/grub-probe.c: Likewise.
8066         * commands/i386/cpuid.c (has_longmode): Make static.
8067         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8068         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8070         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8071         GDT.  This is more robust, as %ds can change.
8072         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8073         calling real_to_prot().
8074         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8076 2008-03-28  Pavel Roskin  <proski@gnu.org>
8078         * kern/i386/pc/startup.S: Assert that uncompressed functions
8079         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8080         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8081         code, as they push parts of the code (error handlers) beyond
8082         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8083         code as correctness and size.
8085 2008-03-28  Pavel Roskin  <proski@gnu.org>
8087         * kern/i386/pc/startup.S
8088         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8089         data block address to the real mode, keep offset minimal.  This
8090         works around a bug in AWARD BIOS on old Athlon systems, which
8091         makes CD detection hang.
8093 2008-03-26  Pavel Roskin  <proski@gnu.org>
8095         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8096         const.
8097         * include/grub/normal.h: Add grub_parse_color_name_pair()
8098         declaration.
8100 2008-03-24  Bean  <bean123ch@gmail.com>
8102         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8103         (cd_count): Removed.
8104         (cd_drive): New variable.
8105         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8106         (grub_biosdisk_call_hook): Likewise.
8107         (grub_biosdisk_iterate): Change cdrom detection method.
8108         (grub_biosdisk_open): Replace cd_start with cd_drive.
8109         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8110         detect cdrom device.
8112         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8113         Removed.
8114         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8115         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8116         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8117         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8118         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8119         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8120         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8121         (grub_biosdisk_cdrp): New structure.
8122         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8124         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8126         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8127         device.
8129         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8130         New function.
8132 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8134         Remove 2 TiB limit in ata.mod.
8135         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8136         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8137         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8138         grub_uint64_t instead of grub_uint32_t.
8140 2008-03-05  Bean  <bean123ch@gmail.com>
8142         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8143         (grub_multiboot): Set boot device.
8145         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8147 2008-03-02  Bean  <bean123ch@gmail.com>
8149         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8150         symlink_buffer.
8152 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8154         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8155         texinfo.tex.
8157         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8158         modified.
8160         * docs/fdl.texi: New file.
8162         * docs/mdate-sh: New file. Copied from gnulib.
8163         * docs/texinfo.tex: Likewise.
8165         * config.guess: Updated from gnulib.
8166         * install-sh: Likewise.
8168 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8170         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8171         (aout_mod_SOURCES): New variable.
8172         (aout_mod_CFLAGS): Likewise.
8173         (aout_mod_LDFLAGS): Likewise.
8175         * conf/i386-ieee1275.rmk: Likewise.
8177 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8179         * util/update-grub.in: Reorganise terminal validity check.  Accept
8180         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8181         Based on suggestion by Franklin PIAT.
8183 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8185         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8186         function.
8187         * util/getroot.c (grub_util_check_block_device): New function that
8188         returns the given argument if it is a block device and returns NULL else.
8189         * util/grub-probe.c (argument_is_device): New variable.
8190         (probe): Promote device_name from a variable to an argument. Receive
8191         device_name from grub_util_check_block_device() if path is NULL and from
8192         grub_guess_root_device() else. Do not free() device_name anymore.
8193         (options): Introduce new parameter '-d, --device'.
8194         (main): Add description of the new parameter to the help screen.
8195         Rename path variable to argument. Set argument_is_device if the '-d'
8196         option is given. Pass argument to probe() depending on
8197         argument_is_device.
8199 2008-02-24  Bean  <bean123ch@gmail.com>
8201         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8202         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8203         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8204         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8205         (GRUB_ISO9660_VOLDESC_END): Likewise.
8206         (grub_iso9660_primary_voldesc): New member escape.
8207         (grub_iso9660_data): New member joliet.
8208         (grub_iso9660_convert_string): New function.
8209         (grub_iso9660_mount): Detect joliet extension.
8210         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8211         (grub_iso9660_iso9660_label): Likewise.
8213         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8214         (grub_setup_SOURCES): Add fs/udf.c.
8215         (grub_fstest_SOURCES): Likewise.
8216         (udf_mod_SOURCES): New variable.
8217         (udf_mod_CFLAGS): Likewise.
8218         (udf_mod_LDFLAGS): Likewise.
8220         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8221         (grub_emu_SOURCES): Likewise.
8223         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8225         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8227         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8229         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8231         * fs/udf.c: New file.
8233 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8235         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8236         (normal/lexer.c_DEPENDENCIES): New variables.
8237         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8238         (normal/lexer.c_DEPENDENCIES): Likewise.
8239         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8240         (normal/lexer.c_DEPENDENCIES): Likewise.
8241         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8242         (normal/lexer.c_DEPENDENCIES): Likewise.
8243         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8244         (normal/lexer.c_DEPENDENCIES): Likewise.
8245         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8246         (normal/lexer.c_DEPENDENCIES): Likewise.
8248 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8250         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8251         since they were intended to be in hex.  This didn't break previously
8252         because of a bug in gpt_partition_map_iterate() (see below).
8254         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8255         when checking the validity of GPT header.
8256         Remove `partno', since it always provides the same information as `i'.
8258 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8260         * include/grub/efi/time.h: Fix a wrong comment.
8262 2008-02-19  Pavel Roskin  <proski@gnu.org>
8264         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8265         message.
8267 2008-02-19  Bean  <bean123ch@gmail.com>
8269         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8270         (aout_mod_SOURCES): New variable.
8271         (aout_mod_CFLAGS): Likewise.
8272         (aout_mod_LDFLAGS): Likewise.
8273         (_bsd_mod_SOURCES): New variable.
8274         (_bsd_mod_CFLAGS): Likewise.
8275         (_bsd_mod_LDFLAGS): Likewise.
8276         (bsd_mod_SOURCES): New variable.
8277         (bsd_mod_CFLAGS): Likewise.
8278         (bsd_mod_LDFLAGS): Likewise.
8280         * include/grub/aout.h: New file.
8282         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8284         * include/grub/i386/bsd.h: New file.
8286         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8287         to make it public.
8289         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8290         function is called, so that it's possible to change it inside the hook.
8291         (grub_elf64_load): Likewise.
8292         (grub_elf_file): Don't close the file if elf header is not found.
8293         (grub_elf_close): Close the file if grub_elf_file fails (The new
8294         grub_elf_file won't close it).
8295         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8296         (grub_elf64_size): Likewise.
8298         * kern/i386/loader.S (grub_unix_real_boot): New function.
8300         * loader/aout.c: New file.
8302         * loader/i386/bsd.c: New file.
8304         * loader/i386/bsd_normal.c: New file.
8306         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8308         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8309         can test other formats.
8311 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8313         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8314         (grub_gpt_partition_type_empty): Redefine with macro from
8315         `<grub/gpt_partition.h>'.
8316         (gpt_partition_map_iterate): Adjust partition type comparison.
8318         Export `entry' as partmap-specific `part.data' struct.
8319         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8321         * include/grub/gpt_partition.h (grub_gpt_header)
8322         (grub_gpt_partentry): ... to here (new file).
8324         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8326         (grub_gpt_partition_type_bios_boot): New const variable, defined
8327         with macro from `<grub/gpt_partition.h>'.
8329         (setup): Replace `first_start' with `embed_region', which keeps
8330         track of the embed region (and is partmap-agnostic).
8332         Replace find_first_partition_start() with find_usable_region(),
8333         which finds a usable region for embedding using partmap-specific
8334         knowledge (supports PC/MSDOS and GPT).
8336         Fix all assumptions that the embed region start at sector 1, using
8337         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8338         rather than `first_start' to calculate available size.
8340         In grub_util_info() message, replace "into after the MBR" with an
8341         indication of the specific sector our embed region starts at.
8343 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8345         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8346         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8347         `commands/reboot.c'.
8348         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8349         (halt_mod_SOURCES): Likewise.
8350         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8351         (halt_mod_SOURCES): Likewise.
8353 2008-02-17  Christian Franke  <franke@computer.org>
8355         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8357 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8359         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8360         set `first_start' to 0 for non-PC/MSDOS partition maps.
8362 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8364         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8365         do not assume partition map is PC/MSDOS before performing checks that
8366         are specific to that layout.
8368 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8370         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8371         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8372         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8374 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8376         * configure.ac: Only a cosmetic change on the handling of
8377         -fno-stack-protector.
8379 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8381         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8382         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8383         reboot.c.
8384         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8385         (halt_mod_SOURCES): New variable.
8386         (halt_mod_CFLAGS): Likewise.
8387         (halt_mod_LDFLAGS): Likewise.
8388         (reboot_mod_SOURCES): Likewise.
8389         (reboot_mod_CFLAGS): Likewise.
8390         (reboot_mod_LDFLAGS): Likewise.
8392         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8393         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8394         reboot.c.
8395         (halt_mod_SOURCES): Likewise.
8396         (reboot_mod_SOURCES): Likewise.
8398         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8399         commands/i386/pc/reboot.c by commands/reboot.c.
8400         (reboot_mod_SOURCES): Likewise.
8402         * commands/i386/pc/reboot.c: merge this file ...
8404         * commands/ieee1275/reboot.c: ... and this file ...
8406         * commands/reboot.c: ... to this file.
8407         Add some precompiler directive to include the correct header for
8408         each machine.
8410         * commands/ieee1275/halt.c: move this file ...
8412         * commands/halt.c: ... to here.
8413         Add some precompiler directive to include the correct header for
8414         each machine.
8416         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8417         (grub_halt): Likewise.
8419         * kern/efi/efi.c (grub_reboot): New function.
8420         (grub_halt): Likewise.
8422 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8424         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8425         /dev (like it is done for /dev/mapper).  This doesn't provide support
8426         for EVMS, but at least it is now easy to identify the problem when it
8427         arises.
8429 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8431         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8432         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8433         comparing it with -1, not 0.
8435 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8437         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8438         `disk/lvm.c'.
8439         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8440         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8442         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8443         `disk/lvm.c' to the end of the list.
8444         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8445         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8447 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8449         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8450         grub_print_error() instead.  This will let user know why we're entering
8451         rescue mode.
8452         Based on suggestions from Sam Morris.
8454 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8456         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8457         on remaining N args, instead of "--" arg N times.
8459 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8461         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8462         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8463         pattern for unknown glyphs.
8465 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8467         * configure.ac: Probe for `help2man'.
8468         * Makefile.in (builddir): New variable.
8469         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8470         or otherwise add a few flags/options to it.
8471         (install-local): For every executable utility or script that is
8472         installed, invoke $(HELP2MAN) to install a manpage based on --help
8473         output.
8475         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8476         that it doesn't prevent --help from working in build tree.
8478         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8479         with `bug-grub@gnu.org'.
8480         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8481         * util/update-grub.in (usage): New function.
8482         Implement proper argument check, with support for --help and --version
8483         (as well as existing -y).
8485 2008-02-09  Christian Franke  <franke@computer.org>
8487         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8488         avoid overwriting previous output.
8489         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8491 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8493         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8494         drawing the menu.
8496 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8498         * commands/sleep.c: New file.
8499         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8500         (sleep_mod_SOURCES): New variable.
8501         (sleep_mod_CFLAGS): Likewise.
8502         (sleep_mod_LDFLAGS): Likewise.
8504 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8506         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8507         situations in which we can deduce the RAID size and the superblock
8508         doesn't match it.
8510 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8512         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8513         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8514         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8516         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8517         and return a grub_diskmemberlist_t composed of physical array members.
8518         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8520         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8521         prototype.
8522         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8523         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8524         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8526         * util/grub-probe.c (probe): Move partmap probing code from here ...
8527         (probe_partmap): ... to here.
8528         (probe): Use probe_partmap() once for the disk we're probing, and
8529         additionally, when such disk contains a memberlist() struct member,
8530         once for each disk that is contained in the structure returned by
8531         memberlist().
8533 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8535         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8536         environment variable to 'all' in order to obtain debug output from
8537         non-util/ code.
8538         * util/i386/pc/grub-setup.c (main): Likewise.
8540 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8542         * disk/raid.c (grub_raid_scan_device): Check for
8543         `array->device[sb.this_disk.number]' rather than for
8544         `array->device[sb.this_disk.number]->name', since the latter is not
8545         guaranteed to be accessible.
8547 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8549         * disk/raid.c: Update copyright.
8550         * fs/cpio.c: Likewise.
8551         * include/grub/raid.h: Likewise.
8552         * loader/i386/pc/multiboot.c: Likewise.
8553         * util/hostfs.c: Likewise.
8555 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8557         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8558         to a grub_disk_t array.
8559         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8560         `device[x]'.
8561         (grub_raid_scan_device): Replace `device[x].name' accesses with
8562         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8564 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8566         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8567         grub_dprintf() calls.
8568         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8569         error message.
8571 2008-02-07  Christian Franke  <franke@computer.org>
8573         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8574         instead of fseek and ftell to support large files.
8575         (grub_hostfs_read): Likewise.
8577 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8579         Patch from Jeroen Dekkers.
8580         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8581         failure, since successfully reading all array members might not be
8582         required.
8584 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8586         * util/grub-probe.c (probe): Simplify partmap probing (with the
8587         assumption that the first word up to the underscore equals to
8588         the module name).
8590 2008-02-06  Christian Franke  <franke@computer.org>
8592         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8593         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8594         last block of a cpio or tar stream.
8595         Check for "TRAILER!!!" instead of any empty data
8596         block to detect last block of a cpio stream.
8597         (grub_cpio_dir): Fix constness of variable np.
8598         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8599         cpio or tar trailer is detected.  This fixes a crash
8600         on open of a non existing file.
8602 2008-02-05  Bean  <bean123ch@gmail.com>
8604         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8605         address of entry.
8606         (grub_multiboot_load_elf64): Likewise.
8607         (grub_multiboot): Initialize mbi structure.
8609         * util/grub-fstest.c: Don't include unused header file script.h.
8611         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8612         of file.
8613         (grub_fstest_SOURCES): Likewise.
8615 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8617         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8618         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8619         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8620         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8622         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8623         (translation_table): Replace hardcoded values with macros
8624         provided by `<grub/term.h>'.
8626         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8627         (keyboard_map): Correct/add a few values, with macros provided
8628         by `<grub/term.h>'.
8629         (keyboard_map_shift): Zero values that don't differ from their
8630         `keyboard_map' equivalents.
8631         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8632         Discard the second scan code that is always sent by Caps lock.
8633         Only use `keyboard_map_shift' when it provides a non-zero value,
8634         otherwise fallback to `keyboard_map'.
8636 2008-02-04  Bean  <bean123ch@gmail.com>
8638         * Makefile.in (enable_grub_fstest): New variable.
8640         * conf/common.rmk (grub_fstest_init.lst): New rule.
8641         (grub_fstest_init.h): Likewise.
8642         (grub_fstest_init.c): Likewise.
8643         (util/grub-fstest.c_DEPENDENCIES): New variable.
8644         (grub_fstest_SOURCES): Likewise.
8646         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8648         * util/grub-fstest.c: New file.
8650 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8652         Make grub-setup handle a separate root device.
8654         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8655         so that the root device can be compared with the destination
8656         device.
8657         When embedding the core image, if the root and destination devices
8658         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8659         0xFF.
8660         When not embedding, set ROOT_DRIVE to 0xFF.
8662 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8664         Add support for having a grub directory in a different drive. This
8665         is still only the data handling part.
8667         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8668         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8669         (grub_root_drive): New variable.
8671         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8672         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8673         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8674         as it was.
8676         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8678         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8679         macro.
8680         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8682         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8683         is bogus, because PXE booting does not specify any drive
8684         correctly.
8686         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8687         am not sure if this is really correct.
8689         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8690         is always identical to the boot drive when booting from a CD.
8692         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8693         longer.
8694         (root_drive): New variable.
8695         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8696         (setup_sectors): Push %dx right after popping it, because %dh will
8697         be modified later.
8698         (copy_buffer): Restore %dx.
8700 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8702         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8703         use `cdboot.img' for cdrom images.
8705 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8707         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8708         only setup gfxterm when `font' command has succeeded.
8710 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8712         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8713         (grub_rescue_cmd_multiboot_loader)
8714         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8716 2008-02-03  Pavel Roskin  <proski@gnu.org>
8718         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8719         %edx and %esi from stack only after grub_gate_a20() is called.
8720         grub_gate_a20() clobbers %edx.
8722 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8724         * configure.ac (AC_INIT): Bumped to 1.96.
8726         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8727         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8728         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8729         video/readers/png.c.
8731 2008-02-03  Bean  <bean123ch@gmail.com>
8733         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8734         (cdboot_img_SOURCES): New variable.
8735         (cdboot_img_ASFLAGS): New variable.
8736         (cdboot_img_LDFLAGS): New variable.
8738         * boot/i386/pc/cdboot.S: New file.
8740         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8741         (cd_count): Likewise.
8742         (grub_biosdisk_get_drive): Add support for cd device.
8743         (grub_biosdisk_call_hook): Likewise.
8744         (grub_biosdisk_iterate): Likewise.
8745         (grub_biosdisk_open): Likewise.
8746         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8747         (grub_biosdisk_rw): Support reading from cd device.
8748         (GRUB_MOD_INIT): Iterate cd devices.
8750         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8751         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8752         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8754         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8756 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8758         * commands/read.c: New file.
8759         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8760         (read_mod_SOURCES): New variable.
8761         (read_mod_CFLAGS): Likewise.
8762         (read_mod_LDFLAGS): Likewise.
8764 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8766         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8767         determining whether menu has to be displayed.
8769 2008-02-02  Marco Gerards  <marco@gnu.org>
8771         * bus/pci.c: New file.
8773         * include/grub/pci.h: Likewise.
8775         * include/grub/i386/pc/pci.h: Likewise.
8777         * commands/lspci.c: Likewise.
8779         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8780         `lspci.mod'.
8781         (pci_mod_SOURCES): New variable.
8782         (pci_mod_CFLAGS): Likewise.
8783         (pci_mod_LDFLAGS): Likewise.
8784         (lspci_mod_SOURCES): Likewise.
8785         (lspci_mod_CFLAGS): Likewise.
8786         (lspci_mod_LDFLAGS): Likewise.
8788 2008-02-02  Bean  <bean123ch@gmail.com>
8790         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8791         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8793         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8794         (grub_xfs_btree_node): New structure.
8795         (grub_xfs_btree_root): New structure.
8796         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8797         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8798         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8799         (GRUB_XFS_EXTENT_SIZE): Likewise.
8800         (grub_xfs_read_block): Support btree format type.
8801         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8802         Use directory block as basic unit.
8804         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8806         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8807         __attribute__ ((__regparm__ (1))).
8809 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8811         Correct a mistake in previous commit.
8813         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8814         top.
8815         (normal/command.c_DEPENDENCIES): New variable.
8817 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8819         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8820         top.
8821         (normal/command.c_DEPENDENCIES): New variable.
8822         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8823         * conf/i386-ieee1275.rmk: Likewise.
8824         * conf/i386-linuxbios.rmk: Likewise.
8825         * conf/i386-pc.rmk: Likewise.
8826         * conf/sparc64-ieee1275.rmk: Likewise.
8827         * conf/powerpc-ieee1275.rmk: Likewise.
8828         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8830         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8832 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8834         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8835         call at beginning of function.
8837 2008-01-31  Pavel Roskin  <proski@gnu.org>
8839         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8840         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8841         (grub_mkrescue_SOURCES): Likewise.
8842         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8844 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8846         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8847         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8848         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8849         (grub_probe_SOURCES): ... to here.
8851         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8852         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8853         * conf/i386-ieee1275.rmk: Likewise.
8854         * conf/i386-linuxbios.rmk: Likewise.
8855         * conf/powerpc-ieee1275.rmk: Likewise.
8857 2008-01-30  Tristan Gingold  <gingold@free.fr>
8859         * kern/rescue.c: Silently accept empty lines.
8861 2008-01-29  Bean  <bean123ch@gmail.com>
8863         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8864         (real_code_2): Code cleanup and change comment style.
8865         (move_memory): Avoid using 32-bit address mode.
8867 2008-01-29  Bean  <bean123ch@gmail.com>
8869         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8870         (png_mod_SOURCES): New variable.
8871         (png_mod_CFLAGS): Likewise.
8872         (png_mod_LDFLAGS): Likewise.
8874         * video/readers/png.c: New file.
8876 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8878         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8879         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8880         `ifndef GRUB_MOD_GAP' hack.
8881         * util/elf/grub-mkimage.c (add_segments): Likewise.
8883 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8885         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8886         `GRUB_MOD_GAP' for platforms in which it's not defined.
8887         * util/elf/grub-mkimage.c (add_segments): Likewise.
8889 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8891         Get grub-emu to build again (including parallel builds).
8893         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8894         Split into ...
8895         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8896         (normal/execute.c_DEPENDENCIES): ... this, ...
8897         (grub-emu_DEPENDENCIES): ... and this.
8899         * conf/i386-efi.rmk: Likewise.
8900         * conf/i386-linuxbios.rmk: Likewise.
8901         * conf/i386-ieee1275.rmk: Likewise.
8902         * conf/powerpc-ieee1275.rmk: Likewise.
8903         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8905 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8907         * NEWS: Add a few items.
8909 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8911         Fix parallel builds with grub-emu.  Based on earlier commit for
8912         grub-probe and grub-setup.
8914         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8915         (util/grub-emu.c_DEPENDENCIES): ... this.
8916         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8917         (util/grub-emu.c_DEPENDENCIES): ... this.
8918         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8919         (util/grub-emu.c_DEPENDENCIES): ... this.
8920         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8921         (util/grub-emu.c_DEPENDENCIES): ... this.
8922         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8923         (util/grub-emu.c_DEPENDENCIES): ... this.
8925 2008-01-27  Pavel Roskin  <proski@gnu.org>
8927         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8928         to create a gap between _end and the modules added to the image
8929         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8930         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8931         * util/elf/grub-mkimage.c (add_segments): Likewise.
8933 2008-01-26  Pavel Roskin  <proski@gnu.org>
8935         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8936         just return an error.
8938 2008-01-26  Bean  <bean123ch@gmail.com>
8940         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8941         (grub_reiserfs_get_item): Save offset of the next item.
8942         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8944 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8946         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8947         make all filesystem sources appear together (possibly fixing omissions
8948         while at it).
8949         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8950         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8951         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8952         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8954         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8955         add `kern/file.c'.
8956         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8957         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8958         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8959         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8961         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8962         (probe): Add a sanity check to make sure of our ability to read
8963         requested files when probing for filesystem type.
8965         * genmk.rb: Update copyright year (2007).
8967         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8968         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8969         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8970         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8971         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8972         : Remove function prototypes.
8974 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8976         Revert my previous commits (based on wrong assumption of how grub_errno
8977         works).
8979         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8980         * kern/file.c (grub_file_open): Likewise.
8982 2008-01-24  Pavel Roskin  <proski@gnu.org>
8984         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8985         that hang if GRUB tries to setup colors.
8986         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8987         colors for firmwares that don't support it.
8988         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8989         Recognize Open Hack'Ware, set flags to work around its
8990         limitations.
8992 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8994         * kern/file.c (grub_file_open): Do not account previous failures of
8995         unrelated functions when grub_errno is checked for.
8996         Reported by Oleg Strikov.
8998 2008-01-24  Bean  <bean123ch@gmail.com>
9000         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9001         (grub_ufs_sblock): New member volume name.
9002         (grub_ufs_find_file): Fix string copy bug.
9003         (grub_ufs_label): Implement this function properly.
9005         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9006         (grub_hfs_iterate_records): Use the correct file number for extents
9007         and catalog file. Fix problem in next index calculation.
9008         (grub_hfs_find_node): Replace recursive function call with loop.
9009         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9011 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9013         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9014         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9015         (grub_multiboot2_real_boot): New function prototype.
9017         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9018         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9020         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9021         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9023 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9025         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9026         #ifdef'ed out grub_printf().
9028 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9030         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9031         grub_dprintf calls, since they make "debug=all" mode unusable.
9032         (grub_console_checkkey): Likewise.
9034 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9036         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9037         `term/i386/pc/at_keyboard.c'.
9038         (pkglib_MODULES): Add `serial.mod'.
9039         (serial_mod_SOURCES): New variable.
9040         (serial_mod_CFLAGS): Likewise.
9041         (serial_mod_LDFLAGS): Likewise.
9043         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9044         `<grub/powerpc/ieee1275/console.h>'.
9045         (grub_keyboard_controller_init): New function prototype.
9046         (grub_console_checkkey): Likewise.
9047         (grub_console_getkey): Likewise.
9049         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9050         keyboard on i386.
9052         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9053         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9055 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9057         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9058         present, "(memdisk)/boot/grub" becomes the default prefix.
9060         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9061         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9062         allows users to overlay additional files into the image.
9064 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9066         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9067         and `machine/memory.h'.
9068         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9069         (_multiboot_mod_SOURCES): New variable.
9070         (_multiboot_mod_CFLAGS): Likewise.
9071         (_multiboot_mod_LDFLAGS): Likewise.
9072         (multiboot_mod_SOURCES): Likewise.
9073         (multiboot_mod_CFLAGS): Likewise.
9074         (multiboot_mod_LDFLAGS): Likewise.
9076         * include/grub/i386/ieee1275/loader.h: New file.
9078         * include/grub/i386/ieee1275/machine.h: Likewise.
9080         * include/grub/i386/ieee1275/memory.h: Likewise.
9082         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9083         variable declaration.
9084         (grub_os_area_size): Likewise.
9086         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9087         (grub_lower_mem, grub_upper_mem): New variables.
9088         (grub_stop_floppy): New function (just to make
9089         grub_multiboot2_real_boot() happy).
9091         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9092         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9093         (grub_stop): New function.
9094         Include `"../realmode.S"' and `"../loader.S"'.
9096         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9097         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9099         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9100         rely on grub_multiboot2_real_boot() for final boot.
9102 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9104         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9105         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9106         device that doesn't look like an SD card.
9107         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9108         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9109         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9110         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9111         found.
9113 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9115         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9116         avoid claiming over our own code.
9118 2008-01-22  Bean  <bean123ch@gmail.com>
9120         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9121         (jpeg_mod_SOURCES): New variable.
9122         (jpeg_mod_CFLAGS): Likewise.
9123         (jpeg_mod_LDFLAGS): Likewise.
9125         * video/readers/jpeg.c : New file.
9127 2008-01-22  Bean  <bean123ch@gmail.com>
9129         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9130         there are no more items.
9132 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9134         * kern/mm.c (grub_mm_init_region): Improve debug message.
9136 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9138         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9139         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9140         address.
9141         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9142         a C macro.
9143         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9144         Indicates start of upper memory.
9145         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9146         (generate_image): Abort when image size is big enough to corrupt
9147         upper memory.
9149         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9150         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9151         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9152         instead of hardcoding 0xA0000.
9153         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9154         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9155         instead of hardcoding 0xA0000.
9157 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9159         * disk/memdisk.c (memdisk_size): New variable.
9160         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9161         `memdisk_size'.
9162         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9163         image to dynamic memory.
9164         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9165         `memdisk_size'.  Free memdisk block.
9167 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9169         Fix detection of very small filesystems (like tar).
9171         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9172         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9173         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9174         a problem with this disk).
9176 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9178         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9179         on grub_biosdisk_rw_standard() error.
9181 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9183         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9184         recent changes.
9185         * kern/elf.c: Likewise.
9186         * kern/ieee1275/ieee1275.c: Likewise.
9187         * kern/powerpc/ieee1275/openfw.c: Likewise.
9188         * term/ieee1275/ofconsole.c: Likewise.
9190 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9192         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9194         * include/grub/kernel.h (grub_arch_memdisk_addr)
9195         (grub_arch_memdisk_size): Moved from here ...
9197         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9198         (grub_arch_memdisk_size): ... to here.
9200 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9202         Mostly based on bugfix from Bean.
9204         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9205         attribute with hook() parameter.
9206         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9207         declaration.
9208         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9209         attribute with hook() parameter.
9210         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9211         declaration.
9213 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9215         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9216         (pkglib_MODULES): Add `memdisk.mod'.
9217         (memdisk_mod_SOURCES): New variable.
9218         (memdisk_mod_CFLAGS): Likewise.
9219         (memdisk_mod_LDFLAGS): Likewise.
9221         * disk/memdisk.c: New file.
9223         * include/grub/disk.h (grub_disk_dev_id): Add
9224         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9226         * include/grub/i386/pc/kernel.h
9227         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9228         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9229         (grub_kernel_image_size): New variable declaration.
9230         (grub_total_module_size): Likewise.
9231         (grub_memdisk_image_size): Likewise.
9233         * include/grub/i386/pc/memory.h
9234         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9236         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9237         (grub_arch_memdisk_addr): New variable declaration.
9238         (grub_arch_memdisk_size): Likewise.
9240         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9241         (grub_arch_memdisk_size): Likewise.
9243         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9244         (codestart): Replace hardcoded `0x100000' with
9245         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9247         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9248         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9249         not NULL, append the contents of the file it refers to, at the end of
9250         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9251         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9252         (options): Add "memdisk"|'m' option.
9253         (main): Parse --memdisk|-m option, and pass user-provided path as
9254         parameter to generate_image().
9256 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9258         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9259         grub_dprintf() calls from here ...
9260         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9262 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9264         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9266         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9267         declaration.
9268         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9269         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9270         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9271         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9272         property).
9273         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9274         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9276 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9278         Get rid of confusing function (superseded by
9279         `grub_ieee1275_get_integer_property')
9280         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9281         prototype.
9282         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9283         function.
9284         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9285         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9286         in native endianness from grub_ieee1275_get_integer_property().
9288 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9290         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9291         command after "shut-down", since implementations differ on which
9292         the command for halt is.
9294 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9296         * include/grub/i386/linuxbios/console.h: Add header protection.
9297         (grub_keyboard_controller_init): New function prototype.
9298         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9299         (KEYBOARD_COMMAND_READ): Likewise.
9300         (KEYBOARD_COMMAND_WRITE): Likewise.
9301         (KEYBOARD_SCANCODE_SET1): Likewise.
9302         (grub_keyboard_controller_write): New function.
9303         (grub_keyboard_controller_read): Likewise.
9304         (grub_keyboard_controller_init): Likewise.
9306         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9307         (grub_console_init): On coreboot/LinuxBIOS, call
9308         grub_keyboard_controller_init().
9310 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9312         PowerPC changes provided by Pavel Roskin.
9314         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9315         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9316         don't rely on cmain() doing it.
9317         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9318         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9320 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9322         * include/grub/i386/linuxbios/memory.h
9323         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9324         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9325         receive `table_header' as argument.  Instead, probe for it in the
9326         known memory ranges where it can be present.
9327         (grub_available_iterate): Do not pass a fixed `table_header' address
9328         to grub_linuxbios_table_iterate().
9330 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9332         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9333         * conf/i386-ieee1275.rmk: New file.
9334         * include/grub/i386/ieee1275/console.h: Likewise.
9335         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9336         * include/grub/i386/ieee1275/kernel.h: Likewise.
9337         * include/grub/i386/ieee1275/time.h: Likewise.
9338         * kern/i386/ieee1275/init.c: Likewise.
9339         * kern/i386/ieee1275/startup.S: Likewise.
9341 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9343         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9344         when pointers are 32-bit (but still do set it to one when they are
9345         64-bit).
9347 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9349         * include/grub/ieee1275/ieee1275.h
9350         (grub_ieee1275_get_integer_property): New function prototype.
9352         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9353         (grub_ieee1275_get_integer_property): New function.  Wraps around
9354         grub_ieee1275_get_property() to handle endianness.
9356         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9357         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9358         where appropriate.
9359         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9360         (grub_map): Likewise.
9361         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9363 2008-01-15  Bean  <bean123ch@gmail.com>
9365         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9366         (grub_script_execute_cmdline): Reset grub_errno.
9368         * normal/main.c (read_config_file): Reset grub_errno.
9370         * normal/parse.y (script_init): New.
9371         (script): Move function and menuentry here.
9372         (delimiter): New.
9373         (command): Add delimiter at the end of command.
9374         (commands): Adjust to match the new command.
9375         (commandblock): Remove grub_script_lexer_record_start.
9376         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9377         (if): Use the new commands.
9379         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9381 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9383         * normal/menu.c (run_menu): Move timeout message from here ...
9384         (print_timeout): ... to here.
9385         (run_menu): Use print_timeout() once during initial draw to print
9386         the whole message, and again in every clock tick to update only
9387         the number of seconds.
9389 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9391         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9392         actual size of `available' from grub_ieee1275_get_property(), and
9393         restrict parsing to that bound.
9395 2008-01-15  Christian Franke  <franke@computer.org>
9397         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9398         (argp_program_version): Remove variable.
9399         (argp_program_bug_address): Likewise.
9400         (options): Convert from struct argp_option to struct option.
9401         (struct arguments): Remove.
9402         (parse_opt): Remove.
9403         (usage): New function.
9404         (main): Replace struct args members by simple variables.
9405         Replace argp_parse() by getopt_long().
9406         Add switch to evaluate options.
9407         Add missing "(...)" around root_dev in prefix string.
9409 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9411         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9412         for grub_ieee1275_exit(), in order to improve portability.
9414 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9416         * util/grub.d/10_linux.in (prefix): Define.
9417         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9419 2008-01-13  Pavel Roskin  <proski@gnu.org>
9421         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9422         grub_errno if no errors have been detected.
9424 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9426         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9427         (grub_util_get_dev_abstraction): New function prototype.
9429         * util/getroot.c: Include `<grub/util/getroot.h>'
9430         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9431         (grub_util_get_dev_abstraction): ... here (new function).
9433         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9434         `PRINT_ABSTRACTION'.
9435         (probe): Probe for abstraction type when requested.
9436         (main): Understand `--target=abstraction'.
9438         * util/i386/efi/grub-install.in: Add abstraction module to core
9439         image when it is found to be necessary.
9440         * util/i386/pc/grub-install.in: Likewise.
9441         * util/powerpc/ieee1275/grub-install.in: Likewise.
9443         * util/update-grub_lib.in (font_path): Return system path without
9444         converting to GRUB path.
9445         * util/update-grub.in: Convert system path returned by font_path()
9446         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9447         abstraction module is needed for loading fonts (if any).  Export
9448         that as `GRUB_PRELOAD_MODULES'.
9449         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9450         insmod commands).
9452 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9454         Remove some unused code from reiserfs.
9456         * fs/reiserfs.c (struct grub_reiserfs_key)
9457         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9458         (struct grub_reiserfs_node_body): Removed.
9459         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9460         Likewise.
9461         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9462         Likewise.
9463         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9464         Likewise.
9465         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9466         Likewise.
9467         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9468         Likewise.
9469         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9470         Likewise.
9471         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9472         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9473         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9475 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9477         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9478         Determines if a file is garbage left by packaging systems, etc.
9479         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9480         for processing /etc/grub.d scripts.
9481         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9482         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9483         as a condition for processing Linux images.
9485 2008-01-10  Pavel Roskin  <proski@gnu.org>
9487         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9488         to compile reiserfs.c on PowerPC.
9490 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9492         * kern/device.c (grub_device_iterate): Do not abort device iteration
9493         when one of the devices cannot be opened.
9494         * kern/disk.c (grub_disk_open): Do not account previous failures of
9495         unrelated functions when grub_errno is checked for.
9497 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9499         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9500         `! grub_linux_is_bzimage', change order of address comparison to make
9501         it more intuitive, and improve "too big zImage" error message.
9503 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9505         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9506         `$(update-grub_DATA)'.
9507         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9508         targets.
9510 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9512         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9513         which instruction is modified by grub-setup during installation
9514         (since it wasn't obvious by only looking at this file).
9516 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9518         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9519         listing actual TODO items.
9521 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9523         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9524         correctly.
9525         (grub_reiserfs_get_key_offset): Likewise.
9526         (grub_reiserfs_set_key_offset): Likewise.
9527         (grub_reiserfs_set_key_type): Likewise.
9528         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9530         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9531         better to remove the bitfield version completely.
9533 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9535         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9536         allocated from the heap, due to the fshelp implementation.
9537         (grub_reiserfs_dir): Free NODE, due to the same reason.
9539 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9541         Mostly from Vincent Pelletier:
9543         * fs/reiserfs.c: New file.
9545         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9546         (reiserfs_mod_SOURCES): New variable.
9547         (reiserfs_mod_CFLAGS): Likewise.
9548         (reiserfs_mod_LDFLAGS): Likewise.
9550         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9551         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9552         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9553         normal/color.c.
9555 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9557         * normal/color.c: Remove `<grub/env.h>'.
9559 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9561         * include/grub/normal.h: Include <grub/env.h>.
9563 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9565         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9566         usage example with `(hd0,1)'.
9567         Reported by Samuel Thibault.
9569 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9571         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9572         (grub_linux_boot_zimage): Rename to ...
9573         (grub_linux_boot): ... this.
9574         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9575         (grub_linux_boot_zimage): Conditionalize zImage copy.
9577         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9578         (grub_linux_boot_bzimage): Remove prototype.
9579         (grub_linux_boot_zimage): Rename to ...
9580         (grub_linux_boot): ... this.
9582         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9583         (grub_linux_boot): Remove function.
9585 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9587         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9588         (grub_env_write_color_highlight): Likewise.
9589         (grub_wait_after_message): Likewise.
9591         * normal/color.c: New file.
9593         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9594         (normal_mod_DEPENDENCIES): Likewise.
9596         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9597         (normal_mod_DEPENDENCIES): Likewise.
9599         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9600         (normal_mod_DEPENDENCIES): Likewise.
9602         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9603         (normal_mod_DEPENDENCIES): Likewise.
9605         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9606         for waiting after a message is printed.
9607         * normal/main.c (read_config_file): Likewise.
9608         (grub_normal_init): Register grub_env_write_color_normal() and
9609         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9610         `color_highlight' variables as global.
9612         * normal/menu.c (grub_wait_after_message): New function.
9613         (grub_color_menu_normal): New variable.  Replaces ...
9614         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9615         (grub_color_menu_highlight): New variable.  Replaces ...
9616         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9617         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9618         `GRUB_TERM_COLOR_STANDARD'.
9619         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9620         `normal_code' and `highlight_code' to `old_color_normal' and
9621         `old_color_highlight', respectively.
9622         (grub_menu_init_page): Update colors when drawing the menu, based on
9623         `menu_color_normal' and `menu_color_highlight' variables.
9624         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9625         a message is printed.
9627 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9629         * kern/env.c (grub_env_context_open): Propagate hooks for global
9630         variables to new context.
9632         * kern/main.c (grub_set_root_dev): Export `root' variable.
9634 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9636         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9637         discs unconditionally, since udev and others have options to provide
9638         them.
9640 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9642         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9644 2008-01-04  Christian Franke  <franke@computer.org>
9646         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9647         of eisa_mmap.
9649 2008-01-03  Pavel Roskin  <proski@gnu.org>
9651         * kern/i386/linuxbios/init.c: Put "void" to all function
9652         declarations with no arguments.
9653         * kern/powerpc/ieee1275/init.c: Likewise.
9654         * term/i386/pc/at_keyboard.c: Likewise.
9655         * term/i386/pc/vga_text.c: Likewise.
9656         * util/grub-mkdevicemap.c: Likewise.
9658 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9660         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9661         message when loaded image is out of bounds.
9662         (grub_multiboot_load_elf64): Likewise.
9664 2008-01-02  Pavel Roskin  <proski@gnu.org>
9666         * util/grub.d/10_linux.in: Try version without ".old" when
9667         looking for initrd.  It's better to use initrd from the newer
9668         kernel of the same version than no initrd at all.
9670 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9672         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9674 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9676         * include/grub/video.h: Added grub_video_unmap_color and
9677         grub_video_get_active_render_target.
9678         (grub_video_adapter): Added unmap_color and get_active_render_target.
9680         * video/video.c: Added grub_video_unmap_color and
9681         grub_video_get_active_render_target.
9682         (grub_video_get_info): Changed method to accept NULL pointer as an
9683         argument to allow detection of active video adapter.
9685         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9686         grub_video_vbe_unmap_color_int.
9687         Added grub_video_vbe_unmap_color and
9688         grub_video_vbe_get_active_render_target.
9689         (grub_video_vbe_adapter): Added unmap_color and
9690         get_active_render_target.
9692         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9693         with grub_video_vbe_unmap_color_int.
9695         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9696         (DEFAULT_NORMAL_COLOR): Likewise.
9697         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9698         (DEFAULT_FG_COLOR): Removed.
9699         (DEFAULT_BG_COLOR): Likewise.
9700         (DEFAULT_CURSOR_COLOR): Changed value.
9701         (grub_virtual_screen): Added standard_color_setting,
9702         normal_color_setting, highlight_color_setting and term_color.
9703         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9704         (bitmap_width): Added.
9705         (bitmap_height): Likewise.
9706         (bitmap): Likewise.
9707         (set_term_color): Likewise.
9708         (grub_virtual_screen_setup): Changed to use new terminal coloring
9709         settings.
9710         (grub_gfxterm_init): Added init for bitmap.
9711         (grub_gfxterm_fini): Added destroy for bitmap.
9712         (redraw_screen_rect): Updated to use background bitmap and new
9713         terminal coloring.
9714         (scroll_up): Added optimization for case when there is no bitmap.
9715         (grub_gfxterm_cls): Fixed to use correct background color.
9716         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9717         coloring.
9718         (grub_virtual_screen_setcolor): Likewise.
9719         (grub_virtual_screen_getcolor): Added.
9720         (grub_gfxterm_background_image_cmd): Likewise.
9721         (grub_video_term): Added setcolor and getcolor.
9722         (MOD_INIT): Added registration of background_image command.
9723         (MOD_TERM): Added unregistration for background_image command.
9725 2007-12-30  Pavel Roskin  <proski@gnu.org>
9727         * loader/multiboot_loader.c: Fix multiboot command
9728         unregistration.  Fix all typos in the word "multiboot".
9730 2007-12-29  Pavel Roskin  <proski@gnu.org>
9732         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9733         support for initrd names used in Fedora.
9735 2007-12-26  Bean  <bean123ch@gmail.com>
9737         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9738         (cpio_mod_SOURCES): New variable.
9739         (cpio_mod_CFLAGS): Likewise.
9740         (cpio_mod_LDFLAGS): Likewise.
9742         * fs/cpio.c: New file.
9744         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9746         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9748         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9750         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9752 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9754         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9755         (grub_getcolor): New function.
9757         * kern/term.c (grub_getcolor): New function.
9758         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9759         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9760         (print_entry): Set normal and highlight colors to
9761         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9762         respectively, before printing and restore them to old
9763         values afterwards.
9764         (grub_menu_init_page): Likewise.  Fill an additional colored space
9765         that would otherwise be left blank.
9767         * term/efi/console.c (grub_console_getcolor): New function.
9768         (struct grub_console_term.getcolor): New variable.
9769         * term/i386/pc/console.c (grub_console_getcolor): New function.
9770         (struct grub_console_term.getcolor): New variable.
9771         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9772         (struct grub_console_term.getcolor): New variable.
9774         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9775         (struct grub_console_term.setcolor): Remove variable.
9776         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9777         (struct grub_console_term.setcolor): Remove variable.
9778         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9779         (struct grub_console_term.setcolor): Remove variable.
9780         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9781         (struct grub_console_term.setcolor): Remove variable.
9783 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9785         * configure.ac: Search for possible unifont.hex locations, and
9786         define UNIFONT_HEX if found.
9788         * Makefile.in (UNIFONT_HEX): Define variable.
9789         (DATA): Rename to ...
9790         (PKGLIB): ... this.  Update all users.
9791         (PKGDATA): New variable.
9792         (pkgdata_IMAGES): Rename to ...
9793         (pkglib_IMAGES): ... this. Update all users.
9794         (pkgdata_MODULES): Rename to ...
9795         (pkglib_MODULES): ... this. Update all users.
9796         (pkgdata_PROGRAMS): Rename to ...
9797         (pkglib_PROGRAMS): ... this. Update all users.
9798         (pkgdata_DATA): Rename to ...
9799         (pkglib_DATA): ... this. Update all users.
9800         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9801         (unicode.pff, ascii.pff): New rules.
9802         (all-local): Add `$(PKGDATA)' dependency.
9803         (install-local): Process `$(PKGDATA)'.
9805         * util/update-grub_lib.in (font_path): Search for *.pff files in
9806         a few more locations, including `${pkgdata}'.
9808 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9810         Patch from Bean  <bean123ch@gmail.com>:
9811         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9812         `size'.
9814 2007-12-21  Bean  <bean123ch@gmail.com>
9816         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9817         (ntfscomp_mod_SOURCES): New variable.
9818         (ntfscomp_mod_CFLAGS): Likewise.
9819         (ntfscomp_mod_LDFLAGS): Likewise.
9821         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9822         (grub_probe_SOURCES): Likewise.
9823         (grub_emu_SOURCES): Likewise.
9825         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9826         (grub_emu_SOURCES): Likewise.
9828         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9829         (grub_emu_SOURCES): Likewise.
9831         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9832         (grub_emu_SOURCES): Likewise.
9834         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9835         (read_run_list): Renamed to grub_ntfs_read_run_list.
9836         (decomp_nextvcn): Moved to ntfscomp.c.
9837         (decomp_getch): Likewise.
9838         (decomp_get16): Likewise.
9839         (decomp_block): Likewise.
9840         (read_block): Likewise.
9841         (read_data): Partially moved to ntfscomp.c.
9842         (fixup): Change unsigned to grub_uint16_t.
9843         (read_mft): Change unsigned long to grub_uint32_t.
9844         (read_attr): Likewise.
9845         (read_data): Likewise.
9846         (read_run_data): Likewise.
9847         (read_run_list): Likewise.
9848         (read_mft): Likewise.
9850         * fs/ntfscomp.c: New file.
9852         * include/grub/ntfs.h: New file.
9854 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9856         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9857         IDE disk check, since Linux is known to support 20 IDE disks.
9858         Reported by Colin Watson.
9860 2007-12-15  Bean  <bean123ch@gmail.com>
9862         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9863         (lnxboot_img_SOURCES): New variable.
9864         (lnxboot_img_ASFLAGS): Likewise.
9865         (lnxboot_img_LDFLAGS): Likewise.
9867         * boot/i386/pc/lnxboot.S: New file.
9869 2007-11-24  Pavel Roskin  <proski@gnu.org>
9871         * configure.ac: Test if '--build-id=none' is supported by the
9872         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9873         objcopy to generate incorrect binary files (binutils
9874         2.17.50.0.18-1 as shipped by Fedora 8).
9875         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9876         linking, so that build ID doesn't break the test.
9878 2007-11-24  Pavel Roskin  <proski@gnu.org>
9880         * include/grub/i386/time.h: use "void" in the argument list
9881         of grub_cpu_idle().
9882         * include/grub/powerpc/time.h: Likewise.
9883         * include/grub/sparc64/time.h: Likewise.
9885 2007-11-18  Christian Franke  <franke@computer.org>
9887         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9888         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9889         This fixes the problem that function keys did not work in grub-emu.
9891 2007-11-18  Christian Franke  <franke@computer.org>
9893         * disk/host.c (grub_host_open): Remove attribute unused from
9894         name parameter. Add check for "host". This fixes the problem
9895         that grub-emu does not find partitions.
9897 2007-11-18  Christian Franke  <franke@computer.org>
9899         * util/hostfs.c (is_dir): New function.
9900         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9901         (grub_hostfs_read): Add missing fseek().
9902         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9903         of grub-emu on "ls (host)".
9905 2007-11-18  Christian Franke  <franke@computer.org>
9907         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9908         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9909         to 64 bit boundary by default.
9911 2007-11-18  Bean  <bean123ch@gmail.com>
9913         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9914         (hexdump_mod_SOURCES): New variable.
9915         (hexdump_mod_CFLAGS): Likewise.
9916         (hexdump_mod_LDFLAGS): Likewise.
9918         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9920         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9922         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9924         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9926         * include/grub/hexdump.h: New file.
9928         * commands/hexdump.c: New file.
9930 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9932         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9933         in grub_outb() calls.
9934         (beep_on): Likewise.
9936 2007-11-10  Christian Franke  <franke@computer.org>
9938         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9939         (grub_menu_run): Likewise.
9941 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9943         * include/grub/i386/efi/machine.h: New file.
9944         * include/grub/i386/linuxbios/machine.h: Likewise.
9945         * include/grub/i386/pc/machine.h: Likewise.
9946         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9947         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9949         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9950         (serial_hw_io_addr): New variable.
9951         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9952         instead of `(unsigned short *) 0x400'.
9954 2007-11-10  Bean  <bean123ch@gmail.com>
9956         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9958 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9960         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9961         (vga_mod_SOURCES): Added.
9962         (vga_mod_CFLAGS): Likewise.
9963         (vga_mod_LDFLAGS): Likewise.
9965         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9966         grub_outb() calls.
9967         (set_map_mask): Likewise.
9968         (set_read_map): Likewise.
9969         (set_read_address): Likewise.
9970         (vga_font): Removed variable.
9971         (get_vga_glyph): Removed function.
9972         (invalidate_char): Likewise.
9973         (write_char): Changed to use grub_font_get_glyph() for font
9974         information.
9975         (grub_vga_putchar): Likewise.
9976         (grub_vga_getcharwidth): Likewise.
9978 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9980         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9981         flags.
9982         (pxeboot_img_LDFLAGS): Likewise.
9983         (diskboot_img_LDFLAGS): Likewise.
9984         (kernel_img_LDFLAGS): Likewise.
9986 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9988         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9989         in grub_outb() calls.
9990         (serial_hw_init): Likewise.
9992 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9994         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9995         spaces.  Skip non-regular files.
9997 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9999         * kern/disk.c (grub_disk_firmware_fini)
10000         (grub_disk_firmware_is_tainted): New variables.
10002         * include/grub/disk.h (grub_disk_firmware_fini)
10003         (grub_disk_firmware_is_tainted): Likewise.
10005         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10006         (grub_disk_biosdisk_fini): ... to here.
10007         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10008         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10009         is set.  Register grub_disk_biosdisk_fini() in
10010         `grub_disk_firmware_fini'.
10012         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10013         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10014         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10015         to finish existing firmware disk interface.
10017         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10018         (ata_mod_SOURCES): New variable.
10019         (ata_mod_CFLAGS): Likewise.
10020         (ata_mod_LDFLAGS): Likewise.
10022 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10024         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10025         (grub_ata_wait): Reimplement using grub_millisleep().
10027         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10028         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10030 2007-11-03  Marco Gerards  <marco@gnu.org>
10032         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10033         (CRTC_ADDR_PORT): New macro.
10034         (CRTC_DATA_PORT): Likewise.
10035         (CRTC_CURSOR): Likewise.
10036         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10037         (CRTC_CURSOR_ADDR_LOW): Likewise.
10038         (update_cursor): New function.
10039         (grub_console_real_putchar): Call `update_cursor'.
10040         (grub_console_gotoxy): Likewise.
10041         (grub_console_cls): Set the default color when clearing the
10042         screen.
10043         (grub_console_setcursor): Implemented.
10045 2007-11-03  Marco Gerards  <marco@gnu.org>
10047         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10048         become activate.
10049         (grub_ata_pio_write): Likewise.
10051         (grub_atapi_identify): Wait after issuing an ATA command.
10052         (grub_atapi_packet): Likewise.
10053         (grub_ata_identify): Likewise.
10054         (grub_ata_readwrite): Likewise.
10056 2007-11-03  Marco Gerards  <marco@gnu.org>
10058         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10059         (grub_ata_pio_write): Likewise.
10060         (grub_ata_readwrite): Use `grub_error', instead of
10061         returning `grub_errno'.
10063 2007-11-03  Marco Gerards  <marco@gnu.org>
10065         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10066         grub_ata_pio_write once for every single sector, instead of for
10067         multiple sectors.
10069 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10071         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10073         * conf/i386-linuxbios.rmk: New file.
10075         * kern/i386/pc/hardware.c: Likewise.
10076         * term/i386/pc/at_keyboard.c: Likewise.
10077         * term/i386/pc/vga_text.c: Likewise.
10079         * include/grub/i386/linuxbios/boot.h: Likewise.
10080         * include/grub/i386/linuxbios/console.h: Likewise.
10081         * include/grub/i386/linuxbios/init.h: Likewise.
10082         * include/grub/i386/linuxbios/kernel.h: Likewise.
10083         * include/grub/i386/linuxbios/loader.h: Likewise.
10084         * include/grub/i386/linuxbios/memory.h: Likewise.
10085         * include/grub/i386/linuxbios/serial.h: Likewise.
10086         * include/grub/i386/linuxbios/time.h: Likewise.
10088         * kern/i386/linuxbios/init.c: Likewise.
10089         * kern/i386/linuxbios/startup.S: Likewise.
10090         * kern/i386/linuxbios/table.c: Likewise.
10092 2007-10-31  Marco Gerards  <marco@gnu.org>
10094         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10095         (ata_mod_SOURCES): New variable.
10096         (ata_mod_CFLAGS): Likewise.
10097         (ata_mod_LDFLAGS): Likewise.
10099         * disk/ata.c: New file.
10101         * include/grub/disk.h (grub_disk_dev_id): Add
10102         `GRUB_DISK_DEV_ATA_ID'.
10104 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10106         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10107         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10109         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10110         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10112         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10113         `<grub/types.h>'.
10115         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10117 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10119         * include/grub/types.h (ULONG_MAX): Define macro.
10121 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10123         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10124         `"../realmode.S"'.
10125         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10127 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10129         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10130         (pkgdata_MODULES): Add `biosdisk.mod'.
10131         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10132         variables.
10134         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10135         (grub_biosdisk_init): Replace with ...
10136         (GRUB_MOD_INIT(biosdisk)): ... this.
10137         (grub_biosdisk_fini): Replace with ...
10138         (GRUB_MOD_FINI(biosdisk)): ... this.
10140         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10141         (grub_machine_init): Remove call to grub_biosdisk_init().
10142         (grub_machine_fini): Remove call to grub_machine_fini().
10144         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10146 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10148         * include/grub/time.h: New file.
10149         * include/grub/i386/time.h: Likewise.
10150         * include/grub/powerpc/time.h: Likewise.
10151         * include/grub/sparc64/time.h: Likewise.
10153         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10154         instances to ...
10155         (KERNEL_MACHINE_TIME_HEADER): ... this.
10156         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10157         instances to ...
10158         (KERNEL_MACHINE_TIME_HEADER): ... this.
10159         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10160         instances to ...
10161         (KERNEL_MACHINE_TIME_HEADER): ... this.
10163         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10164         (grub_millisleep): New function.
10165         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10166         (grub_millisleep): New function.
10167         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10168         Remove `grub/machine/time.h' include.
10169         (grub_millisleep): New function.
10170         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10171         Remove `grub/machine/time.h' include.
10172         (grub_millisleep): New function.
10174         * include/grub/misc.h (grub_div_roundup): New function.
10176         * kern/misc.c: Include `<grub/time.h>'.
10177         (grub_millisleep_generic): New function.
10179         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10180         Add `time.h'.
10181         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10182         Add `time.h'.
10183         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10184         `machine/time.h'.  Add `time.h'.
10185         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10187 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10189         * include/grub/misc.h (grub_max): New function.
10191 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10193         * util/misc.c (grub_util_info): Call fflush() before returning.
10195 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10197         * genmk.rb (Image): Copy `extra_flags' from here ...
10198         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10200         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10201         to `argc' and `args' arguments.
10203 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10205         * kern/i386/loader.S: New file.
10207         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10208         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10209         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10210         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10211         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10212         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10213         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10214         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10215         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10216         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10217         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10218         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10219         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10220         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10222         * kern/i386/realmode.S: New file.
10224         * kern/i386/pc/startup.S (protstack): Moved from here ...
10225         * kern/i386/realmode.S (protstack)... to here.
10226         * kern/i386/pc/startup.S (gdt): Moved from here ...
10227         * kern/i386/realmode.S (gdt)... to here.
10228         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10229         * kern/i386/realmode.S (prot_to_real)... to here.
10231         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10232         `kern/i386/realmode.S'.
10234 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10236         * include/grub/i386/loader.h: New file.
10238         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10239         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10240         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10241         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10242         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10243         * include/grub/i386/loader.h (grub_linux_prot_size)
10244         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10245         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10246         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10247         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10249         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10251 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10253         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10254         filesystem when dev->disk is unset.
10255         Do probe for filesystem even when dev->disk->has_partitions is set.
10256         In case a filesystem is found, always report it.
10257         In case it isn't, if dev->disk->has_partitions is set, report that
10258         a partition table was found instead of reporting that no filesystem
10259         could be identified.
10261 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10263         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10264         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10266         * include/grub/types.h (grub_host_to_target16): New macro.
10267         (grub_host_to_target32): Likewise.
10268         (grub_host_to_target64): Likewise.
10269         (grub_target_to_host16): Likewise.
10270         (grub_target_to_host32): Likewise.
10271         (grub_target_to_host64): Likewise.
10273         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10274         Renamed from to ...
10275         (GRUB_MOD_ALIGN): ...this.  Update all users.
10277         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10278         grub_host_to_target32.
10279         Replace grub_be_to_cpu32 with grub_target_to_host32.
10280         (load_modules): Likewise.
10281         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10282         Replace grub_be_to_cpu32 with grub_target_to_host32.
10283         Replace grub_cpu_to_be16 with grub_host_to_target16.
10284         Replace grub_cpu_to_be32 grub_host_to_target32.
10286 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10288         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10289         * util/elf/grub-mkimage.c: ... here.
10291         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10292         `util/powerpc/ieee1275/grub-mkimage.c'.
10294 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10296         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10297         and make it easier to figure out.
10298         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10299         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10300         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10301         leave us with less than HEAP_MIN_SIZE total heap.
10302         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10304 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10306         * include/grub/i386/io.h: New file.
10307         * commands/i386/pc/play.c (inb): Removed.
10308         (outb): Removed.
10309         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10310         with grub_outb().
10311         * term/i386/pc/serial.c  (inb): Removed.
10312         (outb): Removed.
10313         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10314         with grub_outb().
10315         * term/i386/pc/vga.c  (inb): Removed.
10316         (outb): Removed.
10317         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10318         with grub_outb().
10320 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10322         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10323         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10324         Reported by Marcin Kurek.
10326 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10328         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10329         SmartFirmware version updates (as released by Sven Luther), and avoid
10330         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10331         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10332         known broken.
10334 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10336         From Hitoshi Ozeki:
10337         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10338         when merging two regions.
10340 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10342         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10343         * normal/completion.c (grub_normal_do_completion): Likewise.
10344         Reported by Hitoshi Ozeki.
10346 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10348         Do not use devices at boot in chainloading.
10350         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10351         (boot_part_addr): Likewise.
10352         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10353         with BOOT_DRIVE and BOOT_PART_ADDR.
10354         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10355         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10357 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10359         Patch from Simon Peter <dn.tlp@gmx.net>:
10360         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10361         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10362         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10363         util/i386/pc/grub-setup.c_DEPENDENCIES.
10364         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10365         util/grub-probe.c_DEPENDENCIES.
10366         * conf/powerpc-ieee1275.rmk: Likewise.
10368 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10370         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10371         to tell grub-mkdevicemap how to name devices.
10372         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10373         feature).
10375         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10376         util/i386/get_disk_name.c.
10377         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10378         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10379         util/ieee1275/get_disk_name.c.
10381         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10383         * DISTLIST: Add util/i386/get_disk_name.c and
10384         util/ieee1275/get_disk_name.c.
10386         * util/grub-mkdevicemap.c: Replace device naming logic with
10387         grub_util_get_disk_name() calls.
10389 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10391         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10392         (so that it works for both plural and singular quantities).
10394 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10396         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10397         so that [xz] isn't taken into account when determining order.
10399 2007-08-02  Marco Gerards  <marco@gnu.org>
10401         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10402         `include/multiboot2.h', `include/grub/elfload.h',
10403         `include/multiboot.h', `include/grub/multiboot.h',
10404         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10405         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10406         `kern/elf.c', `loader/multiboot_loader.c',
10407         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10408         `loader/i386/pc/multiboot2.c',
10409         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10410         `util/i386/pc/grub-mkrescue.in'.  Remove
10411         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10412         `include/grub/i386/pc/util/biosdisk.h' and
10413         `include/grub/powerpc/ieee1275/multiboot.h'.
10415 2007-08-02  Bean  <bean123ch@gmail.com>
10417         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10418         (ntfs_mod_SOURCES): New variable.
10419         (ntfs_mod_CFLAGS): Likewise.
10420         (ntfs_mod_LDFLAGS): Likewise.
10422         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10423         (grub_probe_SOURCES): Likewise.
10424         (grub_emu_SOURCES): Likewise.
10426         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10427         (grub_emu_SOURCES): Likewise.
10429         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10430         (grub_emu_SOURCES): Likewise.
10432         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10434         * fs/ntfs.c: New file.
10436 2007-08-02  Bean  <bean123ch@gmail.com>
10438         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10440         * file.h (grub_file): Likewise.
10442         * fshelp.h (grub_fshelp_read_file): Likewise.
10444         * util/i386/pc/grub-setup.c (setup): Likewise.
10445         (save_first_sector): Likewise.
10446         (save_blocklists): Likewise.
10448         * fs/affs.c (grub_affs_read_file): Likewise.
10450         * fs/ext2.c (grub_ext2_read_file): Likewise.
10452         * fs/fat.c (grub_fat_read_data): Likewise.
10454         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10456         * fs/hfs.c (grub_hfs_read_file): Likewise.
10458         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10460         * fs/jfs.c (grub_jfs_read_file): Likewise.
10462         * fs/minix.c (grub_minix_read_file): Likewise.
10464         * fs/sfs.c (grub_sfs_read_file): Likewise.
10466         * fs/ufs.c (grub_ufs_read_file): Likewise.
10468         * fs/xfs.c (grub_xfs_read_file): Likewise.
10470         * command/blocklist.c (read_blocklist): Likewise.
10471         (print_blocklist): Likewise.
10473 2007-08-02  Marco Gerards  <marco@gnu.org>
10475         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10476         `util/hostfs.c'.
10478         * disk/host.c: New file.
10480         * util/hostfs.c: Likewise.
10482         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10483         return `GRUB_ERR_BAD_FS'.
10484         * fs/sfs.c (grub_sfs_mount): Likewise.
10485         * fs/xfs.c (grub_xfs_mount): Likewise.
10487         * include/grub/disk.h (enum grub_disk_dev_id): Add
10488         `GRUB_DISK_DEVICE_HOST_ID'.
10490         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10492 2007-07-24  Jerone Young  <jerone@gmail.com>
10494         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10495         modules for compilation.
10496         * conf/powerpc-ieee1275.rmk: Likewise.
10498         * include/multiboot.h: Move multiboot definitions to one file. Rename
10499         many definitions to not get grub specific.
10500         * include/multiboot2.h: Create header with multiboot 2 definitions.
10501         * include/grub/multiboot.h: Header for grub specific function
10502         prototypes and definitions.
10503         * include/grub/multiboot2.h: Likewise.
10504         * include/grub/multiboot_loader.h: Likewise.
10505         * include/grub/i386/pc/multiboot.h: Removed.
10506         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10508         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10509         and 2 to allow for one multiboot and module commands.
10510         * loader/multiboot2.c: Add multiboot2 functionality.
10511         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10512         and definition names.
10513         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10514         2 functions.
10515         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10516         ieee1275 specific multiboot2 code.
10518         * kern/i386/pc/startup.S: Change headers and definition names for
10519         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10521 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10523         * geninitheader.sh: Process file specified in first parameter rather
10524         than hardcoding grub_modules_init.lst.
10525         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10526         than hardcoding grub_modules_init.h.
10528         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10529         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10530         grub_probe_init.[ch] and grub_setup_init.[ch].
10532         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10533         grub_modules_init.h with grub_emu_init.h.
10534         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10535         grub_probe_init.[ch] files.
10536         * conf/i386-efi.rmk: Likewise.
10537         * conf/i386-pc.rmk: Likewise.
10538         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10539         grub_setup_init.[ch] files.
10541         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10542         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10543         to initialize modules rather than a list of hardcoded functions.
10544         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10545         grub_init_all() to initialize modules rather than a list of hardcoded
10546         functions.
10548 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10550         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10551         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10553 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10555         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10556         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10557         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10558         flag when running on SmartFirmware.
10559         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10560         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10561         was set.
10563         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10564         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10565         rather than decreasing it.
10567         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10568         there's not enough space to do it, fail in the same way as when it
10569         can't be done because there are no partitions.
10571         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10572         when nvsetenv failed.
10574 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10576         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10577         because this rule is automatically generated.
10578         (grub-mkrescue): Removed for the same reason as above.
10580 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10582         Migrate to GNU General Public License Version 3.
10584         * COPYING: Replaced with the plain text version of GPLv3.
10586         * config.guess: Updated from gnulib.
10587         * config.sub: Likewise.
10589         * geninit.sh: Output a GPLv3 copyright notice.
10590         * geninitheader.sh: Likewise.
10591         * genmodsrc.sh: Likewise.
10592         * gensymlist.sh.in: Likewise.
10594         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10595         * boot/i386/pc/diskboot.S: Likewise.
10596         * boot/i386/pc/pxeboot.S: Likewise.
10597         * commands/blocklist.c: Likewise.
10598         * commands/boot.c: Likewise.
10599         * commands/cat.c: Likewise.
10600         * commands/cmp.c: Likewise.
10601         * commands/configfile.c: Likewise.
10602         * commands/echo.c: Likewise.
10603         * commands/help.c: Likewise.
10604         * commands/ls.c: Likewise.
10605         * commands/search.c: Likewise.
10606         * commands/terminal.c: Likewise.
10607         * commands/test.c: Likewise.
10608         * commands/videotest.c: Likewise.
10609         * commands/i386/cpuid.c: Likewise.
10610         * commands/i386/pc/halt.c: Likewise.
10611         * commands/i386/pc/play.c: Likewise.
10612         * commands/i386/pc/reboot.c: Likewise.
10613         * commands/i386/pc/vbeinfo.c: Likewise.
10614         * commands/i386/pc/vbetest.c: Likewise.
10615         * commands/ieee1275/halt.c: Likewise.
10616         * commands/ieee1275/reboot.c: Likewise.
10617         * commands/ieee1275/suspend.c: Likewise.
10618         * disk/loopback.c: Likewise.
10619         * disk/lvm.c: Likewise.
10620         * disk/raid.c: Likewise.
10621         * disk/efi/efidisk.c: Likewise.
10622         * disk/i386/pc/biosdisk.c: Likewise.
10623         * disk/ieee1275/ofdisk.c: Likewise.
10624         * font/manager.c: Likewise.
10625         * fs/affs.c: Likewise.
10626         * fs/ext2.c: Likewise.
10627         * fs/fat.c: Likewise.
10628         * fs/fshelp.c: Likewise.
10629         * fs/hfs.c: Likewise.
10630         * fs/hfsplus.c: Likewise.
10631         * fs/iso9660.c: Likewise.
10632         * fs/jfs.c: Likewise.
10633         * fs/minix.c: Likewise.
10634         * fs/sfs.c: Likewise.
10635         * fs/ufs.c: Likewise.
10636         * fs/xfs.c: Likewise.
10637         * hello/hello.c: Likewise.
10638         * include/grub/acorn_filecore.h: Likewise.
10639         * include/grub/arg.h: Likewise.
10640         * include/grub/bitmap.h: Likewise.
10641         * include/grub/boot.h: Likewise.
10642         * include/grub/cache.h: Likewise.
10643         * include/grub/device.h: Likewise.
10644         * include/grub/disk.h: Likewise.
10645         * include/grub/dl.h: Likewise.
10646         * include/grub/elfload.h: Likewise.
10647         * include/grub/env.h: Likewise.
10648         * include/grub/err.h: Likewise.
10649         * include/grub/file.h: Likewise.
10650         * include/grub/font.h: Likewise.
10651         * include/grub/fs.h: Likewise.
10652         * include/grub/fshelp.h: Likewise.
10653         * include/grub/gzio.h: Likewise.
10654         * include/grub/hfs.h: Likewise.
10655         * include/grub/kernel.h: Likewise.
10656         * include/grub/loader.h: Likewise.
10657         * include/grub/lvm.h: Likewise.
10658         * include/grub/misc.h: Likewise.
10659         * include/grub/mm.h: Likewise.
10660         * include/grub/net.h: Likewise.
10661         * include/grub/normal.h: Likewise.
10662         * include/grub/parser.h: Likewise.
10663         * include/grub/partition.h: Likewise.
10664         * include/grub/pc_partition.h: Likewise.
10665         * include/grub/raid.h: Likewise.
10666         * include/grub/rescue.h: Likewise.
10667         * include/grub/script.h: Likewise.
10668         * include/grub/setjmp.h: Likewise.
10669         * include/grub/symbol.h: Likewise.
10670         * include/grub/term.h: Likewise.
10671         * include/grub/terminfo.h: Likewise.
10672         * include/grub/tparm.h: Likewise.
10673         * include/grub/types.h: Likewise.
10674         * include/grub/video.h: Likewise.
10675         * include/grub/efi/api.h: Likewise.
10676         * include/grub/efi/chainloader.h: Likewise.
10677         * include/grub/efi/console.h: Likewise.
10678         * include/grub/efi/console_control.h: Likewise.
10679         * include/grub/efi/disk.h: Likewise.
10680         * include/grub/efi/efi.h: Likewise.
10681         * include/grub/efi/pe32.h: Likewise.
10682         * include/grub/efi/time.h: Likewise.
10683         * include/grub/i386/linux.h: Likewise.
10684         * include/grub/i386/setjmp.h: Likewise.
10685         * include/grub/i386/types.h: Likewise.
10686         * include/grub/i386/efi/kernel.h: Likewise.
10687         * include/grub/i386/efi/loader.h: Likewise.
10688         * include/grub/i386/efi/time.h: Likewise.
10689         * include/grub/i386/pc/biosdisk.h: Likewise.
10690         * include/grub/i386/pc/boot.h: Likewise.
10691         * include/grub/i386/pc/chainloader.h: Likewise.
10692         * include/grub/i386/pc/console.h: Likewise.
10693         * include/grub/i386/pc/init.h: Likewise.
10694         * include/grub/i386/pc/kernel.h: Likewise.
10695         * include/grub/i386/pc/loader.h: Likewise.
10696         * include/grub/i386/pc/memory.h: Likewise.
10697         * include/grub/i386/pc/multiboot.h: Likewise.
10698         * include/grub/i386/pc/serial.h: Likewise.
10699         * include/grub/i386/pc/time.h: Likewise.
10700         * include/grub/i386/pc/vbe.h: Likewise.
10701         * include/grub/i386/pc/vbeblit.h: Likewise.
10702         * include/grub/i386/pc/vbefill.h: Likewise.
10703         * include/grub/i386/pc/vbeutil.h: Likewise.
10704         * include/grub/i386/pc/vga.h: Likewise.
10705         * include/grub/ieee1275/ieee1275.h: Likewise.
10706         * include/grub/ieee1275/ofdisk.h: Likewise.
10707         * include/grub/powerpc/libgcc.h: Likewise.
10708         * include/grub/powerpc/setjmp.h: Likewise.
10709         * include/grub/powerpc/types.h: Likewise.
10710         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10711         * include/grub/powerpc/ieee1275/console.h: Likewise.
10712         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10713         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10714         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10715         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10716         * include/grub/powerpc/ieee1275/time.h: Likewise.
10717         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10718         * include/grub/sparc64/libgcc.h: Likewise.
10719         * include/grub/sparc64/setjmp.h: Likewise.
10720         * include/grub/sparc64/types.h: Likewise.
10721         * include/grub/sparc64/ieee1275/console.h: Likewise.
10722         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10723         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10724         * include/grub/sparc64/ieee1275/time.h: Likewise.
10725         * include/grub/util/biosdisk.h: Likewise.
10726         * include/grub/util/getroot.h: Likewise.
10727         * include/grub/util/lvm.h: Likewise.
10728         * include/grub/util/misc.h: Likewise.
10729         * include/grub/util/raid.h: Likewise.
10730         * include/grub/util/resolve.h: Likewise.
10731         * io/gzio.c: Likewise.
10732         * kern/device.c: Likewise.
10733         * kern/disk.c: Likewise.
10734         * kern/dl.c: Likewise.
10735         * kern/elf.c: Likewise.
10736         * kern/env.c: Likewise.
10737         * kern/err.c: Likewise.
10738         * kern/file.c: Likewise.
10739         * kern/fs.c: Likewise.
10740         * kern/loader.c: Likewise.
10741         * kern/main.c: Likewise.
10742         * kern/misc.c: Likewise.
10743         * kern/mm.c: Likewise.
10744         * kern/parser.c: Likewise.
10745         * kern/partition.c: Likewise.
10746         * kern/rescue.c: Likewise.
10747         * kern/term.c: Likewise.
10748         * kern/efi/efi.c: Likewise.
10749         * kern/efi/init.c: Likewise.
10750         * kern/efi/mm.c: Likewise.
10751         * kern/i386/dl.c: Likewise.
10752         * kern/i386/efi/init.c: Likewise.
10753         * kern/i386/efi/startup.S: Likewise.
10754         * kern/i386/pc/init.c: Likewise.
10755         * kern/i386/pc/lzo1x.S: Likewise.
10756         * kern/i386/pc/startup.S: Likewise.
10757         * kern/ieee1275/ieee1275.c: Likewise.
10758         * kern/powerpc/cache.S: Likewise.
10759         * kern/powerpc/dl.c: Likewise.
10760         * kern/powerpc/ieee1275/cmain.c: Likewise.
10761         * kern/powerpc/ieee1275/crt0.S: Likewise.
10762         * kern/powerpc/ieee1275/init.c: Likewise.
10763         * kern/powerpc/ieee1275/openfw.c: Likewise.
10764         * kern/sparc64/cache.S: Likewise.
10765         * kern/sparc64/dl.c: Likewise.
10766         * kern/sparc64/ieee1275/init.c: Likewise.
10767         * kern/sparc64/ieee1275/openfw.c: Likewise.
10768         * loader/efi/chainloader.c: Likewise.
10769         * loader/efi/chainloader_normal.c: Likewise.
10770         * loader/i386/efi/linux.c: Likewise.
10771         * loader/i386/efi/linux_normal.c: Likewise.
10772         * loader/i386/pc/chainloader.c: Likewise.
10773         * loader/i386/pc/chainloader_normal.c: Likewise.
10774         * loader/i386/pc/linux.c: Likewise.
10775         * loader/i386/pc/linux_normal.c: Likewise.
10776         * loader/i386/pc/multiboot.c: Likewise.
10777         * loader/i386/pc/multiboot_normal.c: Likewise.
10778         * loader/powerpc/ieee1275/linux.c: Likewise.
10779         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10780         * normal/arg.c: Likewise.
10781         * normal/cmdline.c: Likewise.
10782         * normal/command.c: Likewise.
10783         * normal/completion.c: Likewise.
10784         * normal/execute.c: Likewise.
10785         * normal/function.c: Likewise.
10786         * normal/lexer.c: Likewise.
10787         * normal/main.c: Likewise.
10788         * normal/menu.c: Likewise.
10789         * normal/menu_entry.c: Likewise.
10790         * normal/misc.c: Likewise.
10791         * normal/parser.y: Likewise.
10792         * normal/script.c: Likewise.
10793         * normal/i386/setjmp.S: Likewise.
10794         * normal/powerpc/setjmp.S: Likewise.
10795         * normal/sparc64/setjmp.S: Likewise.
10796         * partmap/acorn.c: Likewise.
10797         * partmap/amiga.c: Likewise.
10798         * partmap/apple.c: Likewise.
10799         * partmap/gpt.c: Likewise.
10800         * partmap/pc.c: Likewise.
10801         * partmap/sun.c: Likewise.
10802         * term/gfxterm.c: Likewise.
10803         * term/terminfo.c: Likewise.
10804         * term/efi/console.c: Likewise.
10805         * term/i386/pc/console.c: Likewise.
10806         * term/i386/pc/serial.c: Likewise.
10807         * term/i386/pc/vesafb.c: Likewise.
10808         * term/i386/pc/vga.c: Likewise.
10809         * term/ieee1275/ofconsole.c: Likewise.
10810         * util/biosdisk.c: Likewise.
10811         * util/console.c: Likewise.
10812         * util/genmoddep.c: Likewise.
10813         * util/getroot.c: Likewise.
10814         * util/grub-emu.c: Likewise.
10815         * util/grub-mkdevicemap.c: Likewise.
10816         * util/grub-probe.c: Likewise.
10817         * util/lvm.c: Likewise.
10818         * util/misc.c: Likewise.
10819         * util/raid.c: Likewise.
10820         * util/resolve.c: Likewise.
10821         * util/update-grub.in: Likewise.
10822         * util/update-grub_lib.in: Likewise.
10823         * util/grub.d/00_header.in: Likewise.
10824         * util/grub.d/10_hurd.in: Likewise.
10825         * util/grub.d/10_linux.in: Likewise.
10826         * util/i386/efi/grub-install.in: Likewise.
10827         * util/i386/efi/grub-mkimage.c: Likewise.
10828         * util/i386/pc/grub-install.in: Likewise.
10829         * util/i386/pc/grub-mkimage.c: Likewise.
10830         * util/i386/pc/grub-mkrescue.in: Likewise.
10831         * util/i386/pc/grub-setup.c: Likewise.
10832         * util/i386/pc/misc.c: Likewise.
10833         * util/powerpc/ieee1275/grub-install.in: Likewise.
10834         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10835         * util/powerpc/ieee1275/misc.c: Likewise.
10836         * video/bitmap.c: Likewise.
10837         * video/video.c: Likewise.
10838         * video/i386/pc/vbe.c: Likewise.
10839         * video/i386/pc/vbeblit.c: Likewise.
10840         * video/i386/pc/vbefill.c: Likewise.
10841         * video/i386/pc/vbeutil.c: Likewise.
10842         * video/readers/tga.c: Likewise.
10844 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10846         * conf/i386-efi.rmk: Replace obsolete reference to
10847         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10848         with util/getroot.c.
10849         * conf/powerpc-ieee1275.rmk: Likewise.
10850         * conf/sparc64-ieee1275.rmk: Likewise.
10852         * util/grub-emu.c (main): Fix unchecked pointer handling.
10854 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10856         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10857         invocation to fail, in order to support partition-less media.
10859         * util/i386/pc/grub-install.in: Likewise.
10861         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10862         which fs or partmap modules are needed (akin to its sister scripts).
10864         Also use grub-probe to get rid of unportable /proc/mounts check.
10866         Print the same informational message that the other scripts do, before
10867         exiting.
10869 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10871         * util/update-grub_lib.in (font_path): New function.  Determine whether
10872         a font file can be found and, if so, echo the GRUB path to it.
10874         * util/update-grub.in: Handle multiple terminals depending on user
10875         input, platform availability and font file presence.  Propagate
10876         variables of our findings to /etc/grub.d/ children.
10878         * util/grub.d/00_header.in: Handle multiple terminals, based on
10879         environment setup by update-grub.
10881 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10883         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10885 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10887         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10888         indicate end of data section in kernel image.
10889         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10890         GRUB_KERNEL_MACHINE_DATA_END.
10892         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10893         space for it.
10894         * kern/i386/efi/startup.S: Likewise.
10896         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10897         during image generation.  Implement --prefix option to override this
10898         patch.
10899         * util/i386/efi/grub-mkimage.c: Likewise.
10901         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10902         code to make path relative to its root into a separate function.
10904         * util/i386/pc/grub-install.in: Use newly provided
10905         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10906         pass the result to grub-install --prefix.
10908 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10910         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10911         DEFAULT_DEVICE_MAP.
10912         * util/grub-emu.c: Use above definitions from misc.h instead of
10913         defining them.
10914         * util/grub-mkdevicemap.c: Likewise.
10915         * util/i386/pc/grub-setup.c: Likewise.
10916         * util/grub-probe.c: Likewise.
10917         (probe): Abort with grub_util_error() when either
10918         grub_guess_root_device or grub_util_get_grub_dev fails.
10920 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10922         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10923         "pager" assignment.
10924         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10925         "pcdata".
10926         * util/grub-probe.c (probe): Likewise for "drive_name".
10928 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10930         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10931         not just the cdrom one.
10933 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10935         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10936         Add --pkglibdir=DIR option to override pkglibdir.
10937         Mention --image-type=TYPE in help output.
10938         Fix --grub-mkimage (it was a no-op).
10939         Abort gracefully when no parameter is given.
10941 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10943         * util/i386/pc/grub-mkrescue.in: New file.
10944         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10945         * Makefile.in: Handle bin_SCRIPTS.
10947 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10949         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10950         list of video modes.
10952 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10954         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10955         file doesn't exist, or if it is in a filesystem grub can't read.
10957         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10958         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10959         header comment to fit in 80 columns when the variables are resolved.
10961         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10962         could be identified by update-grub.  Remove redundant check for
10963         unifont.pff existence (since convert_system_path_to_grub_path now
10964         handles that).
10966 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10968         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10970         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10972         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10974 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10976         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10978         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10979         grub_apple_partition_map_fini.
10981         * util/biosdisk.c
10982         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10983         to access >2 TiB disks).
10985         Print disk->total_sectors with %llu instead of %lu, since this
10986         variable is always 64-bit (prevents wrong disk size from being displayed
10987         on either >2 TiB disk or big-endian CPU).
10989         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10990         into a generic case that supports all (sane) partition maps.
10992         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10993         breaks big-endian.
10995         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10996         and grub_apple_partition_map_fini() after that.
10998 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11000         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11002         * util/grub.d/00_header.in: Only enable gfxterm when
11003         convert_system_path_to_grub_path() succeeds.
11005 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11007         * util/update-grub_lib.in: New file.
11008         * DISTLIST: Add update-grub_lib.in.
11009         * conf/common.rmk: Generate update-grub_lib and install it in
11010         $(lib_DATA).
11011         * Makefile.in: Add install routine for $(lib_DATA).
11013         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11014         function provided by update-grub_lib to support arbitrary paths of
11015         unifont.pff.
11016         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11017         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11019 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11021         * commands/i386/cpuid.c: New module.
11022         * DISTLIST: Add it.
11023         * conf/i386-efi.rmk: Enable cpuid.mod.
11024         * conf/i386-pc.rmk: Likewise.
11026 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11028         * kern/disk.c (grub_disk_read): Check return value of
11029         grub_realloc().
11031 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11033         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11034         arrays.
11035         * disk/raid.c (grub_raid_open): Likewise.
11037 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11039         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11040         stack instead of on the heap.
11042         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11043         before doing a read on it.
11045         * configure.ac: Only use -fno-stack-protector for the target
11046         environment.
11048 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11050         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11051         __attribute_ ((unused)) to mode_type argument.
11053         * util/getroot.c (grub_guess_root_device): Fix #endif.
11055         * kern/misc.c (memcmp): Fix prototype.
11057         * include/grub/partition.h [GRUB_UTIL]
11058         (grub_gpt_partition_map_init): Add prototype.
11059         (grub_gpt_partition_map_fini): Likewise.
11061         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11062         at the right place.
11064         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11065         (grub_fat_read_data): Likewise.
11066         (grub_fat_find_dir): Likewise.
11068         * font/manager.c (find_glyph): Make table a const.
11069         (grub_font_get_glyph): Remove bitmap from if statement.
11071 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11073         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11074         code, first search for device in /dev/mapper, then in /dev.
11075         (grub_util_get_grub_dev): New function.
11076         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11077         prototype.
11078         * util/grub-probe.c (probe): Remove check for RAID, call
11079         grub_util_get_grub_dev() instead of
11080         grub_util_biosdisk_get_grub_dev().
11081         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11082         grub_util_biosdisk_get_grub_dev().
11083         * util/i386/pc/grub-setup.c (main): Likewise.
11085 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11087         * DISTLIST: Update for the latest changes.
11088         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11089         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11090         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11091         grub/util/biosdisk.h.
11092         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11093         grub/util/biosdisk.h.
11095 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11097         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11099 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11101         * util/i386/efi/grub-install.in: New.
11102         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11103         newly added grub-install.
11104         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11105         include.
11106         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11107         grub/util/biosdisk.h.
11108         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11109         grub/util/biosdisk.h.
11111 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11113         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11114         * include/grub/util/biosdisk.h: ... here.
11115         * util/i386/pc/biosdisk.c: Moved to ...
11116         * util/biosdisk.c: ... here.
11117         * util/i386/pc/getroot.c: Moved to ...
11118         * util/getroot.c: ... here.
11119         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11120         * util/grub-mkdevicemap.c: ... here.
11121         * util/i386/pc/grub-probe.c: Moved to ...
11122         * util/grub-probe.c: ... here.
11124 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11126         * util/update-grub.in: Remove duplicated line in grub.cfg header
11127         message.
11129 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11131         * util/update-grub.in: Fix a few assumptions about the devices holding
11132         /, /boot and /boot/grub being the same.
11133         * util/grub.d/00_header.in: Likewise.
11134         * util/grub.d/10_hurd.in: Likewise.
11135         * util/grub.d/10_linux.in: Likewise.
11137         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11138         patterns.  Use that to define the `.old' suffix as older than `'.
11140         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11142         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11143         the grub.cfg header message.
11145 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11147         * util/update-grub.in: Create device.map if it doesn't already exist,
11148         before attempting to run grub-probe.
11149         Check for grub-probe and grub-mkdevicemap with the same code
11150         grub-install is using.
11151         Remove test mode.
11153 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11155         * Makefile.in: Add the datarootdir autoconf variable.
11157 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11159         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11160         fail gracefully if dev->disk->partition == NULL.
11162 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11164         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11165         determine partition map module.
11166         * util/i386/pc/grub-install.in: Use this feature to decide which
11167         partition module to load, instead of hardcoding pc and gpt.
11169 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11171         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11172         source directory differs from build directory.
11174 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11176         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11177         initialisation.
11179 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11181         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11183 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11185         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11186         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11188 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11190         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11191         (grub_probe_SOURCES): Likewise.
11192         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11193         GPT and initialize dos_part and bsd_part accordingly.
11194         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11195         install_bsd_part.
11196         (main): Activate gpt module for use during partition identification,
11197         and deactivate it afterwards.
11198         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11199         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11200         partition identification, and deactivate it afterwards.
11202 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11204         * term/i386/pc/console.c (grub_console_fini): Call
11205         grub_term_set_current() before grub_term_unregister().
11207 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11209         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11210         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11211         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11212         and update-grub_DATA.
11213         * conf/common.rmk: Build and install update-grub components.
11214         * conf/common.mk: Regenerate.
11215         * util/update-grub.in: New.  Core of update-grub.
11216         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11217         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11218         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11219         * util/grub.d/README: New.  Document grub.d directory layout.
11221 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11223         * util/grub-emu.c: Move initialization functions
11224         grub_util_biosdisk_init() and grub_init_all() before
11225         grub_util_biosdisk_get_grub_dev(), which relies on them.
11227 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11229         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11230         it is used later.
11232 2007-04-18  Jerone Young  <jerone@gmail.com>
11234         * kernel/elf.c: Add missing parenthesis for conditional statement
11235         stanza.
11237 2007-04-10  Jerone Young  <jerone@gmail.com>
11239         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11240         continue on and look for device node with real device name.
11242 2007-04-10  Jerone Young  <jerone@gmail.com>
11244         * configure.ac: Add argument for autoconf to use transformation
11245         ability.
11246         * Makefile.in: Add autoconf package transformation code.
11247         * util/i386/pc/grub-install.in: Likewise.
11248         * util/powerpc/ieee1275/grub-install.in: Likewise.
11250 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11252         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11253         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11254         (EXT2_REVISION): Likewise.
11255         (EXT2_INODE_SIZE): Likewise.
11256         (struct grub_ext2_block_group): Added a missing member
11257         "used_dirs".
11258         (grub_ext2_read_inode): Divide by the inode size in a superblock
11259         instead of 128 to obtain INODES_PER_BLOCK.
11260         Use the macro EXT2_INODE_SIZE instead of directly using
11261         SBLOCK->INODE_SIZE.
11263 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11265         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11266         superblock instead of the structure size to compute an
11267         offset. This fixes the problem that GRUB could not read a
11268         filesystem when inode size is different from 128-byte.
11270 2007-03-05  Marco Gerards  <marco@gnu.org>
11272         * normal/main.c (read_config_file): When "menu" is not set, create
11273         an initial context.
11275 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11277         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11278         (HEAP_LIMIT): New macro.
11279         (grub_claim_heap): Claim memory up to `heaplimit'.
11281 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11283         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11284         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11285         (_start): Likewise.
11286         (grub_arch_modules_addr): Return address after `_end'.
11287         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11288         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11289         (add_segments): Calculate `_end' from phdr size and location.
11290         (ALIGN_UP): Moved to ...
11291         * include/grub/misc.h: here.
11292         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11293         New macro.
11294         (GRUB_IEEE1275_MODULE_BASE): Removed.
11296 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11298         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11299         loop boundary.
11301 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11303         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11304         All users updated.
11305         (grub_elf64_load_hook_t): Likewise.
11306         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11307         debug output.
11309 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11311         * kern/mm.c: Update copyright.
11312         (grub_mm_debug): Correct syntax error.
11313         (grub_mm_dump_free): New function.
11314         (grub_debug_free): Call `grub_free'.
11315         * include/grub/mm.h: Update copyright.
11316         (grub_mm_dump_free): Add declaration.
11318 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11320         * include/grub/ieee1275/ieee1275.h: Update copyright.
11321         * kern/powerpc/ieee1275/init.c: Likewise.
11322         * kern/powerpc/ieee1275/openfw.c: Likewise.
11324         * loader/powerpc/ieee1275/linux.c: Likewise.
11325         * include/grub/elfload.h: Likewise.
11326         * kern/elf.c: Likewise.
11327         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11328         callers.
11329         (grub_elf64_load): Likewise.
11330         (grub_elf32_load_segment): Move to a nested function.
11331         (grub_elf64_load_segment): Likewise.
11333 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11335         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11336         prototype.
11337         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11338         (grub_heap_len): Likewise.
11339         (HEAP_SIZE): New macro.
11340         (grub_claim_heap): New function.
11341         (grub_machine_init): Don't claim heap directly.  Call
11342         `grub_claim_heap'.
11343         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11344         (grub_available_iterate): New function.
11346 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11348         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11349         * configure.ac: Use it for testing the HOST and TARGET compilers.
11351 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11353         * Makefile.in (enable_grub_emu): New variable.
11354         * configure.ac (--enable-grub-emu): New option.
11355         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11356         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11357         * conf/i386-pc.rmk: Likewise.
11358         * conf/powerpc-ieee1275.rmk: Likewise.
11359         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11361 2006-12-12  Marco Gerards  <marco@gnu.org>
11363         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11365         * kern/env.c (grub_env_unset): Don't free the member `value' when
11366         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11367         pointer.
11369         * normal/main.c (current_menu): Removed.
11370         (free_menu): Unset the `menu' environment variable.
11371         (grub_normal_menu_addentry): Make use of the environment variable
11372         `menu', instead of using the global `current_menu'.  Allocate
11373         memory for the sourcecode of this entry.
11374         (read_config_file): New argument `nested', changed all callers.
11375         Only in the case of a new context, initialize a new menu.  Set the
11376         `menu' environment variable.
11377         (grub_normal_execute): Don't set and unset the environment
11378         variable `menu' here anymore.  Only free the menu when leaving the
11379         context.
11381         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11382         leak.
11384 2006-12-11  Marco Gerards  <marco@gnu.org>
11386         * normal/menu_entry.c (run): Fix off by one bug so the last line
11387         is executed.  Move the loader check to outside the loop.
11389 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11391         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11393 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11395         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11396         the number of sectors.  Reported by Andrey Shuvikov
11397         <mr_hyro@yahoo.com>.
11399 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11401         * kern/disk.c (grub_disk_read): When there is a read error, always
11402         try to read only the necessary data.
11404         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11405         disk/raid.c.
11406         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11407         prototype.
11408         [GRUB_UTIL] (grub_raid_fini): Likewise.
11409         [GRUB_UTIL] (grub_lvm_init): Likewise.
11410         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11411         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11412         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11413         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11414         and grub_raid_fini().
11416 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11418         * include/grub/types.h (__unused): Rename to UNUSED.
11419         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11420         (grub_elf64_size): Likewise.
11422 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11424         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11425         grub_error_push and grub_error_pop in the error-handling path.
11426         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11427         length.
11429 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11431         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11432         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11433         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11434         (kernel_elf_SOURCES): Likewise.
11435         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11436         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11437         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11438         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11439         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11440         (elf_mod_SOURCES): New variable.
11441         (elf_mod_CFLAGS): Likewise.
11442         (elf_mod_LDFLAGS): Likewise.
11443         * include/grub/types.h (__unused): New macro.
11444         * include/grub/elfload.h: New file.
11445         * kern/elf.c: Likewise.
11446         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11447         (ELF32_LOADMASK): New macro.
11448         (ELF64_LOADMASK): Likewise.
11449         (vmlinux): Removed.
11450         (grub_linux_load32): New function.
11451         (grub_linux_load64): Likewise.
11452         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11453         Use grub_elf_t instead of grub_file_t.
11455 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11457         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11458         `catch_result' to struct set_color_args.
11460 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11462         * normal/menu.c: Include grub/script.h.
11463         * normal/menu_entry.c: Likewise.
11464         * include/grub/normal.h: Do not include grub/script.h.
11466 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11468         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11470 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11472         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11473         disk.
11474         (grub_disk_close): Print debug messages when closing a disk.
11475         (grub_disk_read): Print debug messages when disk read fails.
11476         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11477         filesystem type.
11478         * kern/partition.c: Include misc.h.
11479         (grub_partition_iterate): Print debug messages when detecting
11480         partition type.
11482 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11484         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11485         is negative.
11486         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11488 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11490         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11491         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11493 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11495         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11496         instead of sizeof(lv). Patch by Michael Guntsche.
11498 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11500         * disk/lvm.c: Rename VGS to VG_LIST.
11501         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11502         (grub_lvm_open): Likewise.
11503         Thanks to Michael Guntsche for finding this bug.
11505 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11507         * configure.ac (AC_INIT): Bumped to 1.95.
11509 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11511         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11512         with "/dev/.static/dev/md".
11514 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11516         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11517         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11518         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11519         DRIVE_NAME are always freed.
11521         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11522         DOS_PART, as a DOS partition is counted from one instead of zero
11523         now. Reported by Robert Millan.
11525 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11527         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11528         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11529         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11530         string returned by grub_guess_root_device.
11531         * util/i386/pc/grub-setup.c: Likewise.
11532         * util/i386/pc/grub-probefs.c: Likewise.
11534         * util/i386/pc/grub-probefs.c: Rename to ...
11535         * util/i386/pc/grub-probe.c: ... this.
11536         * DISTLIST: Remove grub-probefs, add grub-probe.
11537         * conf/i386-efi.rmk: Likewise.
11538         * conf/i386-pc.rmk: Likewise.
11539         * util/i386/pc/grub-install.in: Likewise.
11541         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11542         choose which information we want to print.
11544 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11546         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11547         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11548         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11549         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11550         video/readers/tga.c and video/i386/pc/vbeutil.c.
11552 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11554         Added support for RAID and LVM.
11556         * disk/lvm.c: New file.
11557         * disk/raid.c: Likewise.
11558         * include/grub/lvm.h: Likewise.
11559         * include/grub/raid.h: Likewise.
11560         * include/grub/util/lvm.h: Likewise.
11561         * include/grub/util/raid.h: Likewise.
11562         * util/lvm.c: Likewise.
11563         * util/raid.c: Likewise.
11565         * include/grub/disk.h (grub_disk_dev_id): Add
11566         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11567         (grub_disk_get_size): New prototype.
11568         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11569         returns a partition.
11570         (grub_disk_get_size): New function.
11572         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11573         verbatim if grub_install_dos_part is -2.
11575         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11576         and LVM devices.
11578         * util/i386/pc/grub-setup.c (setup): New argument
11579         MUST_EMBED. Force embedding of GRUB when the argument is
11580         true. Close FILE before returning.
11581         (main): Add support for RAID and LVM.
11583         * conf/common.rmk: Add RAID and LVM modules.
11584         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11585         util/lvm.c.
11586         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11588         * kern/misc.c (grub_strstr): New function.
11589         * include/grub/misc.h (grub_strstr): New prototype.
11591 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11593         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11595 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11597         * kern/misc.c (grub_strtoull): Guess the base only if not
11598         specified.
11600 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11602         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11603         PowerMac support.
11605 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11607         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11609         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11610         Remove `flags' argument.  All callers changed.
11611         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11612         (IEEE1275_IHANDLE_INVALID): New variable.
11613         (IEEE1275_CELL_INVALID): New variable.
11614         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11615         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11616         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11617         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11618         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11619         codes from Open Firmware.  All callers updated.
11620         (grub_ieee1275_next_property): Directly return Open Firmware return
11621         code.
11622         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11623         Standardize error checking from `grub_ieee1275_get_property'.
11624         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11625         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11627 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11629         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11630         `instance_to_package_args' to `instance_to_path_args'.
11632         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11633         `grub_ieee1275_chosen'.
11635         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11636         `grub_ieee1275_interpret'.
11638 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11640         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11642 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11644         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11645         (__cmpdi): Likewise.
11647         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11648         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11649         `grub_ssize_t'.
11651         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11653         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11654         to type `grub_ssize_t'.
11655         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11657 2006-09-22  Marco Gerards  <marco@gnu.org>
11659         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11660         newlines.
11662 2006-09-22  Marco Gerards  <marco@gnu.org>
11664         * commands/echo.c: New file.
11666         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11668         * conf/common.rmk (echo_mod_SOURCES): New variable.
11669         (echo_mod_CFLAGS): Likewise.
11670         (echo_mod_LDFLAGS): Likewise.
11672 2006-09-22  Marco Gerards  <marco@gnu.org>
11674         * normal/main.c (get_line): Malloc memory instead of using
11675         preallocated memory.  Removed the arguments `cmdline' and
11676         `max_len'.  Updated all callers.
11678 2006-09-22  Marco Gerards  <marco@gnu.org>
11680         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11681         (normal_mod_DEPENDENCIES): Likewise.
11683         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11684         (normal_mod_DEPENDENCIES): Likewise.
11686         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11688 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11690         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11691         programs.
11692         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11693         (normal_mod_DEPENDENCIES): Likewise.
11694         * conf/i386-pc.mk: Regenerate.
11695         * conf/i386-efi.mk: Likewise
11696         * conf/common.mk: Likewise.
11697         * conf/powerpc-ieee1275.mk: Likewise.
11698         * conf/sparc64-ieee1275.mk: Likewise.
11700 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11702         Sync with i386 version.
11703         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11704         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11706 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11708         Import from GRUB Legacy (lib/device.c):
11709         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11710         (init_device_map) [__linux__]: Add support for I2O devices.
11712 2006-09-14  Marco Gerards  <marco@gnu.org>
11714         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11715         `-melf_i386'.
11717 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11719         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11720         /boot/grub/*.lst.
11722         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11724         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11725         before adding it to device.map.
11727 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11729         * genmk.rb: Let GCC generate dependencies the first time it
11730         compiles a file; using the -MD option.
11731         * conf/common.mk: Regenerate.
11732         * conf/i386-pc.mk: Likewise.
11733         * conf/i386-efi.mk: Likewise.
11734         * conf/powerpc-ieee1275.mk: Likewise.
11735         * conf/sparc64-ieee1275.mk: Likewise.
11737 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11739         Move the prototypes of grub_setjmp and grub_longjmp to
11740         cpu/setjmp.h, so that each architecture may specify different
11741         attributes.
11743         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11744         (grub_longjmp): Likewise.
11745         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11746         (grub_longjmp): Likewise.
11747         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11748         (grub_longjmp): Likewise.
11750         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11751         [!GRUB_UTIL] (grub_longjmp): Removed.
11753 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11755         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11756         "color!" method does not return any value.
11758 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11760         * include/grub/bitmap.h: New file.
11762         * include/grub/i386/pc/vbeutil.h: Likewise.
11764         * video/bitmap.c: Likewise.
11766         * video/readers/tga.c: Likewise.
11768         * video/i386/pc/vbeutil.c: Likewise.
11770         * commands/videotest.c: Code cleanup and updated to reflect to new
11771         video API.
11773         * term/gfxterm.c: Likewise.
11775         * video/video.c: Likewise.
11777         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11778         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11779         (bitmap_mod_SOURCES): New entry.
11780         (bitmap_mod_CFLAGS): Likewise.
11781         (bitmap_mod_LDFLAGS): Likewise.
11782         (tga_mod_SOURCES): Likewise.
11783         (tga_mod_CFLAGS): Likewise.
11784         (tga_mod_LDFLAGS): Likewise.
11786         * include/grub/video.h (grub_video_blit_operators): New enum type.
11787         (grub_video_render_target): Changed as forward declaration and moved
11788         actual definition to be video driver specific.
11789         (grub_video_adapter.blit_bitmap): Added blitting operator.
11790         (grub_video_adapter.blit_render_target): Likewise.
11791         (grub_video_blit_bitmap): Likewise.
11792         (grub_video_blit_render_target): Likewise.
11794         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11795         driver specific render target definition.
11796         (grub_video_vbe_map_rgba): Added driver internal helper.
11797         (grub_video_vbe_unmap_color): Updated to use
11798         grub_video_i386_vbeblit_info.
11799         (grub_video_vbe_get_video_ptr): Likewise.
11801         * include/grub/i386/pc/vbeblit.h
11802         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11803         grub_video_i386_vbeblit_info.
11804         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11805         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11806         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11807         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11808         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11809         (grub_video_i386_vbeblit_index_index): Likewise.
11810         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11811         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11812         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11813         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11814         operator.
11815         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11816         operator.
11818         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11819         include/grub/i386/pc/vbeblit.h.
11821         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11822         Updated to use grub_video_i386_vbeblit_info.
11823         (grub_video_i386_vbefill_R8G8B8): Likewise.
11824         (grub_video_i386_vbefill_index): Likewise.
11825         (grub_video_i386_vbefill): Added generic filler.
11827         * video/i386/pc/vbefill.c: Updated to reflect changes on
11828         include/grub/i386/pc/vbefill.h.
11830         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11831         grub_video_i386_vbeblit_info.
11832         (grub_video_vbe_unmap_color): Likewise.
11833         (grub_video_vbe_blit_glyph): Likewise.
11834         (grub_video_vbe_scroll): Likewise.
11835         (grub_video_vbe_draw_pixel): Removed function.
11836         (grub_video_vbe_get_pixel): Likewise.
11837         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11838         updated code to use it.
11839         (common_blitter): Added common blitter for render target and bitmap.
11840         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11841         (grub_video_vbe_blit_render_target): Likewise.
11843 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11845         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11846         is in text mode if there is no console control protocol instance
11847         available.
11849 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11851         * include/grub/video.h: Code cleanup.
11853         * include/grub/i386/pc/vbe.h: Likewise.
11855         * video/i386/pc/vbe.c: Likewise.
11857         * video/i386/pc/vbeblit.c: Likewise.
11859         * video/i386/pc/vbefill.c: Likewise.
11861         * video/video.c: Likewise.  Also added more comments.
11863 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11865         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11866         (struct grub_biosdisk_dap): Likewise.
11868         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11869         linkage settings for all functions.
11871 2006-07-12  Marco Gerards  <marco@gnu.org>
11873         * configure.ac (--enable-mm-debug): Fix typo.
11875         * genkernsyms.sh.in: Use proper quoting for `CC'.
11877 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11879         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11880         (normal_mod_ASFLAGS): Remove "-m32".
11882 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11884         * util/misc.c: Include config.h.
11885         [!HAVE_MEMALIGN]: Do not include malloc.h.
11886         (grub_memalign): Use posix_memalign, if present. Then, use
11887         memalign, if present. Otherwise, emit an error.
11889         * util/grub-emu.c: Do not include malloc.h.
11891         * include/grub/util/misc.h: Include unistd.h. This is required for
11892         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11893         D. Eades III <hde@foobar-qux.org>.
11895         * configure.ac (AC_GNU_SOURCE): Added.
11896         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11897         type.
11899 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11901         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11902         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11904 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11906         * include/grub/types.h (grub_host_addr_t): Rename to
11907         grub_target_addr_t.
11908         (grub_host_off_t): Rename to grub_target_off_t.
11909         (grub_host_size_t): Rename to grub_target_size_t.
11910         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11911         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11913         * include/grub/kernel.h (struct grub_module_header): Change type
11914         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11915         (grub_module_info): Likewise.
11917 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11919         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11920         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11921         Velazquez <jesus.velazquez@gmail.com>.
11923 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11925         Count partitions from 1 instead of 0 in the string representation
11926         of partitions. Still use 0-based internally.
11928         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11929         (sun_partition_map_iterate): Use grub_partition_t instead of
11930         struct grub_partition *. Cast DESC->START_CYLINDER to
11931         grub_uint64_t after converting the endian.
11932         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11933         (sun_partition_map_get_name): Add 1 to P->INDEX.
11935         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11936         PCDATA->DOS_PART.
11937         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11939         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11940         zero instead of one.
11941         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11942         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11944         * partmap/apple.c (apple_partition_map_iterate): Change the type
11945         of POS to unsigned.
11946         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11947         (apple_partition_map_get_name): Add 1 into P->INDEX.
11949         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11950         of POS to unsigned.
11951         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11952         calculate the offset of a partition.
11953         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11954         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11956         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11957         SECTOR to grub_disk_addr_t.
11958         (acorn_partition_map_iterate): Likewise.
11959         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11960         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11961         top.
11962         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11964         * kern/i386/pc/init.c (make_install_device): Add 1 into
11965         GRUB_INSTALL_DOS_PART.
11967         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11968         conditional.
11970 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11972         Clean up the code to support 64-bit addressing in disks and
11973         files. This change is not enough for filesystems yet.
11975         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11976         type of "start" to grub_uint64_t.
11977         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11978         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11979         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11980         convert addresses.
11982         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11983         to grub_disk_addr_t.
11985         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11986         string.
11988         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11990         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11991         to char *.
11993         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11995         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11997         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11999         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12000         to grub_off_t, to detect an error from grub_file_seek.
12001         (grub_multiboot_load_elf32): Likewise.
12003         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12004         maximum unsigned long value when an overflow is detected.
12005         (grub_strtoull): New function.
12006         (grub_divmod64): Likewise.
12007         (grub_lltoa): use grub_divmod64.
12009         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12010         grub_disk_addr_t.
12011         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12012         the pointer to next character. Use grub_strtoull instead of
12013         grub_strtoul.
12014         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12015         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12016         respectively.
12018         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12019         return value is signed.
12020         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12021         test if OFFSET is less than zero, as OFFSET is unsigned now.
12023         * kern/disk.c (struct grub_disk_cache): Change the type of
12024         "sector" to grub_disk_addr_t.
12025         (grub_disk_cache_get_index): Change the type of SECTOR to
12026         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12027         unsigned after shifting.
12028         (grub_disk_cache_invalidate): Change the type of SECTOR to
12029         grub_disk_addr_t.
12030         (grub_disk_cache_unlock): Likewise.
12031         (grub_disk_cache_store): Likewise.
12032         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12033         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12034         grub_disk_addr_t and grub_uint64_t, respectively.
12035         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12036         body, as the value of OFFSET is tweaked by
12037         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12038         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12039         respectively.
12040         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12041         body, as the value of OFFSET is tweaked by
12042         grub_disk_check_range. Change the types of LEN and N to
12043         grub_size_t.
12045         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12046         and "saved_offset" to grub_off_t.
12047         (test_header): Cast BUF to char *.
12048         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12049         to char *.
12050         (grub_gzio_read): Change the types of OFFSET and SIZE to
12051         grub_off_t and grub_size_t, respectively.
12053         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12054         Removed.
12055         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12056         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12057         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12058         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12059         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12061         * include/grub/types.h (grub_off_t): Unconditionally set to
12062         grub_uint64_t.
12063         (grub_disk_addr_t): Changed to grub_uint64_t.
12065         * include/grub/partition.h (struct grub_partition): Change the
12066         types of "start", "len" and "offset" to grub_disk_addr_t,
12067         grub_uint64_t and grub_disk_addr_t, respectively.
12068         (grub_partition_get_start): Return grub_disk_addr_t.
12069         (grub_partition_get_len): Return grub_uint64_t.
12071         * include/grub/misc.h (grub_strtoull): New prototype.
12072         (grub_divmod64): Likewise.
12074         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12075         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12076         grub_off_t, respectively.
12077         All callers and references changed.
12079         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12080         grub_size_t in "read".
12081         All callers and references changed.
12083         * include/grub/file.h (struct grub_file): Change the types of
12084         "offset" and "size" to grub_off_t and grub_off_t,
12085         respectively. Change the type of SECTOR to grub_disk_addr_t in
12086         "read_hook".
12087         (grub_file_read): Change the type of LEN to grub_size_t.
12088         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12089         grub_off_t.
12090         (grub_file_size): Return grub_off_t.
12091         (grub_file_tell): Likewise.
12092         All callers and references changed.
12094         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12095         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12096         "write".
12097         (struct grub_disk): Change the type of "total_sectors" to
12098         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12099         "read_hook".
12100         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12101         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12102         (grub_disk_write): Likewise.
12103         All callers and references changed.
12105         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12106         char * for grub_strncmp to silence gcc.
12107         (grub_iso9660_mount): Likewise.
12108         (grub_iso9660_mount): Likewise.
12109         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12110         return statement.
12111         (grub_iso9660_iterate_dir): Likewise.
12112         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12114         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12115         LEN to grub_disk_addr_t and grub_size_t, respectively.
12117         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12119         * fs/jfs.c (grub_jfs_read_file): Likewise.
12121         * fs/minix.c (grub_jfs_read_file): Likewise.
12123         * fs/sfs.c (grub_jfs_read_file): Likewise.
12125         * fs/ufs.c (grub_jfs_read_file): Likewise.
12127         * fs/xfs.c (grub_jfs_read_file): Likewise.
12129         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12130         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12131         respectively.
12133         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12134         BLKNR to -1 instead of returning GRUB_ERRNO.
12135         (grub_ext2_read_file): Change the types of SECTOR and
12136         LEN to grub_disk_addr_t and grub_size_t, respectively.
12138         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12139         LEN to grub_disk_addr_t and grub_size_t, respectively.
12141         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12142         grub_file_read.
12144         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12145         string. Do not cast SECTOR explicitly.
12147         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12148         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12149         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12150         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12151         over 2TB and LBA mode is not supported, raise an error.
12152         (get_safe_sectors): New function.
12153         (grub_biosdisk_read): Use get_safe_sectors.
12154         (grub_biosdisk_write): Likewise.
12156         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12157         (grub_efidisk_write): Likewise.
12159         * disk/loopback.c (delete_loopback): Cosmetic changes.
12160         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12161         correctly.
12162         (grub_loopback_open): Likewise.
12163         (grub_loopback_read): Likewise. Also, change the type of POS to
12164         grub_off_t, and fix the usage of grub_memset.
12166         * commands/i386/pc/play.c: Include grub/machine/time.h.
12168         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12169         print FILE->SIZE.
12171         * commands/configfile.c: Include grub/env.h.
12173         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12174         GRUB_ERRNO directly instead. Change the type of POS to
12175         grub_off_t. Follow the coding standard.
12177         * commands/blocklist.c: Include grub/partition.h.
12178         (grub_cmd_blocklist): Return an error if the underlying device is
12179         not a disk. Take the starting sector of a partition into account,
12180         if a partition is used.
12182         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12183         a length field.
12184         (lba_mode): Support 64-bit addresses.
12185         (chs_mode): Likewise.
12186         (copy_buffer): Adapted to the new offsets of a length field and a
12187         segment field.
12188         (blocklist_default_start): Allocate 64-bit space.
12190         * boot/i386/pc/boot.S (force_lba): Removed.
12191         (boot_drive): Moved to under KERNEL_SECTOR.
12192         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12193         space.
12194         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12195         is useless.
12196         (lba_mode): Refactored to support a 64-bit address. More size
12197         optimization.
12198         (setup_sectors): Likewise.
12200 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12202         * DISTLIST: Added include/grub/i386/linux.h. Removed
12203         include/grub/i386/pc/linux.h
12205         * configure.ac (AC_INIT): Bumped to 1.94.
12207         * config.guess: Updated from gnulib.
12208         * config.sub: Likewise.
12209         * install-sh: Likewise.
12210         * mkinstalldirs: Likewise.
12212 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12214         * conf/common.rmk (grub_modules_init.lst): Depended on
12215         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12216         MODSRCFILES.
12218         * genmk.rb (PModule::rule): Reverted the previous change.
12220 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12222         * conf/common.rmk (grub_modules_init.lst): Depends on
12223         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12224         that the target does not exist before producing.
12225         (grub_modules_init.h): Remove the target before generating.
12226         (grub_emu_init.c): Likewise.
12228         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12230 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12232         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12233         for the target-specific tests. Make sure that we also have the
12234         up-to-date target variables for those tests.
12236 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12238         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12239         (PModule::rule): Likewise.
12241 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12243         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12244         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12245         target-specific flags should be prefixed.
12246         (PModule::rule): Likewise.
12248 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12250         * configure.ac (CMP): Check if cmp is available explicitly.
12252 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12254         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12255         (target_cpu): New variable.
12256         (pkglibdir): Use target_cpu instead of host_cpu.
12258         * util/i386/pc/grub-install.in (host_cpu): Removed.
12259         (target_cpu): New variable.
12260         (pkglibdir): Use target_cpu instead of host_cpu.
12262         * util/genmoddep.c: Removed.
12264         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12265         instead of GRUB_HOST_SIZEOF_VOID_P.
12266         * kern/dl.c: Likewise.
12268         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12269         ...
12270         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12271         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12272         (GRUB_TARGET_SIZEOF_LONG): ... this.
12273         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12274         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12275         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12276         to ...
12277         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12278         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12279         (GRUB_TARGET_SIZEOF_LONG): ... this.
12280         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12281         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12282         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12283         to ...
12284         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12285         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12286         (GRUB_TARGET_SIZEOF_LONG): ... this.
12287         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12288         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12290         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12291         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12292         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12293         instead of GRUB_HOST_SIZEOF_LONG.
12294         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12295         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12296         GRUB_CPU_WORDS_BIGENDIAN.
12297         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12298         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12299         grub_host_ssize_t.
12301         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12302         (genmoddep_SOURCES): Likewise.
12303         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12304         (genmoddep_SOURCES): Likewise.
12305         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12306         (genmoddep_SOURCES): Likewise.
12307         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12308         Likewise.
12309         (genmoddep_SOURCES): Likewise.
12311         * genmoddep.awk: New file.
12313         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12314         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12315         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12316         (PModule::rule): Likewise.
12317         (Program::rule): Likewise.
12318         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12319         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12320         respectively.
12322         * configure.ac: Rewritten intensively to use host and target
12323         instead of build and host, respectively.
12325         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12326         (host_cpu): Removed.
12327         (target_cpu): New variable.
12328         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12329         (BUILD_CC): Removed.
12330         (BUILD_CFLAGS): Likewise.
12331         (BUILD_CPPFLAGS): Likewise.
12332         (TARGET_CC): New variable.
12333         (TARGET_CFLAGS): Likewise.
12334         (TARGET_CPPFLAGS): Likewise.
12335         (TARGET_LDFLAGS): Likewise.
12336         (AWK): Likewise.
12337         (include): Use target_cpu instead of host_cpu.
12338         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12340         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12342 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12344         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12345         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12346         field 'false' to 'exec_on_false'.
12347         (grub_script_create_cmdif): Renamed argument names to reflect above
12348         changes.
12350         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12352         * normal/script.c (grub_script_create_cmdif): Likewise.
12354 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12356         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12357         top.
12358         (grub_hfsplus_btree_recptr): Likewise.
12359         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12360         FILEBLOCK both to pass a block number and store next block
12361         number.
12362         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12363         overflow file correctly. Specify errors appropriately, because
12364         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12365         grub_hfsplus_btree_recptr to get the pointer to a found key.
12366         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12367         is found.
12369         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12370         linux.mod.
12371         (_linux_mod_SOURCES): New variable.
12372         (_linux_mod_CFLAGS): Likewise.
12373         (_linux_mod_LDFLAGS): Likewise.
12374         (linux_mod_SOURCES): Likewise.
12375         (linux_mod_CFLAGS): Likewise.
12376         (linux_mod_LDFLAGS): Likewise.
12378         * DISTLIST: Added loader/i386/efi/linux.c,
12379         loader/i386/efi/linux_normal.c and
12380         include/grub/i386/efi/loader.h.
12382         * loader/i386/efi/linux.c: New file.
12383         * loader/i386/efi/linux_normal.c: Likewise.
12384         * include/grub/i386/efi/loader.h: Likewise.
12386 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12388         * commands/blocklist.c: New file.
12390         * DISTLIST: Added commands/blocklist.c.
12392         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12393         color for the background, and a darker color for the foreground.
12394         (grub_console_checkkey): Return READ_KEY.
12395         (grub_console_cls): Set the background to
12396         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12398         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12400         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12401         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12403         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12404         prototype.
12406         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12407         BG. The spec is wrong again.
12409         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12410         prototype.
12411         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12413         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12414         commands/blocklist.c.
12415         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12417         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12418         (blocklist_mod_SOURCES): New variable.
12419         (blocklist_mod_CFLAGS): Likewise.
12420         (blocklist_mod_LDFLAGS): Likewise.
12422 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12424         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12425         duplication.
12426         (lba_mode): Use %eax more intensively to reduce the code size.
12428 2006-05-20  Marco Gerards  <marco@gnu.org>
12430         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12432         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12433         for `menuentry'.
12434         (script): Accept leading newlines.
12435         (newlines): New rule to describe 0 or more newlines.
12436         (commands): Accept `command' with trailing newline.  Fixed the
12437         order in which arguments were passed to `grub_script_add_cmd'.
12438         Accept commands separated by newlines.
12439         (function): Changed to accept newlines.
12440         (menuentry) Rewritten.
12442         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12443         front of the list, instead of to the end.
12445 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12447         * util/i386/pc/grub-install.in (bindir): New variable.
12448         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12449         Shaver <lbgwjl@gmail.com>.
12451 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12453         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12454         grub/machine/linux.h
12455         * loader/i386/pc/linux.c: Likewise.
12457         * include/grub/i386/pc/linux.h: Moved to ...
12458         * include/grub/i386/linux.h: ... here.
12460         * include/grub/i386/linux.h (struct linux_kernel_params): New
12461         struct.
12463 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12465         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12466         checking.
12467         (grub_video_vbe_blit_glyph): Likewise.
12468         (grub_video_vbe_blit_bitmap): Likewise.
12469         (grub_video_vbe_blit_render_target): Likewise.
12471 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12473         * configure.ac (--with-platform): Properly quote the square
12474         brackets.
12476 2006-05-08  Marco Gerards  <marco@gnu.org>
12478         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12479         this...
12480         (kernel_elf_HEADERS): ...to this.  Updated all users.
12481         (grubof_symlist.c): Renamed from this...
12482         (kernel_elf_symlist.c): ...to this.  Updated all users.
12483         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12484         (grubof_SOURCES): Renamed from this...
12485         (kernel_elf_SOURCES): ...to this.
12486         (grubof_HEADERS): Renamed from this...
12487         (kernel_elf_HEADERS): ...to this.
12488         (grubof_CFLAGS): Renamed from this...
12489         (kernel_elf_CFLAGS): ...to this.
12490         (grubof_ASFLAGS): Renamed from this...
12491         (kernel_elf_ASFLAGS): ...to this.
12492         (grubof_LDFLAGS): Renamed from this...
12493         (kernel_elf_LDFLAGS): ...to this.
12495         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12496         this...
12497         (kernel_elf_HEADERS): ...to this.  Updated all users.
12498         (grubof_symlist.c): Renamed from this...
12499         (kernel_elf_symlist.c): ...to this.  Updated all users.
12500         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12501         (grubof_SOURCES): Renamed from this...
12502         (kernel_elf_SOURCES): ...to this.
12503         (grubof_HEADERS): Renamed from this...
12504         (kernel_elf_HEADERS): ...to this.
12505         (grubof_CFLAGS): Renamed from this...
12506         (kernel_elf_CFLAGS): ...to this.
12507         (grubof_ASFLAGS): Renamed from this...
12508         (kernel_elf_ASFLAGS): ...to this.
12509         (grubof_LDFLAGS): Renamed from this...
12510         (kernel_elf_LDFLAGS): ...to this.
12512         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12513         `kernel.elf' instead of `grubof'.
12515 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12517         Add --with-platform to configure. Use pkglibdir instead of
12518         pkgdatadir. This is reported by Roger Leigh.
12520         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12521         (host_vendor): Likewise.
12522         (host_os): Likewise.
12523         (pkgdatadir): Likewise.
12524         (platform): New variable.
12525         (pkglibdir): Likewise.
12526         Use PKGLIBDIR instead of PKGDATADIR.
12528         * util/i386/pc/grub-install.in (datadir): Removed.
12529         (host_vendor): Likewise.
12530         (host_os): Likewise.
12531         (pkgdatadir): Likewise.
12532         (platform): New variable.
12533         (pkglibdir): Likewise.
12534         Use PKGLIBDIR instead of PKGDATADIR.
12536         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12537         instead of GRUB_DATADIR.
12538         (main): Likewise.
12539         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12540         (main): Likewise.
12541         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12542         (main): Likewise.
12544         * configure.ac (--with-platform): New option.
12545         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12547         * Makefile.in: Include a makefile based on PLATFORM instead of
12548         HOST_VENDOR.
12549         (pkgdatadir): Not appended by the machine type.
12550         (pkglibdir): Appended by the machine type.
12551         (host_vendor): Removed.
12552         (platform): New variable.
12553         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12554         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12555         (uninstall): Likewise.
12557 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12559         Use the environment context in the menu. Remove the commands
12560         "default" and "timeout", and use variables instead.
12562         * normal/menu.c: Include grub/env.h.
12563         (print_entry): Cast TITLE to silence gcc.
12564         (get_timeout): New function.
12565         (set_timeout): Likewise.
12566         (get_entry_number): Likewise.
12567         (run_menu): Use a default entry, a fallback entry and a timeout
12568         in the environment variables "default", "fallback" and
12569         "timeout". Also, tweak the default entry if it is not within the
12570         current menu entries.
12571         (grub_menu_run): Use a fallback entry in the environment variable
12572         "fallback".
12574         * normal/main.c (read_config_file): Do not initialize
12575         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12576         NEWMENU->TIMEOUT.
12577         (grub_normal_execute): Use a data slot to store the menu.
12579         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12580         fallback_entry and timeout.
12581         (struct grub_menu_list): Removed.
12582         (grub_menu_list_t): Likewise.
12583         (struct grub_context): Likewise.
12584         (grub_context_t): Likewise.
12585         (grub_context_get): Likewise.
12586         (grub_context_get_current_menu): Likewise.
12587         (grub_context_push_menu): Likewise.
12588         (grub_context_pop_menu): Likewise.
12589         (grub_default_init): Likewise.
12590         (grub_default_fini): Likewise.
12591         (grub_timeout_init): Likewise.
12592         (grub_timeout_fini): Likewise.
12594         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12595         and timeout.mod.
12596         (normal_mod_SOURCES): Removed normal/context.c.
12598         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12599         commands/default.c, commands/timeout.c and normal/context.c.
12600         (normal_mod_SOURCES): Removed normal/context.c.
12602         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12603         commands/timeout.c and normal/context.c.
12604         (normal_mod_SOURCES): Removed normal/context.c.
12606         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12607         commands/default.c, commands/timeout.c and normal/context.c.
12608         (normal_mod_SOURCES): Removed normal/context.c.
12610         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12611         timeout.mod.
12612         (default_mod_SOURCES): Removed.
12613         (default_mod_CFLAGS): Likewise.
12614         (default_mod_LDFLAGS): Likewise.
12615         (timeout_mod_SOURCES): Removed.
12616         (timeout_mod_CFLAGS): Likewise.
12617         (timeout_mod_LDFLAGS): Likewise.
12619         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12620         normal/context.c.
12622         * commands/default.c: Removed.
12623         * commands/timeout.c: Likewise.
12624         * normal/context.c: Likewise.
12626 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12628         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12630 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12632         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12633         "next" to "prev" for readability.
12634         (struct grub_env_sorted_var): New struct.
12635         (grub_env_context): Renamed to ...
12636         (initial_context): ... this.
12637         (grub_env_var_context): Renamed to ...
12638         (current_context): ... this.
12639         (grub_env_find): Look only at CURRENT_CONTEXT.
12640         (grub_env_context_open): Rewritten to copy exported variables from
12641         previous context.
12642         (grub_env_context_close): Rewritten according to the new
12643         scheme. Also, add an assertion to prevent the initial context from
12644         removed.
12645         (grub_env_insert): Removed the code for the sorted list.
12646         (grub_env_remove): Likewise.
12647         (grub_env_export): Simply mark the variable with
12648         GRUB_ENV_VAR_GLOBAL.
12649         (grub_env_set): A cosmetic change for naming consistency.
12650         (grub_env_get): Likewise.
12651         (grub_env_unset): Likewise.
12652         (grub_env_iterate): Rewritten to sort variables within this
12653         function.
12654         (grub_register_variable_hook): Fixed for naming consistency. Call
12655         grub_env_find again, only if NAME is not found at the first time.
12656         (mangle_data_slot_name): New function.
12657         (grub_env_set_data_slot): Likewise.
12658         (grub_env_get_data_slot): Likewise.
12659         (grub_env_unset_data_slot): Likewise.
12661         * include/grub/env.h (grub_env_var_type): New enum.
12662         (GRUB_ENV_VAR_LOCAL): New constant.
12663         (GRUB_ENV_VAR_GLOBAL): Likewise.
12664         (GRUB_ENV_VAR_DATA): Likewise.
12665         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12666         "type".
12667         (grub_env_set): Replace VAR with NAME for consistency.
12668         (grub_register_variable_hook): Likewise.
12669         (grub_env_export): Specify the name of the argument.
12670         (grub_env_set_data_slot): New prototype.
12671         (grub_env_get_data_slot): Likewise.
12672         (grub_env_unset_data_slot): Likewise.
12674 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12676         Extend the loader so that GRUB can accept a loader which comes
12677         back to GRUB when a loaded image exits. Also, this change adds
12678         support for a chainloader on EFI.
12680         * term/efi/console.c: Include grub/misc.h.
12681         (grub_console_checkkey): Display a scan code on the top for
12682         debugging. This will be removed once the EFI port gets stable.
12683         Correct the scan code mapping.
12685         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12686         allocate memory from larger regions, in order to reduce the number
12687         of allocated regions. Otherwise, the MacOSX loader panics.
12688         (filter_memory_map): Avoid less than 1MB for compatibility with
12689         other loaders.
12690         (add_memory_regions): Allocate from the tail of a region, if
12691         possible, to avoid allocating a region near to 1MB, for the MacOSX
12692         loader.
12694         * kern/efi/init.c (grub_efi_set_prefix): Specify
12695         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12697         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12698         argument IMAGE_HANDLE and specify it to get a loaded image.
12699         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12700         grub_efi_get_loaded_image.
12701         (grub_efi_get_filename): Divide the length by the size of
12702         grub_efi_char16_t.
12703         (grub_efi_get_device_path): New function.
12704         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12705         the length by the size of grub_efi_char16_t for a file path device
12706         path node.
12708         * kern/loader.c (grub_loader_noreturn): New variable.
12709         (grub_loader_set): Accept a new argument NORETURN. Set
12710         GRUB_LOADER_NORETURN to NORETURN.
12711         All callers changed.
12712         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12713         grub_machine_fini.
12715         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12716         prototype.
12717         (grub_efi_get_loaded_image): Take an argument to specify an image
12718         handle.
12720         * include/grub/loader.h (grub_loader_set): Added one more argument
12721         NORETURN.
12723         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12724         instead of grub_efi_open_protocol.
12725         (grub_efidisk_get_device_name): Likewise.
12726         (grub_efidisk_close): Print a newline.
12727         (grub_efidisk_get_device_handle): Fixed to use
12728         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12729         GRUB_EFI_DEVICE_PATH_TYPE.
12731         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12732         * kern/efi/efi.c (device_path_guid): ... here.
12734         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12735         chain.mod.
12736         (kernel_mod_HEADERS): Added efi/disk.h.
12737         (_chain_mod_SOURCES): New variable.
12738         (_chain_mod_CFLAGS): Likewise.
12739         (_chain_mod_LDFLAGS): Likewise.
12740         (chain_mod_SOURCES): Likewise.
12741         (chain_mod_CFLAGS): Likewise.
12742         (chain_mod_LDFLAGS): Likewise.
12744         * DISTLIST: Added include/grub/efi/chainloader.h,
12745         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12747         * include/grub/efi/chainloader.h: New file.
12748         * loader/efi/chainloader.c: Likewise.
12749         * loader/efi/chainloader_normal.c: Likewise.
12751 2006-04-30  Marco Gerards  <marco@gnu.org>
12753         * commands/configfile.c (grub_cmd_source): New function.
12754         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12755         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12757 2006-04-30  Marco Gerards  <marco@gnu.org>
12759         * normal/execute.c (grub_script_execute_cmd): Change the return
12760         type to `grub_err_t'.  Correctly return the error.
12761         (grub_script_execute_cmdline): In case a command line is not a
12762         command or a function, try to interpret it as an assignment.
12764 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12766         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12767         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12768         skip a node whose name is obviously invalid as UTF-16,
12769         i.e. contains a NUL character. Stop the iteration when the last
12770         directory entry is found. Instead of using the return value of
12771         grub_hfsplus_btree_iterate_node, store the value in RET and use
12772         it, because the iterator can be stopped by the last directory
12773         entry.
12775 2006-04-30  Marco Gerards  <marco@gnu.org>
12777         * include/grub/env.h (grub_env_export): New prototype.  Reported
12778         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12780 2006-04-30  Marco Gerards  <marco@gnu.org>
12782         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12783         size of the extents in a catalog file record.
12785 2006-04-29  Marco Gerards  <marco@gnu.org>
12787         * commands/configfile.c (grub_cmd_configfile): Execute the
12788         configfile within its own context.
12790         * include/grub/env.h (grub_env_context_open): New prototype.
12791         (grub_env_context_close): Likewise.
12793         * kern/env.c (grub_env): Removed.
12794         (grub_env_sorted): Likewise.
12795         (grub_env_context): New variable.
12796         (grub_env_var_context): Likewise.
12797         (grub_env_find): Search both the active context and the global
12798         context.
12799         (grub_env_context_open): New function.
12800         (grub_env_context_close): Likewise.
12801         (grub_env_insert): Likewise.
12802         (grub_env_remove): Likewise.
12803         (grub_env_export): Likewise.
12804         (grub_env_set): Changed to use helper functions to avoid code
12805         duplication.
12806         (grub_env_iterate): Rewritten so both the current context and the
12807         global context are being used.
12809         * normal/command.c (export_command): New function.
12810         (grub_command_init): Register the `export' function.
12812 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12814         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12815         explicitly to suppress gcc's warnings.
12816         * fs/fat.c (grub_fat_find_dir): Likewise.
12817         (grub_fat_label): Likewise.
12818         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12819         (grub_xfs_mount): Likewise.
12820         (grub_xfs_label): Likewise.
12821         * fs/affs.c (grub_affs_mount): Likewise.
12822         (grub_affs_label): Likewise.
12823         (grub_affs_iterate_dir): Likewise.
12824         * fs/sfs.c (grub_sfs_mount): Likewise.
12825         (grub_sfs_iterate_dir): Likewise.
12826         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12827         * fs/hfs.c (grub_hfs_mount): Likewise.
12828         (grub_hfs_cmp_catkeys): Likewise.
12829         (grub_hfs_find_dir): Likewise.
12830         (grub_hfs_dir): Likewise.
12831         (grub_hfs_label): Likewise.
12832         * fs/jfs.c (grub_jfs_mount): Likewise.
12833         (grub_jfs_opendir): Likewise.
12834         (grub_jfs_getent): Likewise.
12835         (grub_jfs_lookup_symlink): Likewise.
12836         (grub_jfs_label): Likewise.
12837         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12838         (grub_hfsplus_iterate_dir): Likewise.
12839         (grub_hfsplus_btree_iterate_node): Made static.
12841         * util/grub-emu.c (prefix): New variable.
12842         (grub_machine_set_prefix): New function.
12843         (main): Do not set the environment variable "prefix" here. Only
12844         set PREFIX, which is used later by grub_machine_set_prefix.
12846         * include/grub/video.h: Do not include grub/symbol.h.
12847         (grub_video_register): Not exported. This symbol is not defined in
12848         the kernel.
12849         (grub_video_unregister): Likewise.
12850         (grub_video_iterate): Likewise.
12851         (grub_video_setup): Likewise.
12852         (grub_video_restore): Likewise.
12853         (grub_video_get_info): Likewise.
12854         (grub_video_get_blit_format): Likewise.
12855         (grub_video_set_palette): Likewise.
12856         (grub_video_get_palette): Likewise.
12857         (grub_video_set_viewport): Likewise.
12858         (grub_video_get_viewport): Likewise.
12859         (grub_video_map_color): Likewise.
12860         (grub_video_map_rgb): Likewise.
12861         (grub_video_map_rgba): Likewise.
12862         (grub_video_fill_rect): Likewise.
12863         (grub_video_blit_glyph): Likewise.
12864         (grub_video_blit_bitmap): Likewise.
12865         (grub_video_blit_render_target): Likewise.
12866         (grub_video_scroll): Likewise.
12867         (grub_video_swap_buffers): Likewise.
12868         (grub_video_create_render_target): Likewise.
12869         (grub_video_delete_render_target): Likewise.
12870         (grub_video_set_active_render_target): Likewise.
12872         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12873         Undefined.
12874         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12876         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12877         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12878         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12879         instead of $(srcdir)/genkernsyms.sh.
12881         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12882         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12883         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12884         instead of $(srcdir)/genkernsyms.sh.
12886         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12887         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12888         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12889         instead of $(srcdir)/genkernsyms.sh.
12891         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12892         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12893         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12894         instead of $(srcdir)/genkernsyms.sh.
12896         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12897         genkernsyms.sh.
12899         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12900         genkernsyms.sh.
12901         (gensymlist.sh): New target.
12902         (genkernsyms.sh): Likewise.
12904         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12905         genkernsyms.sh.in and gensymlist.sh.in.
12907         * genkernsyms.sh: Removed.
12908         * gensymlist.sh: Likewise.
12910         * genkernsyms.sh.in: New file.
12911         * gensymlist.sh.in: Likewise.
12913 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12915         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12916         clobber "prefix", since we may have already set it manually.
12918 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12920         * kern/misc.c (abort): New alias for grub_abort.
12922 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12924         A new machine-specific function "grub_machine_set_prefix" is
12925         defined. This is called after loading modules, so that a prefix
12926         initialization can use modules. Also, this change adds an
12927         intensive debugging feature for the memory manager via the
12928         configure option "--enable-mm-debug".
12930         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12931         PART.LEN.
12933         * kern/sparc64/ieee1275/init.c (abort): Removed.
12934         (grub_stop): Likewise.
12935         (grub_exit): New function.
12936         (grub_set_prefix): Renamed to ...
12937         (grub_machine_set_prefix): ... this.
12938         (grub_machine_init): Do not call grub_set_prefix.
12940         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12941         (grub_machine_set_prefix): ... this.
12942         (grub_machine_init): Do not call grub_set_prefix.
12944         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12945         (grub_machine_init): Do not set the prefix here.
12947         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12949         * kern/efi/init.c: Include grub/mm.h.
12950         (grub_efi_set_prefix): New function.
12952         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12953         (grub_efi_get_filename): New function.
12954         (grub_print_device_path): Renamed to ...
12955         (grub_efi_print_device_path): ... this.
12957         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12958         [MM_DEBUG] (grub_realloc): Likewise.
12959         [MM_DEBUG] (grub_free): Likewise.
12960         [MM_DEBUG] (grub_memalign): Likewise.
12961         [MM_DEBUG] (grub_mm_debug): New variable.
12962         [MM_DEBUG] (grub_debug_malloc): New function.
12963         [MM_DEBUG] (grub_debug_free): New function.
12964         [MM_DEBUG] (grub_debug_realloc): New function.
12965         [MM_DEBUG] (grub_debug_memalign): New function.
12967         * kern/misc.c (grub_abort): Print a newline to distinguish
12968         the message.
12970         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12971         grub_set_root_dev after loading modules. This is necessary when
12972         setting a prefix depends on modules.
12974         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12975         (grub_efi_print_device_path): ... this.
12976         (grub_efi_get_filename): New prototype.
12977         (grub_efi_set_prefix): Likewise.
12979         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12980         and grub/disk.h.
12981         (grub_efidisk_get_device_handle): New prototype.
12982         (grub_efidisk_get_device_name): Likewise.
12984         * include/grub/mm.h: Include config.h.
12985         (MM_DEBUG): Removed.
12986         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12987         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12988         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12989         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12990         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12991         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12992         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12993         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12994         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12996         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12998         * disk/efi/efidisk.c: Include grub/partition.h.
12999         (iterate_child_devices): New function.
13000         (add_device): First, compare only last device path nodes, so that
13001         devices are sorted by the types.
13002         (grub_efidisk_get_device_handle): New function.
13003         (grub_efidisk_get_device_name): Likewise.
13005         * configure.ac (--enable-mm-debug): New option to enable the
13006         memory manager debugging feature. This makes the binary much
13007         bigger, so is disabled by default.
13009 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13011         Use grub_abort instead of grub_stop, and grub_exit must be
13012         define in each architecture now. Also, this change adds support
13013         for EFI disks.
13015         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13016         (grub_getkey): New function.
13017         (grub_term_get_current): Likewise.
13019         * util/i386/pc/grub-setup.c: Include grub/term.h.
13020         (grub_getkey): New function.
13021         (grub_term_get_current): Likewise.
13023         * util/misc.c (grub_stop): Renamed to ...
13024         (grub_exit): ... this.
13026         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13027         (grub_exit): ... this.
13028         (grub_machine_init): Use grub_abort instead of abort.
13029         (grub_stop): Removed.
13031         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13032         abort.
13034         * kern/i386/pc/startup.S (grub_exit): New function.
13035         (cold_reboot): New label.
13037         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13038         (grub_efi_init): Call grub_efidisk_init.
13039         (grub_efi_fini): Call grub_efidisk_fini.
13041         * kern/efi/efi.c: Include grub/mm.h.
13042         (grub_efi_console_control_guid): Renamed to ...
13043         (console_control_guid): ... this.
13044         (grub_efi_loaded_image_guid): Renamed to ...
13045         (loaded_image_guid): ... this.
13046         (grub_efi_locate_handle): New function.
13047         (grub_efi_open_protocol): Likewise.
13048         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13049         GRUB_EFI_CONSOLE_CONTROL_GUID.
13050         (grub_efi_exit): Removed.
13051         (grub_stop): Likewise.
13052         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13053         (grub_exit): New function.
13054         (grub_print_device_path): Likewise.
13056         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13057         (grub_enter_rescue_mode): Register "exit".
13059         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13060         (grub_abort): New function.
13062         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13064         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13066         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13068         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13069         (grub_print_device_path): New prototype.
13070         (grub_efi_locate_handle): Likewise.
13071         (grub_efi_open_protocol): Likewise.
13073         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13074         * disk/efi/efidisk.c: Likewise.
13076         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13078         * include/grub/efi/console_control.h
13079         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13081         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13082         last 8 bytes as an array.
13083         (GRUB_EFI_DISK_IO_GUID): New macro.
13084         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13085         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13086         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13087         grub_uint8_t.
13088         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13089         (struct grub_efi_device_path): Rename the member "sub_type" to
13090         "subtype".
13091         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13092         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13093         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13094         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13095         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13096         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13097         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13098         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13099         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13100         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13101         (struct grub_efi_pci_device_path): New structure.
13102         (grub_efi_pci_device_path_t): New type.
13103         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13104         (struct grub_efi_pccard_device_path): New structure.
13105         (grub_efi_pccard_device_path_t): New type.
13106         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13107         (struct grub_efi_memory_mapped_device_path): New structure.
13108         (grub_efi_memory_mapped_device_path_t): New type.
13109         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13110         (struct grub_efi_vendor_device_path): New structure.
13111         (grub_efi_vendor_device_path_t): New type.
13112         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13113         (struct grub_efi_controller_device_path): New structure.
13114         (grub_efi_controller_device_path_t): New type.
13115         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13116         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13117         (struct grub_efi_acpi_device_path): New structure.
13118         (grub_efi_acpi_device_path_t): New type.
13119         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13120         (struct grub_efi_expanded_acpi_device_path): New structure.
13121         (grub_efi_expanded_acpi_device_path_t): New type.
13122         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13123         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13124         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13125         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13126         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13127         (struct grub_efi_atapi_device_path): New structure.
13128         (grub_efi_atapi_device_path_t): New type.
13129         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13130         (struct grub_efi_fibre_channel_device_path): New structure.
13131         (grub_efi_fibre_channel_device_path_t): New type.
13132         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13133         (struct grub_efi_1394_device_path): New structure.
13134         (grub_efi_1394_device_path_t): New type.
13135         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13136         (struct grub_efi_usb_device_path): New structure.
13137         (grub_efi_usb_device_path_t): New type.
13138         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13139         (struct grub_efi_usb_class_device_path): New structure.
13140         (grub_efi_usb_class_device_path_t): New type.
13141         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13142         (struct grub_efi_i2o_device_path): New structure.
13143         (grub_efi_i2o_device_path_t): New type.
13144         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13145         (struct grub_efi_mac_address_device_path): New structure.
13146         (grub_efi_mac_address_device_path_t): New type.
13147         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13148         (struct grub_efi_ipv4_device_path): New structure.
13149         (grub_efi_ipv4_device_path_t): New type.
13150         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13151         (struct grub_efi_ipv6_device_path): New structure.
13152         (grub_efi_ipv6_device_path_t): New type.
13153         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13154         (struct grub_efi_infiniband_device_path): New structure.
13155         (grub_efi_infiniband_device_path_t): New type.
13156         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13157         (struct grub_efi_uart_device_path): New structure.
13158         (grub_efi_uart_device_path_t): New type.
13159         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13160         (struct grub_efi_vendor_messaging_device_path): New structure.
13161         (grub_efi_vendor_messaging_device_path_t): New type.
13162         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13163         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13164         (struct grub_efi_hard_drive_device_path): New structure.
13165         (grub_efi_hard_drive_device_path_t): New type.
13166         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13167         (struct grub_efi_cdrom_device_path): New structure.
13168         (grub_efi_cdrom_device_path_t): New type.
13169         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13170         (struct grub_efi_vendor_media_device_path): New structure.
13171         (grub_efi_vendor_media_device_path_t): New type.
13172         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13173         (struct grub_efi_file_path_device_path): New structure.
13174         (grub_efi_file_path_device_path_t): New type.
13175         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13176         (struct grub_efi_protocol_device_path): New structure.
13177         (grub_efi_protocol_device_path_t): New type.
13178         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13179         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13180         (struct grub_efi_bios_device_path): New structure.
13181         (grub_efi_bios_device_path_t): New type.
13182         (struct grub_efi_disk_io): New structure.
13183         (grub_efi_disk_io_t): New type.
13184         (struct grub_efi_block_io_media): New structure.
13185         (grub_efi_block_io_media_t): New type.
13186         (struct grub_efi_block_io): New structure.
13187         (grub_efi_block_io_t): New type.
13189         * include/grub/misc.h (grub_stop): Removed.
13190         (grub_exit): New prototype.
13191         (grub_abort): Likewise.
13193         * include/grub/disk.h (enum grub_disk_dev_id): Added
13194         GRUB_DISK_DEVICE_EFIDISK_ID.
13196         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13197         disk/efi/efidisk.c.
13198         (kernel_syms.lst): Remove the target if an error occurs.
13200 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13202         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13203         as it was simply too buggy.
13205 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13207         * kern/misc.c (grub_lltoa): New function.
13208         (grub_vsprintf): Added support for the long long suffix,
13209         i.e. "ll".
13211 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13213         * Makefile.in (LDFLAGS): Add variable.
13214         (LD): Remove variable.
13215         * configure.ac: Add -m32 to LDFLAGS.
13216         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13217         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13218         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13219         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13220         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13221         variables.
13222         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13223         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13224         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13226 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13228         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13229         length for unknown glyph.
13231 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13233         Add support for pre-loaded modules into the EFI port.
13235         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13236         completely. Accept one more argument DIR. The caller has changed.
13238         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13240         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13241         (grub_efi_loaded_image_guid): New variable.
13242         (grub_efi_get_loaded_image): New function.
13243         (grub_arch_modules_addr): Likewise.
13245         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13246         prototype.
13248         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13249         (struct grub_efi_loaded_image): New structure.
13250         (grub_efi_loaded_image_t): New type.
13252 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13254         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13255         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13256         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13258 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13260         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13262 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13264         * DISTLIST: Added include/grub/efi/console.h,
13265         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13266         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13268         * include/grub/efi/console.h: New file.
13269         * include/grub/efi/time.h: Likewise.
13270         * include/grub/i386/efi/kernel.h: Likewise.
13271         * kern/efi/init.c: Likewise.
13272         * kern/efi/mm.c: Likewise.
13273         * term/efi/console.c: Likewise.
13275         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13276         (grub_stop): Removed.
13277         (grub_get_rtc): Likewise.
13278         (grub_machine_init): Simply call grub_efi_init.
13279         (grub_machine_fini): Call grub_efi_fini.
13281         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13282         (grub_efi_output_string): Removed.
13283         (grub_efi_stall): New function.
13284         (grub_stop): Likewise.
13285         (grub_get_rtc): Likewise.
13287         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13288         (grub_efi_stall): New prototype.
13289         (grub_efi_allocate_pages): Likewise.
13290         (grub_efi_free_pages): Likewise.
13291         (grub_efi_get_memory_map): Likewise.
13292         (grub_efi_mm_init): Likewise.
13293         (grub_efi_mm_fini): Likewise.
13294         (grub_efi_init): Likewise.
13295         (grub_efi_fini): Likewise.
13297         * include/grub/i386/efi/time.h: Do not include
13298         grub/symbol.h. Include grub/efi/time.h.
13299         (GRUB_TICKS_PER_SECOND): Removed.
13300         (grub_get_rtc): Likewise.
13302         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13303         Added padding. The EFI spec is buggy.
13304         (GRUB_EFI_BLACK): New macro.
13305         (GRUB_EFI_BLUE): Likewise.
13306         (GRUB_EFI_GREEN): Likewise.
13307         (GRUB_EFI_CYAN): Likewise.
13308         (GRUB_EFI_RED): Likewise.
13309         (GRUB_EFI_MAGENTA): Likewise.
13310         (GRUB_EFI_BROWN): Likewise.
13311         (GRUB_EFI_LIGHTGRAY): Likewise.
13312         (GRUB_EFI_BRIGHT): Likewise.
13313         (GRUB_EFI_DARKGRAY): Likewise.
13314         (GRUB_EFI_LIGHTBLUE): Likewise.
13315         (GRUB_EFI_LIGHTGREEN): Likewise.
13316         (GRUB_EFI_LIGHTCYAN): Likewise.
13317         (GRUB_EFI_LIGHTRED): Likewise.
13318         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13319         (GRUB_EFI_YELLOW): Likewise.
13320         (GRUB_EFI_WHITE): Likewise.
13321         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13322         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13323         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13324         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13325         (GRUB_EFI_BACKGROUND_RED): Likewise.
13326         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13327         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13328         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13329         (GRUB_EFI_TEXT_ATTR): Likewise.
13331         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13332         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13333         (kernel_mod_HEADERS): Added efi/time.h.
13335 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13337         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13338         include/grub/efi/api.h, include/grub/efi/console_control.h,
13339         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13340         include/grub/i386/efi/time.h, kern/efi/efi.c,
13341         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13342         and util/i386/efi/grub-mkimage.c.
13344         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13346         * genmk.rb (PModule#rule): Do not export symbols if
13347         #{prefix}_EXPORTS is set to "no".
13349         * conf/i386-efi.mk: New file.
13350         * conf/i386-efi.rmk: Likewise.
13351         * include/grub/efi/api.h: Likewise.
13352         * include/grub/efi/console_control.h: Likewise.
13353         * include/grub/efi/efi.h: Likewise.
13354         * include/grub/efi/pe32.h: Likewise.
13355         * include/grub/i386/efi/time.h: Likewise.
13356         * kern/efi/efi.c: Likewise.
13357         * kern/i386/efi/init.c: Likewise.
13358         * kern/i386/efi/startup.S: Likewise.
13359         * util/i386/efi/grub-mkimage.c: Likewise.
13361 2006-04-17  Marco Gerards  <marco@gnu.org>
13363         * include/grub/script.h: Include <grub/parser.h> and
13364         "grub_script.tab.h".
13365         (struct grub_lexer_param): New struct.
13366         (struct grub_parser_param): Likewise.
13367         (grub_script_create_arglist): Pass the state in an argument.
13368         (grub_script_add_arglist): Likewise.
13369         (grub_script_create_cmdline): Likewise.
13370         (grub_script_create_cmdblock): Likewise.
13371         (grub_script_create_cmdif): Likewise.
13372         (grub_script_create_cmdmenu): Likewise.
13373         (grub_script_add_cmd): Likewise.
13374         (grub_script_arg_add): Likewise.
13375         (grub_script_lexer_ref): Likewise.
13376         (grub_script_lexer_deref): Likewise.
13377         (grub_script_lexer_record_start): Likewise.
13378         (grub_script_lexer_record_stop): Likewise.
13379         (grub_script_mem_record): Likewise.
13380         (grub_script_mem_record_stop): Likewise.
13381         (grub_script_malloc): Likewise.
13382         (grub_script_yylex): Likewise.
13383         (grub_script_yyparse): Likewise.
13384         (grub_script_yyerror): Likewise.
13385         (grub_script_yylex): Likewise.
13386         (grub_script_lexer_init): Return the state.
13388         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13389         (grub_script_lexer_done): Likewise.
13390         (grub_script_lexer_getline): Likewise.
13391         (grub_script_lexer_refs): Likewise.
13392         (script): Likewise.
13393         (newscript): Likewise.
13394         (record): Likewise.
13395         (recording): Likewise.
13396         (recordpos): Likewise.
13397         (recordlen): Likewise.
13398         (grub_script_lexer_init): Return the state instead of setting
13399         global variables.
13400         (grub_script_lexer_ref): Use the newly added argument for state
13401         instead of globals.
13402         (grub_script_lexer_deref): Likewise.
13403         (grub_script_lexer_record_start): Likewise.
13404         (grub_script_lexer_record_stop): Likewise.
13405         (recordchar): Likewise.
13406         (nextchar): Likewise.
13407         (grub_script_yylex2): Likewise.
13408         (grub_script_yylex): Likewise.
13409         (grub_script_yyerror): Likewise.
13411         * normal/parser.y (func_mem): Removed variable.
13412         (menu_entry): Likewise.
13413         (err): Likewise.
13414         (%lex-param): New parser option.
13415         (%parse-param): Likewise.
13416         (script): Always return the AST.
13417         (argument): Pass the state around.
13418         (arguments): Likewise.
13419         (grubcmd): Likewise.
13420         (commands): Likewise.
13421         (function): Likewise.
13422         (menuentry): Likewise.
13423         (if_statement): Likewise.
13424         (if): Likewise.
13426         * normal/script.c (grub_script_memused): Removed variable.
13427         (grub_script_parsed): Likewise.
13428         (grub_script_malloc): Added a state argument.  Use that instead of
13429         global variables.
13430         (grub_script_mem_record): Likewise.
13431         (grub_script_mem_record_stop): Likewise.
13432         (grub_script_arg_add): Likewise.
13433         (grub_script_add_arglist): Likewise.
13434         (grub_script_create_cmdline): Likewise.
13435         (grub_script_create_cmdif): Likewise.
13436         (grub_script_create_cmdmenu): Likewise.
13437         (grub_script_add_cmd): Likewise.
13438         (grub_script_parse): Setup the state before calling the parser.
13440 2006-04-16  Marco Gerards  <marco@gnu.org>
13442         * normal/command.c (grub_command_init): Remove the title command.
13444         * normal/lexer.c (grub_script_yylex): Renamed from this...
13445         (grub_script_yylex2): ... to this.
13446         (grub_script_yylex): New function.  Temporary
13447         introduced to filter some tokens.
13448         (grub_script_yyerror): Print a newline.
13450         * normal/main.c (read_config_file): Output information about the
13451         lines that contain errors.  Wait for a key after all lines have
13452         been processed.  Don't return an empty menu.
13454         * normal/parser.y (func_mem): Don't initialize.
13455         (menu_entry): Likewise.
13456         (err): New variable.
13457         (script): Don't return anything when an error was encountered.
13458         (ws, returns): Removed rules.
13459         (argument): Disabled concatenated variable support.
13460         (arguments): Remove explicit separators.
13461         (grubcmd): Likewise.
13462         (function): Likewise.
13463         (menuentry): Likewise.
13464         (if): Likewise.
13465         (commands): Likewise.  Add error handling.
13467         * normal/script.c (grub_script_create_cmdline): If
13468         `grub_script_parsed' is 0, assume the parser encountered an error.
13470 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13472         * configure.ac: Add support for EFI. Fix the typo
13473         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13475 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13477         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13478         foreign multibyte characters should be shown correctly.
13480 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13482         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13483         calculation.
13484         (read_config_file): Made it to close file before returning.
13486 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13488         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13489         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13490         video/i386/pc/vbefill.c.
13492         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13493         video/i386/pc/vbefill.c.
13495         * include/grub/video.h (grub_video_blit_format): New enum.
13496         (grub_video_mode_info): Added new member blit_format.
13497         (grub_video_get_blit_format): New function prototype.
13499         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13500         function prototype.
13501         (grub_video_vbe_map_rgb): Likewise.
13502         (grub_video_vbe_unmap_color): Likewise.
13504         * include/grub/i386/pc/vbeblit.h: New file.
13506         * include/grub/i386/pc/vbefill.h: New file.
13508         * video/video.c (grub_video_get_blit_format): New function.
13509         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13510         (grub_video_vbe_map_rgb): Likewise.
13511         (grub_video_vbe_unmap_color): Likewise.
13513         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13514         optimized fills.
13515         (grub_video_vbe_blit_render_target): Changed to use more optimized
13516         blits.
13517         (grub_video_vbe_setup): Added detection for optimized settings.
13518         (grub_video_vbe_create_render_target): Likewise.
13520         * video/i386/pc/vbeblit.c: New file.
13522         * video/i386/pc/vbefill.c: New file.
13524 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13526         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13527         here...
13529         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13530         parsing to support both hex and dec ranges.  If filename was missing
13531         show usage information.
13533 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13535         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13536         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13538         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13539         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13540         (video_mod_SOURCES): Added.
13541         (video_mod_CFLAGS): Likewise.
13542         (video_mod_LDFLAGS): Likewise.
13543         (gfxterm_mod_SOURCES): Likewise.
13544         (gfxterm_mod_CFLAGS): Likewise.
13545         (gfxterm_mod_LDFLAGS): Likewise.
13546         (videotest_mod_SOURCES): Likewise.
13547         (videotest_mod_CFLAGS): Likewise.
13548         (videotest_mod_LDFLAGS): Likewise.
13549         (vesafb_mod_SOURCES): Removed.
13550         (vesafb_mod_CFLAGS): Likewise.
13551         (vesafb_mod_LDFLAGS): Likewise.
13552         (vga_mod_SOURCES): Likewise.
13553         (vga_mod_CFLAGS): Likewise.
13554         (vga_mod_LDFLAGS): Likewise.
13556         * commands/videotest.c: New file.
13558         * font/manager.c (fill_with_default_glyph): Modified to use
13559         grub_font_glyph.
13560         (grub_font_get_glyph): Likewise.
13561         (fontmanager): Renamed from this...
13562         (font_manager): ... to this.
13564         * include/grub/font.h (grub_font_glyph): Added new structure.
13565         (grub_font_get_glyph): Modified to use grub_font_glyph.
13567         * include/grub/misc.h (grub_abs): Added as inline function.
13569         * include/grub/video.h: New file.
13571         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13572         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13573         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13574         (grub_vbe_get_controller_info): Renamed from this...
13575         (grub_vbe_bios_get_controller_info): ... to this.
13576         (grub_vbe_get_mode_info): Renamed from this...
13577         (grub_vbe_bios_get_mode_info): ... to this.
13578         (grub_vbe_set_mode): Renamed from this...
13579         (grub_vbe_bios_set_mode): ... to this.
13580         (grub_vbe_get_mode): Renamed from this...
13581         (grub_vbe_bios_get_mode): ... to this.
13582         (grub_vbe_set_memory_window): Renamed from this...
13583         (grub_vbe_bios_set_memory_window): ... to this.
13584         (grub_vbe_get_memory_window): Renamed from this...
13585         (grub_vbe_bios_get_memory_window): ... to this.
13586         (grub_vbe_set_scanline_length): Renamed from this...
13587         (grub_vbe_set_scanline_length): ... to this.
13588         (grub_vbe_get_scanline_length): Renamed from this...
13589         (grub_vbe_bios_get_scanline_length): ... to this.
13590         (grub_vbe_set_display_start): Renamed from this...
13591         (grub_vbe_bios_set_display_start): ... to this.
13592         (grub_vbe_get_display_start): Renamed from this...
13593         (grub_vbe_bios_get_display_start): ... to this.
13594         (grub_vbe_set_palette_data): Renamed from this...
13595         (grub_vbe_bios_set_palette_data): ... to this.
13596         (grub_vbe_set_pixel_rgb): Removed.
13597         (grub_vbe_set_pixel_index): Likewise.
13599         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13600         from this...
13601         (grub_vbe_bios_get_controller_info): ... to this.
13602         (grub_vbe_get_mode_info): Renamed from this...
13603         (grub_vbe_bios_get_mode_info): ... to this.
13604         (grub_vbe_set_mode): Renamed from this...
13605         (grub_vbe_bios_set_mode): ... to this.
13606         (grub_vbe_get_mode): Renamed from this...
13607         (grub_vbe_bios_get_mode): ... to this.
13608         (grub_vbe_set_memory_window): Renamed from this...
13609         (grub_vbe_bios_set_memory_window): ... to this.
13610         (grub_vbe_get_memory_window): Renamed from this...
13611         (grub_vbe_bios_get_memory_window): ... to this.
13612         (grub_vbe_set_scanline_length): Renamed from this...
13613         (grub_vbe_set_scanline_length): ... to this.
13614         (grub_vbe_get_scanline_length): Renamed from this...
13615         (grub_vbe_bios_get_scanline_length): ... to this.
13616         (grub_vbe_set_display_start): Renamed from this...
13617         (grub_vbe_bios_set_display_start): ... to this.
13618         (grub_vbe_get_display_start): Renamed from this...
13619         (grub_vbe_bios_get_display_start): ... to this.
13620         (grub_vbe_set_palette_data): Renamed from this...
13621         (grub_vbe_bios_set_palette_data): ... to this.
13622         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13623         getting corrupted after calling it.  Added more pushes and pops.
13624         (grub_vbe_bios_set_mode): Likewise.
13625         (grub_vbe_bios_get_mode): Likewise.
13626         (grub_vbe_bios_get_memory_window): Likewise.
13627         (grub_vbe_bios_set_scanline_length): Likewise.
13628         (grub_vbe_bios_get_scanline_length): Likewise.
13629         (grub_vbe_bios_get_display_start): Likewise.
13630         (grub_vbe_bios_set_palette_data): Likewise.
13632         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13633         (cl_insert): Likewise.
13634         (cl_delete): Likewise.
13636         * term/gfxterm.c: New file.
13638         * term/i386/pc/vesafb.c: Removed file.
13640         * video/video.c: New file.
13642         * video/i386/pc/vbe.c (real2pm): Added new function.
13643         (grub_video_vbe_draw_pixel): Likewise.
13644         (grub_video_vbe_get_video_ptr): Likewise.
13645         (grub_video_vbe_get_pixel): Likewise
13646         (grub_video_vbe_init): Likewise.
13647         (grub_video_vbe_fini): Likewise.
13648         (grub_video_vbe_setup): Likewise.
13649         (grub_video_vbe_get_info): Likewise.
13650         (grub_video_vbe_set_palette): Likewise.
13651         (grub_video_vbe_get_palette): Likewise.
13652         (grub_video_vbe_set_viewport): Likewise.
13653         (grub_video_vbe_get_viewport): Likewise.
13654         (grub_video_vbe_map_color): Likewise.
13655         (grub_video_vbe_map_rgb): Likewise.
13656         (grub_video_vbe_map_rgba): Likewise.
13657         (grub_video_vbe_unmap_color): Likewise.
13658         (grub_video_vbe_fill_rect): Likewise.
13659         (grub_video_vbe_blit_glyph): Likewise.
13660         (grub_video_vbe_blit_bitmap): Likewise.
13661         (grub_video_vbe_blit_render_target): Likewise.
13662         (grub_video_vbe_scroll): Likewise.
13663         (grub_video_vbe_swap_buffers): Likewise.
13664         (grub_video_vbe_create_render_target): Likewise.
13665         (grub_video_vbe_delete_render_target): Likewise.
13666         (grub_video_vbe_set_active_render_target): Likewise.
13667         (grub_vbe_set_pixel_rgb): Remove function.
13668         (grub_vbe_set_pixel_index): Likewise.
13669         (index_color_mode): Remove static variable.
13670         (active_mode): Likewise.
13671         (framebuffer): Likewise.
13672         (bytes_per_scan_line): Likewise.
13673         (grub_video_vbe_adapter): Added new static variable.
13674         (framebuffer): Likewise.
13675         (render_target): Likewise.
13676         (initial_mode): Likewise.
13677         (mode_in_use): Likewise.
13678         (mode_list): Likewise.
13680 2006-03-10  Marco Gerards  <marco@gnu.org>
13682         * configure.ac (AC_INIT): Bumped to 1.93.
13684         * DISTLIST: Added `include/grub/hfs.h'.
13686 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13688         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13689         18H, which might help the BIOS falling back to next boot media.
13691 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13693         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13694         Poe Chen <poe.poechen@gmail.com>.
13696 2006-01-17  Marco Gerards  <marco@gnu.org>
13698         * include/grub/normal.h: Include <grub/script.h>.
13699         (grub_command_list): Removed struct.
13700         (grub_command_list_t): Removed type.
13701         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13702         members `commands' and `sourcecode'.
13703         * include/grub/script.h: Add inclusion guards.
13704         (grub_script_cmd_menuentry): New struct.
13705         (grub_script_execute_menuentry): New prototype.
13706         (grub_script_lexer_record_start): Likewise.
13707         (grub_script_lexer_record_stop): Likewise.
13708         * normal/execute.c (grub_script_execute_menuentry): New function.
13709         * normal/lexer.c (record, recording, recordpos, recordlen): New
13710         variables.
13711         (grub_script_lexer_record_start): New function.
13712         (grub_script_lexer_record_stop): Likewise.
13713         (recordchar): Likewise.
13714         (nextchar): Likewise.
13715         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13716         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13717         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13718         (current_menu): New variable.
13719         (free_menu): Mainly rewritten.
13720         (grub_normal_menu_addentry): New function.
13721         (read_config_file): Rewritten.
13722         * normal/menu.c (run_menu_entry): Mainly rewritten.
13723         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13724         the menu entry.
13725         (run): Mainly rewritten.
13726         * normal/parser.y (menu_entry): New variable.
13727         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13728         (menuentry): New rule.
13729         (command): Add `menuentry'.
13730         (if_statement): Allow additional returns before `fi'.
13731         * normal/script.c (grub_script_create_cmdmenu): New function.
13733 2006-01-03  Marco Gerards  <marco@gnu.org>
13735         * INSTALL: GNU Bison is required.
13736         * configure.ac: Rewritten the test to detect Bison.
13737         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13738         <xun.sun.cn@gmail.com>.
13740 2006-01-03  Marco Gerards  <marco@gnu.org>
13742         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13743         the HFS+ filesystem to filesystem blocks.
13744         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13745         GCC warning is silenced.
13747 2006-01-03  Marco Gerards  <marco@gnu.org>
13749         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13750         read from disk from big endian to host byte order.
13752 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13754         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13755         documentation.
13756         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13757         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13758         embedded HFS+ filesystem.
13759         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13760         (grub_hfs_sblock): Move from here...
13761         * include/grub/hfs.h: To here...  New file.
13762         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13763         documentation.
13764         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13765         New macros.
13766         (grub_hfsplus_volheader): Change type of member `magic' to
13767         `grub_uint16_t'.
13768         (grub_hfsplus_data): Add new member `embedded_offset'.
13769         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13770         returned block.
13771         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13772         Calculate the offset.
13774 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13776         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13777         Removed.
13778         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13780 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13782         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13783         ENV->NAME is NULL after allocating ENV->VALUE.
13785 2005-12-25  Marco Gerards  <marco@gnu.org>
13787         * kern/env.c (grub_env_set): Rewritten the error handling code.
13789 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13791         * geninit.sh: Made more robust, and more portable.
13793 2005-12-25  Marco Gerards  <marco@gnu.org>
13795         Add support for Apple HFS+ filesystems.
13797         * fs/hfsplus.c: New file.
13799         * DISTLIST: Added `fs/hfsplus.c'.
13801         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13802         (hfsplus_mod_SOURCES): New variable.
13803         (hfsplus_mod_CFLAGS): Likewise.
13804         (hfsplus_mod_LDFLAGS): Likewise.
13805         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13806         (grub_setup_SOURCES): Likewise.
13807         (grub_mkdevicemap_SOURCES): Likewise.
13808         (grub_emu_SOURCES): Likewise.
13809         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13811         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13813         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13815 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13817         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13818         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13819         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13820         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13821         normal/lexer.c, normal/parser.y, normal/script.c, and
13822         partmap/gpt.c.
13823         Removed kern/sparc64/cache.c.
13825         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13826         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13827         grub_emu_init.c.
13829         * configure.ac (AC_INIT): Bumped to 1.92.
13831 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13833         * kern/err.c (grub_error_push): Added new function to support error
13834         stacks.
13835         (grub_error_pop): Likewise.
13836         (grub_error_stack_items): New local variable to support error stacks.
13837         (grub_error_stack_pos): Likewise.
13838         (grub_error_stack_assert): Likewise.
13839         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13840         stack depth.
13841         (grub_print_error): Added support to print errors from error stack.
13843         * include/grub/err.h (grub_error_push): Added function prototype.
13844         (grub_error_pop): Likewise.
13846 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13848         * configure.ac: Accept `powerpc64' as host_cpu.
13849         (amd64): Rename to `biarch32'.
13851         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13852         non-cacheline-aligned addresses.
13854         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13855         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13856         if `size' is non-zero.
13858 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13860         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13861         and `cd' to make sure the filename is not prefixed with a
13862         directory name.
13863         (pkgdata_MODULES): Add `gpt.mod'.
13864         (gpt_mod_SOURCES): New variable.
13865         (gpt_mod_CFLAGS): Likewise.
13866         (gpt_mod_LDFLAGS): Likewise.
13868         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13870         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13871         New macro.
13873         * partmap/gpt.c: New file.
13875         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13876         GPT partition map is detected.
13878 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13880         * commands/i386/pc/play.c: New file.
13881         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13882         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13883         macros.
13885 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13887         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13888         ((unused))' to silence gcc warning.
13890 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13892         * configure.ac: Correct `AC_PROG_YACC' test.
13894 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13896         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13897         check before installing files.
13899 2005-11-22  Mike Small  <smallm@panix.com>
13901         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13902         number regex so multidigit numbers are recognized correctly.
13904 2005-11-22  Mike Small  <smallm@panix.com>
13906         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13907         debugging message before attempting to claim memory.
13908         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13909         multiple addresses in case of failure.
13911 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13913         * term/tparm.c (get_space): Remove empty `if' statement.
13915         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13917         * kern/parser.c (check_varstate): Rename `state' to 's'.
13919 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13921         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13922         variable definitions to the beginning of each function.  Sort stack
13923         variables by size.
13924         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13925         `buf' argument to `char *'.
13927 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13929         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13930         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13931         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13932         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13933         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13934         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13935         configfile.mod, search.mod, gzio.mod and test.mod.
13936         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13937         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13938         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13939         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13940         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13941         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13942         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13943         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13944         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13945         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13946         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13947         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13948         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13949         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13950         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13951         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13952         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13953         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13954         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13955         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13956         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13957         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13958         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13960         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13961         `grep --include'.
13962         (pkgdata_MODULES): Add test.mod.
13964 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13966         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13967         appending to variables with "+=".
13968         (PModule): Use full pathname to generate *.lst filenames.
13970         * Makefile.in: Fixed list rules moved from genmk.rb.
13971         (.DELETE_ON_ERROR): New special target.
13972         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13974         * conf/i386-pc.rmk: Include conf/common.mk.
13975         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13976         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13977         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13978         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13979         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13980         configfile.mod, search.mod, gzio.mod and test.mod.
13981         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13982         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13983         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13984         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13985         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13986         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13987         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13988         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13989         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13990         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13991         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13992         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13993         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13994         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13995         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13996         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13997         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13998         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13999         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14000         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14001         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14002         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14003         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14004         here...
14005         * conf/common.rmk: ... to here.  New file.
14007         * conf/common.mk: New file.
14009 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14011         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14012         (grub_script.tab.c): ... here.
14014         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14015         (grub_script.tab.c): ... here.
14017         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14018         (grub_script.tab.c): ... here.
14020         * normal/command.c (grub_command_find): Fixed a memory leak of
14021         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14023 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14025         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14026         "@" which marks the start of a comment on ARM.
14027         (VARIABLE): Likewise.
14029 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14031         Add support for Linux/ADFS partition tables.
14033         * partmap/acorn.c: New file.
14035         * include/grub/acorn_filecore.h: Likewise.
14037         * DISTLIST: Added `partmap/acorn.c' and
14038         `include/grub/acorn_filecore.h'.
14040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14041         `partmap/acorn.c'.
14042         (pkgdata_MODULES): Add `acorn.mod'.
14043         (acorn_mod_SOURCES): New variable.
14044         (acorn_mod_CFLAGS): Likewise.
14046         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14047         `partmap/acorn.c'.
14048         (pkgdata_MODULES): Add `acorn.mod'.
14049         (acorn_mod_SOURCES): New variable.
14050         (acorn_mod_CFLAGS): Likewise.
14052         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14053         (pkgdata_MODULES): Add `acorn.mod'.
14054         (acorn_mod_SOURCES): New variable.
14055         (acorn_mod_CFLAGS): Likewise.
14056         (acorn_mod_LDFLAGS): Likewise.
14058         * include/types.h (grub_disk_addr_t): New typedef.
14060 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14062         * geninit.sh: New file.
14064         * geninitheader.sh: Likewise.
14066         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14067         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14068         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14069         * commands/configfile.c (grub_configfile_init)
14070         (grub_configfile_fini): Likewise.
14071         * commands/default.c (grub_default_init, grub_default_fini):
14072         Likewise.
14073         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14074         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14075         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14076         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14077         Likewise.
14078         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14079         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14080         Likewise.
14081         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14082         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14083         Likewise.
14084         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14085         Likewise.
14086         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14087         Likewise.
14088         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14089         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14090         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14091         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14092         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14093         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14094         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14095         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14096         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14097         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14098         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14099         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14100         * partmap/amiga.c (grub_amiga_partition_map_init)
14101         (grub_amiga_partition_map_fini): Likewise.
14102         * partmap/apple.c (grub_apple_partition_map_init)
14103         (grub_apple_partition_map_fini): Likewise.
14104         * partmap/pc.c (grub_pc_partition_map_init)
14105         (grub_pc_partition_map_fini): Likewise.
14106         * partmap/sun.c (grub_sun_partition_map_init,
14107         grub_sun_partition_map_fini): Likewise.
14108         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14109         Likewise.
14111         * util/grub-emu.c: Include <grub_modules_init.h>.
14112         (main): Don't initialize and de-initialize any modules directly,
14113         use `grub_init_all' and `grub_fini_all' instead.
14115         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14116         `grub_vesafb_mod_init'.
14117         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14118         all users.
14119         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14120         `grub_vga_mod_init'.  Updated all users.
14121         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14123         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14124         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14125         rules.
14127         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14128         Generate a function to initialize the module in utilities.
14129         Updated all callers.
14130         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14131         initialize the module in utilities.  Updated all callers.
14133 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14135         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14136         escape sequence and a literal ^L to clear the screen.
14138         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14139         when returning from Open Firmware.
14141 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14143         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14144         (grub_ofconsole_height): Likewise.
14145         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14146         manually insert a '\n'.
14147         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14148         `grub_ofconsole_height'.  Return early if these are already set.
14150 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14152         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14153         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14154         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14155         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14156         and `normal/script.c'.
14157         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14158         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14159         (test_mod_SOURCES): New variable.
14160         (test_mod_CFLAGS): Likewise.
14161         (test_mod_LDFLAGS): Likewise.
14162         (pkgdata_MODULES): Add `test.mod'.
14163         (grub_script.tab.c): New rule.
14164         (grub_script.tab.h): Likewise.
14166 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14168         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14169         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14170         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14171         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14172         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14173         (test_mod_SOURCES): New variable.
14174         (test_mod_CFLAGS): Likewise.
14175         (pkgdata_MODULES): Add `test.mod'.
14176         (grub_script.tab.c): New rule.
14177         (grub_script.tab.h): Likewise.
14179 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14181         Add initial scripting support.
14183         * commands/test.c: New file.
14184         * include/grub/script.h: Likewise.
14185         * normal/execute.c: Likewise.
14186         * normal/function.c: Likewise.
14187         * normal/lexer.c: Likewise.
14188         * normal/parser.y: Likewise.
14189         * normal/script.c: Likewise.
14191         * configure.ac: Add `AC_PROG_YACC' test.
14193         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14194         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14195         `normal/function.c' and `normal/script.c'.
14196         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14197         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14198         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14199         variables.
14200         (pkgdata_MODULES): Add `test.mod'.
14201         (grub_script.tab.c): New rule.
14202         (grub_script.tab.h): Likewise.
14204         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14206         * include/grub/normal.h (grub_test_init): New prototype.
14207         (grub_test_fini): Likewise.
14209         * normal/command.c: Include <grub/script.h>.
14210         (grub_command_execute): Rewritten.
14212         * util/grub-emu.c (main): Call `grub_test_init' and
14213         `grub_test_fini'.
14215 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14217         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14218         to 0.
14219         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14220         there are no pending characters.
14222 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14224         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14225         `grub_strndup' to drop device arguments. Replace unnecessary
14226         `grub_strndup' with `grub_strdup'.
14228 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14230         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14231         `debug' environment variable has been set.
14233 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14235         * Makefile.in (install-local): Use $(DATA).
14236         (uninstall): Likewise.
14237         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14238         (sbin_UTILITIES): ... to here.
14239         (sbin_SCRIPTS): New variable.
14240         (grub_install_SOURCES): New variable.
14241         * util/powerpc/ieee1275/grub-install.in: New file.
14242         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14243         variable.
14244         (add_segments): Call `grub_util_get_path'.
14246 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14248         From Timothy Baldwin:
14249         * commands/ls.c (grub_ls_list_files): Close FILE with
14250         grub_file_close.
14251         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14253 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14255         * include/grub/parser.h: New file.
14257         * kern/parser.c: Likewise.
14259         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14260         (grub_setup_SOURCES): Likewise.
14261         (grub_probefs_SOURCES): Likewise.
14262         (grub_emu_SOURCES): Likewise.
14263         (kernel_img_HEADERS): Add `parser.h'.
14265         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14266         (grub_emu_SOURCES): Add `kern/parser.c'.
14267         (grubof_SOURCES): Likewise.
14269         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14270         (grubof_SOURCES): Add `kern/parser.c'.
14272         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14274         * kern/misc.c (grub_split_cmdline): Removed function.
14276         * kern/rescue.c: Include <grub/parser.h>.
14277         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14278         of `grub_split_cmdline'.
14280         * normal/command.c: Include <grub/parser.h>.
14281         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14282         of `grub_split_cmdline'.
14284         * normal/completion.c: Include <grub/parser.h>.
14285         (cmdline_state): New variable.
14286         (iterate_dir): End the filename with a quote depending on the
14287         command line state.
14288         (get_state): new function.
14289         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14290         split the arguments and determine the current argument.  When the
14291         argument string is not quoted, escape all spaces.
14293 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14295         * normal/sparc64/setjmp.S: New file.
14297 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14299         * include/grub/sparc64/libgcc.h: New file.
14300         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14301         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14302         normal/sparc64/setjmp.c.
14304 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14306         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14307         * kern/sparc64/cache.S: New file.
14308         * kern/sparc64/cache.c: Removed.
14309         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14310         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14311         -mtune=ultrasparc.
14312         (COMMON_LDFLAGS): Add -melf64_sparc.
14313         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14314         (grubof_SOURCES): Use cache.S instead of cache.c.
14315         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14316         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14317         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14318         commented though.
14319         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14320         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14321         (linux_mod_CFLAGS): Commented out.
14322         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14323         out because module isn't built.
14324         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14325         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14326         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14327         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14328         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14329         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14330         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14331         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14332         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14333         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14334         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14335         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14336         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14337         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14339 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14341         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14342         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14343         longer, because HFS should not be used on PC.
14345 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14347         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14348         consistently within the loop.
14350 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14352         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14353         directory can not be read.
14355 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14357         * configure.ac (AC_INIT): Increase the version number to 1.91.
14359         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14360         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14361         term/i386/pc/serial.c.
14363 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14365         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14366         file size must be permitted.
14368         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14369         between %ah and %al.
14371 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14373         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14374         grub_uint64_t.
14375         Call the hook with a NUL-terminated filename.
14376         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14377         grub_cpu_to_be32.
14379         * kern/term.c (cursor_state): New variable.
14380         (grub_term_set_current): Reset the cursor state on a new
14381         terminal.
14382         (grub_setcursor): Rewritten to use CURSOR_STATE.
14383         (grub_getcursor): New function.
14385         * include/grub/term.h (grub_getcursor): New prototype.
14387         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14388         integers on ARM. Reported by Timothy Baldwin
14389         <T.E.Baldwin99@members.leeds.ac.uk>.
14391 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14393         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14394         allocated.
14395         (grub_sfs_dir): Likewise.
14397 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14399         Add support for the SFS filesystem.
14401         * fs/sfs.c: New file.
14403         * DISTLIST: Added `fs/sfs.c'.
14405         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14406         (grub_probefs_SOURCES): Likewise.
14407         (grub_emu_SOURCES): Likewise.
14408         (pkgdata_MODULES): Add `sfs.mod'.
14409         (sfs_mod_SOURCES): New variable.
14410         (sfs_mod_CFLAGS): Likewise.
14411         (sfs_mod_LDFLAGS): Likewise.
14413         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14414         (pkgdata_MODULES): Add `sfs.mod'.
14415         (sfs_mod_SOURCES): New variable.
14416         (sfs_mod_CFLAGS): Likewise.
14418         * util/grub-emu.c (main): Call `grub_sfs_init' and
14419         `grub_sfs_fini'.
14421         * include/grub/fs.h (grub_sfs_init): New prototype.
14422         (grub_sfs_fini): Likewise.
14424 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14426         Add support for the AFFS filesystem.
14428         * fs/affs.c: New file.
14430         * DISTLIST: Added `fs/affs.c'.
14432         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14433         (grub_probefs_SOURCES): Likewise.
14434         (grub_emu_SOURCES): Likewise.
14435         (pkgdata_MODULES): Add `affs.mod'.
14436         (affs_mod_SOURCES): New variable.
14437         (affs_mod_CFLAGS): Likewise.
14438         (affs_mod_LDFLAGS): Likewise.
14440         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14441         (pkgdata_MODULES): Add `affs.mod'.
14442         (affs_mod_SOURCES): New variable.
14443         (affs_mod_CFLAGS): Likewise.
14445         * util/grub-emu.c (main): Call `grub_affs_init' and
14446         `grub_affs_fini'.
14448         * include/grub/fs.h (grub_affs_init): New prototype.
14449         (grub_affs_fini): Likewise.
14451 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14453         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14455 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14457         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14458         `-m32' to CFLAGS.
14460         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14461         linking.
14463         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14464         (COMMON_LDFLAGS): New variable.
14465         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14466         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14467         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14468         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14469         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14470         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14471         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14472         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14473         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14474         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14475         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14476         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14477         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14478         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14479         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14480         variables.
14481         (normal_mod_ASFLAGS): Add `-m32'.
14483         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14484         (grub_host_size_t, grub_host_ssize_t): New types.
14485         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14486         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14487         `GRUB_HOST_SIZEOF_VOID_P'.
14489         * include/grub/kernel.h (struct grub_module_header): Type of
14490         member offset changed to `grub_host_off_t'.  Type of member size
14491         changed to `grub_host_size_t'.
14492         (struct grub_module_info): Type of member offset changed to
14493         `grub_host_off_t'.  Type of member size changed to
14494         `grub_host_size_t'.
14496 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14498         Make GRUB's kernel compliant to Multiboot Specification.
14500         * kern/i386/pc/startup.S (multiboot_header): New label.
14501         (multiboot_entry): Likewise.
14502         (multiboot_trampoline): Likewise.
14504         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14505         Increased to 0x4A0.
14507         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14508         put parentheses after a question mark.
14509         [!GRUB_UTIL] (my_mod): New variable.
14511         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14513 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14515         Adds support for the XFS filesystem.  Btrees are not supported
14516         yet.
14518         * fs/xfs.c: New file.
14520         * DISTLIST: Added `fs/xfs.c'.
14522         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14523         (grub_probefs_SOURCES): Likewise.
14524         (grub_emu_SOURCES): Likewise.
14525         (pkgdata_MODULES): Add `xfs.mod'.
14526         (xfs_mod_SOURCES): New variable.
14527         (xfs_mod_CFLAGS): Likewise.
14529         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14530         (pkgdata_MODULES): Add `xfs.mod'.
14531         (xfs_mod_SOURCES): New variable.
14532         (xfs_mod_CFLAGS): Likewise.
14534         * util/grub-emu.c (main): Call `grub_xfs_init' and
14535         `grub_xfs_fini'.
14537         * include/grub/fs.h (grub_xfs_init): New prototype.
14538         (grub_xfs_fini): Likewise.
14541 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14543         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14544         color modes, allow greater than 16 colors to be configured as
14545         a default palette.
14547 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14549         * normal/completion.c (complete_arguments): Add the qualifier
14550         const into OPTIONS.
14552         From Omniflux <omniflux+lists@omniflux.com>:
14553         * include/grub/terminfo.h: New file.
14554         * include/grub/tparm.h: Likewise.
14555         * include/grub/i386/pc/serial.h: Likewise.
14556         * term/terminfo.c: Likewise.
14557         * term/tparm.c: Likewise.
14558         * term/i386/pc/serial.c: Likewise.
14559         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14560         serial.mod.
14561         (terminfo_mod_SOURCES): New variable.
14562         (terminfo_mod_CFLAGS): Likewise.
14563         (serial_mod_SOURCES): Likewise.
14564         (serial_mod_CFLAGS): Likewise.
14566 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14568         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14569         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14570         and kern/powerpc/ieee1275/cmain.c, respectively.
14572         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14573         * kern/powerpc/ieee1275/crt0.S: ... here.
14575         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14576         * kern/powerpc/ieee1275/cmain.c: ... here.
14578         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14579         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14580         instead of boot/powerpc/ieee1275/crt0.S and
14581         boot/powerpc/ieee1275/cmain.c, respectively.
14583         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14584         sectors. It was not used anyway.
14586 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14588         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14589         `unused parameter' warning.
14591 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14593         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14594         function.
14595         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14596         getcharwidth.
14598 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14600         * include/grub/normal.h (enum grub_completion_type): Added
14601         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14603         * normal/cmdline.c (print_completion): Handle
14604         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14605         * normal/menu_entry.c (store_completion): Likewise.
14607         * normal/completion.c (complete_arguments): New function.
14608         (grub_normal_do_completion): Call `complete_arguments' when the
14609         current words start with a dash.
14611 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14613         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14614         `gzio.mod' instead of `io.mod').
14616 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14618         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14619         (DISTDIRS): Added io and video.
14620         Rewrite the search routine to make an output consistently.
14622         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14623         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14624         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14625         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14626         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14627         util/powerpc/ieee1275/misc.c.
14629         * include/grub/gzio.h: New file.
14630         * io/gzio.c: Likewise.
14632         * kern/file.c (grub_file_close): Call grub_device_close only if
14633         FILE->DEVICE is not NULL.
14635         * include/grub/mm.h [!NULL] (NULL): New macro.
14637         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14639         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14640         (pkgdata_MODULES): Added gzio.mod.
14641         (gzio_mod_SOURCES): New variable.
14642         (gzio_mod_CFLAGS): Likewise.
14644         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14645         (pkgdata_MODULES): Added gzio.mod.
14646         (gzio_mod_SOURCES): New variable.
14647         (gzio_mod_CFLAGS): Likewise.
14649         * commands/cat.c: Include grub/gzio.h.
14650         (grub_cmd_cat): Use grub_gzfile_open instead of
14651         grub_file_open.
14653         * commands/cmp.c: Include grub/gzio.h.
14654         (grub_cmd_cmp): Use grub_gzfile_open instead of
14655         grub_file_open.
14657         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14658         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14659         grub_file_open.
14660         (grub_rescue_cmd_module): Likewise.
14662 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14664         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14665         kern/sparc64/ieee1275/init.c because it contains _start.
14666         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14668 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14670         * configure.ac: Add support for sparc64 host with ieee1275
14671         firmware.
14672         * configure: Generated from configure.ac.
14673         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14674         instead of int.
14675         (grub_ofdisk_read): Likewise.
14676         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14677         pointers as (void *) to remove a warning.
14678         (grub_ofdisk_close): Likewise.
14679         (grub_ofdisk_read): Likewise.
14680         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14681         returns, so make it return void to remove a warning.
14682         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14683         Corresponding prototype change.
14684         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14685         values, and cast the pointers as (void *) to remove a warning.
14686         (grub_mm_dump): Likewise.
14687         * conf/sparc64-ieee1275.mk: New file.
14688         * conf/sparc64-ieee1275.rmk: Likewise.
14689         * include/grub/sparc64/setjmp.h: Likewise.
14690         * include/grub/sparc64/types.h: Likewise.
14691         * include/grub/sparc64/ieee1275/console.h: Likewise.
14692         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14693         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14694         * include/grub/sparc64/ieee1275/time.h: Likewise.
14695         * kern/sparc64/cache.c: Likewise.
14696         * kern/sparc64/dl.c: Likewise.
14697         * kern/sparc64/ieee1275/init.c: Likewise.
14698         * kern/sparc64/ieee1275/openfw.c: Likewise.
14700 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14702         * util/console.c (grub_ncurses_putchar): If C is greater than
14703         0x7f, set C to a question mark.
14704         (grub_ncurses_getcharwidth): New function.
14705         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14706         getcharwidth.
14708         * normal/menu.c (print_entry): Made aware of Unicode. First,
14709         convert TITLE to UCS-4, and predict the cursor position by
14710         grub_getcharwidth.
14712         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14713         const to SRC.
14714         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14716 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14718         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14719         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14720         grub_strcat.
14722         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14723         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14724         grub_strcpy and grub_strlen. Take it into account that a space
14725         character is inserted as a delimiter.
14727 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14729         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14730         invalid magic in the error.
14732         * commands/search.c: New file.
14734         * util/grub-emu.c (main): Call grub_search_init and
14735         grub_search_fini.
14737         * kern/rescue.c (grub_rescue_print_disks): Removed.
14738         (grub_rescue_print_devices): New function.
14739         (grub_rescue_cmd_ls): Use grub_device_iterate with
14740         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14741         grub_rescue_print_disks.
14743         * kern/partition.c (grub_partition_iterate): Return the result of
14744         PARTMAP->ITERATE instead of GRUB_ERRNO.
14746         * kern/device.c: Include grub/partition.h.
14747         (grub_device_iterate): New function.
14749         * include/grub/partition.h (grub_partition_iterate): Return int
14750         instead of grub_err_t.
14752         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14753         prototype.
14754         [GRUB_UTIL] (grub_search_fini): Likewise.
14756         * include/grub/device.h (grub_device_iterate): New prototype.
14758         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14759         commands/search.c.
14760         (pkgdata_MODULES): Added search.mod.
14761         (search_mod_SOURCES): New variable.
14762         (search_mod_CFLAGS): Likewise.
14764         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14765         (pkgdata_MODULES): Added search.mod.
14766         (search_mod_SOURCES): New variable.
14767         (search_mod_CFLAGS): Likewise.
14769         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14770         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14771         All callers changed.
14773         * DISTLIST: Added commands/search.c.
14775 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14777         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14778         conversion.
14779         (grub_getcharwidth): New function.
14781         * kern/misc.c (grub_utf8_to_ucs4): New function.
14783         * include/grub/term.h (struct grub_term): Added a new member
14784         "getcharwidth".
14785         (grub_getcharwidth): New prototype.
14787         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14789         * term/i386/pc/console.c (map_char): New function. Segregated from
14790         grub_console_putchar.
14791         (grub_console_putchar): Use map_char.
14792         (grub_console_getcharwidth): New function.
14793         (grub_console_term): Specified grub_console_getcharwidth as
14794         getcharwidth.
14796         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14797         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14799         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14800         GRUB_ERRNO.
14801         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14802         on grub_strtoul completely.
14803         (write_char): Declare local variables in the beginning of the
14804         function.
14805         (grub_vesafb_getcharwidth): New function.
14806         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14807         getcharwidth.
14809 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14811         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14812         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14813         commands/i386/pc/vbetest.c.
14815         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14816         call grub_vbe_get_controller_info again, because the returned
14817         information is volatile.
14818         (grub_vbe_set_video_mode): Mostly rewritten.
14819         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14820         grub_vbe_status_t correctly.
14821         (grub_vbe_get_video_mode_info): Likewise.
14822         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14823         several if statements.
14825         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14826         * commands/i386/pc/vbeinfo.c: ... this.
14828         * commands/i386/pc/vbe_test.c: Renamed to ...
14829         * commands/i386/pc/vbetest.c: ... this.
14831         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14832         ...
14833         (grub_cmd_vbeinfo): ... this. Save video modes before
14834         iterating. Skip a video mode, if it is not available, not enough
14835         information is given or it is monochrome. Show the memory
14836         model. Leave the interpretation of MODEVAR to grub_strtoul
14837         completely.
14838         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14839         (GRUB_MOD_FINI): Likewise.
14841         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14842         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14843         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14844         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14845         grub_strtoul completely.
14846         (real2pm): Removed.
14847         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14848         (GRUB_MOD_FINI): Likewise.
14850         * normal/misc.c: Include grub/mm.h.
14852         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14853         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14854         (vbe_list_modes_mod_SOURCES): Removed.
14855         (vbe_list_modes_mod_CFLAGS): Likewise.
14856         (vbe_test_mod_SOURCES): Likewise.
14857         (vbe_test_mod_CFLAGS): Likewise.
14858         (vbeinfo_mod_SOURCES): New variable.
14859         (vbeinfo_mod_CFLAGS): Likewise.
14860         (vbetest_mod_SOURCES): Likewise.
14861         (vbetest_mod_CFLAGS): Likewise.
14863 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14865         * normal/misc.c: New file.
14867         * DISTLIST: Added normal/misc.c.
14869         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14870         DISK to HOOK. Call HOOK with DISK.
14871         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14872         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14873         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14875         * normal/menu_entry.c (struct screen): Added a new member
14876         "completion_shown".
14877         (completion_buffer): New global variable.
14878         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14879         (store_completion): New function.
14880         (complete): Likewise.
14881         (clear_completions): Likewise.
14882         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14883         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14884         a tab, call complete.
14886         * normal/completion.c (disk_dev): Removed.
14887         (print_simple_completion): Likewise.
14888         (print_partition_completion): Likewise.
14889         (print_func): New global variable.
14890         (add_completion): Do not take the arguments WHAT or PRINT any
14891         longer. Added a new argument TYPE. Instead of printing directly,
14892         call PRINT_FUNC if not NULL.
14893         All callers changed.
14894         (complete_device): Use a local variable DEV instead of
14895         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14896         (grub_normal_do_completion): Take a new argument HOOK. Do not
14897         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14898         empty string, return NULL instead.
14899         All callers changed.
14901         * normal/cmdline.c (print_completion): New function.
14903         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14904         to HOOK.
14905         All callers changed.
14907         * kern/disk.c (grub_print_partinfo): Removed.
14909         * include/grub/partition.h (struct grub_partition_map): Add a new
14910         argument DISK into HOOK of ITERATE.
14911         (grub_partition_iterate): Add a new argument DISK to HOOK.
14913         * include/grub/normal.h (enum grub_completion_type): New enum.
14914         (grub_completion_type_t): New type.
14915         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14916         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14917         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14918         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14919         (grub_normal_do_completion): Added a new argument HOOK.
14920         (grub_normal_print_device_info): New prototype.
14922         * include/grub/disk.h (grub_print_partinfo): Removed.
14924         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14925         (normal_mod_SOURCES): Likewise.
14926         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14927         (normal_mod_SOURCES): Likewise.
14929         * commands/ls.c (grub_ls_list_disks): Use
14930         grub_normal_print_device_info instead of grub_print_partinfo. Free
14931         PNAME.
14932         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14933         duplicating the code.
14935 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14937         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14938         follow GCS more precisely.
14939         * commands/i386/pc/vbe_test.c: Likewise.
14940         * include/grub/i386/pc/vbe.h: Likewise.
14941         * term/i386/pc/vesafb.c: Likewise.
14942         * video/i386/pc/vbe.c: Likewise.
14944 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14946         * DISTLIST: Added term/i386/pc/vesafb.c
14947         DISTLIST: Added video/i386/pc/vbe.c
14948         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14949         DISTLIST: Added commands/i386/pc/vbe_test.c.
14950         * commands/i386/pc/vbe_list_modes.c: New file.
14951         * commands/i386/pc/vbe_test.c: Likewise.
14952         * term/i386/pc/vesafb.c: Likewise.
14953         * video/i386/pc/vbe.c: Likewise.
14954         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14955         (grub_vbe_probe) Added prototype.
14956         (grub_vbe_set_video_mode) Likewise.
14957         (grub_vbe_get_video_mode) Likewise.
14958         (grub_vbe_get_video_mode_info) Likewise.
14959         (grub_vbe_set_pixel_rgb) Likewise.
14960         (grub_vbe_set_pixel_index) Likewise.
14961         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14962         (pkgdata_MODULES): Added vesafb.mod.
14963         (pkgdata_MODULES): Added vbe_list_modes.mod.
14964         (pkgdata_MODULES): Added vbe_test.mod.
14965         (vbe_mod_SOURCES): Added.
14966         (vbe_mod_CFLAGS): Likewise.
14967         (vesafb_mod_SOURCES): Likewise.
14968         (vesafb_mod_CFLAGS): Likewise.
14969         (vbe_list_modes_mod_SOURCES): Likewise.
14970         (vbe_list_modes_mod_CFLAGS): Likewise.
14971         (vbe_test_mod_SOURCES): Likewise.
14972         (vbe_test_mod_CFLAGS): Likewise.
14974 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14976         * normal/command.c (grub_command_execute): If INTERACTIVE is
14977         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14978         CMDLINE. Disable the pager if INTERACTIVE is true.
14979         All callers are changed.
14981         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14982         before reading a config file.
14983         * normal/main.c (read_config_file): Even if a command is not
14984         found, register it if it is within an entry.
14986         * util/grub-emu.c: Include sys/types.h and unistd.h.
14987         (options): Added --hold.
14988         (struct arguments): Added a new member "hold".
14989         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14990         missing.
14991         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14992         cleared by a debugger, if it is not zero.
14994         * include/grub/normal.h (grub_command_execute): Add an argument
14995         INTERACTIVE.
14997 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14999         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15001 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15003         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15004         program with another one, because the old one didn't detect a bug
15005         in gcc-3.4. Always use regparm 2, because the new test is still
15006         not enough for gcc-4.0. Someone must investigate a simple test
15007         case which detects a bug in gcc-4.0.
15009 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15011         * DISTLIST: Added normal/completion.c.
15013         * normal/completion.c: New file.
15015         * term/i386/pc/console.c (grub_console_getwh): New function.
15016         (grub_console_term): Assign grub_console_getwh to getwh.
15018         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15019         function is defined in normal/completion.c as
15020         grub_normal_do_completion.
15021         (grub_cmdline_get): Use grub_normal_do_completion instead of
15022         grub_tab_complete.
15024         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15025         returns non-zero, otherwise return 0.
15026         (grub_partition_iterate): First, probe the partition map. Then,
15027         call ITERATE only for this partition map.
15029         * kern/misc.c (grub_strncmp): Rewritten.
15031         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15032         returns non-zero. Otherwise return 0.
15034         * include/grub/partition.h (grub_partition_map_iterate): Return
15035         int instead of void.
15037         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15039         * include/grub/misc.h (grub_strncmp): Change the type of N to
15040         grub_size_t.
15042         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15043         of void.
15045         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15046         unsigned explicitly before comparing it with I.
15048         * kern/main.c (grub_env_write_root): Add the attribute unused into
15049         VAR.
15051         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15052         normal/completion.c.
15053         (normal_mod_SOURCES): Likewise.
15054         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15055         (normal_mod_SOURCES): Likewise.
15057         * normal/command.c (grub_iterate_commands): If ITERATE returns
15058         non-zero, return one immediately.
15060 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15062         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15063         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15064         descriptions.
15065         (grub_vbe_get_controller_info): New function.
15066         (grub_vbe_get_mode_info): Likewise.
15067         (grub_vbe_set_mode): Likewise.
15068         (grub_vbe_get_mode): Likewise.
15069         (grub_vbe_set_memory_window): Likewise.
15070         (grub_vbe_get_memory_window): Likewise.
15071         (grub_vbe_set_scanline_length): Likewise.
15072         (grub_vbe_get_scanline_length): Likewise.
15073         (grub_vbe_set_display_start): Likewise.
15074         (grub_vbe_get_display_start): Likewise.
15075         (grub_vbe_set_palette_data): Likewise.
15076         * include/grub/i386/pc/vbe.h: New file.
15078 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15080         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15081         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15082         * DISTLIST: Likewise.
15083         * kern/ieee1275/of.c: Moved to ...
15084         * kern/ieee1275/ieee1275.c: ... here.
15086 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15088         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15089         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15090         Pass 0 as `end' parameter to grub_strtoul().
15092 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15094         * include/grub/powerpc/ieee1275/console.h: Do not include
15095         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15096         ifdef.
15097         (grub_console_cur_color): Remove i386-specific prototype.
15098         (grub_console_real_putchar): Likewise.
15099         (grub_console_checkkey): Likewise.
15100         (grub_console_getkey): Likewise.
15101         (grub_console_getxy): Likewise.
15102         (grub_console_gotoxy): Likewise.
15103         (grub_console_cls): Likewise.
15104         (grub_console_setcursor): Likewise.
15105         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15106         Include <grub/machine/console.h>.
15107         * term/ieee1275/ofconsole.c: Likewise.
15109 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15111         * Makefile.in (LIBLZO): New variable.
15113         * configure.ac: Check for LZO version 2.
15115         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15116         lzo/lzo1x.h instead of lzo1x.h.
15118         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15119         of -llzo.
15121         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15122         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15124         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15125         copying the data from PARTITION to P.
15127 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15129         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15130         negative, unload the module.
15132         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15133         map is "pc_partition_map" but not "pc".
15134         (usage): Fix the description. The options are --boot-image and
15135         --core-image but not --boot-file or --core-file.
15136         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15137         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15138         DEFAULT_DIRECTORY.
15140         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15141         --core-file. Specify INSTALL_DEVICE as an argument.
15143         * util/console.c: Include config.h.
15144         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15145         [HAVE_NCURSES_H]: Include ncurses.h.
15146         [HAVE_CURSES_H]: Include curses.h.
15147         [!A_NORMAL] (A_NORMAL): Defined as zero.
15148         [!A_STANDOUT] (A_STANDOUT): Likewise.
15150         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15151         -lncurses.
15152         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15154         * configure.ac: Check for curses libraries and headers.
15156         * Makefile.in (LIBCURSES): New variable.
15158         * genmk.rb (Script::rule): Set the executable bits.
15160         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15161         name of the PC partition map is "pc_partition_map" but not "pc".
15163 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15165         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15166         (modules): Likewise.
15167         (usage): Added descriptions for --modules and --grub-probefs.
15168         Handle --modules and --grub-probefs. Save the arguments in MODULES
15169         and GRUB_PROBEFS, respectively.
15170         Auto-detect a filesystem module against GRUBDIR. If the result is
15171         empty and modules are not specified explicitly, abort the
15172         installation. Add the result to MODULES.
15174         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15175         disk/powerpc/ieee1275/ofdisk.c,
15176         include/grub/powerpc/ieee1275/init.h and
15177         term/powerpc/ieee1275/ofconsole.c.
15178         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15179         term/ieee1275/ofconsole.c.
15181         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15183         * COPYING: Upgraded to the latest version. Only the address of the
15184         FSF office has changed.
15186 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15188         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15189         kern/ieee1275.c with kern/ieee1275/of.c.
15191         * kern/ieee1275.c: Moved to ...
15192         * kern/ieee1275/of.c: ... here.
15194 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15196         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15197         readability.
15199         * config.guess: Updated to the latest version from gnulib.
15200         * config.sub: Likewise.
15201         * install.sh: Likewise.
15202         * mkinstalldirs: Likewise.
15204         * include/grub/console.h: Removed. This file is arch-specific. Do
15205         not put this in include/grub.
15207         * include/grub/i386/pc/console.h: Resurrected.
15209         * util/console.c: Include grub/machine/console.h instead of
15210         grub/console.h.
15211         * util/grub-emu.c: Likewise.
15213 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15215         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15216         hardcoded value.
15218         From Vincent Pelletier  <subdino2004@yahoo.fr>
15219         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15220         Redefined to use grub_getwh.
15221         (grub_term): New member named getwh.
15222         (grub_getwh): New prototype.
15223         * kern/term.c (grub_getwh): New function.
15224         * term/i386/pc/console.c (grub_console_getwh): New function.
15225         (grub_console_term): New member `getwh'.
15226         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15227         (grub_vga_term): New member `getwh'.
15228         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15229         grub_ssize_t.
15230         (grub_ofconsole_getw): New function.
15231         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15232         (grub_ofconsole_term): New field named getwh and new initial
15233         value.
15235 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15237         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15238         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15239         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15240         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15241         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15242         of <grub/machine/ieee1275.h>.
15243         * commands/ieee1275/reboot.c: Likewise.
15244         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15245         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15246         parameter structs to use new type `grub_ieee1275_cell_t'.
15247         * term/powerpc/ieee1275/ofconsole.c: Move ...
15248         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15249         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15250         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15251         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15252         to return int.
15253         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15254         Remove unused prototypes.  All users updated.
15255         * include/grub/powerpc/ieee1275/console.h: Removed.
15256         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15257         `grub_ieee1275_cell_t'.
15258         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15259         Cast comparisons with -1 to the correct type.
15260         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15261         type to match `grub_ieee1275_entry_fn'.
15263 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15265         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15267         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15268         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15269         partmap/sun.c.
15270         (grub_probefs_SOURCES): New variable.
15272         * util/i386/pc/grub-probefs.c: New file.
15274         * util/i386/pc/grub-setup.c (main): Call
15275         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15276         grub_hfs_init and grub_jfs_init to initialize the system. Call
15277         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15278         grub_pc_partition_map_fini to finish the system.
15280 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15282         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15283         function.
15284         (grub_multiboot_load_elf32): Likewise.
15285         (grub_multiboot_is_elf64): Likewise.
15286         (grub_multiboot_load_elf64): Likewise.
15287         (grub_multiboot_load_elf): Likewise.
15288         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15289         an ELF32 or ELF64 file.
15290         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15292         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15293         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15294         NULL before calling FS->LABEL.
15295         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15296         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15297         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15298         before calling FS->LABEL.
15300 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15302         * util/i386/pc/grub-install.in (datadir): New variable.
15303         (libdir): Removed.
15304         (pkgdatadir): New variable.
15305         (pkglibdir): Removed.
15307 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15309         * DISTLIST: Added util/i386/pc/grub-install.in.
15311         * util/i386/pc/grub-install.in: New file.
15313         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15314         (grub_install_SOURCES): Likewise.
15316         * genmk.rb: Added support for scripts.
15317         (Script): New class.
15318         (scripts): New variable.
15320         * Makefile.in (install-local): Install sbin_SCRIPTS by
15321         INSTALL_SCRIPT.
15322         (uninstall): Remove sbin_SCRIPTS.
15324         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15325         device, try to get a GRUB device by
15326         grub_util_biosdisk_get_grub_dev.
15327         Free DEST_DEV.
15329         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15330         description for --device-map.
15332 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15334         Change the semantics of variable hooks. They now return strings
15335         instead of error values.
15337         * util/i386/pc/grub-setup.c: Include grub/env.h.
15338         (setup): Use grub_device_set_root instead of grub_env_set.
15340         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15341         grub_env_get instead of grub_device_set_root and
15342         grub_device_get_root, respectively.
15344         * kern/main.c (grub_env_write_root): New function.
15345         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15346         grub_env_set instead of grub_device_set_root.
15348         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15349         many variables.
15350         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15351         rather than calling ENV->WRITE_HOOK afterwards.
15352         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15353         passing a pointer of a pointer.
15354         (grub_register_variable_hook): Change the types of "read_hook" and
15355         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15356         respectively.
15357         Allocate the default empty string on the heap, because this string
15358         may be freed later.
15360         * kern/device.c: Include grub/env.h.
15361         (grub_device_set_root): Removed.
15362         (grub_device_get_root): Likewise.
15363         (grub_device_open): Use grub_env_get instead of
15364         grub_device_get_root.
15366         * include/grub/env.h (grub_env_read_hook_t): New type.
15367         (grub_env_write_hook_t): Likewise.
15368         (grub_env_var): Change the types of "read_hook" and "write_hook"
15369         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15370         (grub_register_variable_hook): Likewise.
15372         * include/grub/device.h (grub_device_set_root): Removed.
15373         (grub_device_set_root): Likewise.
15375         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15376         make sure that DIRNAME terminates with '/', so that
15377         grub_fat_find_dir will fail if PATH is not a directory.
15379         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15380         from DIRNAME.
15381         Use the qualifier auto for print_files and print_files_long.
15382         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15383         as a regular file.
15384         Put a newline only if there is no error.
15385         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15386         used.
15388 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15390         * kern/partition.c (grub_partition_probe): Initialize PART to
15391         NULL. Otherwise, when no partition map is registered, this returns
15392         a garbage.
15394 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15396         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15397         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15398         valid.
15400 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15402         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15403         information on each device, if it does not have partitions. Print
15404         "Device" instead of "Disk", because this function is not specific
15405         to disk devices.
15407         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15408         static to ensure that it is put on the memory rather than a
15409         register.
15411 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15413         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15414         (grub_cat_init): Likewise.
15415         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15416         (options): Likewise.
15417         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15418         (grub_configfile_init): Likewise.
15419         * font/manager.c (GRUB_MOD_INIT): Likewise.
15420         * commands/help.c (GRUB_MOD_INIT): Likewise.
15421         (grub_help_init): Likewise.
15422         * normal/command.c (grub_command_init): Likewise.
15423         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15424         * disk/loopback.c (grub_loop_init): Likewise.
15425         (GRUB_MOD_INIT): Likewise.
15426         * commands/ls.c (grub_ls_init): Likewise.
15427         (GRUB_MOD_INIT): Likewise.
15428         (options): Likewise.
15429         * commands/boot.c (grub_boot_init): Likewise.
15430         (GRUB_MOD_INIT): Likewise.
15431         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15432         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15433         (GRUB_MOD_INIT): Likewise.
15434         * commands/cmp.c (grub_cmp_init): Likewise.
15435         (GRUB_MOD_INIT): Likewise.
15437         * normal/arg.c: Use <> instead of "" to include header files.
15438         (SHORT_ARG_HELP): New macro.
15439         (SHORT_ARG_USAGE): Likewise.
15440         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15441         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15442         descriptions.
15443         (find_short): Check if C is 'h' or 'u' explicitly.
15444         (grub_arg_show_help): Use space characters instead of tabs. Treat
15445         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15446         are shown with --help and --usage only if they are not used for
15447         the command itself.
15448         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15449         'h' and 'u'.
15451         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15452         const into "longarg". Change the type of "shortarg" to int.
15454 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15456         * boot/i386/pc/boot.S (boot_drive_check): New label.
15458         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15459         macro.
15461         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15462         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15464 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15466         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15467         When turning off Gate A20, skip the check and return immediately,
15468         because this is not fatal usually.
15470 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15472         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15473         be 0x7C00 instead of 0x8000.
15475         * boot/i386/pc/pxeboot.S: Rewritten.
15477         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15478         EXT_C.
15479         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15480         result.
15482 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15484         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15485         robustness. This routine now supports a BIOS call and System
15486         Control Port A to modify the gate A20.
15488         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15489         Increased to 0x440.
15491 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15493         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15494         device path and resulting ihandle.
15495         (grub_ofdisk_close): dprintf the ihandle being closed.
15496         (grub_ofdisk_read): dprintf function parameters.
15497         * kern/mm.c (grub_mm_init_region): Likewise.
15498         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15499         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15500         size, and boot arguments.
15501         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15502         before loading into memory.
15503         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15504         before loading into memory.
15506 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15508         * kern/mm.c: Added much documentation.
15509         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15510         8, set to 5 instead of 8.
15512 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15514         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15516         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15517         (grub_mkdevicemap_SOURCES): New variable.
15519         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15520         lib/device.c of GRUB Legacy.
15522 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15524         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15525         instead of PATH is NULL.
15527 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15529         * commands/cmp.c (BUFFER_SIZE): New macro.
15530         (grub_cmd_cmp): Close the right file at the right time.  Compare
15531         only data just read.  Don't report files of different  size as
15532         identical.  Dynamically allocate buffers.  Move variable
15533         declarations at the beginning of function.
15535 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15537         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15538         reverse.
15540 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15542         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15543         when backspace is pressed at beginning of line.
15545 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15547         * DISTLIST: Added genfslist.sh.
15549         * normal/main.c (fs_module_list): New variable.
15550         (autoload_fs_module): New function.
15551         (read_fs_list): Likewise.
15552         (grub_normal_execute): Call read_fs_list.
15554         * kern/fs.c (grub_fs_autoload_hook): New variable.
15555         (grub_fs_probe): Added support for auto-loading.
15557         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15558         (grub_fs_module_list_t): New type.
15560         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15561         (grub_fs_autoload_hook): New prototype.
15563         * genfslist.sh: New file.
15565         * genmk.rb: Added a rule to generate a filesystem list.
15567 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15569         * configure.ac: Fix the test for cross-compiling.
15571         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15572         define GRUB_UTIL anymore.
15574         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15575         so this function works on other systems than just big endian.
15576         (load_modules): Likewise.
15577         (add_segments): Likewise.
15579 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15581         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15582         contains `l' modifier, get a long from va_arg().
15584 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15586         * kern/mm.c (grub_free): If the next free block which is being
15587         merged is the first free block, set the first block to the block
15588         being freed.
15589         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15591 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15593         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15594         `grub_ieee1275_chosen'.
15596 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15598         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15599         (grub_ieee1275_chosen): New variable.
15600         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15601         `chosen'.
15602         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15603         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15604         Rename first argument to `phandle' for consistency.
15605         (grub_ieee1275_get_property_length): Likewise.
15606         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15607         to grub_ieee1275_phandle_t.
15608         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15609         Move export next to declaration.
15610         (grub_ieee1275_chosen): New variable.
15611         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15612         Correct cosmetic typo.
15613         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15614         `grub_ieee1275_chosen'.
15615         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15616         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15617         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15618         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15619         `grub_ieee1275_chosen'.
15621 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15623         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15624         /chosen/bootargs.
15625         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15626         /chosen/bootargs as "variable=value" pairs.
15628 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15630         * include/grub/misc.h (grub_dprintf): New macro.
15631         (grub_real_dprintf): New prototype.
15632         (grub_strword): Likewise.
15633         (grub_iswordseparator): Likewise.
15634         * kern/misc.c (grub_real_dprintf): New function.
15635         (grub_strword): Likewise.
15636         (grub_iswordseparator): Likewise.
15638 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15640         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15641         (roundup): Remove macro.
15642         (grub_ieee1275_flags): Make static.
15643         (grub_ieee1275_realmode): Remove.
15644         (grub_ieee1275_test_flag): New function.
15645         (grub_ieee1275_set_flag): Likewise.
15646         (find_options): Rename to `grub_ieee1275_find_options'; update
15647         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15648         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15649         (cmain): New prototype.
15650         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15651         `grub_ieee1275_flags' directly.
15652         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15653         machine/biosdisk.h.
15654         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15655         Don't include grub/machine/init.h.
15656         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15657         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15658         Remove prototype.
15659         (grub_ieee1275_realmode): Likewise.
15660         (grub_ieee1275_flag): New enum.
15661         (grub_ieee1275_test_flag): New prototype.
15662         (grub_ieee1275_set_flag): New prototype.
15663         * include/grub/powerpc/ieee1275/init.h: Remove file.
15664         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15665         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15666         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15667         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15668         comment.
15669         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15670         `grub_ieee1275_test_flag'.
15671         (grub_ieee1275_encode_devname): Likewise.
15673 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15675         * include/grub/powerpc/ieee1275/ieee1275.h
15676         (grub_ieee1275_encode_devname): New prototype.
15677         (grub_ieee1275_get_filename): Likewise.
15678         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15679         function.
15680         (grub_set_prefix): Likewise.
15681         (grub_machine_init): Call grub_set_prefix.
15682         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15683         (grub_parse_type): New enum.
15684         (grub_ieee1275_get_devargs): New function.
15685         (grub_ieee1275_get_devname): Likewise.
15686         (grub_ieee1275_parse_args): Likewise.
15687         (grub_ieee1275_get_filename): Likewise.
15688         (grub_ieee1275_encode_devname): Likewise.
15690 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15692         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15693         `grub_loader_unset'.
15695 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15697         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15698         instead of grub_ieee1275_interpret.
15699         (grub_halt_init): New function.
15700         (grub_halt_fini): Likewise.
15701         (GRUB_MOD_INIT): Correct message grammar.
15702         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15703         instead of grub_ieee1275_interpret.
15704         (grub_reboot_init): New function.
15705         (grub_reboot_fini): Likewise.
15706         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15707         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15708         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15709         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15710         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15711         function.
15712         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15713         Add prototype.
15714         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15715         prototype.
15716         (grub_halt): Likewise.
15717         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15718         (cmain): Remove __attribute__((unused)).
15719         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15720         (grub_heap_len): Likewise.
15721         (grub_machine_fini): New function.
15722         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15723         (grub_halt): Likewise.
15724         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15725         function.
15726         * util/powerpc/ieee1275/misc.c: New file.
15728 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15730         * DISTLIST: New file.
15731         * gendistlist.sh: Likewise.
15733         * Makefile.in (COMMON_DISTFILES): Removed.
15734         (BOOT_DISTFILES): Likewise.
15735         (CONF_DISTFILES): Likewise.
15736         (DISK_DISTFILES): Likewise.
15737         (FS_DISTFILES): Likewise.
15738         (INCLUDE_DISTFILES): Likewise.
15739         (KERN_DISTFILES): Likewise.
15740         (LOADER_DISTFILES): Likewise.
15741         (TERM_DISTFILES): Likewise.
15742         (UTIL_DISTFILES): Likewise.
15743         (DISTFILES): Likewise.
15744         (uninstall): Uninstall files in $(pkgdata_DATA).
15745         (DISTLIST): New target.
15746         (distdir): Use the contents of the file DISTLIST to get a list of
15747         distributed files.
15749 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15751         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15752         descriptor. This is ported from GRUB Legacy.
15754         * gencmdlist.sh: Added an extra semicolon to make it work with
15755         old sed versions. Reported by Robert Bihlmeyer
15756         <robbe@orcus.priv.at>.
15758 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15760         Automatic loading of commands is supported.
15762         * normal/main.c (read_command_list): New function.
15763         (grub_normal_execute): Call read_command_list.
15765         * normal/command.c (grub_register_command): Return zero or CMD.
15766         Allocate CMD->NAME from the heap.
15767         Initialize CMD->MODULE_NAME to zero.
15768         Find the same name as well. If the same command is found and it is
15769         a dummy command, overwrite members. If it is not a dummy command,
15770         return zero.
15771         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15772         (grub_command_find): If a dummy command is found, load a module
15773         and retry to find a command only once.
15775         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15776         make sure that each command is loaded.
15778         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15779         macro.
15780         (struct grub_command): Remove const from the member `name'.
15781         Add a new member `module_name'.
15782         (grub_register_command): Return grub_command_t.
15784         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15785         sure that each command is loaded.
15787         * genmk.rb (PModule::rule): Specify a module name without the
15788         suffix ".mod" to gencmdlist.sh.
15790 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15792         * gencmdlist.sh: New file.
15794         * genmk.rb (PModule::rule): Generate a rule for a command list.
15795         Clean command.lst.
15796         Generate command.lst from $(COMMANDFILES).
15798         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15799         (DATA): Added $(pkgdata_DATA).
15800         (install-local): Install files in $(pkgdata_DATA).
15802 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15804         * term/i386/pc/vga.c (debug_command): Removed.
15805         (GRUB_MOD_INIT): Do not register the command "debug".
15807         From Hollis Blanchard:
15808         * commands/configfile.c: New file.
15809         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15810         commands/configfile.c.
15811         (pkgdata_MODULES): Added configfile.mod.
15812         (configfile_mod_SOURCES): New variable.
15813         (configfile_mod_CFLAGS): Likewise.
15814         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15815         commands/configfile.c.
15816         (pkgdata_MODULES): Added configfile.mod.
15817         (configfile_mod_SOURCES): New variable.
15818         (configfile_mod_CFLAGS): Likewise.
15819         * util/grub-emu.c (main): Call grub_configfile_init and
15820         grub_configfile_fini.
15821         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15822         prototype.
15823         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15825 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15827         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15828         address.
15830         * commands/help.c (grub_cmd_help): Do not print newlines after
15831         the last command in print_command_help.
15833 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15835         * commands/default.h: New file.
15836         * commands/timeout.h: Likewise.
15837         * normal/context.c: Likewise.
15839         * util/misc.c: Do not include sys/times.h.
15840         Include sys/time.h and grub/machine/time.h.
15841         (grub_get_rtc): Rewritten with gettimeofday.
15843         * util/grub-emu.c (main): Call grub_default_init and
15844         grub_timeout_init before grub_normal_init, and call
15845         grub_timeout_fini and grub_default_fini after grub_main.
15847         * util/console.c (grub_ncurses_checkkey): Return the read
15848         character or -1.
15850         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15851         timeouts.
15853         * normal/main.c (read_config_file): Push MENU. If this fails,
15854         print an error and wait for a user input.
15855         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15856         If a menu is empty or an error occurs, pop MENU.
15857         (grub_normal_execute): Pop and free MENU after grub_menu_run
15858         returns.
15860         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15862         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15863         include time.h.
15864         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15865         without GRUB_UTIL.
15866         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15867         time.h.
15868         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15869         without GRUB_UTIL.
15871         * include/grub/normal.h (struct grub_menu_list): New struct.
15872         (grub_menu_list_t): New type.
15873         (struct grub_context): New struct.
15874         (grub_context_t): New type.
15875         (grub_register_command): Got rid of EXPORT_FUNC.
15876         (grub_unregister_command): Likewise.
15877         (grub_context_get): New prototype.
15878         (grub_context_get_current_menu): Likewise.
15879         (grub_context_push_menu): Likewise.
15880         (grub_context_pop_menu): Likewise.
15881         [GRUB_UTIL] (grub_default_init): Likewise.
15882         [GRUB_UTIL] (grub_default_fini): Likewise.
15883         [GRUB_UTIL] (grub_timeout_init): Likewise.
15884         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15886         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15887         commands/timeout.c and normal/context.c.
15888         (pkgdata_MODULES): Added default.mod and timeout.mod.
15889         (normal_mod_SOURCES): Added normal/context.c.
15890         (default_mod_SOURCES): New variable.
15891         (default_mod_CFLAGS): Likewise.
15892         (timeout_mod_SOURCES): Likewise.
15893         (timeout_mod_CFLAGS): Likewise.
15894         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15895         conf/i386-pc.rmk.
15896         (pkgdata_MODULES): Added default.mod and timeout.mod.
15897         (normal_mod_SOURCES): Added normal/context.c.
15898         (default_mod_SOURCES): New variable.
15899         (default_mod_CFLAGS): Likewise.
15900         (timeout_mod_SOURCES): Likewise.
15901         (timeout_mod_CFLAGS): Likewise.
15903         * Makefile.in (all-local): Added $(MKFILES).
15905 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15907         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15908         (grub_emu_SOURCES): Likewise.
15909         (pkgdata_MODULES): Add `sun.mod'.
15910         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15911         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15912         `partmap/sun.c'.
15913         (pkgdata_MODULES): Add `sun.mod'.
15914         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15915         * include/grub/partition.h (grub_sun_partition_map_init): New
15916         prototype.
15917         (grub_sun_partition_map_fini): Likewise.
15918         * partmap/sun.c: New file.
15919         * util/grub-emu.c (main): Initialize and de-initialize the sun
15920         partitionmap support.
15922 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15924         This implements an Emacs-like menu entry editor.
15926         * normal/menu_entry.c: New file.
15928         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15929         characters to ASCII.
15930         (saved_char): New variable.
15931         (grub_ncurses_checkkey): Rewritten completely.
15932         (grub_ncurses_getkey): Likewise.
15933         (grub_ncurses_init): Call raw instead of cbreak.
15935         * normal/menu.c (print_entry): Do not put a space.
15936         (init_page): Renamed to ...
15937         (grub_menu_init_page): ... this. All callers changed.
15938         (edit_menu_entry): Removed.
15939         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15941         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15943         * kern/misc.c (grub_vprintf): Call grub_refresh.
15945         * normal/menu.c (DISP_LEFT): Renamed to ...
15946         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15947         * normal/menu.c (DISP_UP): Renamed to ...
15948         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15949         * normal/menu.c (DISP_RIGHT): Renamed to ...
15950         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15951         * normal/menu.c (DISP_DOWN): Renamed to ...
15952         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15953         * normal/menu.c (DISP_HLINE): Renamed to ...
15954         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15955         * normal/menu.c (DISP_VLINE): Renamed to ...
15956         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15957         * normal/menu.c (DISP_UL): Renamed to ...
15958         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15959         * normal/menu.c (DISP_UR): Renamed to ...
15960         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15961         * normal/menu.c (DISP_LL): Renamed to ...
15962         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15963         * normal/menu.c (DISP_LR): Renamed to ...
15964         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15965         * normal/menu.c (TERM_WIDTH): Renamed to ...
15966         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15967         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15968         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15969         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15970         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15971         * normal/menu.c (TERM_MARGIN): Renamed to ...
15972         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15973         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15974         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15975         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15976         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15977         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15978         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15979         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15980         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15981         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15982         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15983         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15984         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15985         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15986         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15987         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15988         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15989         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15990         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15991         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15992         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15993         All callers changed.
15995         * include/grub/normal.h: New prototype.
15997         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15998         normal/menu_entry.c.
15999         (normal_mod_SOURCES): Likewise.
16000         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16001         (normal_mod_SOURCES): Likewise.
16003 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16005         * include/grub/normal.h (grub_halt_init): New prototype.
16006         (grub_halt_fini): Likewise.
16007         (grub_reboot_init): Likewise.
16008         (grub_reboot_fini): Likewise.
16010         * util/grub-emu.c: Include signal.h.
16011         (main_env): New global variable.
16012         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16013         catch C-c.
16014         (grub_machine_fini): New function.
16015         (main): Call grub_halt_init and grub_reboot_init before
16016         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16017         Call setjmp with MAIN_ENV to go back afterwards.
16018         Call grub_machine_fini right before return.
16020         * include/grub/util/misc.h: Include setjmp.h.
16021         (main_env): New prototype.
16023         * include/grub/kernel.h (grub_machine_fini): New prototype.
16024         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16025         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16027         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16028         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16029         * term/i386/pc/console.c (grub_console_fini): Likewise.
16031         * util/i386/pc/misc.c: New file.
16033         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16034         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16035         commands/i386/pc/reboot.c.
16037 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16039         * include/grub/dl.h (grub_dl_check_header): New prototype.
16040         (grub_arch_dl_check_header): Change return type to grub_err_t,
16041         remove size parameter and export function.  Update all callers.
16042         * kern/dl.c (grub_dl_check_header): New function.
16043         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16044         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16045         are inside the core.
16046         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16047         independent ELF header checks.
16048         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16049         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16050         `grub_dl_check_header' instead of explicit checks.  Check for the
16051         ELF type.
16052         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16053         `grub_dl_check_header' instead of explicit checks.  Remove arch
16054         specific ELF header checks.
16056         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16057         argument SIZE.
16059 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16061         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16062         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16064 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16066         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16067         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16068         (part_map_iterate): Clear `grub_errno' and return 0 if
16069         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16070         * partmap/amiga.c (amiga_partition_map_iterate): Return
16071         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16072         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16074 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16076         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16077         help info.
16079 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16081         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16082         Removed prototype.
16083         (grub_rescue_cmd_linux): New prototype.
16084         (grub_rescue_cmd_initrd): Likewise.
16085         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16086         `bi_rec'.
16087         (grub_linux_release_mem): Release the memory for the initrd.
16088         (grub_load_linux): Renamed from this...
16089         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16090         Changed `entry' not to be static.  Loop over memory regions to
16091         find another one when the default fails.
16092         (grub_rescue_cmd_initrd): New function.
16093         (grub_linux_init): Remove function.
16094         (grub_linux_fini): Likewise.
16095         (GRUB_MOD_INIT): Register `initrd'.
16096         (GRUB_MOD_FINI): Unregister `initrd'.
16097         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16098         Function removed.
16099         (grub_linux_normal_fini): Likewise.
16100         (GRUB_MOD_INIT): Register `initrd'.
16101         (GRUB_MOD_FINI): Unregister `initrd'.
16103 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16105         * commands/help.c: New file.
16106         * normal/arg.c (show_help): Renamed to...
16107         (grub_arg_show_help): ... this.
16108         * commands/i386/pc/halt.c: New file.
16109         * commands/i386/pc/reboot.c: Likewise.
16110         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16111         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16112         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16113         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16114         variables.
16115         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16116         `commands/help.c'.
16117         (pkgdata_MODULES): Add `help.mod'.
16118         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16119         * grub/i386/pc/init.h (grub_reboot): New prototype.
16120         (grub_halt): Likewise.
16121         * include/grub/normal.h (grub_arg_show_help): New prototype.
16122         (grub_help_init): Likewise.
16123         (grub_help_fini): Likewise.
16124         * util/grub-emu.c (main): Initialize and deinitialize the help
16125         command.
16127         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16129         * normal/command.c (grub_command_init): Fixed the description of
16130         the `set' and `unset' commands.
16132 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16134         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16135         function.
16136         * commands/ieee1275/halt.c: New file.
16137         * commands/ieee1275/reboot.c: Likewise.
16138         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16139         `__attribute__ ((unused))'.  Some GCS related fixed.
16140         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16141         (grub_suspend_fini): Likewise.
16142         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16143         and `halt.mod'.
16144         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16145         (halt_mod_CFLAGS): New variables.
16146         * include/grub/powerpc/ieee1275/ieee1275.h
16147         (grub_ieee1275_interpret): New prototype.
16149 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16151         * include/grub/misc.h (memmove): New prototype.
16152         (memcpy): Likewise.
16154 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16156         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16157         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16159 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16161         * kern/misc.c (grub_strndup): Function rewritten.
16163 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16165         * normal/menu.c (TERM_WIDTH): Macro redefined.
16166         (TERM_TOP_BORDER_Y): Likewise.
16167         (draw_border): Replaced while-loop by a for-loop.  Make the number
16168         of lines consistent with the number of lines displayed in
16169         print_entries.  Added a margin below the rectangle.
16170         (print_entry): Make the entry fit in the rectangle.
16171         (print_entries): Display the scroll arrows next to the right
16172         border.
16174 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16176         * fs/minix.c (grub_minix_find_file): Reserve more space for
16177         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16178         `grub_strncpy' to copy `path' into it.
16180 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16182         Add the loopback device, a device via which files can be accessed
16183         as devices.
16185         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16186         (pkgdata_MODULES): Add loopback.mod.
16187         (loopback_mod_SOURCES): New variable.
16188         (loopback_mod_CFLAGS): Likewise.
16189         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16190         `disk/loopback.c'.
16191         (pkgdata_MODULES): Add loopback.mod.
16192         (loopback_mod_SOURCES): New variable.
16193         (loopback_mod_CFLAGS): Likewise.
16194         * disk/loopback.c: new file.
16195         * include/grub/normal.h (grub_loop_init): New prototype.
16196         (grub_loop_fini): New prototype.
16197         * util/grub-emu.c (main): Initialize and de-initialize loopback
16198         support.
16199         * include/grub/disk.h (grub_disk_dev_id): Add
16200         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16202 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16204         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16205         function.
16206         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16207         (suspend_mod_SOURCES): New variable.
16208         (suspend_mod_CFLAGS): Likewise.
16209         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16210         New prototype.
16211         * commands/ieee1275/suspend.c: New file.
16213 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16215         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16216         ((unused))' to `__attribute__ ((used))'.
16217         (GRUB_MOD_FINI): Likewise.
16218         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16219         * genmk.rb (PModule): Assign space to common symbols when linking
16220         modules.
16222 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16224         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16225         `unsigned' arguments to `grub_size_t'.
16226         (grub_malloc): Likewise.
16227         (grub_realloc): Likewise.
16228         (grub_memalign): Likewise.
16229         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16230         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16231         * util/misc.c (grub_malloc): Likewise.
16232         (grub_realloc): Likewise.
16233         * kern/mm.c (get_header_from_pointer): Change the casts to
16234         `unsigned' into a cast to `grub_size_t'.
16236         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16237         point to `currnode' when `currnode' is changed.
16239         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16240         Schottelius <nico-linux@schottelius.org>.
16242 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16244         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16245         (note_path): Remove variable.
16246         (GRUB_IEEE1275_NOTE_NAME): New macro.
16247         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16248         (grub_ieee1275_note_hdr): New structure.
16249         (grub_ieee1275_note_desc): Likewise.
16250         (grub_ieee1275_note): Likewise.
16251         (load_note): Remove `dir' argument.  All callers updated.  Remove
16252         `note_img' and `path'.  Do not load a file from `note_path'.
16253         Initialize a struct grub_ieee1275_note and write that to `out'.
16254         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16256 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16258         * util/misc.c (grub_util_read_image): Revert last change.  It
16259         called `grub_util_read_at', which seeks from the beginning of the
16260         file.
16262 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16264         * TODO: Add note about endianness in grub-mkimage.
16265         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16266         section.
16267         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16268         (grub_mkimage_SOURCES): New target.
16269         * include/grub/kernel.h (grub_start_addr): Remove variable.
16270         (grub_end_addr): Likewise.
16271         (grub_total_module_size): Likewise.
16272         (grub_kernel_image_size): Likewise.
16273         (GRUB_MODULE_MAGIC): New constant.
16274         (grub_module_info): New structure.
16275         (grub_arch_modules_addr): New prototype.
16276         (grub_get_end_addr): Remove prototype.
16277         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16278         * include/grub/powerpc/ieee1275/kernel.h: New file.
16279         * include/grub/util/misc.h (grub_util_get_fp_size): New
16280         prototype.
16281         (grub_util_read_at): Likewise.
16282         (grub_util_write_image_at): Likewise.
16283         * kern/main.c (grub_get_end_addr): Remove function.
16284         (grub_load_modules): Call grub_arch_modules_addr instead of using
16285         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16286         the grub_module_info fields instead of calling grub_get_end_addr
16287         as loop conditions.  Move grub_add_unused_region code here.
16288         (grub_add_unused_region): Remove function.
16289         * kern/i386/pc/init.c: Include grub/cache.h.
16290         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16291         one call to add_mem_region.
16292         (grub_arch_modules_addr): New function.
16293         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16294         (grub_total_module_size): Likewise.
16295         Include grub/machine/kernel.h.
16296         (grub_arch_modules_addr): New function.
16297         * util/grub-emu.c (grub_end_addr): Remove variable.
16298         (grub_total_module_size): Likewise.
16299         (grub_arch_modules_addr): New function.
16300         * util/misc.c: Include unistd.h.
16301         (grub_util_get_fp_size): New function.
16302         (grub_util_read_at): Likewise.
16303         (grub_util_write_image_at): Likewise.
16304         (grub_util_read_image): Call grub_util_read_at.
16305         (grub_util_write_image): Call grub_util_write_image_at.
16306         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16307         additional memory in kernel_img for a struct grub_module_info.
16308         Fill in that grub_module_info.
16309         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16311 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16313         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16314         New function.
16315         * include/grub/powerpc/ieee1275/ieee1275.h
16316         (grub_ieee1275_milliseconds): New prototype.
16317         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16318         Change to 1000.
16319         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16320         grub_ieee1275_milliseconds.
16322 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16324         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16325         variable.
16326         (find_options): New function.
16327         (cmain): Call find_options.
16328         * include/grub/powerpc/ieee1275/ieee1275.h
16329         (grub_ieee1275_realmode): New extern variable.
16330         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16331         grub_map if grub_ieee1275_realmode is false.
16333 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16335         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16336         lines are inserted and make it work like readline.  Reported by
16337         Vincent Pelletier <subdino2004@yahoo.fr>.
16339 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16341         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16343         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16344         `kern/powerpc/cache.S'.
16346 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16348         * genmk.rb: Handle the `Program' class in the main loop.  Written
16349         by Johan Rydberg <jrydberg@gnu.org>.
16350         (Program): New class.
16351         (programs): New variable.
16352         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16353         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16354         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16355         (help_arch): Function removed.
16356         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16357         `powerpc/libgcc.h' and `loader.h'.
16358         (pkgdata_PROGRAMS): New variable.
16359         (sbin_UTILITIES): Variable removed.
16360         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16361         (grubof_SOURCES): Variable re-defined so it only includes the
16362         core functionality.
16363         (grubof_CFLAGS): Remove `-DGRUBOF'.
16364         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16365         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16366         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16367         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16368         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16369         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16370         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16371         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16372         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16373         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16374         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16375         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16376         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16377         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16378         (pc_mod_CFLAGS): New variables.
16379         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16380         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16381         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16382         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16383         Moved from here...
16384         * include/grub/i386/pc/init.h (grub_os_area_addr)
16385         (rub_os_area_size): ... to here.
16386         * include/grub/powerpc/ieee1275/ieee1275.h
16387         (grub_ieee1275_entry_fn): Export symbol.
16388         * include/grub/powerpc/ieee1275/init.h: New file.
16389         * include/grub/powerpc/libgcc.h: Likewise.
16390         * include/grub/cache.h: Likewise.
16391         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16392         <hollis@penguinppc.org>.
16393         * kern/dl.c: Include <grub/cache.h>.
16394         (grub_dl_flush_cache): New function.
16395         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16396         for this module.
16397         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16398         (grub_console_init): Removed prototypes.
16399         (grub_machine_init): Don't initialize the modules anymore.
16400         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16401         static.
16402         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16403         Macro undef removed.
16404         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16405         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16406         relocation `R_PPC_REL32'.  Return an error when the relocation is
16407         unknown.
16408         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16409         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16410         * util/misc.c (grub_arch_sync_caches): Likewise.
16412 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16414         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16415         `symlist.c', add `grubof_symlist.c'.
16416         (symlist.c): Variable removed.
16417         (grubof_HEADERS): Variable added.
16418         (grubof_symlist.c): New target.
16419         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16420         `kernel_img_HEADERS'.
16421         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16422         * kern/powerpc/dl.c: New file.
16423         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16424         Function removed.
16425         (grub_arch_dl_relocate_symbols): Likewise.
16426         (grub_register_exported_symbols): Likewise.
16428 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16430         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16431         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16432         to fail instead.  Reported by Vincent Pelletier
16433         <subdino2004@yahoo.fr>.
16435         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16436         it is not allocated.  Reported by Vincent Pelletier
16437         <subdino2004@yahoo.fr>.
16439         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16440         output so the output looks better.
16442 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16444         Modulize the partition map support and add support for the amiga
16445         partition map.
16447         * commands/ls.c: Include <grub/partition.h> instead of
16448         <grub/machine/partition.h>.
16449         * kern/disk.c: Likewise.
16450         * kern/rescue.c: Likewise.
16451         * loader/i386/pc/chainloader.c: Likewise.
16452         * normal/cmdline.c: Likewise.
16453         * kern/powerpc/ieee1275/init.c: Likewise.
16454         (grub_machine_init): Call `grub_pc_partition_map_init',
16455         `grub_amiga_partition_map_init' and
16456         `grub_apple_partition_map_init'.
16457         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16458         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16459         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16460         `partition.h' and `pc_partition.h'.
16461         (grub_setup_SOURCES): Remove
16462         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16463         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16464         (grub_emu_SOURCES): Likewise.
16465         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16466         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16467         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16468         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16469         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16470         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16471         (grubof_SOURCES): Likewise.
16472         * disk/i386/pc/partition.c: File removed.
16473         * disk/powerpc/ieee1275/partition.c: Likewise.
16474         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16475         * include/grub/i386/pc/partition.h: Likewise.
16476         * kern/partition.c: New file.
16477         * partmap/amiga.c: Likewise.
16478         * partmap/apple.c: Likewise.
16479         * partmap/pc.c: Likewise.
16480         * include/grub/partition.h: Likewise..
16481         * include/grub/pc_partition.h: Likewise.
16482         * util/grub-emu.c: Include <grub/partition.h> instead of
16483         <grub/machine/partition.h>.
16484         (main): Call `grub_pc_partition_map_init',
16485         `grub_amiga_partition_map_init' and
16486         `grub_apple_partition_map_init' and deinitialize afterwards.
16487         * util/i386/pc/biosdisk.c: Include `#include
16488         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16489         `<grub/machine/partition.h>'.
16490         * util/i386/pc/grub-setup.c: Likewise.
16491         * util/i386/pc/biosdisk.c: Likewise.
16492         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16493         partition information in case of a PC partition.
16494         * util/i386/pc/grub-setup.c: Include `#include
16495         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16496         `<grub/machine/partition.h>'.
16497         (setup): Only access the PC specific partition information in case
16498         of a PC partition.
16500 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16502         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16503         (grub_longjmp): Likewise.
16504         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16505         20.
16506         * normal/powerpc/setjmp.S: New file.
16507         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16508         `normal/powerpc/setjmp.S'.
16509         (grubof_CFLAGS): Add `-DGRUBOF'.
16510         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16511         [GRUB_UTIL && !GRUBOF].
16513 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16515         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16516         property named `name'.  Correctly handle the error returned by
16517         `grub_ieee1275_finddevice' if a device can not be opened.
16519 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16521         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16522         `actual' for negativity.
16523         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16524         kern/fshelp.c.
16526 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16528         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16529         (PAGE_OFFSET): New macro.
16530         (CRTC_ADDR_PORT): Likewise.
16531         (CRTC_DATA_PORT): Likewise.
16532         (START_ADDR_HIGH_REGISTER): Likewise.
16533         (START_ADDR_LOW_REGISTER): Likewise.
16534         (GRAPHICS_ADDR_PORT): Likewise.
16535         (GRAPHICS_DATA_PORT): Likewise.
16536         (READ_MAP_REGISTER): Likewise.
16537         (INPUT_STATUS1_REGISTER): Likewise.
16538         (INPUT_STATUS1_VERTR_BIT): Likewise.
16539         (page): New variable.
16540         (wait_vretrace): New function.
16541         (set_read_map): Likewise.
16542         (set_start_address): Likewise.
16543         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16544         the right page.
16545         (check_vga_mem): Take the page into account.
16546         (write_char): Likewise.
16547         (write_cursor): Likewise.
16548         (scroll_up): Likewise.  Copy the page to the page that is not
16549         shown and switch between both pages.
16550         (grub_vga_putchar): Fix off by one error.
16551         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16552         account.
16554 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16556         Add support for iso9660 (including rockridge).
16558         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16559         (iso9660_mod_SOURCES): New variable.
16560         (iso9660_mod_CFLAGS): Likewise.
16561         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16562         * include/grub/fs.h (grub_iso9660_init): New prototype.
16563         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16564         * fs/iso9660.c: New file.
16566         * include/grub/misc.h (grub_strncat): New prototype.
16567         * kern/misc.c (grub_strncat): New function.
16569         * fs/hfs.c (grub_hfs_mount): Translate the error
16570         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16571         * fs/jfs.c (grub_jfs_mount): Likewise.
16572         * fs/ufs.c (grub_ufs_mount): Likewise.
16574 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16576         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16577         which initialized BAT registers.
16578         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16579         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16580         Move from here...
16581         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16582         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16583         ... to here.
16584         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16585         (grub_mapclaim): Likewise.
16586         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16587         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16588         hand.
16590 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16592         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16593         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16594         -ffreestanding and -msoft-float.
16596 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16598         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16599         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16600         set in grub_ieee1275_flags.
16602 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16604         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16605         prototype.
16606         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16607         grub_console_init first.
16608         Change the memory range used for grub_ieee1275_claim and
16609         grub_mm_init_region.
16610         Print an error message if the claim fails.
16611         Include <grub/misc.h>.
16613 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16615         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16616         Call grub_children_iterate for device nodes of type `scsi',
16617         `ide', or `ata'.
16618         (grub_ofdisk_open): Remove manual device alias resolution.
16619         Fix memory leak when device cannot be opened.
16620         * include/grub/powerpc/ieee1275/ieee1275.h
16621         (grub_children_iterate): New prototype.
16622         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16623         New function.
16624         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16625         Return -1 if args.size was -1.
16627 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16629         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16630         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16631         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16632         Open Firmware's memory for it; claim memory from _start to _end.
16633         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16634         (_end): New extern.
16635         (_start): Zero BSS from __bss_start to _end.
16636         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16637         New extern.
16638         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16640 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16642         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16643         -1 if args.base was -1.
16645 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16647         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16648         escape sequence instead of a literal ^L. Also call
16649         grub_ofconsole_gotoxy.
16651 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16653         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16654         void *  arguments to grub_addr_t.  All callers updated.  Also make
16655         the `result' argument optional.
16656         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16657         All callers updated.
16659 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16661         * commands/ls.c (grub_ls_list_files): Use the string following the
16662         initial ')', if present, as the filesystem path.
16663         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16665         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16667 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16669         Make the source code of the menu interface more readable.
16671         * normal/menu.c: Include grub/mm.h.
16672         (TERM_WIDTH): New macro.
16673         (TERM_HEIGHT): Likewise.
16674         (TERM_INFO_HEIGHT): Likewise.
16675         (TERM_MARGIN): Likewise.
16676         (TERM_SCROLL_WIDTH): Likewise.
16677         (TERM_TOP_BORDER_Y): Likewise.
16678         (TERM_LEFT_BORDER_X): Likewise.
16679         (TERM_BORDER_WIDTH): Likewise.
16680         (TERM_MESSAGE_HEIGHT): Likewise.
16681         (TERM_BORDER_HEIGHT): Likewise.
16682         (TERM_NUM_ENTRIES): Likewise.
16683         (TERM_FIRST_ENTRY_Y): Likewise.
16684         (TERM_ENTRY_WIDTH): Likewise.
16685         (TERM_CURSOR_X): Likewise.
16686         (draw_border): Use macros instead of magic numbers.
16687         (print_entry): Likewise.
16688         (print_entries): Likewise.
16689         (run_menu): Likewise. Also, handle the key 'e'.
16690         (run_menu_entry): Ignore empty command lines.
16691         (print_message): Added a new argument EDIT. If EDIT is true,
16692         print a different message.
16693         (init_page): Likewise.
16694         (edit_menu_entry): New function. Not implemented yet.
16696 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16698         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16699         can be loaded from normal mode.
16701         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16702         `multiboot.mod'.
16703         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16704         (multiboot_mod_CFLAGS): New variables.
16705         * loader/i386/pc/linux_normal.c: New file.
16706         * loader/i386/pc/multiboot_normal.c: Likewise.
16708         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16709         attribute `unused'.
16711         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16712         `fdiro' to read the mode information from instead of `diro'.
16714         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16715         looking up a symlink.
16717         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16718         macro.
16719         * normal/command.c (grub_command_execute): Don't parse the
16720         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16721         flags of the command.
16723         * normal/menu.c (grub_menu_run): Fix typo.
16725 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16727         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16729         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16730         `y + 1' instead of `y - 1'.
16732         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16734 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16736         From Hollis Blanchard <hollis@penguinppc.org>:
16737         * kern/misc.c (memmove): New alias for grub_memmove.
16738         (memcmp): New alias for grub_memcmp.
16739         (memset): New alias for grub_memset.
16740         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16741         Change "int handle" to "grub_ieee1275_phandle_t handle".
16742         * include/grub/powerpc/ieee1275/ieee1275.h
16743         (grub_ieee1275_get_property): Likewise.
16745 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16747         Added normal mode command `chainloader' as module chain.mod, which
16748         depends on normal.mod and _chain.mod.
16750         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16751         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16752         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16753         Deleted prototype.
16754         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16755         but arguments parsing moved to ...
16756         (grub_chainloader_cmd): ... here.  New function.
16757         * include/grub/i386/pc/chainloader.h: New file.
16758         * loader/i386/pc/chainloader_normal.c: Likewise.
16760 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16762         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16763         (grub_mkimage_LDFLAGS): Likewise.
16764         (grub_emu_SOURCES): Likewise.
16765         (kernel_img_HEADERS): Added fshelp.h.
16766         * fs/ext2.c: Include <grub/fshelp.h>.
16767         (FILETYPE_REG): New macro.
16768         (FILETYPE_INO_REG): Likewise.
16769         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16770         Changed all users.
16771         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16772         all users.
16773         (grub_fshelp_node): New struct.
16774         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16775         to a pointer.
16776         (grub_ext2_get_file_block): Removed function.
16777         (grub_ext2_read_block): New function.
16778         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16779         This function was written.
16780         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16781         (grub_ext2_find_file): Removed function.
16782         (grub_ext2_read_symlink): New function.
16783         (grub_ext2_iterate_dir): Likewise.
16784         (grub_ext2_open): Rewritten.
16785         (grub_ext2_dir): Rewritten.
16786         * include/grub/fshelp.h: New file.
16787         * fs/fshelp.c: Likewise.
16789 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16791         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16792         (print_message): Add a missing newline.
16793         (run_menu): Added timeout support.
16794         (run_menu_entry): New local function.
16795         (grub_menu_run): Added support for booting.
16797         * kern/loader.c (grub_loader_is_loaded): New function.
16799         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16800         (grub_get_rtc): Exported.
16802         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16803         (grub_get_rtc): Exported.
16805         * include/grub/normal.h (struct grub_command_list): Remove
16806         constant from the member `command'.
16808         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16810         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16812         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16814 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16816         Add support for the JFS filesystem.
16818         * fs/jfs.c: New file.
16819         * include/grub/fs.h (grub_jfs_init): New prototype.
16820         (grub_jfs_fini): New prototype.
16821         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16822         (grub_emu_SOURCES): Likewise.
16823         (pkgdata_MODULES): Add jfs.mod.
16824         (jfs_mod_SOURCES): New variable.
16825         (jfs_mod_CFLAGS): Likewise.
16826         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16827         (grubof_SOURCES): Likewise.
16828         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16830         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16831         endian to the host endian.
16832         (grub_fat_utf16_to_utf8): Move function from there...
16833         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16834         the endianness of the source string anymore.
16835         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16837 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16839         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16840         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16841         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16842         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16844         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16845         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16846         for `node_found' and `it_dir'.
16847         (grub_hfs_dir): Add prototype for `dir_hook'.
16849         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16850         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16851         and `indir32' to silence a gcc warning.
16853         * include/grub/fs.h (grub_hfs_init): New prototype.
16854         (grub_hfs_fini): Likewise.
16857 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16859         Each disk device has its own id now. This is useful to make use
16860         of multiple disk devices.
16862         * include/grub/disk.h (grub_disk_dev_id): New enum.
16863         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16864         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16866         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16867         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16869         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16870         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16872         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16873         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16875         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16876         "id" which is used by the cache manager.
16878         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16879         of just "GRUB".
16881 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16883         * fs/hfs.c: New file.
16884         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16885         (grub_emu_SOURCES): Likewise.
16886         (pkgdata_MODULES): Add hfs.mod.
16887         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16888         (grubof_SOURCES): Likewise.
16889         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16891         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16892         * kern/misc.c (grub_strncasecmp): Add function.
16894 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16896         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16897         with parentheses.
16899         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16900         (grub_ext2_dir): In case the directory entry type is unknown, read
16901         it from the inode.
16903 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16905         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16906         grub_load_linux instead of grub_rescue_cmd_linux as second
16907         argument of grub_rescue_register_command.
16909         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16911 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16913         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16914         function.
16915         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16916         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16917         `loader/powerpc/ieee1275/linux.c',
16918         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16919         * include/grub/powerpc/ieee1275/ieee1275.h
16920         (grub_ieee1275_release): New prototype.
16921         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16922         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16923         normal, boot, linux and linux_normal.
16924         * loader/powerpc/ieee1275/linux.c: New file.
16925         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16927 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16929         * normal/arg.c (grub_arg_parse): Correct error handling after
16930         reallocating the argumentlist (check if `argl' is not null instead
16931         of checking if `args' is not null).
16932         * kern/mm.c (grub_realloc): Return the same pointer when using the
16933         same region, instead of returning the header address.
16935 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16937         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16938         one block instead of two when looking for the initial partition.
16939         (grub_partition_probe): Initialize the local variable `p' with 0.
16940         Use base 10 for the grub_strtoul call.
16941         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16942         need for one local variable.
16943         (grub_strtoul): Don't add the new value to `num', instead of that
16944         just assign it.
16946 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16948         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16949         (pxeboot_img_SOURCES): New variable.
16950         (pxeboot_img_ASFLAGS): Likewise.
16951         (pxeboot_img_LDFLAGS): Likewise.
16952         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16953         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16954         <lode_leroy@hotmail.com>.
16956 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16958         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16959         there was no input.
16961 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16963         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16964         the history buffer logic.
16966 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16968         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16969         (FILETYPE_INO_SYMLINK): New macros.
16970         (grub_ext2_find_file): Check if the node is a directory using the
16971         inode stat information instead of using the filetype in the
16972         dirent.  Exclude the first character of an absolute symlink.
16973         (grub_ext2_dir): Mask out the filetype part of the mode member of
16974         the inode.
16976 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16978         Add support for UFS version 1 and 2.  Add support for the minix
16979         filesystem version 1 and 2, both the variants with 14 and 30 long
16980         filenames.
16982         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16983         fs/minix.c.
16984         (grub_emu_SOURCES): Likewise.
16985         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16986         (ufs_mod_SOURCES): New variable.
16987         (ufs_mod_CFLAGS): Likewise.
16988         (minix_mod_SOURCES): Likewise.
16989         (minix_mod_CFLAGS): Likewise.
16990         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16991         fs/minix.c.
16992         (grubof_SOURCES): Likewise.
16993         * fs/ufs.c: New file.
16994         * fs/minix.c: New file.
16995         * include/grub/fs.h (grub_ufs_init): New prototype.
16996         (grub_ufs_fini): Likewise.
16997         (grub_minix_init): Likewise.
16998         (grub_minix_fini): Likewise.
16999         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17000         minix fs.
17002 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17004         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17005         commands/ls.c, commands/terminal.c, commands/boot.c,
17006         commands/cmp.c and commands/cat.c.
17007         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17009         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17010         "env.h"
17012 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17014         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17015         and grub_, respectively. Because the conversion is trivial and
17016         mechanical, I omit the details here. Please refer to the CVS
17017         if you need more information.
17019 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17021         * include/pupa: Renamed to ...
17022         * include/grub: ... this.
17023         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17024         * util/i386/pc/grub-mkimage.c: ... this.
17025         * util/i386/pc/pupa-setup.c: Renamed to ...
17026         * util/i386/pc/grub-setup.c: ... this.
17027         * util/pupa-emu.c: Renamed to ...
17028         * util/grub-emu.c: ... this.
17030 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17032         Add support for the newworld apple macintosh (PPC).  This has been
17033         tested on the powerbook 2000 only.  It only adds support for
17034         generic ieee1275 functions, console and disk support.  This should
17035         be easy to port to other architectures with support for Open
17036         Firmware.
17038         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17039         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17040         specific tests are only executed while building for the i386.
17041         Inverse test for crosscompile.
17042         * genmk.rb (Utility): Allow assembler files.
17043         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17044         * conf/powerpc-ieee1275.rmk: New file.
17045         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17046         * disk/powerpc/ieee1275/partition.c: Likewise.
17047         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17048         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17049         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17050         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17051         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17052         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17053         * include/pupa/powerpc/ieee1275/loader.h
17054         * include/pupa/powerpc/setjmp.h: Likewise.
17055         * include/pupa/powerpc/types.h: Likewise.
17056         * kern/powerpc/ieee1275/init.c: Likewise.
17057         * kern/powerpc/ieee1275/openfw.c: Likewise.
17058         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17060         These files were written by Johan Rydberg
17061         (jrydberg@night.trouble.net) and I only modified them slightly.
17063         * boot/powerpc/ieee1275/cmain.c: New file.
17064         * boot/powerpc/ieee1275/crt0.S: Likewise.
17065         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17066         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17068 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17070         * Makefile.in: Update copyright.
17071         * genmodsrc.sh: Likewise.
17072         * gensymlist.sh: Likewise.
17073         * term/i386/pc/vga.c: Indent correctly.
17075         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17076         bugreporting address.
17077         * util/i386/pc/pupa-setup.c (usage): Likewise,
17078         (main): Call pupa_ext2_init and pupa_ext2_fini.
17080         * fs/fat.c (log2): Renamed to ...
17081         (fat_log2): ... this.
17082         All callers changed.
17083         * kern/misc.c (memcpy): Alias to pupa_memmove.
17084         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17085         lvalue cast.
17086         * util/console.c (pupa_ncurses_fini): Return 0.
17088         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17089         Move fail label here.
17090         [__GNU__]: Don't warn when using stat.
17091         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17092         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17093         long int. Use strtol instead of strtoul.
17095 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17097         * commands/boot.c: New file.
17098         * commands/cat.c: Likewise.
17099         * commands/cmp.c: Likewise.
17100         * commands/ls.c: Likewise.
17101         * commands/terminal.c: Likewise.
17102         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17103         (pupa_register_command): Changed interface to match the new
17104         argument parser.
17105         (pupa_command_execute): Changed (almost rewritten) so it uses
17106         pupa_split_command.  Added support for setting variables using the
17107         syntax `foo=bar'.
17108         (rescue_command): Changed to work with the new argument parser.
17109         (terminal_command): Moved from here to commands/terminal.c.
17110         (set_command): New function.
17111         (unset_command): New function.
17112         (insmod_command): New function.
17113         (rmmod_command): New function.
17114         (lsmod_command): New function.
17115         (pupa_command_init): Don't initialize the command terminal
17116         anymore.  Initialize the commands set, unset, insmod, rmmod and
17117         lsmod.
17118         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17119         (kernel_img_HEADERS): Add arg.h and env.h.
17120         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17121         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17122         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17123         normal/arg.c.
17124         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17125         terminal.mod.
17126         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17127         (boot_mod_SOURCES): New variable.
17128         (terminal_mod_SOURCES): Likewise.
17129         (ls_mod_SOURCES): Likewise.
17130         (cmp_mod_SOURCES): Likewise.
17131         (cat_mod_SOURCES): Likewise.
17133         * normal/arg.c: New file.
17134         * kern/env.c: Likewise.
17135         * include/pupa/arg.h: Likewise.
17136         * include/pupa/env.h: Likewise.
17137         * font/manager.c (font_command): Changed to match argument parsing
17138         interface changes.
17139         (PUPA_MOD_INIT): Likewise.
17140         * hello/hello.c (pupa_cmd_hello): Likewise.
17141         (PUPA_MOD_INIT): Likewise.
17142         * include/pupa/disk.h: Include <pupa/device.h>.
17143         (pupa_print_partinfo): New prototype.
17144         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17145         (pupa_dl_get_prefix): Likewise.
17146         * include/pupa/misc.h: Include <pupa/err.h>.
17147         (pupa_isgraph): New prototype.
17148         (pupa_isdigit): Likewise.
17149         (pupa_split_cmdline): Likewise.
17150         * include/pupa/normal.h: Include <pupa/arg.h>.
17151         (pupa_command): Changed the prototype of the member `func' to
17152         match the argument parsing interface.  Added member `options'.
17153         (pupa_register_command): Updated to match function.
17154         (pupa_arg_parse): New prototype.
17155         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17156         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17157         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17158         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17159         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17160         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17161         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17162         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17163         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17164         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17165         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17166         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17167         * kern/disk.c: Include <pupa/file.h>.
17168         (pupa_print_partinfo): New function.
17169         * kern/dl.c: Include <pupa/env.h>.
17170         (pupa_dl_dir): Variable removed.
17171         (pupa_dl_load): Use the environment variable `prefix' instead of
17172         the variable pupa_dl_dir.
17173         (pupa_dl_set_prefix): Function removed.
17174         (pupa_dl_get_prefix): Likewise.
17175         * kern/i386/pc/init.c: Include <pupa/env.h>.
17176         (pupa_machine_init): Use the environment variable `prefix' instead of
17177         using pupa_dl_set_prefix to set the prefix.
17178         * kern/main.c: Include <pupa/env.h>.
17179         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17180         using pupa_dl_get_prefix to get the prefix.
17181         * kern/misc.c: Include <pupa/env.h>.
17182         (pupa_isdigit): New function.
17183         (pupa_isgraph): Likewise.
17184         (pupa_ftoa): Likewise.
17185         (pupa_vsprintf): Added support for printing values of the type
17186         `double'.  Make it possible to format variable output when using
17187         formatting like `%1.2%f'.
17188         (pupa_split_cmdline): New function.
17189         * kern/rescue.c: Include <pupa/env.h>.
17190         (next_word): Removed function.
17191         (pupa_rescue_cmd_prefix): Likewise.
17192         (pupa_rescue_cmd_set): New function.
17193         (pupa_rescue_cmd_unset): New function.
17194         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17195         split the command line instead of splitting it here.  Added
17196         support for setting variables using the syntax `foo=bar'.  Don't
17197         initialize the prefix command anymore.  Initialized the set and
17198         unset commands.
17199         * normal/cmdline.c: Include <pupa/env.h>.
17200         (pupa_tab_complete): Added prototypes for print_simple_completion,
17201         print_partition_completion, add_completion, iterate_commands,
17202         iterate_dev, iterate_part and iterate_dir. Moved code to print
17203         partition information from here to kern/disk.c.
17204         (pupa_cmdline_run): Don't check if the function exists anymore.
17205         * normal/main.c: Include <pupa/env.h>.
17206         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17207         instead of using pupa_dl_get_prefix to get the prefix.
17208         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17209         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17210         warning.
17211         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17212         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17213         ((unused))' to silence a gcc warning.
17214         (pupa_vga_setcolor): Likewise.
17215         (debug_command): Changed to match argument parsing
17216         interface changes.
17217         * util/pupa-emu.c: Include <pupa/env.h>.
17218         (options): Added 0's for unused fields to silence a gcc warning.
17219         (argp): Likewise.
17220         (main): Use the environment variable `prefix' instead of using
17221         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17222         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17223         and terminal.
17225         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17226         * util/misc.c: Include <malloc.h>.
17227         (pupa_malloc): Rewritten so errors are correctly reported.
17228         (pupa_realloc): Likewise.
17229         (pupa_memalign): Likewise.
17230         (pupa_mm_init_region): Declare unused variables with
17231         `__attribute__ ((unused))' to silence a gcc warning.
17232         * normal/i386/setjmp.S: Remove tab at the end of the file to
17233         silence a gcc warning.
17234         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17235         variables with `__attribute__ ((unused))' to silence a gcc
17236         warning.
17237         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17238         local variable i unsigned to silence a gcc warning.
17240         * kern/term.c: Include <pupa/misc.h>.
17241         (pupa_more_lines): New variable.
17242         (pupa_more): Likewise.
17243         (pupa_putcode): When the pager is active pause at the end of every
17244         screen.
17245         (pupa_set_more): New function.
17246         * include/pupa/term.h (pupa_set_more): New prototype.
17249 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17251         Now this project is GRUB 2 rather than PUPA. The location of
17252         the CVS repository was moved to GRUB's.
17254         * configure.ac: Use bug-grub as the reporting address.
17255         Use GRUB instead of PUPA.
17256         Change the version number to 1.90.
17258 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17260         * genkernsyms.sh: Updated copyright information.
17261         * genmk.rb: Likewise.
17262         * genmodsrc.sh: Likewise.
17263         * gensymlist.sh: Likewise.
17264         * boot/i386/pc/boot.S: Likewise.
17265         * boot/i386/pc/diskboot.S: Likewise.
17266         * disk/i386/pc/biosdisk.c: Likewise.
17267         * disk/i386/pc/partition.c: Likewise.
17268         * font/manager.c: Likewise.
17269         * fs/ext2.c: Likewise.
17270         * fs/fat.c: Likewise.
17271         * include/pupa/boot.h: Likewise.
17272         * include/pupa/device.h: Likewise.
17273         * include/pupa/disk.h: Likewise.
17274         * include/pupa/dl.h: Likewise.
17275         * include/pupa/elf.h: Likewise.
17276         * include/pupa/err.h: Likewise.
17277         * include/pupa/file.h: Likewise.
17278         * include/pupa/font.h: Likewise.
17279         * include/pupa/fs.h: Likewise.
17280         * include/pupa/kernel.h: Likewise.
17281         * include/pupa/loader.h: Likewise.
17282         * include/pupa/misc.h: Likewise.
17283         * include/pupa/mm.h: Likewise.
17284         * include/pupa/net.h: Likewise.
17285         * include/pupa/normal.h: Likewise.
17286         * include/pupa/rescue.h: Likewise.
17287         * include/pupa/setjmp.h: Likewise.
17288         * include/pupa/symbol.h: Likewise.
17289         * include/pupa/term.h: Likewise.
17290         * include/pupa/types.h: Likewise.
17291         * include/pupa/i386/setjmp.h: Likewise.
17292         * include/pupa/i386/types.h: Likewise.
17293         * include/pupa/i386/pc/biosdisk.h: Likewise.
17294         * include/pupa/i386/pc/boot.h: Likewise.
17295         * include/pupa/i386/pc/console.h: Likewise.
17296         * include/pupa/i386/pc/init.h: Likewise.
17297         * include/pupa/i386/pc/kernel.h: Likewise.
17298         * include/pupa/i386/pc/linux.h: Likewise.
17299         * include/pupa/i386/pc/loader.h: Likewise.
17300         * include/pupa/i386/pc/memory.h: Likewise.
17301         * include/pupa/i386/pc/multiboot.h: Likewise.
17302         * include/pupa/i386/pc/partition.h: Likewise.
17303         * include/pupa/i386/pc/time.h: Likewise.
17304         * include/pupa/i386/pc/vga.h: Likewise.
17305         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17306         * include/pupa/util/getroot.h: Likewise.
17307         * include/pupa/util/misc.h: Likewise.
17308         * include/pupa/util/resolve.h: Likewise.
17309         * kern/device.c: Likewise.
17310         * kern/disk.c: Likewise.
17311         * kern/dl.c: Likewise.
17312         * kern/err.c: Likewise.
17313         * kern/file.c: Likewise.
17314         * kern/fs.c: Likewise.
17315         * kern/loader.c: Likewise.
17316         * kern/main.c: Likewise.
17317         * kern/misc.c: Likewise.
17318         * kern/mm.c: Likewise.
17319         * kern/rescue.c: Likewise.
17320         * kern/term.c: Likewise.
17321         * kern/i386/dl.c: Likewise.
17322         * kern/i386/pc/init.c: Likewise.
17323         * kern/i386/pc/lzo1x.S: Likewise.
17324         * kern/i386/pc/startup.S: Likewise.
17325         * loader/i386/pc/chainloader.c: Likewise.
17326         * loader/i386/pc/linux.c: Likewise.
17327         * loader/i386/pc/multiboot.c: Likewise.
17328         * normal/cmdline.c: Likewise.
17329         * normal/command.c: Likewise.
17330         * normal/main.c: Likewise.
17331         * normal/menu.c: Likewise.
17332         * normal/i386/setjmp.S: Likewise.
17333         * term/i386/pc/console.c: Likewise.
17334         * term/i386/pc/vga.c: Likewise.
17335         * util/console.c: Likewise.
17336         * util/genmoddep.c: Likewise.
17337         * util/misc.c: Likewise.
17338         * util/pupa-emu.c: Likewise.
17339         * util/resolve.c: Likewise.
17340         * util/unifont2pff.rb: Likewise.
17341         * util/i386/pc/biosdisk.c: Likewise.
17342         * util/i386/pc/getroot.c: Likewise.
17343         * util/i386/pc/pupa-mkimage.c: Likewise.
17344         * util/i386/pc/pupa-setup.c: Likewise.
17346 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17348         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17349         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17350         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17351         reading and reset it after reading.
17352         (pupa_ext2_close): Return PUPA_ERR_NONE.
17354         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17355         Correct value.
17356         (struct linux_kernel_header): Add kernel_version and
17357         initrd_addr_max.
17358         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17359         pupa_file_read succeeds.
17360         (pupa_rescue_cmd_initrd): Implement.
17362 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17364         * fs/ext2.c (pupa_ext2_label): New function.
17365         (pupa_ext2_fs): Added label.
17366         * fs/fat.c (pupa_fat_label): New function.
17367         (pupa_fat_fs): Added label.
17368         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17370         * kern/misc.c (pupa_strndup): New function.
17371         * include/pupa/misc.h (pupa_strndup): New prototype.
17373         * include/pupa/normal.h: Include <pupa/err.h>.
17374         (pupa_set_history): New prototype.
17375         (pupa_iterate_commands): New prototype.
17376         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17377         <pupa/disk.h>, <pupa/file.h>.
17378         (hist_size): New variable.
17379         (hist_lines): Likewise.
17380         (hist_end): Likewise.
17381         (hist_used): Likewise.
17382         (pupa_set_history): New function.
17383         (pupa_history_get): Likewise.
17384         (pupa_history_add): Likewise.
17385         (pupa_history_replace): Likewise.
17386         (pupa_tab_complete): Likewise.
17387         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17388         completion shows partitionnames while completing partitions, this
17389         feature was suggested by Jeff Bailey.
17390         * normal/command.c (pupa_iterate_commands): New function.
17391         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17392         (pupa_normal_init): Initialize history buffer.
17393         (PUPA_MOD_INIT): Likewise.
17394         (pupa_normal_fini): Free the history buffer.
17395         (PUPA_MOD_FINI): Likewise.
17397         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17398         key.
17400         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17401         * configure.ac [i386]: Check for regparam bug.
17402         (NESTED_FUNC_ATTR) [! i386]: Defined.
17404 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17406         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17407         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17408         (pupa_emu_SOURCES): New variable.
17409         (pupa_emu_LDFLAGS): Likewise.
17410         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17411         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17412         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17413         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17414         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17415         (pupa_jmp_buf): New typedef.
17416         (pupa_setjmp) [PUPA_UTIL]: New macro.
17417         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17418         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17419         (pupa_refresh): New prototype.
17420         * include/pupa/util/getroot.h: New file.
17421         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17422         it.
17423         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17424         (pupa_rescue_cmd_cat): Likewise.
17425         (pupa_rescue_cmd_ls): Likewise.
17426         (pupa_rescue_cmd_testload): Likewise.
17427         (pupa_rescue_cmd_lsmod): Likewise.
17428         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17429         * normal/menu.c (run_menu): Likewise.
17430         * kern/term.c (pupa_cls): Likewise.
17431         (pupa_refresh): New function.
17432         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17433         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17434         * util/console.c: New file.
17436         * util/i386/pc/getroot.c: New file.
17437         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17438         (pupa_putchar): New function.
17439         (pupa_refresh): Likewise.
17440         (xgetcwd): Function moved to ...
17441         (strip_extra_slashes): Likewise.
17442         (get_prefix): Likewise.
17443         * util/i386/pc/getroot.c: ... here.
17444         (find_root_device): Function moved and renamed to...
17445         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17446         Changed all callers.
17447         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17448         and renamed to...
17449         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17450         Changed all callers.
17451         * util/misc.c (pupa_memalign): New function.
17452         (pupa_mm_init_region): Likewise.
17453         (pupa_register_exported_symbols): Likewise.
17454         (pupa_putchar): Function removed.
17455         * util/pupa-emu.c: New file.
17457 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17459         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17460         (_multiboot_mod_SOURCES): New variable.
17461         (_multiboot_mod_CFLAGS): Likewise.
17462         * loader/i386/pc/multiboot.c: New file.
17463         * include/pupa/i386/pc/multiboot.h: Likewise.
17464         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17465         (pupa_multiboot_real_boot): New function.
17466         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17467         (pupa_multiboot_real_boot): New prototype.
17468         (pupa_rescue_cmd_multiboot): Likewise
17469         (pupa_rescue_cmd_module): Likewise.
17471         * kern/loader.c (pupa_loader_set): Continue when
17472         pupa_loader_unload_func() fails.
17473         (pupa_loader_unset): New function.
17474         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17476         * kern/misc.c (pupa_stpcpy): New function.
17477         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17479 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17481         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17482         for available extensions.
17484         * include/pupa/i386/pc/time.h: New file.
17485         * kern/disk.c: Include <pupa/machine/time.h>.
17486         (PUPA_CACHE_TIMEOUT): New macro.
17487         (pupa_last_time): New variable.
17488         (pupa_disk_open): Flush the cache when there was a timeout.
17489         (pupa_disk_close): Reset the timer.
17490         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17491         pupa_currticks.
17492         * util/misc.c: Include <sys/times.h>
17493         (pupa_get_rtc): New function.
17495 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17497         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17498         as blocks.
17499         (pupa_ext2_get_file_block): Use blocks member.
17501         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17502         first block. Return -1 instead of pupa_errno on error.
17504 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17506         * README: In the pupa-mkimage example use _chain instead of chain
17507         and ext2 instead of fat.
17508         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17509         adding journal playback for ext2fs.
17510         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17511         (pkgdata_MODULES): Added ext2.mod.
17512         (ext2_mod_SOURCES): New variable.
17513         (ext2_mod_CFLAGS): Likewise.
17514         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17515         * include/pupa/misc.h (pupa_strncpy): New prototype.
17516         (pupa_strcat): Likewise.
17517         (pupa_strncmp): Likewise.
17518         * kern/misc.c (pupa_strcat): Enable function.
17519         (pupa_strncpy): New function.
17520         (pupa_strncmp): Likewise.
17521         * fs/ext2.c: New file.
17523         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17524         when the read failed before retrying.
17525         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17526         (_FILE_OFFSET_BITS): Likewise.
17527         * configure.ac: Added AC_SYS_LARGEFILE.
17529 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17531         * genmk.rb (PModule#rule): Make sure to get only symbol names
17532         from the output of nm.
17533         Reported by Robert Millan <zeratul2@wanadoo.es>.
17535 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17537         I forgot to check in these changes for a long time. This adds
17538         incomplete support for VGA console, and this is still very
17539         buggy. Also, a lot of consideration is required for I18N,
17540         UNICODE, and VGA font issues. Therefore, assume that this is
17541         such that "better than nothing".
17543         * font/manager.c: New file.
17544         * include/pupa/font.h: Likewise.
17545         * include/pupa/i386/pc/vga.h: Likewise.
17546         * term/i386/pc/vga.c: Likewise.
17547         * util/unifont2pff.rb: Likewise.
17549         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17550         (pkgdata_MODULES): Added vga.mod and font.mod.
17551         (vga_mod_SOURCES): New variables.
17552         (vga_mod_CFLAGS): Likewise.
17553         (font_mod_SOURCES): Likewise.
17554         (font_mod_CFLAGS): Likewise.
17556         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17558         * include/pupa/term.h: Include pupa/err.h.
17559         (struct pupa_term): Added init and fini.
17560         Changed the argument of putchar to pupa_uint32_t.
17562         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17563         (pupa_console_real_putchar): New prototype.
17564         (pupa_console_putchar): Removed.
17565         (pupa_console_checkkey): Exported.
17566         (pupa_console_getkey): Likewise.
17568         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17569         characters.
17571         * kern/term.c (pupa_term_set_current): Rewritten.
17572         (pupa_putchar): Likewise.
17573         (pupa_putcode): New function.
17575         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17576         (pupa_console_real_putchar): ... this.
17577         (pupa_vga_set_mode): New function.
17578         (pupa_vga_get_font): Likewise.
17580         * normal/command.c: Include pupa/term.h.
17581         (terminal_command): New function.
17582         (pupa_command_init): Register the command "terminal".
17584         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17585         (DISP_UP): Likewise.
17586         (DISP_RIGHT): Likewise.
17587         (DISP_DOWN): Likewise.
17588         (DISP_HLINE): Likewise.
17589         (DISP_VLINE): Likewise.
17590         (DISP_UL): Likewise.
17591         (DISP_UR): Likewise.
17592         (DISP_LL): Likewise.
17593         (DISP_LR): Likewise.
17595         * term/i386/pc/console.c (pupa_console_putchar): New function.
17597 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17599         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17600         FIX. Reverse the path_list.
17602         * include/pupa/normal.h: Export pupa_register_command and
17603         pupa_unregister_command.
17605         * hello/hello.c (pupa_cmd_hello): New module.
17606         * conf/i386-pc.rmk: Added hello.mod.
17608 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17610         * kern/i386/pc/lzo1x.S: New file.
17612         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17613         (compress_kernel): New variable.
17614         (generate_image): Heavily modified to support compressing a
17615         large part of the core image.
17617         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17618         leak.
17619         (pupa_util_load_image): New function.
17621         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17622         (pupa_compressed_size): New variable.
17623         (codestart): Enable Gate A20 here.
17624         Decompress the compressed part of the core image.
17625         Rearrange the code to put functions and variables which are
17626         required for initialization in the non-compressed part.
17627         Include lzo1x.S.
17629         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17630         here.
17632         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17634         * include/pupa/i386/pc/kernel.h
17635         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17636         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17637         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17638         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17639         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17641         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17643         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17644         (Utility#rule): Likewise.
17646         * configure.ac: Check if LZO is available.
17648 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17650         * include/pupa/normal.h: New file.
17651         * include/pupa/setjmp.h: Likewise.
17652         * include/pupa/i386/setjmp.h: Likewise.
17653         * normal/cmdline.c: Likewise.
17654         * normal/command.c: Likewise.
17655         * normal/main.c: Likewise.
17656         * normal/menu.c: Likewise.
17657         * normal/i386/setjmp.S: Likewise.
17659         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17660         (pupa_rescue_cmd_initrd): Likewise.
17662         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17663         Likewise.
17665         * kern/i386/pc/startup.S (translation_table): New variable.
17666         (translate_keycode): New function.
17667         (pupa_console_getkey): Call translate_keycode.
17669         * kern/rescue.c (attempt_normal_mode): New function.
17670         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17671         it failed, print a message.
17673         * kern/mm.c (pupa_real_malloc): Print more information when a
17674         free magic is broken.
17675         (pupa_free): If the first free header is not free actually, set
17676         it to P.
17678         * kern/main.c (pupa_load_normal_mode): Just load the module
17679         "normal".
17680         (pupa_main): Don't print the message
17681         "Entering into rescue mode..." here.
17683         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17684         Declared.
17685         (pupa_rescue_cmd_initrd): Likewise.
17686         (pupa_rescue_cmd_initrd): Likewise.
17688         * include/pupa/symbol.h (FUNCTION): Specify the type.
17689         (VARIABLE): Likewise.
17691         * include/pupa/err.h (pupa_err_t): Added
17692         PUPA_ERR_UNKNOWN_COMMAND.
17694         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17695         (pupa_dl_get_prefix): Likewise.
17697         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17698         Added _chain.mod and _linux.mod instead of chain.mod and
17699         linux.mod.
17700         (chain_mod_SOURCES): Renamed to ...
17701         (_chain_mod_SOURCES): ... this.
17702         (chain_mod_CFLAGS): Renamed to ...
17703         (_chain_mod_CFLAGS): ... this.
17704         (linux_mod_SOURCES): Renamed to ...
17705         (_linux_mod_SOURCES): ... this.
17706         (linux_mod_CFLAGS): Renamed to ...
17707         (_linux_mod_CFLAGS): ... this.
17708         (normal_mod_SOURCES): New variable.
17709         (normal_mod_CFLAGS): Likewise.
17710         (normal_mod_ASFLAGS): Likewise.
17712 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17714         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17715         possible.
17717         * kern/dl.c (pupa_dl_ref): Refer depending modules
17718         recursively.
17719         (pupa_dl_unref): Unrefer depending modules recursively.
17720         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17721         a module is unloaded before one depending on that module is
17722         unloaded.
17723         (pupa_dl_unload): Unload depending modules explicitly,
17724         if possible.
17726 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17728         * include/pupa/i386/pc/linux.h: New file.
17729         * loader/i386/pc/linux.c: Likewise.
17731         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17732         Removed.
17733         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17734         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17735         of PUPA_CHAINLOADER_BOOT_SECTOR.
17737         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17738         (pupa_linux_prot_size): New variable.
17739         (pupa_linux_tmp_addr): Likewise.
17740         (pupa_linux_real_addr): Likewise.
17741         (pupa_linux_boot_zimage): New function.
17742         (pupa_linux_boot_bzimage): Likewise.
17744         * kern/i386/pc/init.c (struct mem_region): New structure.
17745         (MAX_REGIONS): New macro.
17746         (mem_regions): New variable.
17747         (num_regions): Likewise.
17748         (pupa_os_area_addr): Likewise.
17749         (pupa_os_area_size): Likewise.
17750         (pupa_lower_mem): Likewise.
17751         (pupa_upper_mem): Likewise.
17752         (add_mem_region): New function.
17753         (compact_mem_regions): Likewise.
17754         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17755         the size of the conventional memory and that of so-called upper
17756         memory (before the first memory hole).
17757         Instead of adding each found region to free memory, use
17758         add_mem_region and add them after removing overlaps.
17759         Also, add only 1/4 of the upper memory to free memory. The rest
17760         is used for loading OS images. Maybe this is ad hoc, but this
17761         makes it much easier to relocate OS images when booting.
17763         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17764         (pupa_enter_rescue_mode): Don't register initrd and module.
17766         * kern/mm.c: Include pupa/dl.h.
17768         * kern/main.c: Include pupa/file.h and pupa/device.h.
17770         * kern/loader.c (pupa_loader_load_module_func): Removed.
17771         (pupa_loader_load_module): Likewise.
17773         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17774         ``.o''.
17776         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17777         (pupa_linux_tmp_addr): Likewise.
17778         (pupa_linux_real_addr): Likewise.
17779         (pupa_linux_boot_zimage): Likewise.
17780         (pupa_linux_boot_bzimage): Likewise.
17782         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17783         (pupa_upper_mem): Likewise.
17784         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17785         module is too dangerous.
17787         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17788         (pupa_os_area_size): Likewise.
17789         (pupa_loader_set): Remove the first argument. Loader doesn't
17790         manage modules or initrd any longer.
17791         (pupa_loader_load_module): Removed.
17793         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17794         (linux_mod_SOURCES): New variable.
17795         (linux_mod_CFLAGS): Likewise.
17797 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17799         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17800         the length of a blocklist correctly.
17802         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17803         Use ioctl only if the OS file is a block device.
17804         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17805         not very useful for normal files.
17807         * kern/main.c (pupa_set_root_dev): New function.
17808         (pupa_load_normal_mode): Likewise.
17809         (pupa_main): Call those above.
17811         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17812         pupa_uint16_t.
17814         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17816 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17818         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17819         (setup): Configure the installed partition information and the
17820         dl prefix.
17822         * loader/i386/pc/chainloader.c (my_mod): New variable.
17823         (pupa_chainloader_unload): New function.
17824         (pupa_rescue_cmd_chainloader): Refer itself.
17825         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17827         * kern/i386/pc/startup.S (install_partition): Removed.
17828         (version_string): Likewise.
17829         (config_file): Likewise.
17830         (pupa_install_dos_part): New variable.
17831         (pupa_install_bsd_part): Likewise.
17832         (pupa_prefix): Likewise.
17833         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17835         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17836         and pupa/misc.h.
17837         (make_install_device): New function.
17838         (pupa_machine_init): Set the dl prefix.
17840         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17841         (buf): Renamed to ...
17842         (linebuf): ... this.
17843         (pupa_rescue_cmd_prefix): New function.
17844         (pupa_rescue_cmd_insmod): Likewise.
17845         (pupa_rescue_cmd_rmmod): Likewise.
17846         (pupa_rescue_cmd_lsmod): Likewise.
17847         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17848         rmmod and lsmod.
17850         * kern/mm.c (pupa_memalign): If failed even after invalidating
17851         disk caches, unload unneeded modules and retry.
17853         * kern/misc.c (pupa_memmove): New function.
17854         (pupa_memcpy): Removed.
17855         (pupa_strcpy): New function.
17856         (pupa_itoa): Made static.
17858         * kern/dl.c (pupa_dl_iterate): New function.
17859         (pupa_dl_ref): Likewise.
17860         (pupa_dl_unref): Likewise.
17861         (pupa_dl_unload): Return if succeeded or not.
17862         (pupa_dl_unload_unneeded): New function.
17863         (pupa_dl_unload_all): Likewise.
17864         (pupa_dl_init): Renamed to ...
17865         (pupa_dl_set_prefix): ... this.
17866         (pupa_dl_get_prefix): New function.
17868         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17869         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17870         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17871         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17872         (pupa_install_dos_part): Declared.
17873         (pupa_install_bsd_part): Likewise.
17874         (pupa_prefix): Likewise.
17875         (pupa_boot_drive): Likewise.
17877         * include/pupa/types.h: Fix a typo.
17879         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17880         pupa_memmove.
17881         (pupa_memmove): Declared.
17882         (pupa_strcpy): Likewise.
17884         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17885         pupa_mod_init takes one argument, its own module.
17886         (pupa_dl_unload_unneeded): Declared.
17887         (pupa_dl_unload_all): Likewise.
17888         (pupa_dl_ref): Likewise.
17889         (pupa_dl_unref): Likewise.
17890         (pupa_dl_iterate): Likewise.
17891         (pupa_dl_init): Renamed to ...
17892         (pupa_dl_set_prefix): ... this.
17893         (pupa_dl_get_prefix): Declared.
17895         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17896         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17897         unloaded.
17898         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17899         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17901         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17902         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17904 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17906         * util/i386/pc/pupa-setup.c (setup): Define the internal
17907         function find_first_partition_start at the top level, because GCC
17908         3.0.x cannot compile internal functions in deeper scopes
17909         correctly.
17910         (find_root_device): Use lstat instead of stat.
17911         Don't follow symbolic links.
17912         Fix the path-constructing code.
17914         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17915         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17916         by a BLKGETSIZE ioctl first, because block devices don't fill
17917         the member st_mode of the structure stat on Linux.
17918         [__linux__] (linux_find_partition): Use a temporary buffer
17919         REAL_DEV for the working space. Copy it to DEV before returning.
17920         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17921         buffer cache consistent.
17922         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17923         strncmp. The previous value was merely wrong.
17924         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17926         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17927         FAT size is 12. The previous value was merely wrong.
17929         * kern/main.c (pupa_main): Don't split the starting message from
17930         newlines.
17932         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17933         LF, because BIOS goes crazy about character attributes in this
17934         case.
17936 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17938         * include/i386/pc/util/biosdisk.h: New file.
17939         * util/i386/pc/biosdisk.c: Likewise.
17940         * util/i386/pc/pupa-setup.c: Likewise.
17942         * Makefile.in (INCLUDE_DISTFILES): Added
17943         include/pupa/i386/pc/util/biosdisk.h.
17944         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17945         directory util/i386/pc.
17946         (install-local): Added a rule for sbin_UTILITIES.
17947         (uninstall): Likewise.
17949         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17951         * util/misc.c (xrealloc): New function.
17952         (pupa_malloc): Likewise.
17953         (pupa_free): Likewise.
17954         (pupa_realloc): Likewise.
17955         (pupa_stop): Likewise.
17956         (pupa_putchar): Likewise.
17958         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17960         * include/pupa/util/misc.h (xrealloc): Declared.
17962         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17963         macro.
17964         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17965         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17967         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17968         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17970         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17971         way should be implemented.
17972         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17974         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17975         the size of NAME for safety.
17976         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17977         0x88.
17979         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17980         (pupa_setup_SOURCES): Likewise.
17982         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17984 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17986         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17987         bunch of pushl's from pusha, because this destroys the return
17988         value.
17990 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17992         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17993         This means that any missing prototypes could be fatal. Also, you
17994         must take care when writing assembly code. See the comments at
17995         the beginning of startup.S, for more details.
17997         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17998         compilation mechanism.
17999         (pupa_chainloader_real_boot): Likewise.
18000         (pupa_biosdisk_rw_int13_extensions): Likewise.
18001         (pupa_biosdisk_rw_standard): Likewise.
18002         (pupa_biosdisk_check_int13_extensions): Likewise.
18003         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18004         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18005         (pupa_get_memsize): Likewise.
18006         (pupa_get_mmap_entry): Likewise.
18007         (pupa_console_putchar): Likewise.
18008         (pupa_console_setcursor): Likewise.
18009         (pupa_getrtsecs): Use pushl instead of push.
18011         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18012         memory instead of the stack for a mmap entry, because some
18013         BIOSes may ignore the maximum size and overflow.
18015         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18017         * genmk.rb (PModule#rule): Compile automatically generated
18018         sources with module-specific CFLAGS as well as other sources.
18020 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18022         * configure.ac: Check ld.
18023         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18024         respectively, before checking endianness and sizes.
18026         * Makefile.in (LD): New variable.
18028 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18030         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18032 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18034         * Changelog: New file.