2009-06-16 Pavel Roskin <proski@gnu.org>
[grub2/phcoder/solaris.git] / ChangeLog
blob9430c0f041c2bf92b2955af2c7705829e683f5c6
1 2009-06-16  Pavel Roskin  <proski@gnu.org>
3         * kern/i386/halt.c: Include grub/machine/init.h.
4         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
6 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
8         * util/grub.d/30_os-prober.in: Use ${root} in the generated
9         drivemap menuentry.
11 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
13         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
14         `echo' command.
16 2009-06-16  Pavel Roskin  <proski@gnu.org>
18         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
19         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
20         save %dx, we only need %dl and we never change it.
21         * boot/i386/pc/cdboot.S: Don't set the root drive.
22         * boot/i386/pc/pxeboot.S: Likewise.
23         * include/grub/i386/pc/boot.h: Remove
24         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
25         GRUB_BOOT_MACHINE_DRIVE_CHECK.
26         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
27         * kern/i386/pc/init.c (make_install_device): Remove references
28         to grub_root_drive.
29         * kern/i386/pc/startup.S: Likewise.
30         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
32 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
34         xnu_uuid command
36         * commands/xnu_uuid.c: new file
37         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
38         (xnu_uuid_mod_SOURCES): new variable
39         (xnu_uuid_mod_CFLAGS): likewise
40         (xnu_uuid_mod_LDFLAGS): likewise
41         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
42         * conf/i386-ieee1275.rmk: likewise
43         * conf/i386-pc.rmk: likewise
44         * conf/powerpc-ieee1275.rmk: likewise
45         * conf/sparc64-ieee1275.rmk: likewise
46         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
48 2009-06-16  Pavel Roskin  <proski@gnu.org>
50         * configure.ac: Avoid '==' in test command, it's not portable.
52 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
54         Probe command
56         * commands/probe.c: new file
57         * conf/common.rmk (pkglib_MODULES): add probe.mod
58         (probe_mod_SOURCES): new variable
59         (probe_mod_CFLAGS): likewise
60         (probe_mod_LDFLAGS): likewise
61         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
62         * conf/i386-ieee1275.rmk: likewise
63         * conf/i386-pc.rmk: likewise
64         * conf/powerpc-ieee1275.rmk: likewise
65         * conf/sparc64-ieee1275.rmk: likewise
67 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
69         Fix handling of string like \"hello\" and "a
70         b"
72         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
73         (grub_script_yylex): fix parsing of quoting, escaping and newline
75 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
77         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition 
78         handling
79         
80 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
82         * util/grub-mkconfig.in: Fix parsing of --output option.
84 2009-06-12  Pavel Roskin  <proski@gnu.org>
86         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
87         genmk.rb don't need to be generated or installed.
89 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
91         * commands/i386/pc/drivemap_int13h.S: add more comments
93 2009-06-11  Pavel Roskin  <proski@gnu.org>
95         * Makefile.in (uninstall): Uninstall manuals.
97         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
98         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
99         and update-grub_lib in two places.
100         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
102         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
103         a compiler warning.
105         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
106         `entry_lo' to fix variable shadowing.
108 2009-06-11  Christian Franke  <franke@computer.org>
110         * kern/misc.c (__enable_execute_stack): Add missing return type
111         to prevent gcc warning.
113 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
115         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
117 2009-06-11  Pavel Roskin  <proski@gnu.org>
119         * Makefile.in: Don't rely on any scripts being executable.
120         Always use $(SHELL) to run shell scripts.
122         * configure.ac: Always define ___main if using -nostdlib.  This
123         fixes tests on Cygwin.
125 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
127         UDF fix
129         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
130         is in bytes and not in blocks
132 2009-06-11  Pavel Roskin  <proski@gnu.org>
134         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
135         warning.
137 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
139         * util/grub.d/30_os-prober.in: Fix a comment. Source
140         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
141         to set the root device.  Place drivemap command in the generated
142         chain entry.
144 2009-06-11  Pavel Roskin  <proski@gnu.org>
146         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
147         have long been resolved.
149 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
151         * util/grub.d/10_linux.in: Capitalise "Linux".
153         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
155 2009-06-11  Pavel Roskin  <proski@gnu.org>
157         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
158         fix a gcc warning and ensure that the function won't ever exit.
160         * kern/i386/ieee1275/init.c: Add missing prototype for
161         grub_stop_floppy().
163         * loader/ieee1275/multiboot2.c [__i386__]: Include
164         grub/cpu/multiboot.h.
166         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
167         casts to short - they are not portable and cause warnings.  Fix
168         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
170 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
172         Drivemap fixes
174         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
175         new function
176         (grub_get_root_biosnumber_saved): new variable
177         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
178         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
179         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
180         %dx after the call if necessary
181         * conf/common.rmk (pkglib_MODULES): remove boot.mod
182         (boot_mod_SOURCES): remove
183         (boot_mod_CFLAGS): remove
184         (boot_mod_LDFLAGS): remove
185         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
186         (boot_mod_SOURCES): new variable
187         (boot_mod_CFLAGS): likewise
188         (boot_mod_LDFLAGS): likewise
189         * conf/i386-efi.rmk: likewise
190         * conf/i386-ieee1275.rmk: likewise
191         * conf/i386-pc.rmk: likewise
192         * conf/powerpc-ieee1275.rmk: likewise
193         * conf/sparc64-ieee1275.rmk: likewise
194         * conf/x86_64-efi.rmk: likewise
195         * include/grub/i386/pc/biosnum.h: new file
196         * lib/i386/pc/biosnum.c: likewise
197         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
198         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
199         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
201 2009-06-10  Pavel Roskin  <proski@gnu.org>
203         * io/gzio.c (test_header): Don't reuse one buffer for all data.
204         Use separate variables.  Read only the file size at the end, but
205         not the checksum that we don't use.
207         * kern/file.c (grub_file_read): Use void pointer for the buffer.
208         Adjust all callers.
210         * kern/ieee1275/openfw.c: Remove libc includes.
211         * kern/ieee1275/cmain.c: Likewise.
212         * include/grub/ieee1275/ieee1275.h: Likewise.
214         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
215         compiler warnings.
217 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
219         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
220         `genparttoollist.sh'.
221         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
222         Add `*.sh' to the list find searches for and change `mdate.sh'
223         to `mdate-sh'.
225 2009-06-10  Pavel Roskin  <proski@gnu.org>
227         * include/grub/multiboot2.h: Provide compatibility defines for
228         multiboot2.h.
229         * include/multiboot2.h: Include stdint.h only if needed, using
230         angle brackets.
231         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
232         grub/multiboot2.h.
233         * loader/ieee1275/multiboot2.c: Likewise.
234         * loader/multiboot2.c: Likewise.
235         * loader/multiboot_loader.c: Likewise.
237         * configure.ac: Use -nostdlib when probing for the target.  It
238         should not be required to have libc for the target.
240         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
241         they fail without libc headers for the target.
242         * include/grub/powerpc/libgcc.h: Use weak attribute for all
243         exports.
244         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
245         preprocessor conditionals.
247         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
248         build system doesn't need to be aware of the tar.c internals.
250 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
252         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
254 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
256         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
257         disk limit to 26 for IDE, Virtio, Xen and SCSI.
259 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
261         * util/i386/pc/grub-install.in: Change the error message if UUIDs
262         aren't available if ata.mod gets used.
264 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
266         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
267         initialising controller.
268         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
270 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
272         * util/i386/pc/grub-install.in: Add a parameter --disk-module
273         to choose between ata and biosdisk module on i386-pc.
275 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
277         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
278         Subclass and Programming Interface fields in terms of the 3 byte
279         Class Code register.
280         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
282         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
283         interface is OHCI.  Add grub_dprintf for symmetry with
284         bus/usb/uhci.c.
285         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
286         interface is UHCI.  Add interf variable for programming
287         interface.  Print interface with class/subclass.
289         * bus/usb/ohci.c: Set interf with correct field.
291         * bus/usb/uhci.c: Remove unneeded doubled lines.
292         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
293         Remove whitespace inside comment.
295 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
297         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
298         as fallback an equivalent option without depth.
300 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
302         Not fail if unable to retrieve C/H/S on LBA disks
304         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
305         if unable to retrieve C/H/S on LBA disks
307 2009-06-08  Pavel Roskin  <proski@gnu.org>
309         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
310         about aliasing.
312 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
314         * Makefile.in (uninstall): Remove all $lib_DATA files.
316 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
318         Bugfix: install on partitionless device
320         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
321         is a whole disk
323 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
325         * Makefile.in (uninstall): Remove all $include_DATA files.
327 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
329         * commands/true.c: New file.  Implement the true and false commands.
330         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
331         (true_mod_SOURCES): New variable.
332         (true_mod_CFLAGS): Likewise.
333         (true_mod_LDFLAGS): Likewise.
335 2009-06-05  Colin D Bennett  <colin@gibibit.com>
337         Optimized font character lookup using binary search instead of linear
338         search.  Fonts now are required to have the character index ordered by
339         code point.
341         * font/font.c (load_font_index): Verify that fonts have ordered
342         character indices.
343         (find_glyph): Use binary search instead of linear search to find a
344         character in a font.
346 2009-06-05  Michael Scherer  <misc@mandriva.org>
348         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
349         uses case sensitive btree.
350         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
351         only for case insensitive filesystems.
353 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
355         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
356         * conf/common.rmk (search_mod_CFLAGS): likewise
358 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
360         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
361         compensate a compiler bug
363 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
365         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
366         instead of '\b'
368 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
370         Definitions for creating asm symbols with Apple's CC
372         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
373         [APPLE_CC] (VARIABLE): likewise
375 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
377         Disable lnxboot.img when compiled
378         with Apple's CC
380         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
381         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
382         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
383         [! APPLE_CC] (CODE_LENG): skip
384         [! APPLE_CC] (setup_sects): likewise
385         [! APPLE_CC]: skip filling
387 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
389         Address in trampolines based on 32-bit registers when compiled
390         with Apple's CC
392         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
393         for addresses
394         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
396 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
398         Avoid aliases when compiling with Apple's CC for PCBIOS machine
400         * kern/misc.c [APPLE_CC] (memcpy): new function
401         [APPLE_CC] (memmove): likewise
402         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
403         (memcpy): define alias conditionally on !APPLE_CC
404         (memset): likewise
405         (abort): likewise
406         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
407         APPLE_CC are defined
408         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
409         (grub_assert_fail): make prototype conditional
411 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
413         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
415         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
416         grub-macho2img
417         (CLEANFILES): add grub-macho2img
418         (grub_macho2img_SOURCES): new variable
419         * kern/i386/pc/startup.S (bss_start): new variable
420         (bss_end): likewise
421         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
422         * util/grub-macho2img.c: new file
424 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
426         Use objconv when compiling with Apple's CC
428         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
429         (efiemu64.o): likewise
430         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
431         when compiling with Apple's CC
432         (efiemu64_s.o): likewise
433         * configure.ac: check for objconv when compiling with Apple's CC
434         * genmk.rb: use objconv for modules when compiled with Apple's CC
436 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
438         Define segment as well as section when compiling with
439         Apple's CC
441         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
442         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
443         (efiemu_convert_pointer): likewise
444         (efiemu_set_virtual_address_map): likewise
445         (efiemu_convert_pointer): likewise
446         (efiemu_getcrc32): likewise
447         (init_crc32_table): likewise
448         (reflect): likewise
449         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
450         (GRUB_MOD_DEP): likewise
452 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
454         Allow a compilation without -mcmodel=large
456         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
457         when compiled without -mcmodel=large
458         (filter_memory_map): remove memory post 4 GiB when compiled
459         without -mcmodel=large
460         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
461         TARGET_CFLAGS when -mcmodel=large isn't supported
463 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
465         Remove nested functions in efiemu core
467         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
469 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
471         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
473         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
474         temporary storage
475         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
476         using Apple's CC
477         (grub_cpu_is_tsc_supported): likewise
478         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
480 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
482         Absolute addressing through constant with Apple's cc
484         * kern/i386/pc/startup.S: Define necessary constants
485         and address through it when using ABS with Apple's CC
486         * boot/i386/pc/diskboot.S: likewise
487         * boot/i386/pc/boot.S: likewise
488         * boot/i386/pc/lnxboot.S: likewise
489         * boot/i386/pc/cdboot.S: likewise
490         * mmap/i386/pc/mmap_helper.S: likewise
491         * commands/i386/pc/drivemap_int13h.S: likewise
493 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
495         Check if compiler is apple cc
497         * Makefile.in (ASFLAGS): new variable
498         (TARGET_ASFLAGS): likewise
499         (TARGET_MODULE_FORMAT): likewise
500         (TARGET_APPLE_CC): likewise
501         (OBJCONV): likewise
502         (TARGET_IMG_CFLAGS): likewise
503         (TARGET_CPPFLAGS): add includedir
504         * configure.ac: call grub_apple_cc and grub_apple_target_cc
505         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
506         Check for linker script only if compiler isn't Apple's CC
507         (TARGET_MODULE_FORMAT): set
508         (TARGET_APPLE_CC): likewise
509         (TARGET_ASFLAGS): likewise
510         (ASFLAGS): likewise
511         Check for objcopy only if compiler isn't Apple's CC
512         Check for BSS symbol only if compiler isn't Apple's CC
513         * genmk.rb: adapt nm options if we use Apple's utils
514         * aclocal.m4 (grub_apple_cc): new test
515         (grub_apple_target_cc): likewise
517 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
519         Simplify sed expressions and improve awk
521         * Makefile.in (install-local): simplify sed expression
522         * gencmdlist.sh: likewise
523         * genmoddep.awk: avoid adding module as a dependency of itself
525 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
527         Add missing start symbols
529         * boot/i386/pc/boot.S: add start
530         * boot/i386/pc/pxeboot.S: likewise
532 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
534         Fix wrong assumptions with grub-mkimage on EFI
536         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
537         (relocate_addresses): consider both r_addend and value at offset
538         (make_mods_section): zerofill modinfo and header
539         (convert_elf): write prefix here
541 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
543         Use .asciz instead of .string
545         * i386/pc/diskboot.S: use .asciz instead of .string
546         * i386/pc/boot.S: likewise
547         * include/grub/dl.h (GRUB_MOD_DEP): likewise
548         (GRUB_MOD_NAME): likewise
550 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
552         gfxpayload support
554         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
555         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
556         (grub_video_setup): remove
557         (grub_video_set_mode): new prototype
558         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
559         (vid_mode): remove
560         (linux_vesafb_res): compile only on PCBIOS
561         (grub_linux_boot): support gfxpayload
562         * loader/i386/pc/xnu.c (video_hook): new function
563         (grub_xnu_set_video): support gfxpayload
564         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
565         (DEFAULT_VIDEO_HEIGHT): likewise
566         (DEFAULT_VIDEO_FLAGS): likewise
567         (DEFAULT_VIDEO_MODE): new definition
568         (video_hook): new function
569         (grub_gfxterm_init): use grub_video_set_mode
570         * util/grub.d/30_os-prober.in: remove explicit modesetting before
571         loading xnu
572         * video/video.c (grub_video_setup): removed
573         (grub_video_set_mode): new function based on grub_gfxterm_init and
574         grub_video_setup
576 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
578         Avoid calling biosdisk in drivemap
580         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
581         (revparse_biosdisk): likewise
582         (list_mappings): derive name from id directly
583         (grub_cmd_drivemap): use tryparse_diskstring
585 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
587         Script fixes
589         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
590         (grub_lexer_param): add tokenonhold
591         (grub_script_create_cmdline): remove cmdline. All callers updated
592         (grub_script_function_create): make functionname
593         grub_script_arg. All callers updated
594         (grub_script_execute_argument_to_string): new prototype
595         * kern/parser.c (state_transitions): reorder
596         (grub_parser_cmdline_state): fix a bug and make more compact
597         * script/sh/execute.c (grub_script_execute_argument_to_string):
598         make global
599         (grub_script_execute_cmdline): use new format
600         * script/sh/function.c (grub_script_function_create): make functionname
601         grub_script_arg. All callers updated
602         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
603         (grub_script_yylex): remove
604         (grub_script_yylex2): renamed to ...
605         (grub_script_yylex): ...renamed
606         parse the expressions like a${b}c
607         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
608         (GRUB_PARSER_TOKEN_VAR): remove
609         (GRUB_PARSER_TOKEN_NAME): likewise
610         ("if"): declare as typeless
611         ("while"): likewise
612         ("function"): likewise
613         ("else"): likewise
614         ("then"): likewise
615         ("fi"): likewise
616         (text): remove
617         (argument): likewise
618         (script): accept empty scripts and make exit on error
619         (arguments): use GRUB_PARSER_TOKEN_ARG
620         (function): likewise
621         (command): move error handling to script
622         (menuentry): move grub_script_lexer_ref before
623         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
624         argument. All callers updated
626 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
628         Prevent GRUB from probing floppies during boot.
630         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
631         * commands/search.c (options): Add --no-floppy.
632         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
633         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
634         --no-floppy when searching for UUIDs.
636 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
638         Simplify the code duplication in commands/search.c.
640         * commands/search.c (search_label, search_fs_uuid): Merge into ...
641         (search_fs): ... this.  Update all users.
643 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
645         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
647 2009-05-28  Pavel Roskin  <proski@gnu.org>
649         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
650         Remove the original symlink explicitly.
652         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
653         just one slash.  That's how grub_fshelp_find_file() does it.
655 2009-05-26  Pavel Roskin  <proski@gnu.org>
657         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
658         to `str'.
660         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
661         possibly unused.
663 2009-05-25  Christian Franke  <franke@computer.org>
665         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
666         register.
667         (grub_atapi_identify): Add wait after drive select.
668         (grub_ata_identify): Do more strict status register check before
669         calling grub_atapi_identify ().  Suppress error message if status
670         register is 0x00 after command failure.  Add status register
671         check after PIO read to avoid bogus identify due to stuck DRQ.
672         Thanks to Pavel Roskin for testing.
673         (grub_device_initialize): Remove unsafe status register check.
674         Thanks to 'phcoder' for problem report and patch.
675         Prevent sign extension in debug message.
677 2009-05-23  Colin D Bennett  <colin@gibibit.com>
679         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
680         definition file, and functions defined in `normal/menu.c' have had
681         their prototypes moved to `include/grub/menu.h' for consistency.
683         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
684         from normal.h.
685         (grub_menu_get_entry): Likewise.
686         (grub_menu_get_timeout): Likewise.
687         (grub_menu_set_timeout): Likewise.
688         (grub_menu_execute_entry): Likewise.
689         (grub_menu_execute_with_fallback): Likewise.
690         (grub_menu_entry_run): Likewise.
692         * include/grub/normal.h: Re-ordered and grouped function
693         prototypes by file that the function is defined in.
694         (grub_menu_execute_callback): Removed; moved to menu.h.
695         (grub_menu_get_entry): Likewise.
696         (grub_menu_get_timeout): Likewise.
697         (grub_menu_set_timeout): Likewise.
698         (grub_menu_execute_entry): Likewise.
699         (grub_menu_execute_with_fallback): Likewise.
700         (grub_menu_entry_run): Likewise.
701         (grub_menu_addentry): Renamed from this ...
702         (grub_normal_add_menu_entry): ... to this.
704         * normal/main.c (grub_menu_addentry): Renamed from this ...
705         (grub_normal_add_menu_entry): ... to this.
707         * script/sh/execute.c (grub_script_execute_menuentry): Update
708         reference to renamed grub_menu_addentry function.
710 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
712         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
714 2009-05-22  Pavel Roskin  <proski@gnu.org>
716         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
717         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
718         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
719         compiling for the i386 targets, but not for the utilities.
721         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
722         to grub_uint8_t.
723         (grub_root_drive): Likewise.
724         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
725         remove alignment.
726         (grub_root_drive): Change size to byte.
727         (grub_start_addr): Remove.
728         (grub_end_addr): Likewise.
729         (grub_apm_bios_info): Likewise.
731 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
733         * normal/i386: Remove.
734         * normal/powerpc: Likewise.
735         * normal/sparc64: Likewise.
736         * normal/x86_64: Likewise.
738 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
740         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
741         * loader/i386/linux_trampoline.S: Fix indentation
742         * loader/i386/xnu_helper.S: Likewise
744 2009-05-18  Colin D Bennett  <colin@gibibit.com>
746         Display error messages when parsing a Lua statement fails.
747         Previously, executing a syntactically invalid statement like
748         ")foo" or "bar;" would silently fail.
750         * script/lua/grub_main.c (handle_lua_error): New function.
751         (grub_lua_parse_line): Improved reporting of Lua parser and
752         execution errors.
754 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
756         Remove -Werror which causes build to fail on some systems
758         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
759         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
760         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
762 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
764         trampoline for linux on 64-bit platform
766         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
767         loader/i386/efi/linux_trampoline.S
768         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
769         declaration
770         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
771         here
772         * loader/i386/linux_trampoline.S: moved here
773         * loader/i386/efi/linux.c (allocate_pages): reserve space for
774         trampoline
775         (jumpvector): removed
776         (grub_linux_trampoline_start): new declaration
777         (grub_linux_trampoline_end): likewise
778         (grub_linux_boot): use trampoline when on 64-bit platform
779         * loader/i386/linux.c: likewise
781 2009-05-16  Pavel Roskin  <proski@gnu.org>
783         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
784         const to avoid a warning.
785         (grub_lua_setenv): Likewise.
786         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
787         lmsg to fix a warning.
789 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
791         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
792         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
793         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
794         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
795         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
796         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
797         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
798         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
800 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
802         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
804 2009-05-16  Bean  <bean123ch@gmail.com>
806         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
807         (lua_mod_SOURCES): New variable.
808         (lua_mod_CFLAGS): Likewise.
809         (lua_mod_LDFLAGS): Likewise.
811         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
812         (setjmp_mod_SOURCES): New variable.
813         (setjmp_mod_CFLAGS): Likewise.
814         (setjmp_LDFLAGS): Likewise.
816         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
817         (setjmp_mod_SOURCES): New variable.
818         (setjmp_mod_CFLAGS): Likewise.
819         (setjmp_LDFLAGS): Likewise.
821         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
822         (setjmp_mod_SOURCES): New variable.
823         (setjmp_mod_CFLAGS): Likewise.
824         (setjmp_LDFLAGS): Likewise.
826         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
827         (setjmp_mod_SOURCES): New variable.
828         (setjmp_mod_CFLAGS): Likewise.
829         (setjmp_LDFLAGS): Likewise.
831         * normal/i386/setjmp.S: Moved from here ...
832         * lib/i386/setjmp.S: ... Moved here
833         * normal/x86_64/setjmp.S: Moved from here ...
834         * lib/x86_64/setjmp.S: ... Moved here
835         * normal/powerpc/setjmp.S: Moved from here ...
836         * lib/powerpc/setjmp.S: ... Moved here
837         * normal/sparc64/setjmp.S: Moved from here ...
838         * lib/sparc64/setjmp.S: ... Moved here
840         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
841         returns_twice in mingw.
843         * script/lua/grub_lib.c: New file.
844         * script/lua/grub_lib.h: Likewise.
845         * script/lua/grub_lua.h: Likewise.
846         * script/lua/grub_main.c: Likewise.
847         * script/lua/lapi.c: Likewise.
848         * script/lua/lapi.h: Likewise.
849         * script/lua/lauxlib.c: Likewise.
850         * script/lua/lauxlib.h: Likewise.
851         * script/lua/lbaselib.c: Likewise.
852         * script/lua/lcode.c: Likewise.
853         * script/lua/lcode.h: Likewise.
854         * script/lua/ldblib.c: Likewise.
855         * script/lua/ldebug.c: Likewise.
856         * script/lua/ldebug.h: Likewise.
857         * script/lua/ldo.c: Likewise.
858         * script/lua/ldo.h: Likewise.
859         * script/lua/ldump.c: Likewise.
860         * script/lua/lfunc.c: Likewise.
861         * script/lua/lfunc.h: Likewise.
862         * script/lua/lgc.c: Likewise.
863         * script/lua/lgc.h: Likewise.
864         * script/lua/linit.c: Likewise.
865         * script/lua/liolib.c: Likewise.
866         * script/lua/llex.c: Likewise.
867         * script/lua/llex.h: Likewise.
868         * script/lua/llimits.h: Likewise.
869         * script/lua/lmathlib.c: Likewise.
870         * script/lua/lmem.c: Likewise.
871         * script/lua/lmem.h: Likewise.
872         * script/lua/loadlib.c: Likewise.
873         * script/lua/lobject.c: Likewise.
874         * script/lua/lobject.h: Likewise.
875         * script/lua/lopcodes.c: Likewise.
876         * script/lua/lopcodes.h: Likewise.
877         * script/lua/loslib.c: Likewise.
878         * script/lua/lparser.c: Likewise.
879         * script/lua/lparser.h: Likewise.
880         * script/lua/lstate.c: Likewise.
881         * script/lua/lstate.h: Likewise.
882         * script/lua/lstring.c: Likewise.
883         * script/lua/lstring.h: Likewise.
884         * script/lua/lstrlib.c: Likewise.
885         * script/lua/ltable.c: Likewise.
886         * script/lua/ltable.h: Likewise.
887         * script/lua/ltablib.c: Likewise.
888         * script/lua/ltm.c: Likewise.
889         * script/lua/ltm.h: Likewise.
890         * script/lua/lua.h: Likewise.
891         * script/lua/luaconf.h: Likewise.
892         * script/lua/lualib.h: Likewise.
893         * script/lua/lundump.c: Likewise.
894         * script/lua/lundump.h: Likewise.
895         * script/lua/lvm.c: Likewise.
896         * script/lua/lvm.h: Likewise.
897         * script/lua/lzio.c: Likewise.
898         * script/lua/lzio.h: Likewise.
900 2009-05-16  Bean  <bean123ch@gmail.com>
902         * include/grub/kernel.h (grub_module_header_types): Add type
903         OBJ_TYPE_CONFIG.
905         * kern/main.c (grub_load_config): New function.
906         (grub_main): Call grub_load_config to read boot config.
908         * grub-mkimage (generate_image): New parameter config_path.
909         (options): New option --config.
910         (main): Parse --config option, and pass it to generate_image.
912 2009-05-14  Christian Franke  <franke@computer.org>
914         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
915         This fixes build on Cygwin.
917 2009-05-14  Pavel Roskin  <proski@gnu.org>
919         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
920         jump.  This saves two bytes, so the typical case of 2 swapped
921         drives would fit 32 bytes.
923 2009-05-13  Pavel Roskin  <proski@gnu.org>
925         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
926         grub_uint32_t to avoid a warning.
928         * loader/i386/linux.c (allocate_pages): When assigning
929         real_mode_mem, cast through grub_size_t to fix a warning.  The
930         code already makes sure that the value would fit a pointer.
931         (grub_linux_setup_video): Cast render_target->data to
932         grub_size_t to fix a warning.
934 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
936         * commands/i386/pc/drivemap.c: New file - implement drivemap
937         command.
938         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
939         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
941 2009-05-13  Pavel Roskin  <proski@gnu.org>
943         * util/i386/pc/grub-setup.c (setup): Remove unused variable
944         embedding_area_exists.
946 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
948         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
949         it easier to understand / work with.
950         Improve warning messages for cases where there's no embedding area,
951         or when it is too small (or core.img too large).
953 2009-05-13  Pavel Roskin  <proski@gnu.org>
955         * loader/i386/pc/multiboot2.c: Add necessary includes for
956         grub_multiboot2_real_boot().
958         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
959         PX record is always little-endian.  We only need the lower 2
960         bytes of the mode.
962         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
963         facilitate code reuse.
964         (grub_cpio_mount): Use "struct head", not a char buffer.  This
965         fixes a warning reported by gcc 4.4.
967         * kernel/disk.c (grub_disk_read): Use void pointer for the
968         buffer.
969         (grub_disk_write): Use const void pointer for the buffer.
970         Adjust all callers.  Remove unnecessary casts.
972 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
974         * util/i386/pc/grub-install.in: Update copyright year.
976 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
978         gptsync
980         * commands/gptsync.c: new file
981         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
982         (gptsync_mod_SOURCES): new variable
983         (gptsync_mod_CFLAGS): likewise
984         (gptsync_mod_LDFLAGS): likewise
985         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
986         new definition
987         (GRUB_PC_PARTITION_TYPE_HFS): likewise
988         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
989         * conf/i386-ieee1275.rmk: likewise
990         * conf/i386-pc.rmk: likewise
991         * conf/powerpc-ieee1275.rmk: likewise
993 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
995         Fixed grub-emu
997         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
998         (grub_dl_ref): likewise
1000 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1002         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1003         split in two functions (one for msdos and one for gpt).
1005 2009-05-08  Pavel Roskin  <proski@gnu.org>
1007         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1008         not modified.
1010         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1011         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1012         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1013         nerr variable.
1015 2009-05-08  David S. Miller  <davem@davemloft.net>
1017         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1019 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1021         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1022         existence.
1024 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1026         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1027         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1029 2009-05-05  David S. Miller  <davem@davemloft.net>
1031         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1033 2009-05-05  Pavel Roskin  <proski@gnu.org>
1035         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1036         of grub_dl_ref() and grub_dl_unref().
1037         * commands/parttool.c: Remove preprocessor conditionals around
1038         grub_dl_ref() and grub_dl_unref().
1039         * fs/affs.c: Likewise.
1040         * fs/afs.c: Likewise.
1041         * fs/cpio.c: Likewise.
1042         * fs/ext2.c: Likewise.
1043         * fs/fat.c: Likewise.
1044         * fs/hfs.c: Likewise.
1045         * fs/hfsplus.c: Likewise.
1046         * fs/iso9660.c: Likewise.
1047         * fs/jfs.c: Likewise.
1048         * fs/minix.c: Likewise.
1049         * fs/ntfs.c: Likewise.
1050         * fs/reiserfs.c: Likewise.
1051         * fs/sfs.c: Likewise.
1052         * fs/udf.c: Likewise.
1053         * fs/ufs.c: Likewise.
1054         * fs/xfs.c: Likewise.
1055         * include/grub/dl.h: Likewise.
1056         * loader/xnu.c: Likewise.
1058 2009-05-04  Pavel Roskin  <proski@gnu.org>
1060         * commands/acpi.c: Remove unused variable my_mod.
1061         * partmap/amiga.c: Likewise.
1062         * partmap/apple.c: Likewise.
1063         * partmap/gpt.c: Likewise.
1064         * partmap/pc.c: Likewise.
1065         * partmap/sun.c: Likewise.
1066         * term/gfxterm.c: Likewise.
1067         * term/i386/pc/vesafb.c: Likewise.
1068         * term/i386/pc/vga.c: Likewise.
1070 2009-05-04  David S. Miller  <davem@davemloft.net>
1072         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1073         pointer args to grub_ieee1275_get_property().
1075         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1077         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1078         devices, and do not traverse down under controller nodes.
1080         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1081         (grub_ofdisk_open): Use it to un-escape "," characters.
1082         * kern/disk.c (find_part_sep): New.
1083         (grub_disk_open): Use it to find the first non-escaped ','
1084         character in the disk name.
1085         * util/ieee1275/devicemap.c (escape_of_path): New.
1086         (grub_util_emit_devicemap_entry): Use it.
1087         * util/sparc64/ieee1275/grub-install.in: Update script to
1088         strip partition specifiers properly by not triggering on
1089         '\' escaped ',' characters.
1091 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1093         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1094         to 0x300.
1095         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1096         resolutions.
1097         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1098         on documentation from Wikipedia).
1100 2009-05-04  Pavel Roskin  <proski@gnu.org>
1102         * disk/ata.c: Spelling fixes.
1103         * disk/raid.c: Likewise.
1104         * disk/usbms.c: Likewise.
1105         * disk/dmraid_nvidia.c: Likewise.
1106         * kern/ieee1275/openfw.c: Likewise.
1107         * kern/ieee1275/init.c: Likewise.
1108         * kern/ieee1275/cmain.c: Likewise.
1109         * boot/i386/pc/cdboot.S: Likewise.
1110         * video/readers/png.c: Likewise.
1111         * video/i386/pc/vbe.c: Likewise.
1112         * fs/udf.c: Likewise.
1113         * fs/hfs.c: Likewise.
1114         * fs/reiserfs.c: Likewise.
1115         * efiemu/runtime/efiemu.c: Likewise.
1116         * efiemu/main.c: Likewise.
1117         * efiemu/mm.c: Likewise.
1118         * include/grub/elf.h: Likewise.
1119         * include/grub/xnu.h: Likewise.
1120         * include/grub/usbdesc.h: Likewise.
1121         * include/grub/usb.h: Likewise.
1122         * include/grub/script_sh.h: Likewise.
1123         * include/grub/lib/LzmaEnc.h: Likewise.
1124         * include/grub/efiemu/efiemu.h: Likewise.
1125         * include/grub/command.h: Likewise.
1126         * normal/menu.c: Likewise.
1127         * normal/main.c: Likewise.
1128         * normal/datetime.c: Likewise.
1129         * bus/usb/uhci.c: Likewise.
1130         * mmap/i386/uppermem.c: Likewise.
1131         * mmap/mmap.c: Likewise.
1132         * commands/acpi.c: Likewise.
1133         * commands/test.c: Likewise.
1134         * partmap/apple.c: Likewise.
1135         * font/font.c: Likewise.
1136         * loader/sparc64/ieee1275/linux.c: Likewise.
1137         * loader/macho.c: Likewise.
1138         * loader/i386/bsd_trampoline.S: Likewise.
1139         * loader/i386/bsd.c: Likewise.
1140         * loader/xnu.c: Likewise.
1141         * term/i386/pc/vesafb.c: Likewise.
1142         * term/usb_keyboard.c: Likewise.
1143         * util/resolve.c: Likewise.
1144         * util/getroot.c: Likewise.
1146 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1148         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1150 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1152         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1153         build error.
1155 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1157         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1158         parameter only available on BIOS.
1160 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1162         Removed wrong semicolon in declaration
1164         * grub/misc.h (grub_dprintf): remove semicolon
1166 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1168         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1169         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1170         is done by grub_cmd_linux() now).
1171         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1172         restore video to text mode.
1173         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1174         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1175         `GRUB_LINUX_VID_MODE_NORMAL'.
1177 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1179         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1180         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1181         and `normal/script.c'.  Add `kern/rescue_reader.c',
1182         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1183         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1184         `grub_script.tab.c'.
1186         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1187         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1189         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1190         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1192         * Makefile.in: Remove duplicated 2008 in Copyright line.
1194 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1196         * util/misc.c (grub_util_warn): New function.  Emits a warning
1197         unconditionally.
1198         * include/grub/util/misc.h (grub_util_warn): New declaration.
1200         * util/i386/pc/grub-install.in: Understand --force and pass it down
1201         to grub-setup.
1203         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1204         down to setup().
1205         (setup): Improve error messages and add warnings when requested to
1206         install in odd layouts.  Refuse to install using blocklists unless
1207         --force was set.
1209 2009-05-04  martin f. krafft  <madduck@madduck.net>
1211         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1213 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1215         Updated copyright year
1217         * fs/hfsplus.c: updated copyright year
1219 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1221         HFS+ UUID
1223         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1224         in the space previously used by unused3
1225         (grub_hfsplus_uuid): new function
1226         (grub_hfsplus_fs): added uuid field
1228 2009-05-03  Pavel Roskin  <proski@gnu.org>
1230         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1231         suppress warnings.  It's no longer needed.
1232         * disk/host.c: Likewise.
1233         * disk/ata_pthru.c: Likewise.
1234         * disk/loopback.c: Likewise.
1235         * hook/datehook.c: Likewise.
1236         * parttool/pcpart.c: Likewise.
1237         * fs/i386/pc/pxe.c: Likewise.
1238         * fs/ntfscomp.c: Likewise.
1239         * efiemu/main.c: Likewise.
1240         * mmap/mmap.c: Likewise.
1241         * commands/crc.c: Likewise.
1242         * commands/hexdump.c: Likewise.
1243         * commands/hdparm.c: Likewise.
1244         * commands/acpi.c: Likewise.
1245         * commands/echo.c: Likewise.
1246         * commands/minicmd.c: Likewise.
1247         * commands/blocklist.c: Likewise.
1248         * commands/memrw.c: Likewise.
1249         * commands/loadenv.c: Likewise.
1250         * commands/usbtest.c: Likewise.
1251         * commands/lsmmap.c: Likewise.
1252         * commands/boot.c: Likewise.
1253         * commands/parttool.c: Likewise.
1254         * commands/configfile.c: Likewise.
1255         * commands/search.c: Likewise.
1256         * commands/ieee1275/suspend.c: Likewise.
1257         * commands/cat.c: Likewise.
1258         * commands/i386/pc/pxecmd.c: Likewise.
1259         * commands/i386/pc/play.c: Likewise.
1260         * commands/i386/pc/halt.c: Likewise.
1261         * commands/i386/pc/vbeinfo.c: Likewise.
1262         * commands/i386/pc/vbetest.c: Likewise.
1263         * commands/lspci.c: Likewise.
1264         * commands/date.c: Likewise.
1265         * commands/handler.c: Likewise.
1266         * commands/ls.c: Likewise.
1267         * commands/test.c: Likewise.
1268         * commands/cmp.c: Likewise.
1269         * commands/efi/loadbios.c: Likewise.
1270         * commands/efi/fixvideo.c: Likewise.
1271         * commands/halt.c: Likewise.
1272         * commands/help.c: Likewise.
1273         * commands/reboot.c: Likewise.
1274         * hello/hello.c: Likewise.
1275         * script/sh/main.c: Likewise.
1276         * loader/xnu.c: Likewise.
1277         * term/terminfo.c: Likewise.
1278         * term/i386/pc/serial.c: Likewise.
1279         * term/usb_keyboard.c: Likewise.
1281 2009-05-03  David S. Miller  <davem@davemloft.net>
1283         * normal/menu.c: Include grub/parser.h
1285 2009-05-03  Pavel Roskin  <proski@gnu.org>
1287         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1288         not char*.
1289         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1290         Suggested by Javier Martín <lordhabbit@gmail.com>
1292         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1293         efiemu??.o doesn't exist.
1294         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1295         copying.
1297 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1299         FreeBSD 64-bit support
1301         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1302         and loader/i386/bsd_trampoline.S
1303         (bsd_mod_ASFLAGS): new variable
1304         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1305         (FREEBSD_MODTYPE_KERNEL64): likewise
1306         (grub_bsd64_trampoline_start): likewise
1307         (grub_bsd64_trampoline_end): likewise
1308         (grub_bsd64_trampoline_selfjump): likewise
1309         (grub_bsd64_trampoline_gdt): likewise
1310         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1311         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1312         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1313         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1314         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1315         of "attrib" member
1316         * loader/i386/bsd_pagetable.c: new file
1317         * loader/i386/bsd_trampoline.S: likewise
1318         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1319         (ALIGN_VAR): likewise
1320         (entry_hi): new variable
1321         (kern_end_mdofs): likewise
1322         (is_64bit): likewise
1323         (grub_freebsd_add_meta): use ALIGN_VAR
1324         (grub_e820_mmap): new declaration
1325         (grub_freebsd_add_mmap): new function
1326         (grub_freebsd_add_meta_module): support 64 bit kernels
1327         (grub_freebsd_list_modules): use ALIGN_VAR
1328         (gdt_descriptor): new declaration
1329         (grub_freebsd_boot): support 64 bit kernels
1330         (grub_bsd_elf64_hook): new function
1331         (grub_bsd_load_elf): support elf64
1333 2009-05-03  Bean  <bean123ch@gmail.com>
1335         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1336         after we get the result of if statement.
1338 2009-05-03  Bean  <bean123ch@gmail.com>
1340         * Makefile.in (enable_efiemu): New variable.
1342         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1343         set.
1344         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1345         path.
1346         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1347         path, add -mno-red-zone option.
1348         (efiemu64_s.o): Likewise.
1349         (efiemu64.o): Use macro $^ for source file.
1351         * configure.ac (--enable-efiemu): New option.
1353 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1355         xnu support
1357         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1358         (pkglib_MODULES): add xnu.mod
1359         (xnu_mod_SOURCES): new variable
1360         (xnu_mod_CFLAGS): likewise
1361         (xnu_mod_LDFLAGS): likewise
1362         (xnu_mod_ASFLAGS): likewise
1363         * conf/i386-pc.rmk: likewise
1364         * conf/x86_64-efi.rmk: likewise
1365         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1366         new declaration
1367         * include/grub/i386/macho.h: new file
1368         * include/grub/i386/xnu.h: likewise
1369         * include/grub/macho.h: likewise
1370         * include/grub/machoload.h: likewise
1371         * include/grub/x86_64/macho.h: likewise
1372         * include/grub/x86_64/xnu.h: likewise
1373         * include/grub/xnu.h: likewise
1374         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1375         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1376         * loader/i386/efi/xnu.c: new file
1377         * loader/i386/pc/xnu.c: likewise
1378         * loader/i386/xnu.c: likewise
1379         * loader/i386/xnu_helper.S: likewise
1380         * loader/macho.c: likewise
1381         * loader/xnu.c: likewise
1382         * loader/xnu_resume.c: likewise
1383         * util/grub-dumpdevtree: likewise
1384         * include/grub/i386/pit.h: include grub/err.h
1385         (grub_pit_wait): export
1386         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1388 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1390         Efiemu
1392         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1393         _linux_efi, linux_efi.
1394         new files in grub-emu
1395         new targets efiemu32.o and efiemu64.o
1396         * loader/linux_normal_efiemu.c: likewise
1397         * loader/i386/efi/linux.c: added preliminary efiemu support
1398         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1399         files to copy
1400         * include/grub/autoefi.h: new file
1401         * include/grub/i386/efiemu.h: likewise
1402         * include/grub/i386/pc/efiemu.h: likewise
1403         * include/grub/efi/api.h: add LL suffix when necessary
1404         new definitions relating to tables
1405         * include/grub/efiemu/efiemu.h: new file
1406         * include/grub/efiemu/runtime.h: likewise
1407         * efiemu/prepare.c: likewise
1408         * efiemu/loadcore_common.c: likewise
1409         * efiemu/loadcore64.c: likewise
1410         * efiemu/runtime/efiemu.sh: likewise
1411         * efiemu/runtime/efiemu.S: likewise
1412         * efiemu/runtime/efiemu.c: likewise
1413         * efiemu/runtime/config.h: likewise
1414         * efiemu/prepare32.c: likewise
1415         * efiemu/main.c: likewise
1416         * efiemu/modules/pnvram.c: likewise
1417         * efiemu/modules/i386: likewise
1418         * efiemu/modules/i386/pc: likewise
1419         * efiemu/modules/acpi.c: likewise
1420         * efiemu/i386/pc/cfgtables.c: likewise
1421         * efiemu/i386/loadcore64.c: likewise
1422         * efiemu/i386/loadcore32.c: likewise
1423         * efiemu/prepare64.c: likewise
1424         * efiemu/loadcore.c: likewise
1425         * efiemu/symbols.c: likewise
1426         * efiemu/mm.c: likewise
1427         * efiemu/loadcore32.c: likewise
1429 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1431         ACPI spoofing
1433         * commands/acpi.c: new file
1434         * commands/i386/pc/acpi.c: likewise
1435         * commands/efi/acpi.c: likewise
1436         * include/grub/acpi.h: likewise
1437         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1438         (acpi_mod_SOURCES): new variable
1439         (acpi_mod_CFLAGS): likewise
1440         (acpi_mod_LDFLAGS): likewise
1441         * conf/i386-efi.rmk: likewise
1442         * conf/x86_64-efi.rmk: likewise
1444 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1446         Missing part from mmap patch
1448         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1449         (grub_mmap_unregister)
1450         (grub_mmap_free_and_unregister): use grub_mmap_register
1452 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1454         Mmap services
1456         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1457         * loader/i386/linux.c (find_mmap_size): likewise
1458         (allocate_pages): likewise
1459         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1460         (grub_fill_multiboot_mmap): likewise
1461         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1462         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1463         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1464         (OPENBSD_MMAP_RESERVED): likewise
1465         * include/grub/i386/pc/memory.h: include grub/memory.h
1466         (grub_lower_mem): removed
1467         (grub_upper_mem): likewise
1468         (GRUB_MACHINE_MEMORY_ACPI): new definition
1469         (GRUB_MACHINE_MEMORY_NVS): likewise
1470         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1471         (GRUB_MACHINE_MEMORY_HOLE): likewise
1472         (grub_machine_mmap_register): likewise
1473         (grub_machine_mmap_unregister): likewise
1474         (grub_machine_get_upper): likewise
1475         (grub_machine_get_lower): likewise
1476         (grub_machine_get_post64): likewise
1477         * include/grub/i386/efi/memory.h: new file
1478         * include/grub/x86_64/efi/memory.h: likewise
1479         * include/grub/efi/memory.h: likewise
1480         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1481         (mmap_mod_SOURCES): new variable
1482         (mmap_mod_LDFLAGS): likewise
1483         (mmap_mod_ASFLAGS): likewise
1484         * conf/i386-coreboot.rmk: likewise
1485         * conf/i386-ieee1275.rmk: likewise
1486         * conf/i386-efi.rmk: likewise
1487         * conf/x86_64-efi.rmk: likewise
1488         * include/grub/types.h (UINT_TO_PTR): new macro
1489         (PTR_TO_UINT32): likewise
1490         (PTR_TO_UINT64): likewise
1491         * include/grub/memory.h: new file
1492         * mmap/i386/pc/mmap.c: likewise
1493         * mmap/i386/pc/mmap_helper.S: likewise
1494         * mmap/i386/uppermem.c: likewise
1495         * mmap/mmap.c: likewise
1496         * mmap/efi/mmap.c: likewise
1497         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1498         grub_upper_mem
1499         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1500         (grub_upper_mem): likewise
1501         (grub_machine_init): don't use grub_upper_mem,
1502         make grub_lower_mem local
1503         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1504         grub_mmap_iterate and grub_mmap_get_upper
1505         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1507 2009-05-02  Bean  <bean123ch@gmail.com>
1509         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1510         script/sh/parser.y.
1511         (pkglib_MODULES): Add normal.mod and sh.mod.
1512         (normal_SOURCES): New variable.
1513         (normal_mod_CFLAGS): Likewise.
1514         (normal_mod_LDFLAGS): Likewise.
1515         (sh_mod_SOURCES): Likewise.
1516         (sh_mod_CFLAGS): Likewise.
1517         (sh_mod_LDFLAGS): Likewise.
1519         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1520         script/sh/lexer.c_DEPENDENCIES.
1521         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1522         kern/rescue_reader.c and kern/rescue_parser.c.
1523         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1524         (grub_emu_SOURCES): Change source files.
1525         (pkglib_MODULES): Remove normal.mod.
1526         (normal_SOURCES): Removed.
1527         (normal_mod_CFLAGS): Likewise.
1528         (normal_mod_LDFLAGS): Likewise.
1529         * conf/i386-coreboot.rmk: Likewise.
1530         * conf/i386-efi.rmk: Likewise.
1531         * conf/i386-ieee1276.rmk: Likewise.
1532         * conf/powerpc-ieee1275.rmk: Likewise.
1533         * conf/sparc64-ieee1275.rmk: Likewise.
1534         * conf/x86_64-efi.rmk: Likewise.
1536         * include/grub/command.h (grub_command_execute): New inline function.
1538         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1540         * include/grub/normal.h: Remove <grub/setjmp.h>.
1541         (grub_fs_module_list): Moved to normal/autofs.c.
1542         (grub_exit_env): Removed.
1543         (grub_command_execute): Likewise.
1544         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1545         parameter script.
1546         (read_command_list): New function declaration.
1547         (read_fs_list): Likewise.
1549         * include/parser.h: Include <grub/reader.h>.
1550         (grub_parser_split_cmdline): Change type of getline parameter.
1551         (grub_parser): New structure.
1552         (grub_parser_class): New variable.
1553         (grub_parser_execute): New function declaration.
1554         (grub_register_rescue_parser): Likewise.
1555         (grub_parser_register): New inline function.
1556         (grub_parser_unregister): Likewise.
1557         (grub_parser_get_current): Likewise.
1558         (grub_parser_set_current): Likewise.
1560         * include/grub/reader.h: New file.
1561         * kern/reader.c: Likewise.
1562         * kern/rescue_parser.c: Likewise.
1563         * kern/rescue_reader.c: Likewise.
1564         * normal/autofs.c: Likewise.
1565         * normal/dyncmd.c: Likewise.
1567         * include/grub/rescue.h: Removed.
1568         * normal/command.h: Likewise.
1570         * include/grub/script.h: Moved to ...
1571         * include/grub/script_sh.h: ... Moved here.
1572         * normal/execute.c: Moved to ...
1573         * script/sh/execute.c: ... Moved here.
1574         * normal/function.c: Moved to ...
1575         * script/sh/function.c: ... Moved here.
1576         * normal/lexer.c: Moved to ...
1577         * script/sh/lexer.c: ... Moved here.
1578         * normal/parser.y: Moved to ...
1579         * script/sh/parser.y: ... Moved here.
1580         * normal/script.c: Moved to ...
1581         * script/sh/script.c: ... Moved here.
1583         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1584         <grub/reader.h>.
1585         (grub_exit_env): Removed.
1586         (fs_module_list): Moved to normal/autofs.c.
1587         (grub_file_getline): Don't handle comment here.
1588         (free_menu): Skip removed field entry->commands.
1589         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1590         script parameter.
1591         (read_config_file): Removed nested parameter, change getline function.
1592         (grub_enter_normal_mode): Removed.
1593         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1594         (read_command_list): Likewise.
1595         (autoload_fs_module): Moved to normal/autofs.c.
1596         (read_fs_list): Likewise.
1597         (reader_nested): New variable.
1598         (grub_normal_execute): Run parser.sh to switch to sh parser.
1599         (grub_cmd_rescue): Removed.
1600         (cmd_normal): Removed.
1601         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1602         rescue command.
1603         (grub_cmdline_run): New function.
1604         (grub_normal_reader_init): Likewise.
1605         (grub_normal_read_line): Likewise.
1606         (grub_env_write_pager): Likewise.
1607         (cmdline): New variable.
1608         (grub_normal_reader): Likewise.
1609         (GRUB_MOD_INIT): Register normal reader and set as current, register
1610         pager hook, register normal command with grub_register_command_prio,
1611         so that it won't show up in command.lst.
1612         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1613         grub_fs_autoload_hook.
1615         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1616         (grub_menu_execute_entry): Replace grub_script_execute with
1617         grub_parser_execute, change parameter to grub_command_execute.
1619         * normal/menu_text.c: Remove <grub/script.h>.
1621         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1622         and <grub/parser.h>.
1623         (run): Change editor_getline to use new parser interface. Change
1624         parameter to grub_command_execute.
1626         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1627         <grub/reader.h> and <grub/parser.h>.
1628         (grub_load_normal_mode): Execute normal command.
1629         (grub_main): Call grub_register_core_commands,
1630         grub_register_rescue_parser and grub_register_rescue_reader, use
1631         grub_reader_loop to enter input loop.
1633         * kern/parser.c (grub_parser_split_cmdline): Change type of
1634         getline parameter.
1635         (grub_parser_class): New variable.
1636         (grub_parser_execute): New function.
1638         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1639         * loader/multiboot2.c: Likewise.
1640         * loader/sparc64/ieee1275/linux.c: Likewise.
1642         * util/grub-emu.c (read_command_list): New dummy function.
1644 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1646         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1647         count to 16 for CCISS and IDA.
1649 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1651         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1652         after waiting for user input.
1654         * loader/i386/linux.c: Include `<grub/normal.h>'.
1655         (grub_cmd_linux): Improve the error message about `ask' mode, by
1656         waiting for user input so it's not missed (we can do this, since
1657         user requested interaction).
1659 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1661         Added missing lst to grub-mkrescue
1663         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1664         and ${input_dir}/parttool.lst
1666 2009-04-30  David S. Miller  <davem@davemloft.net>
1668         * util/hostdisk.c (device_is_wholedisk): New function.
1669         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1670         zero only if device_is_wholedisk() returns true.
1672         * util/hostdisk.c (convert_system_partition_to_system_disk):
1673         Handle virtual disk devices named /dev/vdiskX as found on sparc
1674         and powerpc.
1676         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1677         lettered partition specifier is found, convert to numbered.
1679 2009-04-29  David S. Miller  <davem@davemloft.net>
1681         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1682         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1684         * normal/command.c: Add missing newline at end of file.
1686         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1687         warnings.
1688         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1689         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1690         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1691         ihandles have a 32-bit type but need to be stored in a "void *".
1693 2009-04-28  Pavel Roskin  <proski@gnu.org>
1695         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1696         not disk.  Adjust all dependencies.
1697         (grub_fs_uuid_close): Use grub_device_close(), not
1698         grub_disk_close().
1700         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1701         parent's partition, don't copy it by reference, as it gets freed
1702         on close.
1704 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1706         Preboot hooks support
1708         * commands/boot.c (struct grub_preboot_t): new declaration
1709         (preboots_head): new variable
1710         (preboots_tail): likewise
1711         (grub_loader_register_preboot_hook): new function
1712         (grub_loader_unregister_preboot_hook): likewise
1713         (grub_loader_set): launch preboot hooks
1714         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1715         (grub_loader_register_preboot_hook): new declaration
1716         (grub_loader_unregister_preboot_hook): likewise
1718 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1720         Warning fix
1722         * disk/scsi.c (grub_scsi_open): added missing cast when
1723         calling grub_dprintf
1725 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1727         Bug and warning fixes
1729         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1730         declaration
1731         * commands/test.c (test_parse): fixed bug with file tests and corrected
1732         declaration of find_file
1734 2009-04-26  Pavel Roskin  <proski@gnu.org>
1736         * Makefile.in: Don't install empty manual pages if help2man is
1737         missing.  Use help2man option for output, not shell redirection.
1739 2009-04-26  David S. Miller  <davem@davemloft.net>
1741         * util/grub-mkdevicemap.c (make_device_map): Add missing
1742         NESTED_FUNC_ATTR to process_device().
1744 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1746         Test command
1748         * commands/test.c: rewritten to use bash-like test
1750 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1752         Parttool autoloading and improvements
1754         * Makefile.in (pkglib_DATA): add parttool.lst
1755         (parttool.lst): new target
1756         * genmk.rb: generate parttool-*
1757         (CLEANFILES): add #{parttool}
1758         (PARTTOOLFILES): new variable
1759         * genparttoollist.sh: new file
1760         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1761         (grub_pcpart_type): likewise
1762         * commands/parttool.c (helpmsg): new variable
1763         (grub_cmd_parttool): output help if not enough arguments are supplied
1764         autoload modules
1765         (GRUB_MOD_INIT(parttool)): use helpmsg
1767 2009-04-24  David S. Miller  <davem@davemloft.net>
1769         Avoiding opening same device multiple times in device iterator.
1771         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1772         and use it to build a list of partitions in iterate_disk() and
1773         iterate_partition().
1775         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1776         on disk->data.
1778         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1779         grub_devalias_iterate() result instead of unconditional 0.
1780         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1781         Also, capture hook return value, either directly or via
1782         grub_children_iterate(), and propagate to caller.
1783         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1784         grub_children_iterate): Return value is now 'int' instead of
1785         'grub_err_t'.
1786         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1787         like a proper iterator, stopping when hooks return non-zero.
1788         (grub_devalias_iterate): Likewise.
1790 2009-04-23  David S. Miller  <davem@davemloft.net>
1792         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1794 2009-04-22  David S. Miller  <davem@davemloft.net>
1796         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1797         is larger than address_cells, use that value for address_cells too.
1799         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1800         IEEE1275_MAX_PATH_LEN): Define.
1801         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1802         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1803         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1804         'devtype'.  Explicitly NULL terminate devalias expansion.
1806         * util/sparc64/ieee1275/misc.c: New file.
1807         * util/sparc64/ieee1275/grub-setup.c: New file.
1808         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1809         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1810         * util/sparc64/ieee1275/grub-install.in: New file.
1811         * util/ieee1275/ofpath.c: New file.
1812         * util/ieee1275/devicemap.c: New file.
1813         * util/devicemap.c: New file.
1814         * util/deviceiter.c: New file.
1815         * kern/sparc64/ieee1275/init.c: New file.
1816         * include/grub/util/ofpath.h: New file.
1817         * include/grub/util/deviceiter.h: New file.
1818         * util/grub-mkdevicemap.c: Include deviceiter.h.
1819         Implement using grub_util_emit_devicemap_entry and
1820         grub_util_iterate_devices.
1821         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1822         util/devicemap.c into grub-mkdevicemap
1823         * conf/i386-efi.rmk: Likewise.
1824         * conf/i386-ieee1275.rmk: Likewise.
1825         * conf/i386-pc.rmk: Likewise.
1826         * conf/powerpc-ieee1275.rmk: Likewise.
1827         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1828         images and installation utilities.  Build kernel as image
1829         instead of as elf binary.  Use common rules as much as possible.
1831 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1833         Correct GPT definition
1835         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1836         of "attrib" member
1838 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1840         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1842 2009-04-19  David S. Miller  <davem@davemloft.net>
1844         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1845         (grub_rescue_cmd_linux): Rename to...
1846         (grub_cmd_linux): and fix prototype.
1847         (grub_rescue_cmd_initrd): Rename to...
1848         (grub_cmd_initrd): and fix prototype.
1849         (cmd_linux, cmd_initrd): New.
1850         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1851         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1853 2009-04-17  Pavel Roskin  <proski@gnu.org>
1855         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1856         format.
1857         (grub_ohci_transfer): Likewise.
1859         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1861         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1862         return without a value.  Fix inconsistent indentation.
1864         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1865         match struct grub_fs.
1867         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1868         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1869         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1870         * commands/lspci.c (grub_lspci_iter): Likewise.
1872 2009-04-16  Bean  <bean123ch@gmail.com>
1874         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1875         value.
1877 2009-04-15  Pavel Roskin  <proski@gnu.org>
1879         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1880         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1881         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1882         definitions.
1884 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1886         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1887         that no multiple data or metadata areas are supported and `Unknown
1888         metadata header'.
1890 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1892         Move loader out of the kernel
1894         * kern/loader.c: moved to ...
1895         * commands/boot.c: ... moved here
1896         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1897         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1898         * include/grub/kernel.h (grub_machine_fini): export
1899         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1900         (grub_loader_set): likewise
1901         (grub_loader_unset): likewise
1902         (grub_loader_boot): likewise
1903         * conf/common.rmk: new module boot.mod
1904         (pkglib_MODULES): add boot.mod
1905         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1906         (grub_emu_SOURCES): likewise
1907         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1908         (grub_emu_SOURCES): likewise
1909         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1910         (grub_emu_SOURCES): likewise
1911         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1912         (grub_emu_SOURCES): likewise
1913         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1914         (grub_emu_SOURCES): likewise
1915         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1916         (grub_emu_SOURCES): likewise
1917         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1918         (grub_emu_SOURCES): likewise
1920 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1922         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1924         * kern/misc.c (grub_itoa): Removed function
1925         (grub_ltoa): likewise
1926         (grub_vsprintf): use grub_lltoa
1928 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1930         Restore grub-emu
1932         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1933         * conf/i386-coreboot.rmk: likewise
1934         * conf/i386-ieee1275.rmk: likewise
1935         * conf/powerpc-ieee1275.rmk: likewise
1937 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1939         * INSTALL: Add that `./autogen.sh' needs to be run before
1940         `./configure.'.
1942 2009-04-14  Bean  <bean123ch@gmail.com>
1944         * Makefile.in (pkglib_DATA): Add handler.lst.
1945         (handler.lst): New rule.
1947         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1948         * conf/i386-coreboot.rmk: Likewise.
1949         * conf/i386-ieee1275.rmk: Likewise.
1950         * conf/i386-efi.rmk: Likewise.
1951         * conf/x86_64-efi.rmk: Likewise.
1952         * conf/powerpc-ieee1275.rmk: Likewise.
1953         * conf/sparc64-ieee1275.rmk: Likewise.
1955         * genhandlerlist.sh: New file.
1957         * genmk.rb: Add rules to generate handler.lst.
1959         * include/grub/normal.h (grub_file_getline): New function definition.
1960         (read_handler_list): Likewise.
1961         (free_handler_list): Likewise.
1963         * include/grub/term.h (grub_term_register_input): Add name parameter
1964         for auto generation of handler.lst.
1965         (grub_term_register_output): Likewise.
1967         * normal/handler.c: New file.
1969         * normal/main.c (get_line): Renamed to grub_file_getline.
1970         (read_config_file): Use the newly renamed grub_file_getline.
1971         (read_command_list): Likewise.
1972         (read_fs_list): Likewise.
1973         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1974         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1976         * term/efi/console.c (grub_console_init): Add name parameter for auto
1977         generation of handler.lst.
1978         * term/gfxterm.c: Likewise.
1979         * term/i386/pc/at_keyboard.c: Likewise.
1980         * term/i386/pc/console.c: Likewise.
1981         * term/i386/pc/serial.c: Likewise.
1982         * term/i386/pc/vesafb.c: Likewise.
1983         * term/i386/pc/vga.c: Likewise.
1984         * term/i386/pc/vga_text.c: Likewise.
1985         * term/ieee1275/ofconsole.c: Likewise.
1986         * term/usb_keyboard.c: Likewise.
1988 2009-04-14  Bean  <bean123ch@gmail.com>
1990         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1991         properly with null character.
1993 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1995         * configure: Remove.
1996         * config.h.in: Likewise.
1997         * stamp-h.in: Likewise.
1998         * DISTLIST: Likewise.
1999         * conf/common.mk: Likewise.
2000         * conf/i386-coreboot.mk: Likewise.
2001         * conf/i386-efi.mk: Likewise.
2002         * conf/i386-ieee1275.mk: Likewise.
2003         * conf/i386.mk: Likewise.
2004         * conf/i386-pc.mk: Likewise.
2005         * conf/powerpc-ieee1275.mk: Likewise.
2006         * conf/sparc64-ieee1275.mk: Likewise.
2007         * conf/x86_64-efi.mk: Likewise.
2009         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2010         develop on GRUB.
2012 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2013             David S. Miller  <davem@davemloft.net>
2015         * util/hostdisk.c (make_device_name): Fix buffer length
2016         calculations.
2018 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2020         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2021         <sys/param.h> and <sys/sysctl.h>.
2022         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2023         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2024         opening the device and reset them afterwards.
2026 2009-04-13  Pavel Roskin  <proski@gnu.org>
2028         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2029         Reported by John Stanley <jpsinthemix@verizon.net>
2031 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2033         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2034         that name for menuentries when appropriate.
2036 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2038         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2040 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2042         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2043         to Linux, simply abort telling the user it's no longer supported.
2045 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2047         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2048         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2049         `freebsd_loadenv' only when devices.hints exist.
2051 2009-04-13  Pavel Roskin  <proski@gnu.org>
2053         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2055 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2057         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2058         partition number.
2059         (grub_drive): Likewise.
2061 2009-04-13  David S. Miller  <davem@davemloft.net>
2063         * kern/sparc64/ieee1275/ieee1275.c: New file.
2064         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2065         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2066         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2067         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2068         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2069         grub_ieee1275_alloc_physmem): Declare new exported functions.
2071         * include/grub/sparc64/ieee1275/loader.h: New file.
2072         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2073         * include/grub/sparc64/kernel.h: Likewise.
2074         * loader/sparc64/ieee1275/linux.c: Likewise.
2076         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2077         (grub_fstest_SOURCES): Likewise.
2079         * util/hostdisk.c (make_device_name): Do not make any assumptions
2080         about the length of drive names.
2082         * kern/dl.c (grub_dl_load_file): Close file immediately when
2083         we are done using it.
2085 2009-04-12  David S. Miller  <davem@davemloft.net>
2087         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2088         values.  Noticed by Pavel Roskin.
2090         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2091         target compiler.
2093         * genmk.rb: Add more flexible image type specification, also
2094         pass --strip-unneeded to objcopy.
2095         * conf/i386-pc.rmk: Use *_FORMAT.
2096         * conf/i386-pc.mk: Rebuilt.
2098         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2099         (OFDISK_HASH_SZ): Define.
2100         (ofdisk_hash): New hash table.
2101         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2102         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2103         instead of device phandle which is not unique.
2105         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2106         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2107         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2108         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2109         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2110         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2111         GRUB_KERNEL_MACHINE_DATA_END): Define.
2112         (grub_kernel_image_size, grub_total_module_size): Declare.
2114 2009-04-12  Pavel Roskin  <proski@gnu.org>
2116          * configure.ac: Change the logic when we check for target tools.
2117          Do it when the target is specified and it's different from the
2118          specified value of the host.
2120 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2122         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2123         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2124         GNU/kFreeBSD. Check if a device is a character device. Use
2125         DIOCGMEDIASIZE to get the size.
2126         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2127         support for GNU/kFreeBSD.
2128         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2129         is a character device instead of a block device. Add support for
2130         FreeBSD device names.
2132         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2133         is a character device instead of a block device.
2135         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2136         is a character device instead of a block device.
2138 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2140         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2141         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2142         FreeBSD. Check if a device is a character device. Use
2143         DIOCGMEDIASIZE to get the size.
2144         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2145         support for FreeBSD.
2146         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2147         is a character device instead of a block device. Add support for
2148         FreeBSD device names.
2150         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2151         a character device instead of a block device.
2152         (grub_util_check_char_device): New function.
2154         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2155         a character device instead of a block device.
2157         * include/grub/util/getroot.h (grub_util_check_char_device): New
2158         prototype.
2160 2009-04-11  David S. Miller  <davem@davemloft.net>
2162         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2163         static libgcc.
2164         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2165         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2166         function, if present.
2167         (__bswapdi2): Likewise.
2169         * include/grub/sparc64/ieee1275/boot.h: New file.
2170         * boot/sparc64/ieee1275/boot.S: Likewise.
2171         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2173         * kern/misc.c (grub_ltoa): New function.
2174         (grub_vsprintf): Use it to format 'long' integers.
2176 2009-04-10  David S. Miller  <davem@davemloft.net>
2178         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2179         slots are of type grub_ieee1275_cell_t.
2180         (grub_nand_read): Likewise.
2181         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2182         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2183         macros are used to compare values in arg/ret block of the call.
2184         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2185         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2186         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2187         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2188         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2189         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2190         grub_ieee1275_close, grub_ieee1275_set_property,
2191         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2192         grub_ieee1275_cell_t.
2193         * kern/ieee1275/openfw.c (grub_map): Likewise.
2194         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2195         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2197         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2198         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2199         (grub_devalias_iterate): Likewise.
2201 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2203         UFS improvements
2205         * fs/ufs.c (INODE_NBLOCKS): new definition
2206         (struct grub_ufs_dirent): added fields for non-BSD dirents
2207         (grub_ufs_get_file_block): fixed double indirect handling
2208         (grub_ufs_lookup_symlink): use more robust way to determine whether
2209         symlink is inline
2210         (grub_ufs_find_file): support for non-BSD dirents
2211         (grub_ufs_dir): support for non-BSD dirents
2213 2009-04-10  Bean  <bean123ch@gnail.com>
2215         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2216         attribute, otherwise the size would be wrong for i386 platform.
2218         * include/grub/pci.h (grub_pci_read_word): New inline function.
2219         (grub_pci_read_byte): Likewise.
2220         (grub_pci_write): Likewise.
2221         (grub_pci_write_word): Likewise.
2222         (grub_pci_write_byte): Likewise.
2224         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2226         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2227         (find_framebuf): Scan pci to locate the frame buffer address.
2229         * commands/efi/fixvideo.c: New file.
2231         * commands/efi/loadbios.c: Likewise.
2233         * commands/memrw.c: Likewise.
2235         * util/grub-dumpbios.in: Likewise.
2237         * conf/common.rmk (grub-dumpbios): New utility.
2238         (pkglib_MODULES): New module memrw.mod.
2239         (memrw_mod_SOURCE): New macro.
2240         (memrw_mod_CFLAGS): Likewise.
2241         (memrw_mod_LDFLAGS): Likewise.
2243         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2244         fixvideo.mod.
2245         (loadbios_mod_SOURCE): New macro.
2246         (loadbios_mod_CFLAGS): Likewise.
2247         (loadbios_mod_LDFLAGS): Likewise.
2248         (fixvideo_mod_SOURCE): Likewise.
2249         (fixvideo_mod_CFLAGS): Likewise.
2250         (fixvideo_mod_LDFLAGS): Likewise.
2252         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2253         fixvideo.mod.
2254         (loadbios_mod_SOURCE): New macro.
2255         (loadbios_mod_CFLAGS): Likewise.
2256         (loadbios_mod_LDFLAGS): Likewise.
2257         (fixvideo_mod_SOURCE): Likewise.
2258         (fixvideo_mod_CFLAGS): Likewise.
2259         (fixvideo_mod_LDFLAGS): Likewise.
2261 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2263         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2265 2009-04-07  David S. Miller  <davem@davemloft.net>
2267         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2268         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2269         R_SPARC_WDISP30 case.
2270         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2272 2009-04-06  Pavel Roskin  <proski@gnu.org>
2274         * include/grub/misc.h (ARRAY_SIZE): New macro.
2275         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2276         New macro.
2277         * loader/i386/linux.c (allocate_pages): Use free_pages().
2278         (grub_linux_unload): Don't use free_pages().
2279         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2280         wrong index.  Treat all other modes as text modes.
2281         (grub_cmd_linux): Initialize vid_mode unconditionally to
2282         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2284         * commands/help.c (print_command_help): Use cmd->prio, not
2285         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2287 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2289         Parttool
2291         * parttool/pcpart.c: new file
2292         * commands/parttool.c: likewise
2293         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2294         (parttool_mod_SOURCES): new variable
2295         (parttool_mod_CFLAGS): likewise
2296         (parttool_mod_LDFLAGS): likewise
2297         (pcpart_mod_SOURCES): likewise
2298         (pcpart_mod_CFLAGS): likewise
2299         (pcpart_mod_LDFLAGS): likewise
2300         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2301         and parttool/pcpart.c
2302         * conf/i386-efi.rmk: likewise
2303         * conf/i386-ieee1275.rmk: likewise
2304         * conf/i386-pc.rmk: likewise
2305         * conf/powerpc-ieee1275.rmk: likewise
2306         * conf/sparc64-ieee1275.rmk: likewise
2307         * conf/x86_64-ieee1275.rmk: likewise
2309 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2311         Support for mtime and further expandability of dir command
2313         * include/grub/lib/datetime.h: moved to ...
2314         * include/grub/datetime.h: ... moved here and added
2315         declaration of grub_unixtime2datetime. All users updated
2316         * include/grub/fs.h: new syntax for dir and mtime functions in
2317         struct grub_fs
2318         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2319         and GRUB_FSHELP_FLAGS_MASK
2320         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2321         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2322         (grub_ext2_mtime): new function
2323         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2324         (grub_hfsplus_mtime): new function
2325         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2326         (GRUB_UFS_ATTR_FILE): likewise
2327         (GRUB_UFS_ATTR_LNK): likewise
2328         (struct grub_ufs_sblock): new fields mtime
2329         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2330         all users updated
2331         (grub_ufs_dir): mtime support
2332         (grub_ufs_mtime): new function
2333         * fs/affs.c (grub_affs_dir): use new dir syntax
2334         * fs/afs.c (grub_afs_dir): likewise
2335         * fs/cpio.c (grub_cpio_dir): likewise
2336         * fs/fat.c (grub_fat_find_dir): likewise
2337         * fs/hfs.c (grub_hfs_dir): likewise
2338         * fs/iso9660.c (grub_iso9660_dir): likewise
2339         * fs/jfs.c (grub_jfs_dir): likewise
2340         * fs/minix.c (grub_minix_dir): likewise
2341         * fs/ntfs.c (grub_ntfs_dir): likewise
2342         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2343         * fs/sfs.c (grub_sfs_dir): likewise
2344         * fs/xfs.c (grub_xfs_dir): likewise
2345         * util/hostfs.c (grub_hostfs_dir): likewise
2346         * lib/datetime.c: moved to ...
2347         * normal/datetime.c: ... moved here
2348         (grub_unixtime2datetime): new function
2349         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2350         * normal/completion.c (iterate_dir): use new dir syntax
2351         * normal/misc.c (grub_normal_print_device_info): tell the
2352         last modification time of a volume
2353         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2354         * conf/common.rmk: added lib/datetime.c to ls.mod
2355         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2356         (normal_mod_SOURCES): likewise
2357         (datetime_mod_SOURCES): Removed lib/datetime.c
2358         * conf/i386-efi.rmk: likewise
2359         * conf/i386-ieee1275.rmk: likewise
2360         * conf/i386-pc.rmk: likewise
2361         * conf/powerpc-ieee1275.rmk: likewise
2362         * conf/sparc64-ieee1275.rmk: likewise
2363         * conf/x86_64-efi.rmk: likewise
2365 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2367         Trim trailing spaces in FAT label and support mtools-like labels
2369         * fs/fat.c (grub_fat_iterate_dir): New function based
2370         on grub_fat_find_dir
2371         (grub_fat_find_dir): use grub_fat_iterate_dir
2372         (grub_fat_label): likewise
2374 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2376         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2377         and command.h
2378         remove extraneous kernel_elf_HEADERS
2380 2009-04-04  Bean  <bean123ch@gnail.com>
2382         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2384         * util/misc.c: Likewise.
2386 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2388         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2389         instead of grub_printf.
2391 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2393         * loader/i386/linux.c (grub_linux_setup_video): Fill
2394         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2395         values from `mode info' structure instead of hardcoded
2396         values.
2398 2009-04-01  Pavel Roskin  <proski@gnu.org>
2400         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2401         unused now.
2402         * genmk.rb: Likewise.
2403         * configure.ac: Likewise.
2405 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2407         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2408         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2410 2009-04-01  David S. Miller  <davem@davemloft.net>
2412         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2413         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2414         (grub_setjmp): Mark with 'returns_twice' attribute.
2415         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2416         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2417         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2419 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2421         Reapply fix from 2008-07-28 which was accidentally reverted; also
2422         perform the same fix to a similar check in same function.
2424         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2425         with the same number are found, just use issue a warning with
2426         grub_dprintf(), as this error has been reported to be non-fatal.
2428 2009-03-31  Pavel Roskin  <proski@gnu.org>
2430         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2431         for cross-compilation.
2433 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2435         Fix i386-ieee1275 build.
2437         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2438         Remove declaration.
2440 2009-03-30  Pavel Roskin  <proski@gnu.org>
2442         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2443         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2444         zero-terminated, rely only on the strlen value.  Fix comparison
2445         of strings differing in length.
2447 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2449         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2450         checking for abi version.  Improve error messages on BIOS to notify
2451         user about `linux16' command.
2453 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2455         Leak fixes
2457         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2458         in case of collision
2459         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2461 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2463         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2464         set `vid_mode' accordingly.
2465         (grub_linux_boot): Process `vid_mode' and set video mode.
2467 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2469         * util/grub.d/10_linux.in (linux_entry): New function.
2470         Factorize generation of Linux boot entries.
2472 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2474         Make the format of Environment Block plain text. The boot loader
2475         part is not tested well yet.
2477         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2478         (buffer): Removed.
2479         (envblk): Likewise.
2480         (usage): Remove "info" and "clear". Add "unset". Update the
2481         description of "set", as this does not delete variables any
2482         longer.
2483         (create_envblk_file): Complete rewrite.
2484         (open_envblk_file): Likewise.
2485         (cmd_info): Removed.
2486         (cmd_list): Likewise.
2487         (cmd_set): Likewise.
2488         (cmd_clear): Likewise.
2489         (list_variables): New function.
2490         (write_envblk): Likewise.
2491         (set_variables): Likewise.
2492         (unset_variables): Likewise.
2493         (main): Complete rewrite.
2495         * commands/loadenv.c (buffer): Removed.
2496         (envblk): Likewise.
2497         (open_envblk_file): New function.
2498         (read_envblk_file): Complete rewrite.
2499         (grub_cmd_load_env): Likewise.
2500         (grub_cmd_list_env): Likewise.
2501         (struct blocklist): New struct.
2502         (free_blocklists): New function.
2503         (check_blocklists): Likewise.
2504         (write_blocklists): Likewise.
2505         (grub_cmd_save_env): Complete rewrite.
2507         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2508         a plain text signature.
2509         (GRUB_ENVBLK_MAXLEN): Removed.
2510         (struct grub_envblk): Complete rewrite.
2511         (grub_envblk_find): Removed.
2512         (grub_envblk_insert): Likewise.
2513         (grub_envblk_open): New prototype.
2514         (grub_envblk_set): Likewise.
2515         (grub_envblk_delete): Put const to VALUE.
2516         (grub_envblk_iterate): Put const to NAME and VALUE.
2517         (grub_envblk_close): New prototype.
2518         (grub_envblk_buffer): New inline function.
2519         (grub_envblk_size): Likewise.
2521         * lib/envblk.c: Include grub/mm.h.
2522         (grub_env_find): Removed.
2523         (grub_envblk_open): New function.
2524         (grub_envblk_close): Likewise.
2525         (escaped_value_len): Likewise.
2526         (find_next_line): Likewise.
2527         (grub_envblk_insert): Removed.
2528         (grub_envblk_set): New function.
2529         (grub_envblk_delete): Complete rewrite.
2530         (grub_envblk_iterate): Likewise.
2532 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2534         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2535         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2536         variables.  Use 16-bit loader.
2537         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2538         loader.
2539         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2540         (grub_linux16_boot): ... this.  Update all users.
2541         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2542         (grub_linux_boot): ... this.  Update all users.
2544         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2545         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2546         commands to `linux16' and `initrd16'.
2547         (GRUB_MOD_FINI(linux)): Rename to ...
2548         (GRUB_MOD_FINI(linux16)): ... this.
2550 2009-03-24  Pavel Roskin  <proski@gnu.org>
2552         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2553         not just for compilation.
2555 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2557         Move multiboot helper out of kernel
2559         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2560         `loader/i386/multiboot_helper.S'.
2561         * conf/i386-coreboot.rmk: Likewise
2562         * conf/i386-ieee1275.rmk: Likewise
2564         * kern/i386/loader.S: Move multiboot helpers from here...
2565         * loader/i386/multiboot_helper.S: ...moved here
2566         * include/grub/i386/loader.h: Move declarations of multiboot
2567         helpers from here...
2568         * include/grub/i386/multiboot.h: ...moved here
2569         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2571 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2573         * kern/env.c (grub_env_context_open): Added an argument to specify
2574         whether a new context inherits exported variables from current
2575         one. This is useful when making a sandbox to interpret a config
2576         file.
2577         All callers updated.
2579         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2581 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2583         * kern/env.c (grub_env_context_close): Fix memory leaks.
2585 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2587         * normal/main.c (grub_normal_execute): Added an argument
2588         BATCH to specify if an interactive interface should be provided
2589         after reading a config file.
2590         All callers updated.
2591         (read_command_list): Prevent being executed twice.
2592         (read_fs_list): Likewise.
2594         * include/grub/normal.h (grub_normal_execute): Updated the
2595         prototype.
2597 2009-03-22  Pavel Roskin  <proski@gno.org>
2599         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2600         _start.
2601         * kern/i386/pc/startup.S: Likewise.
2602         * kern/i386/efi/startup.S: Likewise.
2603         * kern/i386/ieee1275/startup.S: Likewise.
2604         * kern/i386/coreboot/startup.S: Likewise.
2605         * kern/x86_64/efi/startup.S: Likewise.
2607         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2608         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2609         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2611 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2613         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2615         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2616         limit detection.
2617         Use vaddr of correct segment for entry_point.
2619 2009-03-21  Bean  <bean123ch@gmail.com>
2621         * commands/blocklist.c: Add include file <grub/command.h>, remove
2622         <grub/normal.h> and <grub/arg.h>.
2623         (grub_cmd_blocklist): Use the new command interface.
2624         (GRUB_MOD_INIT): Likewise.
2625         (GRUB_MOD_FINI): Likewise.
2626         * commands/boot.c: Likewise.
2627         * commands/cat.c: Likewise.
2628         * commands/cmp.c: Likewise.
2629         * commands/configfile.c: Likewise.
2630         * commands/crc.c: Likewise.
2631         * commands/echo.c: Likewise.
2632         * commands/halt.c: Likewise.
2633         * commands/handler.c: Likewise.
2634         * commands/hdparm.c: Likewise.
2635         * commands/help.c: Likewise.
2636         * commands/hexdump.c: Likewise.
2637         * commands/loadenv.c: Likewise.
2638         * commands/ls.c: Likewise.
2639         * commands/lsmmap.c: Likewise.
2640         * commands/lspci.c: Likewise.
2641         * commands/loadenv.c: Likewise.
2642         * commands/read.c: Likewise.
2643         * commands/reboot.c: Likewise.
2644         * commands/search.c: Likewise.
2645         * commands/sleep.c: Likewise.
2646         * commands/test.c: Likewise.
2647         * commands/usbtest.c: Likewise.
2648         * commands/videotest.c: Likewise.
2649         * commands/i386/cpuid.c: Likewise.
2650         * commands/i386/pc/halt.c: Likewise.
2651         * commands/i386/pc/play.c: Likewise.
2652         * commands/i386/pc/pxecmd.c: Likewise.
2653         * commands/i386/pc/vbeinfo.c: Likewise.
2654         * commands/i386/pc/vbetest.c: Likewise.
2655         * commands/ieee1275/suspend.c: Likewise.
2656         * disk/loopback.c: Likewise.
2657         * font/font_cmd.c: Likewise.
2658         * hello/hello.c: Likewise.
2659         * loader/efi/appleloader.c: Likewise.
2660         * loader/efi/chainloader.c: Likewise.
2661         * loader/i386/bsd.c: Likewise.
2662         * loader/i386/efi/linux.c: Likewise.
2663         * loader/i386/ieee1275/linux.c: Likewise.
2664         * loader/i386/linux.c: Likewise.
2665         * loader/i386/pc/chainloader.c: Likewise.
2666         * loader/i386/pc/linux.c: Likewise.
2667         * loader/powerpc/ieee1275/linux.c: Likewise.
2668         * loader/multiboot_loader.c: Likewise.
2669         * term/gfxterm.c: Likewise.
2670         * term/i386/pc/serial.c: Likewise.
2671         * term/terminfo.c: Likewise.
2673         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2674         * term/i386/pc/vga.c: Likewise.
2675         * video/readers/jpeg.c: Likewise.
2676         * video/readers/png.c: Likewise.
2677         * video/readers/tga.c: Likewise.
2679         * util/grub-fstest (cmd_loopback): Removed.
2680         (cmd_blocklist): Likewise.
2681         (cmd_ls): Likewise.
2682         (grub_register_command): Likewise.
2683         (grub_unregister_command): Likewise.
2684         (execute_command): Use grub_command_find to locate command and execute
2685         it.
2687         * include/grub/efi/chainloader.h: Removed.
2688         * loader/efi/chainloader_normal.c: Likewise.
2689         * loader/i386/bsd_normal.c: Likewise.
2690         * loader/i386/pc/chainloader_normal.c: Likewise.
2691         * loader/i386/pc/multiboot_normal.c: Likewise.
2692         * loader/linux_normal.c: Likewise.
2693         * loader/multiboot_loader_normal.c: Likewise.
2694         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2696         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2697         and grub_register_command_p1.
2699         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2700         kern/command.c, lib/arg.c and commands/extcmd.c.
2701         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2702         (minicmd_mod_SOURCES): New variable.
2703         (minicmd_mod_CFLAGS): Likewise.
2704         (minicmd_mod_LDFLAGS): Likewise.
2705         (extcmd_mod_SOURCES): Likewise.
2706         (extcmd_mod_CFLAGS): Likewise.
2707         (extcmd_mod_LDFLAGS): Likewise.
2708         (boot_mod_SOURCES): Removed.
2709         (boot_mod_CFLAGS): Likewise.
2710         (boot_mod_LDFLAGS): Likewise.
2712         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2713         kern/corecmd.c.
2714         (kernel_img_HEADERS): Add command.h.
2715         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2716         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2717         and lib/arg.c.
2718         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2719         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2720         remove the corresponding normal mode command.
2721         (normal_mod_SOURCES): Remove normal/arg.c.
2722         * conf/i386-coreboot.rmk: Likewise.
2723         * conf/i386-efi.rmk: Likewise.
2724         * conf/i386-ieee1275.rmk: Likewise.
2725         * conf/powerpc-ieee1275.rmk: Likewise.
2726         * conf/x86_64-efi.rmk: Likewise.
2728         * include/grub/arg.h: Move from here ...
2729         * include/grub/lib/arg.h: ... to here.
2731         * normal/arg.c: Move from here ...
2732         * lib/arg.c: ... to here.
2734         * commands/extcmd.c: New file.
2735         * commands/minicmd.c: Likewise.
2736         * include/grub/command.h: Likewise.
2737         * include/grub/extcmd.h: Likewise.
2738         * kern/command.c: Likewise.
2739         * kern/corecmd.c: Likewise.
2741         * kern/list.c (grub_list_iterate): Return int instead of void.
2742         (grub_list_insert): New function.
2743         (grub_prio_list_insert): Likewise.
2745         * kern/rescue.c (grub_rescue_command): Removed.
2746         (grub_rescue_command_list): Likewise.
2747         (grub_rescue_register_command): Likewise.
2748         (grub_rescue_unregister_command): Likewise.
2749         (grub_rescue_cmd_boot): Move to minicmd.c
2750         (grub_rescue_cmd_help): Likewise.
2751         (grub_rescue_cmd_info): Likewise.
2752         (grub_rescue_cmd_boot): Likewise.
2753         (grub_rescue_cmd_testload): Likewise.
2754         (grub_rescue_cmd_dump): Likewise.
2755         (grub_rescue_cmd_rmmod): Likewise.
2756         (grub_rescue_cmd_lsmod): Likewise.
2757         (grub_rescue_cmd_exit): Likewise.
2758         (grub_rescue_print_devices): Moved to corecmd.c.
2759         (grub_rescue_print_files): Likewise.
2760         (grub_rescue_cmd_ls): Likewise.
2761         (grub_rescue_cmd_insmod): Likewise.
2762         (grub_rescue_cmd_set): Likewise.
2763         (grub_rescue_cmd_unset): Likewise.
2764         (attempt_normal_mode): Use grub_command_find to get normal module.
2765         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2766         commands, remove grub_rescue_register_command calls.
2768         * normal/command.c (grub_register_command): Removed.
2769         (grub_unregister_command): Likewise.
2770         (grub_command_find): Likewise.
2771         (grub_iterate_commands): Likewise.
2772         (rescue_command): Likewise.
2773         (export_command): Moved to corecmd.c.
2774         (set_command): Removed.
2775         (unset_command): Likewise.
2776         (insmod_command): Likewise.
2777         (rmmod_command): Likewise.
2778         (lsmod_command): Likewise.
2779         (grub_command_init): Likewise.
2781         * normal/completion.c (iterate_command): Use cmd->prio to check for
2782         active command.
2783         (complete_arguments): Use grub_extcmd_t structure to find options.
2784         (grub_normal_do_completion): Change function grub_iterate_commands to
2785         grub_command_iterate.
2787         * normal/execute.c (grub_script_execute_cmd): No need to parse
2788         argument here.
2790         * normal/main.c (grub_dyncmd_dispatcher): New function.
2791         (read_command_list): Register unload commands as dyncmd.
2792         (grub_cmd_normal): Use new command interface, register rescue,
2793         unregister normal at entry, register normal, unregister rescue at exit.
2795         * include/grub/list.h (grub_list_test_t): New type.
2796         (grub_list_iterate): Return int instead of void.
2797         (grub_list_insert): New function.
2798         (GRUB_AS_NAMED_LIST_P): New macro.
2799         (GRUB_AS_PRIO_LIST): Likewise.
2800         (GRUB_AS_PRIO_LIST_P): Likewise.
2801         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2802         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2803         (grub_prio_list): New structure.
2804         (grub_prio_list_insert): New function.
2805         (grub_prio_list_remove): New inline function.
2807         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2808         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2809         (GRUB_COMMAND_FLAG_MENU): Likewise.
2810         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2811         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2812         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2813         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2814         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2815         (grub_command): Likewise.
2816         (grub_register_command): Likewise.
2817         (grub_command_find): Likewise.
2818         (grub_iterate_commands): Likewise.
2819         (grub_command_init): Likewise.
2820         (grub_arg_parse): Likewise.
2821         (grub_arg_show_help): Likewise.
2823         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2824         (grub_rescue_unregister_command): Likewise.
2826         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2827         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2828         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2830         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2831         grub_rescue_cmd_initrd.
2832         * include/grub/i386/loader.h: Likewise.
2833         * include/grub/x86_64/loader.h: Likewise.
2835         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2837 2009-03-21  Bean  <bean123ch@gmail.com>
2839         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2840         instead of stat in mingw environment.
2842         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2844         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2846         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2847         AC_CONFIG_LINKS.
2849 2009-03-21  Bean  <bean123ch@gmail.com>
2851         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2852         out of range error.
2854 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2856         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2857         checking inode flags for EXT4_EXTENTS_FLAG.
2859 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2861         * loader/i386/linux.c: Include `<grub/video.h>' and
2862         `<grub/i386/pc/vbe.h>'..
2863         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2864         (grub_linux32_boot): Attempt to configure video settings with
2865         grub_linux_setup_video().
2866         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2867         to avoid grub_console_fini() which would step out of graphical mode
2868         unconditionally.
2870 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2872         Fix build on powerpc.
2873         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2875 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2877         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2878         background image command.
2880 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2882         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2883         (grub_gfxterm_putchar): Extract pairs of identical calls to
2884         draw_cursor out of conditional blocks.
2886 2009-03-11  Pavel Roskin  <proski@gnu.org>
2888         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2889         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2891 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2893         * loader/i386/multiboot_elfxx.c
2894         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2896 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2898         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2899         `kern/handler.c'.
2901 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2903         * loader/i386/multiboot.c (code_size): New variable.
2904         (grub_multiboot): Define offsets by adding to `code_size' rather
2905         than subtracting from `grub_multiboot_payload_size'.  Provide
2906         4-byte alignment to MBI and others by increasing
2907         `boot_loader_name_length' appropriately.
2909         * loader/i386/multiboot_elfxx.c
2910         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2912 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2914         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2915         `fs/ext2.c'.
2917 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2919         Make loader/i386/linux.c usable on i386-pc again.
2921         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2922         memory to heap.
2923         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2924         `#error' stanza.
2926 2009-03-07  Bean  <bean123ch@gmail.com>
2928         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2929         allocation.
2931 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2933         Fix display issue on terminals with screen size other than 80x25
2934         (e.g. gfxterm with resolution higher than 640x480).
2936         * normal/main.c (grub_normal_init_page): Display title text in a
2937         position relative to the center of the terminal instead of relying
2938         on a hardcoded offset.
2940 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2942         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2943         installed.
2945         * Makefile.in (host_kernel): New variable.
2946         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2947         scripts instead of just the windows one.
2948         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2950 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2952         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2953         `kern/handler.c'.
2954         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2955         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2956         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2957         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2958         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2959         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2961 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2963         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2964         or if there's no space for the disk label and print the partition number on a
2965         invalid magic.
2967 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2969         * util/misc.c: Include <time.h>.
2970         (grub_millisleep): New function.
2972 2009-03-04  Bean  <bean123ch@gmail.com>
2974         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2975         another option -mno-red-zone.
2977         * commands/handler.c: Change module description.
2979         * kern/handler.c: Add missing space at the end of description line.
2981         * kern/list.c: Likewise.
2983 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2985         Move more components to the relocation area, and fix mbi pointer
2986         handling to use the destination rather than the origin (thanks to
2987         Vladimir Serbinenko for spotting).
2989         * loader/i386/multiboot.c (mbi_dest): New variable.
2990         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2991         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2992         relocation area.
2994 2009-03-01  Bean  <bean123ch@gmail.com>
2996         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2997         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2998         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2999         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3001         * loader/i386/efi/linux.c (acpi_guid): New variable.
3002         (acpi_guid): Likewise.
3003         (EBDA_SEG_ADDR): New constant.
3004         (LOW_MEM_ADDR): Likewise.
3005         (FAKE_EBDA_SEG): Likewise.
3006         (fake_bios_data): New function.
3007         (grub_linux_boot): Call fake_bios_data.
3009 2009-03-01  Bean  <bean123ch@gmail.com>
3011         * commands/terminal.c: Removed.
3013         * commands/handler.c: New file.
3015         * include/grub/list.h: Likewise.
3017         * include/grub/handler.h: Likewise.
3019         * kern/list.c: Likewise.
3021         * kern/handler.c: Likewise.
3023         * kern/term.h: Include header file <grub/handler.h>.
3024         (grub_term_input): Move next field to the beginning.
3025         (grub_term_output): Likewise.
3026         (grub_term_input_class): New variable.
3027         (grub_term_output_class): Likewise.
3028         (grub_term_register_input): Changed to inline function.
3029         (grub_term_register_output): Likewise.
3030         (grub_term_unregister_input): Likewise.
3031         (grub_term_unregister_output): Likewise.
3032         (grub_term_set_current_input): Likewise.
3033         (grub_term_set_current_output): Likewise.
3034         (grub_term_get_current_input): Likewise.
3035         (grub_term_get_current_output): Likewise.
3036         (grub_term_iterate_input): Removed.
3037         (grub_term_iterate_output): Likewise.
3039         * kern/term.c (grub_term_list_input): Removed.
3040         (grub_term_list_output): Likewise.
3041         (grub_term_input_class): New variable.
3042         (grub_term_output_class): Likewise.
3043         (grub_cur_term_input): Change variable as macro.
3044         (grub_cur_term_output): Likewise.
3045         (grub_term_register_input): Removed.
3046         (grub_term_register_output): Likewise.
3047         (grub_term_unregister_input): Likewise.
3048         (grub_term_unregister_output): Likewise.
3049         (grub_term_set_current_input): Likewise.
3050         (grub_term_set_current_output): Likewise.
3051         (grub_term_iterate_input): Likewise.
3052         (grub_term_iterate_output): Likewise.
3053         (grub_term_get_current_input): Likewise.
3054         (grub_term_get_current_output): Likewise.
3056         * util/grub-editenv.c: Include header file <grub/handler.h>.
3057         (grub_term_get_current_input): Removed.
3058         (grub_term_get_current_output): Likewise.
3059         (grub_term_input_class): New variable.
3060         (grub_term_output_class): Likewise.
3062         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3063         (grub_term_get_current_output): Likewise.
3064         (grub_term_input_class): New variable.
3065         (grub_term_output_class): Likewise.
3067         * util/grub-probe.c (grub_term_get_current_input): Removed.
3068         (grub_term_get_current_output): Likewise.
3069         (grub_term_input_class): New variable.
3070         (grub_term_output_class): Likewise.
3072         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3073         (grub_term_get_current_output): Likewise.
3074         (grub_term_input_class): New variable.
3075         (grub_term_output_class): Likewise.
3077         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3078         (terminal_mod_SOURCES): Likewise.
3079         (terminal_mod_CFLAGS): Likewise.
3080         (terminal_mod_LDFLAGS): Likewise.
3082         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3083         handler.c.
3084         (kernel_img_SOURCES): Add list.c and handler.c.
3085         (kernel_img_HEADERS): Add list.h and handler.h.
3087         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3088         handler.c.
3089         (kernel_mod_SOURCES): Add list.c and handler.c.
3090         (kernel_mod_HEADERS): Add list.h and handler.h.
3092         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3093         handler.c.
3094         (kernel_elf_SOURCES): Add list.c and handler.c.
3095         (kernel_elf_HEADERS): Add list.h and handler.h.
3097         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3098         handler.c.
3099         (kernel_elf_SOURCES): Add list.c and handler.c.
3100         (kernel_elf_HEADERS): Add list.h and handler.h.
3102         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3103         handler.c.
3104         (kernel_mod_SOURCES): Add list.c and handler.c.
3105         (kernel_mod_HEADERS): Add list.h and handler.h.
3107         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3108         handler.c.
3109         (kernel_elf_SOURCES): Add list.c and handler.c.
3110         (kernel_elf_HEADERS): Add list.h and handler.h.
3112 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3114         Factorize elf32 / elf64 code in Multiboot loader.  This will
3115         prevent it from getting out of sync again.
3117         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3118         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3119         grub_multiboot_load_elf64): Move from here ...
3120         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3121         grub_multiboot_load_elf): ... to here (new file).
3123 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3125         * util/grub.d/10_linux.in: Rename "single-user mode" to
3126         "recovery mode".
3128 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3130         Don't leak in SCSI code.
3131         * disk/scsi.c (grub_scsi_close): free `scsi'.
3133 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3135         * loader/i386/pc/multiboot.c: Move from here ...
3136         * loader/i386/multiboot.c: ... to here.  Update all users.
3138 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3140         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3141         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3143 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3145         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3146         b-tree.
3148 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3150         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3151         `0x' qualifier as 0 when base is specified as parameter).
3153 2009-02-24  Bean  <bean123ch@gmail.com>
3155         * configure.ac: Check for -mcmodel=large in x86_64 target.
3157         * include/grub/efi/api.h (efi_call_10): New macro.
3158         (efi_wrap_10): New function.
3160         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3161         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3162         (GRUB_PE32_REL_BASED_LOW): Likewise.
3163         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3164         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3165         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3166         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3167         (GRUB_PE32_REL_BASED_REL): Likewise.
3168         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3169         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3170         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3172         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3173         issue.
3175         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3176         (efi_wrap_10): New function.
3178         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3180         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3181         MB/MBP model (NV chipset).
3182         (devdata_devs): Add devpath_5 to the list.
3184         * load/i386/efi/linux.c (video_base): Remove variable.
3185         (RGB_MASK): New macro.
3186         (RGB_MAGIC): Likewise.
3187         (LINE_MIN): Likewise.
3188         (LINE_MAX): Likewise.
3189         (FBTEST_STEP): Likewise.
3190         (FBTEST_COUNT): Likewise.
3191         (fb_list): New variable.
3192         (grub_find_video_card): Remove function.
3193         (find_framebuf): New function.
3194         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3195         line length.
3197         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3198         problem for x86_64.
3200 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3202         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3204         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3205         coding tool name.
3207 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3209         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3210         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3211         in our relocation, instead of using it directly from heap.  Also
3212         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3214 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3216         Implement USB keyboard support (based on patch by Marco Gerards)
3218         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3219         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3220         (usb_keyboard_mod_LDFLAGS): New variables.
3222         * term/usb_keyboard.c: New file.
3224 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3226         Corrected wrong declaration
3228         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3230 2009-02-14  Christian Franke  <franke@computer.org>
3232         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3233         (grub_lspci_iter): Print class code and programming interface byte.
3235 2009-02-14  Christian Franke  <franke@computer.org>
3237         * gendistlist.sh: Ignore `.svn' directories.
3239 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3241         * fs/fat.c: Add 2009 to Copyright line.
3243 2009-02-14  Christian Franke  <franke@computer.org>
3245         * commands/hdparm.c: New file.  Provides `hdparm' command
3246         which sends ATA commands via grub_disk_ata_pass_through ().
3248         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3250         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3251         and <grub/cpu/io.h> to include/grub/ata.h.
3252         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3253         (GRUB_CDROM_SECTOR_SIZE): Remove.
3254         (GRUB_ATA_*): Move to include/grub/ata.h.
3255         (GRUB_ATAPI_*): Likewise.
3256         (enum grub_ata_commands): Likewise.
3257         (enum grub_ata_timeout_milliseconds): Likewise.
3258         (struct grub_ata_device): Likewise.
3259         (grub_ata_regset): Likewise.
3260         (grub_ata_regget): Likewise.
3261         (grub_ata_regset2): Likewise.
3262         (grub_ata_regget2): Likewise.
3263         (grub_ata_check_ready): Likewise.
3264         (grub_ata_wait_not_busy): Remove static, exported in
3265         include/grub/ata.h.
3266         (grub_ata_wait_drq): Likewise.
3267         (grub_ata_pio_read): Likewise.
3269         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3270         function for hdparm.mod.
3272         * include/grub/ata.h: New file, contains declarations from
3273         disk/ata.c.
3274         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3276         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3277         (grub_disk_ata_pass_through): New exported variable.
3279         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3281 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3283         Support multiple fallback entries, and provide an API to support
3284         executing default+fallback menu entries.  Renamed the `terminal' menu
3285         viewer to `text'.
3287         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3288         variable declaration.
3289         (grub_menu_execute_callback): New structure declaration.
3290         (grub_menu_execute_callback_t): New typedef.
3291         (grub_menu_execute_with_fallback): New function declaration.
3292         (grub_menu_get_entry): Likewise.
3293         (grub_menu_get_timeout): Likewise.
3294         (grub_menu_set_timeout): Likewise.
3296         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3298         * normal/menu.c (grub_wait_after_message): Moved to
3299         `normal/menu_text.c'.
3300         (draw_border): Likewise.
3301         (print_message): Likewise.
3302         (print_entry): Likewise.
3303         (print_entries): Likewise.
3304         (grub_menu_init_page): Likewise.
3305         (get_entry_number): Likewise.
3306         (print_timeout): Likewise.
3307         (run_menu): Likewise.
3308         (grub_menu_execute_entry): Likewise.
3309         (show_text_menu): Likewise.
3310         (get_and_remove_first_entry_number): New function.
3311         (grub_menu_execute_with_fallback): Likewise.
3312         (get_entry): Renamed to ...
3313         (grub_menu_get_entry): .. this and made it global.
3314         (get_timeout): Renamed to ...
3315         (grub_menu_get_timeout): ... this and made it global.
3316         (set_timeout): Renamed to ...
3317         (grub_menu_set_timeout): ... this and made it global.
3318         (grub_normal_terminal_menu_viewer): Renamed to ...
3319         (grub_normal_text_menu_viewer): ... this.
3321         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3322         from normal/menu.c.
3324         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3325         (normal_mod_SOURCES): Likewise.
3327         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3328         (normal_mod_SOURCES): Likewise.
3330         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3331         (normal_mod_SOURCES): Likewise.
3333         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3334         (normal_mod_SOURCES): Likewise.
3336         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3337         (normal_mod_SOURCES): Likewise.
3339         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3340         (normal_mod_SOURCES): Likewise.
3342         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3343         (normal_mod_SOURCES): Likewise.
3345 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3347         * util/grub.d/00_header.in: Update old reference to `font' command.
3349 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3351         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3353         Based on patch from Javier Martín.
3355 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3357         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3358         to avoid false positives with FAT.
3359         (grub_fstest_SOURCES): Likewise.
3360         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3361         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3362         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3363         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3364         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3365         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3367 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3369         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3370         bpb.version_specific.fat12_or_fat16.fstype and
3371         bpb.version_specific.fat32.fstype.
3373 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3375         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3377 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3379         * Makefile.in (host_os, host_cpu): New variables.
3380         (target_os): Remove.  Update all users.
3382 2009-02-08  Marco Gerards  <marco@gnu.org>
3384         * Makefile.in (enable_grub_emu_usb): New variable.
3385         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3386         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3387         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3388         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3389         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3390         `usbtest.mod' and `usbms.mod'.
3391         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3392         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3393         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3394         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3395         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3396         variables.
3398         * disk/usbms.c: New file.
3400         * include/grub/usb.h: Likewise.
3402         * include/grub/usbtrans.h: Likewise.
3404         * include/grub/usbdesc.h: Likewise.
3406         * bus/usb/usbtrans.c: Likewise.
3408         * bus/usb/ohci.c: Likewise.
3410         * bus/usb/uhci.c: Likewise.
3412         * bus/usb/usbhub.c: Likewise.
3414         * bus/usb/usb.c: Likewise.
3416         * commands/usbtest.c: Likewise.
3418         * util/usb.c: Likewise.
3420         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3422         * configure.ac: Test for libusb presence.
3424         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3426 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3428         * kern/mm.c: Add more comments.
3430 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3432         Patch from Javier Martín.
3433         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3434         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3436 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3438         * fs/cpio.c: Split tar functionality to ...
3439         * fs/tar.c: ... here (new file).  Update all users.
3441 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3443         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3444         backward-incompatible features.
3446         Based on patch from Javier Martín, with some adjustments.
3448 2009-02-07  Michael Scherer  <misc@mandriva.org>
3450         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3452 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3454         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3455         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3456         after the RAID stuff.
3458 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3460         Fixes problem when running vbetest command as reported by
3461         Vladimir Serbinenko <phcoder@gmail.com>.
3463         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3465 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3467         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3468         /dev/md/NpN style mdraid devices.
3470 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3472         * util/unifont2pff.rb: Remove.
3474 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3476         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3477         `#'.
3479 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3481         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3482         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3483         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3484         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3485         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3486         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3487         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3489 2009-02-02  Christian Franke  <franke@computer.org>
3491         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3493 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3495         * INSTALL: Note that we now require at least autoconf 2.59 and
3496         that LZO is optional.
3498 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3500         Base on patch on bug #24154 created by Tomas Tintera
3501         <trosos@seznam.cz>.
3503         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3505 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3507         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3508         <bero@arklinux.org>.
3510         * normal/parser.y (script_init): Add missing semicolon.
3512 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3514         * normal/main.c: Add include to grub/menu_viewer.h.
3515         (free_menu_entry_classes): Added.
3516         (grub_normal_menu_addentry): Added class property handling.
3517         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3518         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3520         * normal/menu_viewer.c: New file.
3522         * normal/menu.c (run_menu_entry): Renamed to ...
3523         (grub_menu_execute_entry): ... this and made it as global.
3524         (grub_menu_run): Renamed to ...
3525         (show_text_menu): ... this and made it local.
3526         (show_text_menu): Adapt to new function names.
3527         (grub_normal_terminal_menu_viewer): New global variable.
3529         * include/grub/menu.h: New file.
3531         * include/grub/menu_viewer.h: New file.
3533         * include/grub/normal.h: Added include to grub/menu.h.
3534         (grub_menu_entry): Moved to include/grub/menu.h.
3535         (grub_menu_entry_t): Likewise.
3536         (grub_menu): Likewise.
3537         (grub_menu_t): Likewise.
3538         (grub_normal_terminal_menu_viewer): Added.
3539         (grub_menu_execute_entry): Likewise.
3540         (grub_menu_run): Removed.
3542         * DISTLIST: Added include/grub/menu.h.
3543         Added include/grub/menu_viewer.h.
3544         Added normal/menu_viewer.c.
3546 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3548         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3549         arglist for menutitle arguments.
3551         * normal/main.c (grub_normal_menu_addentry): Likewise.
3553         * normal/parser.y (menuentry): Likewise.
3555         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3557         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3558         (grub_script_create_cmdmenu): Likewise.
3560         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3562         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3563         changes.
3565         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3567         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3569         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3571         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3573         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3575         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3577 2009-01-30  Christian Franke  <franke@computer.org>
3579         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3580         in option help text.
3582 2009-01-27  Pavel Roskin  <proski@gnu.org>
3584         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3586 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3588         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3590         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3592         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3593         unregister function.
3595 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3597         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3599         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3601         * util/grub-mkfont.c (usage): Fix typo.
3603         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3605 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3607         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3609         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3611         * kern/misc.c (grub_strcasecmp): New function.
3612         (grub_strcasecmp): Use grub_size_t instead of int for length.
3613         Fix return value.
3614         * include/grub/misc.h: Update function prototypes.
3616 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3618         * configure.ac: Fix cross-compilation check.
3620 2009-01-22  Christian Franke  <franke@computer.org>
3622         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3623         (precision) digit string.  Allow `.format2' without `format1' (width).
3624         Limit input chars for `%s' output to `format2' if specified.  This is
3625         compatible with standard printf ().
3627 2009-01-22  Christian Franke  <franke@computer.org>
3629         * disk/ata.c (grub_ata_wait_status): Replace by ...
3630         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3631         other status bits may be invalid while BSY is asserted.
3632         (grub_ata_check_ready): New function.
3633         (grub_ata_cmd): Removed.
3634         (grub_ata_wait_drq): New function.
3635         (grub_ata_strncpy): Remove inline.
3636         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3637         and error check now done by grub_ata_wait_drq ().
3638         (grub_ata_pio_write): Likewise.
3639         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3640         grub_ata_wait_drq () to wait for data.
3641         (grub_ata_device_initialize): Add status register check to
3642         detect missing SATA slave devices.  Add debug messages.
3643         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3644         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3645         transfer loop by grub_ata_pio_write ().
3646         (grub_ata_identify): Set DEV before check for !BSY. Use
3647         grub_ata_wait_drq () to wait for data.
3648         (grub_ata_setaddress): Set DEV before check for !BSY.
3649         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3650         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3651         command on (size % batch) == 0.  Add missing error check after write of
3652         last block.  Add debug messages.
3653         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3655 2009-01-19  Christian Franke  <franke@computer.org>
3657         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3658         (GRUB_ATAPI_IREASON_*): Likewise.
3659         (grub_ata_pio_write): Fix timeout error return.
3660         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3661         (grub_atapi_wait_drq): New function.
3662         (grub_atapi_packet): New parameter `size'.
3663         Use grub_atapi_wait_drq () and direct write instead of
3664         grub_ata_pio_write ().
3665         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3666         reads the number of bytes requested by the device for each DRQ
3667         assertion.
3668         (grub_atapi_write): Remove old implementation, return not
3669         implemented instead.
3671 2009-01-19  Christian Franke  <franke@computer.org>
3673         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3674         of 512 to calculate data size.
3675         (grub_scsi_read12): Likewise.
3676         (grub_scsi_write10): Likewise.
3677         (grub_scsi_write12): Likewise.
3678         (grub_scsi_read): Adjust size according to blocksize.
3679         Add checks for invalid blocksize and unaligned transfer.
3681 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3683         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3685         * term/gfxterm.c (write_char): Fix background rendering for wide
3686         width glyphs.
3688 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3690         * config.guess: Update to latest version from config git.
3691         * config.sub: Likewise.
3693 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3695         * Makefile.in: Change font compilation to use new grub-mkfont instead
3696         of java version.
3698         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3699         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3700         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3701         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3702         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3703         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3704         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3705         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3706         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3708 2009-01-16  Christian Franke  <franke@computer.org>
3710         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3711         (enum grub_ata_timeout_milliseconds): New enum.
3712         (grub_ata_wait_status): Add parameter milliseconds.
3713         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3714         recovery from timed-out commands.
3715         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3716         return grub_errno instead of REG_ERROR.
3717         (grub_ata_pio_write): Add parameter milliseconds.
3718         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3719         Pass milliseconds to grub_ata_wait_status () and
3720         grub_ata_pio_read ().
3721         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3722         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3723         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3724         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3725         It is not suitable for device detection, because DEV bit is ignored,
3726         the command may run too long, and not all devices set the signature
3727         properly.
3728         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3729         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3730         Fix device selection, DEV bit must be set first to address the registers
3731         of the correct device.
3732         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3733         grub_ata_pio_read/write ().
3734         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3735         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3737 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3739         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3741 2009-01-13  Bean  <bean123ch@gmail.com>
3743         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3745 2009-01-13  Bean  <bean123ch@gmail.com>
3747         * Makefile.in: (enable_grub_mkfont): New variable.
3748         (freetype_cflags): Likewise.
3749         (freetype_libs): Likewise.
3751         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3752         (grub_mkfont_SOURCES): New variable.
3753         (grub_mkfont_CFLAGS): Likewise.
3754         (grub_mkfont_LDFLAGS): Likewise.
3756         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3757         library if `--enable-grub-mkfont' is requested.
3758         (enable_grub_mkfont): New variable.
3759         (freetype_cflags): Likewise.
3760         (freetype_libs): Likewise.
3762         * util/grub-mkfont.c: New file.
3764 2009-01-12  Christian Franke  <franke@computer.org>
3766         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3767         mode check.  Fix setting of compat_use[].
3769 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3771         Update a few copyright years which we forgot to do in 2008 (only for
3772         files whose changes made in 2008 were copyright-significant)
3774         * Makefile.in: Add 2008 to Copyright line.
3775         * disk/ieee1275/ofdisk.c: Likewise.
3776         * disk/efi/efidisk.c: Likewise.
3777         * kern/dl.c: Likewise.
3778         * kern/sparc64/ieee1275/init.c: Likewise.
3779         * kern/mm.c: Likewise.
3780         * kern/efi/mm.c: Likewise.
3781         * boot/i386/pc/boot.S: Likewise.
3782         * genfslist.sh: Likewise.
3783         * fs/iso9660.c: Likewise.
3784         * fs/hfs.c: Likewise.
3785         * fs/jfs.c: Likewise.
3786         * fs/minix.c: Likewise.
3787         * fs/ufs.c: Likewise.
3788         * gensymlist.sh.in: Likewise.
3789         * genkernsyms.sh.in: Likewise.
3790         * include/grub/misc.h: Likewise.
3791         * include/grub/types.h: Likewise.
3792         * include/grub/symbol.h: Likewise.
3793         * include/grub/elf.h: Likewise.
3794         * include/grub/kernel.h: Likewise.
3795         * include/grub/disk.h: Likewise.
3796         * include/grub/dl.h: Likewise.
3797         * include/grub/i386/linux.h: Likewise.
3798         * include/grub/i386/pc/biosdisk.h: Likewise.
3799         * include/grub/efi/api.h: Likewise.
3800         * include/grub/efi/pe32.h: Likewise.
3801         * include/grub/util/misc.h: Likewise.
3802         * normal/execute.c: Likewise.
3803         * normal/arg.c: Likewise.
3804         * normal/completion.c: Likewise.
3805         * normal/lexer.c: Likewise.
3806         * normal/parser.y: Likewise.
3807         * normal/misc.c: Likewise.
3808         * commands/i386/pc/vbeinfo.c: Likewise.
3809         * commands/hexdump.c: Likewise.
3810         * commands/terminal.c: Likewise.
3811         * commands/ls.c: Likewise.
3812         * commands/help.c: Likewise.
3813         * partmap/pc.c: Likewise.
3814         * loader/efi/chainloader.c: Likewise.
3815         * loader/multiboot_loader.c: Likewise.
3816         * loader/i386/pc/multiboot2.c: Likewise.
3817         * term/efi/console.c: Likewise.
3818         * term/i386/pc/serial.c: Likewise.
3819         * util/lvm.c: Likewise.
3820         * util/console.c: Likewise.
3821         * util/i386/efi/grub-mkimage.c: Likewise.
3822         * util/raid.c: Likewise.
3824 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3826         * commands/videotest.c: Removed include to grub/machine/memory.h.
3828         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3829         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3830         (video_mod_SOURCES): Removed.
3831         (video_mod_CFLAGS): Likewise.
3832         (video_mod_LDFLAGS): Likewise.
3833         (gfxterm_mod_SOURCES): Likewise.
3834         (gfxterm_mod_CFLAGS): Likewise.
3835         (gfxterm_mod_LDFLAGS): Likewise.
3836         (videotest_mod_SOURCES): Likewise.
3837         (videotest_mod_CFLAGS): Likewise.
3838         (videotest_mod_LDFLAGS): Likewise.
3839         (bitmap_mod_SOURCES): Likewise.
3840         (bitmap_mod_CFLAGS): Likewise.
3841         (bitmap_mod_LDFLAGS): Likewise.
3842         (tga_mod_SOURCES): Likewise.
3843         (tga_mod_CFLAGS): Likewise.
3844         (tga_mod_LDFLAGS): Likewise.
3845         (jpeg_mod_SOURCES): Likewise.
3846         (jpeg_mod_CFLAGS): Likewise.
3847         (jpeg_mod_LDFLAGS): Likewise.
3848         (png_mod_SOURCES): Likewise.
3849         (png_mod_CFLAGS): Likewise.
3850         (png_mod_LDFLAGS): Likewise.
3852         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3853         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3854         (video_mod_SOURCES): Added.
3855         (video_mod_CFLAGS): Likewise.
3856         (video_mod_LDFLAGS): Likewise.
3857         (videotest_mod_SOURCES): Likewise.
3858         (videotest_mod_CFLAGS): Likewise.
3859         (videotest_mod_LDFLAGS): Likewise.
3860         (bitmap_mod_SOURCES): Likewise.
3861         (bitmap_mod_CFLAGS): Likewise.
3862         (bitmap_mod_LDFLAGS): Likewise.
3863         (tga_mod_SOURCES): Likewise.
3864         (tga_mod_CFLAGS): Likewise.
3865         (tga_mod_LDFLAGS): Likewise.
3866         (jpeg_mod_SOURCES): Likewise.
3867         (jpeg_mod_CFLAGS): Likewise.
3868         (jpeg_mod_LDFLAGS): Likewise.
3869         (png_mod_SOURCES): Likewise.
3870         (png_mod_CFLAGS): Likewise.
3871         (png_mod_LDFLAGS): Likewise.
3872         (gfxterm_mod_SOURCES): Likewise.
3873         (gfxterm_mod_CFLAGS): Likewise.
3874         (gfxterm_mod_LDFLAGS): Likewise.
3876         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3877         grub/machine/console.h.
3879 2009-01-04  Jerone Young  <jerone@gmail.com>
3881         Make on screen instructions clearer
3883         Based on patch created by Jidanni <jidanni@jidanni.org>
3885         * normal/menu.c: print clearer instructions on the screen
3887 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3889         New font engine.
3891         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3892         build system and fixed gfxterm.c to work with different sized fonts.
3894         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3896         * configure: Re-generated.
3898         * DISTLIST: Removed font/manager.c.
3899         Added font/font.c.
3900         Added font/font_cmd.c.
3902         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3903         compilation.
3905         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3907         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3909         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3911         * normal/menu.c: Likewise.
3913         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3914         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3916         * include/grub/font.h: Replaced with new file.
3918         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3919         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3920         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3921         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3922         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3923         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3924         fg_red, fg_green, fg_blue, fg_alpha.
3925         (grub_video_adapter): Removed blit_glyph.
3926         (grub_video_blit_glyph): Removed.
3928         * font/manager.c: Removed file.
3930         * font/font.c: New file.
3932         * font/font_cmd.c: Likewise.
3934         * video/video.c (grub_video_blit_glyph): Removed.
3936         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3937         (grub_video_vbe_map_rgba): Likewise.
3938         (grub_video_vbe_unmap_color_int): Likewise.
3939         (grub_video_vbe_blit_glyph): Removed.
3940         (grub_video_vbe_adapter): Removed blit_glyph.
3942         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3943         (get_pixel): Likewise.
3944         (set_pixel): Likewise.
3946         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3948         * term/gfxterm.c: Adapted to new font engine.
3950         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3952         * term/i386/pc/vga.c: Likewise.
3954         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3956         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3958         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3960         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3962         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3964         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3966         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3968         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3970         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3972         * util/grub.d/00_header.in: Changed to use new loadfont command.
3974         * util/grub-mkconfig_lib.in: Changed font extension.
3976 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3978         * util/getroot.c (grub_util_get_grub_dev): Add support for
3979         /dev/md/dNNpNN style partitionable mdraid devices.
3981 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3983         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3984         at a time limit of the PXE TFTP API correctly.
3985         (grub_pxefs_close): Likewise.
3987 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3989         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3990         grub_ata_device_initialize() calls.
3992 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3994         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3995         iteration failed.
3996         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3998 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4000         Fix build on powerpc-ieee1275.  Based on patch created by
4001         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4002         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4003         `kern/ieee1275/mmap.c'.
4004         * include/grub/powerpc/ieee1275/memory.h: New file.
4006         Provide grub-install on coreboot.
4007         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4008         (grub_install_SOURCES): New variable.
4009         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4010         usable on coreboot.
4012 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4014         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4015         to `grub_term_input_t'.
4016         (grub_term_get_current_output): Change return type to
4017         `grub_term_output_t'.
4019 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4021         Fix breakage on coreboot due to declaration mismatch.
4022         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4023         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4024         grub_vga_text_cls().
4026         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4027         comments.  Avoid copying one more byte than necessary (just in case).
4029         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4030         to 0x200000 (avoids trouble with some OFW implementations, and matches
4031         with the one in Yaboot).
4032         Reported by Manoel Abranches
4034 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4036         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4037         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4039         * util/grub-mkconfig_lib.in (grub_warn): New function.
4040         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4041         warnings, to obtain consistent formatting.
4042         * util/grub.d/00_header.in: Likewise.
4043         * util/update-grub_lib.in: Likewise.
4045         * loader/i386/linux.c (allocate_pages): Fix a warning.
4046         Move comment text to `#error' stanza.
4048         Harmonize ieee1275's grub_available_iterate() with the generic
4049         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4050         build problem on i386-ieee1275):
4051         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4052         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4053         parameter `type'.  Update all users of this function.
4054         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4055         `kern/ieee1275/mmap.c'.
4056         * kern/ieee1275/init.c
4057         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4058         with ...
4059         (grub_machine_mmap_iterate): ... this.
4060         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4061         return type to `grub_err_t'.  Update all implementations of this
4062         function prototype.
4063         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4064         Likewise.
4066         Add `lsmmap' command (lists firmware-provided memory map):
4067         * commands/lsmmap.c: New file.
4068         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4069         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4070         variables.
4071         * conf/powerpc-ieee1275.rmk: Likewise.
4072         * conf/i386-coreboot.rmk: Likewise.
4073         * conf/i386-ieee1275.rmk: Likewise.
4075 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4077         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4078         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4079         constraints to initrd allocation (based on code from
4080         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4081         for Linux to find it.
4083 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4085         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4086         order to cope with duplicate slashes.
4088 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4090         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4091         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4092         don't want to mess with lower memory, because it is used in the Linux
4093         loader.
4095         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4096         an appropriate place in lower memory, between 0x10000 and 0x90000,
4097         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4098         is in our heap (probably as a result of it being corrupted during
4099         decompression).  Add #error instance with comment to explain why this
4100         loader isn't currently usable on PC/BIOS.
4102 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4104         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4105         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4107 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4109         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4111         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4112         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4113         from here ...
4114         * include/grub/i386/pc/memory.h: ... to here.
4116 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4118         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4119         split).
4121         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4122         (grub_console_cur_color, grub_console_real_putchar)
4123         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4124         (grub_console_setcolorstate, grub_console_setcolor)
4125         (grub_console_getcolor): Move from here ...
4126         * include/grub/i386/vga_common.h: ... to here (new file).
4128         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4129         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4130         `<grub/i386/io.h>'.
4131         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4132         `<grub/i386/vga_common.h>'.
4134 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4136         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4137         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4138         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4139         variables.
4140         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4141         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4143         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4144         grub_console_init() with call to grub_vga_text_init().
4145         (grub_machine_fini): Replace call to
4146         grub_console_fini() with call to grub_vga_text_fini() and
4147         grub_at_keyboard_fini().
4149         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4150         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4151         (grub_console_setcolorstate, grub_console_setcolor)
4152         (grub_console_getcolor): New function prototypes.
4154         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4155         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4156         (grub_vga_text_setcursor): Static-ize.
4157         (grub_vga_text_term): New structure.
4158         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4160         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4161         (grub_console_cur_color, grub_console_standard_color)
4162         (grub_console_normal_color, grub_console_highlight_color)
4163         (map_char, grub_console_putchar, grub_console_getcharwidth)
4164         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4165         (grub_console_getcolor): Move from here ...
4166         * term/i386/vga_common.c: ... to here (same function names).
4168 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4170         Use newly-added Multiboot support in coreboot.
4172         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4173         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4175         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4176         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4177         (codestart): Store the MBI in `startup_multiboot_info' when we're
4178         being loaded using Multiboot.
4180         * kern/i386/coreboot/init.c (grub_machine_init): Move
4181         grub_at_keyboard_init() call to beginning of function (useful for
4182         debugging).  Call grub_machine_mmap_init() before attempting to use
4183         grub_machine_mmap_iterate().
4184         (grub_lower_mem, grub_upper_mem): Move from here ...
4185         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4186         here (new file).
4188         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4189         function prototype.
4191 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4193         Fix a regression introduced by the at_keyboard.mod split.  Because
4194         some terminals are default on some platforms and non-default on
4195         others, the first terminal being registered determines which is
4196         going to be default.
4198         * kern/term.c (grub_term_register_input): If this is the first
4199         terminal being registered, set it as the current one.
4200         (grub_term_register_output): Likewise.
4202         * term/efi/console.c (grub_console_init): Do not call
4203         grub_term_set_current_output() or grub_term_set_current_input().
4204         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4205         * term/i386/pc/console.c (grub_console_init): Likewise.
4206         (grub_console_fini): Do not call grub_term_set_current_input()
4207         (but leave grub_term_set_current_output() to restore text mode).
4209 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4211         * util/grub.d/00_header.in: Add backward compatibility check for
4212         versions of terminal.mod that don't understand `terminal_input' or
4213         `terminal_output'.
4215 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4217         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4218         `terminal_input' / `terminal_output', not `terminal'.
4220 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4222         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4223         (DISTCLEANFILES): Add `build_env.mk'.
4225 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4227         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4228         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4229         members.  Update all users.
4230         * util/console.c (grub_ncurses_term): Split in ...
4231         (grub_ncurses_term_input): ... this, and ...
4232         (grub_ncurses_term_output): ... this.  Update all users.
4233         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4235 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4237         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4238         (PKGDATA): Add $(pkgdata_SRCDIR).
4239         (pkglib_BUILDDIR): New variable.
4240         (pkgdata_SRCDIR): New variable.
4241         (build_env.mk): New target.
4242         (include_DATA): New variable.
4243         (install-local): Install $(include_DATA) files in $(includedir).
4245 2008-11-07  Pavel Roskin  <proski@gnu.org>
4247         * gendistlist.sh: Use C locale for sorting to ensure consistent
4248         output on all systems.
4250         * util/grub.d/00_header.in: Remove incorrect space before
4251         "serial".
4253 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4255         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4256         per specification.
4257         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4258         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4259         (based on find_multi_boot1_header).
4260         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4261         using find_multi_boot2_header(), and abort if neither Multiboot or
4262         Multiboot headers were found.
4264 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4266         Modularize at_keyboard.mod:
4268         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4269         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4270         (at_keyboard_mod_LDFLAGS): New variables.
4272         Actual terminal split:
4274         * include/grub/term.h (struct grub_term): Split in ...
4275         (struct grub_term_input): ... this, and ...
4276         (struct grub_term_output): ... this.  Update all users.
4277         (grub_term_set_current): Split in ...
4278         (grub_term_set_current_input): ... this, and ...
4279         (grub_term_set_current_output): ... this.
4280         (grub_term_get_current): Split in ...
4281         (grub_term_get_current_input): ... this, and ...
4282         (grub_term_get_current_output): ... this.
4283         (grub_term_register): Split in ...
4284         (grub_term_register_input): ... this, and ...
4285         (grub_term_register_output): ... this.
4286         (grub_term_unregister): Split in ...
4287         (grub_term_unregister_input): ... this, and ...
4288         (grub_term_unregister_output): ... this.
4289         (grub_term_iterate): Split in ...
4290         (grub_term_iterate_input): ... this, and ...
4291         (grub_term_iterate_output): ... this.
4293         * kern/term.c (grub_term_list): Split in ...
4294         (grub_term_list_input): ... this, and ...
4295         (grub_term_list_output): ... this.  Update all users.
4296         (grub_cur_term): Split in ...
4297         (grub_cur_term_input): ... this, and ...
4298         (grub_cur_term_output): ... this.  Update all users.
4299         (grub_term_set_current): Split in ...
4300         (grub_term_set_current_input): ... this, and ...
4301         (grub_term_set_current_output): ... this.
4302         (grub_term_get_current): Split in ...
4303         (grub_term_get_current_input): ... this, and ...
4304         (grub_term_get_current_output): ... this.
4305         (grub_term_register): Split in ...
4306         (grub_term_register_input): ... this, and ...
4307         (grub_term_register_output): ... this.
4308         (grub_term_unregister): Split in ...
4309         (grub_term_unregister_input): ... this, and ...
4310         (grub_term_unregister_output): ... this.
4311         (grub_term_iterate): Split in ...
4312         (grub_term_iterate_input): ... this, and ...
4313         (grub_term_iterate_output): ... this.
4315         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4316         a check for input and one for output (and only attempt to get keys
4317         from user when input works).
4319         * util/grub-probe.c (grub_term_get_current): Split in ...
4320         (grub_term_get_current_input): ... this, and ...
4321         (grub_term_get_current_output): ... this.
4322         * util/grub-fstest.c: Likewise.
4323         * util/i386/pc/grub-setup.c: Likewise.
4324         * util/grub-editenv.c: Likewise.
4326         Portability adjustments:
4328         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4329         `term/i386/pc/at_keyboard.c'.
4330         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4331         grub_keyboard_controller_init() (now handled by terminal .init).
4332         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4333         grub_at_keyboard_init().
4334         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4335         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4336         at_keyboard.mod via input terminal interface).
4337         * include/grub/i386/coreboot/console.h: Convert into a stub for
4338         `<grub/i386/pc/console.h>'.
4340         Migrate full terminals to new API:
4342         * term/efi/console.c (grub_console_term): Split into ...
4343         (grub_console_term_input): ... this, and ...
4344         (grub_console_term_output): ... this.  Update all users.
4345         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4346         (grub_ofconsole_init): Split into ...
4347         (grub_ofconsole_init_input): ... this, and ...
4348         (grub_ofconsole_init_output): ... this.
4349         (grub_ofconsole_term): Split into ...
4350         (grub_ofconsole_term_input): ... this, and ...
4351         (grub_ofconsole_term_output): ... this.  Update all users.
4352         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4353         (grub_serial_term_input): ... this, and ...
4354         (grub_serial_term_output): ... this.  Update all users.
4355         * term/i386/pc/console.c (grub_console_term): Split into ...
4356         (grub_console_term_input): ... this, and ...
4357         (grub_console_term_output): ... this.  Update all users.
4358         (grub_console_term_input): Only enable it on PC/BIOS platform.
4359         (grub_console_init): Remove grub_keyboard_controller_init() call.
4361         Migrate input terminals to new API:
4363         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4364         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4365         i386-specific anyway).
4366         (grub_console_checkkey): Rename to ...
4367         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4368         users.
4369         (grub_keyboard_controller_orig): New variable.
4370         (grub_console_getkey): Rename to ...
4371         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4372         users.
4373         (grub_keyboard_controller_init): Static-ize.  Save original
4374         controller value so that it can be restored ...
4375         (grub_keyboard_controller_fini): ... here (new function).
4376         (grub_at_keyboard_term): New structure.
4377         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4378         functions.
4380         Migrate output terminals to new API:
4382         * term/i386/pc/vga.c (grub_vga_term): Change type to
4383         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4384         members.  Update all users.
4385         * term/gfxterm.c (grub_video_term): Change type to
4386         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4387         members.  Update all users.
4388         * include/grub/i386/pc/console.h (grub_console_checkkey)
4389         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4390         etc).
4392         Migrate `terminal' command and userland tools to new API:
4394         * commands/terminal.c (grub_cmd_terminal): Split into ...
4395         (grub_cmd_terminal_input): ... this, and ...
4396         (grub_cmd_terminal_output): ... this.
4397         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4398         `terminal_input' and `terminal_output'.
4399         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4400         `terminal_input' / `terminal_output' API.
4401         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4402         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4403         provided ${GRUB_TERMINAL}, convert it).
4405 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4407         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4408         for FreeBSD.
4409         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4411 2008-11-03  Bean  <bean123ch@gmail.com>
4413         * kern/elf.c (grub_elf32_load): Revert to previous code.
4414         (grub_elf64_load): Likewise.
4416         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4418 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4420         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4421         (TARGET_CPPFLAGS): Likewise.
4422         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4424 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4426         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4428 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4430         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4431         addition of objects until the code is not going to be able to fail.
4433 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4435         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4436         (add a missing NULL check, and correct them by moving the pointer
4437         operations after the actual check).
4439 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4441         * util/i386/pc/grub-install.in: Handle empty string as output from
4442         make_system_path_relative_to_its_root().
4444 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4446         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4447         circular metadata worst case scenario. If the metadata is circular
4448         then copy the wrap in place.
4449         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4450         project lib/format_text/layout.h
4451         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4453 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4455         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4457 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4459         * util/update-grub_lib.in: Mention filename in warning message.
4461 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4463         * NEWS: Update for rename of update-grub to grub-mkconfig.
4465 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4467         * util/update-grub_lib.in: Copy to ...
4468         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4469         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4470         * util/update-grub.in: Rename to ...
4471         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4472         option. Add `--output' option to allow users to specify the generated
4473         configuration file.  Default to stdout.
4474         (update_grub_dir): Rename to ...
4475         (grub_mkconfig_dir): ... this.
4476         (grub_cfg): Default to an empty string.
4477         * conf/common.rmk (update-grub): Rename to ...
4478         (grub-mkconfig): ... this.
4479         (update-grub_lib): Copy to ...
4480         (grub-mkconfig_lib): ... this.
4481         (update-grub_SCRIPTS): Copy to ...
4482         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4483         (update-grub_DATA): Rename to ...
4484         (grub-mkconfig_DATA): ... this.
4486 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4488         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4489         to `modified'.  Add the real `created' field.
4490         (grub_iso9660_uuid): Use `modified' rather than `created' for
4491         constructing the UUID.
4493 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4495         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4496         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4498 2008-09-28  Bean  <bean123ch@gmail.com>
4500         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4501         Thanks to Christian Franke for finding this bug.
4503 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4505         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4506         instances of grub_util_get_disk_name() (see previous commit).
4508 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4510         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4511         `util/i386/get_disk_name.c'.
4512         * conf/i386-efi.rmk: Likewise.
4513         * conf/x86_64-efi.rmk: Likewise.
4514         * conf/i386-coreboot.rmk: Likewise.
4515         * conf/i386-ieee1275.rmk: Likewise.
4516         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4517         `util/ieee1275/get_disk_name.c'.
4518         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4519         * util/ieee1275/get_disk_name.c: Remove file.
4520         * util/i386/get_disk_name.c: Remove file.
4521         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4522         "hd%d" for device.map entries, rather than using
4523         grub_util_get_disk_name().
4525 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4527         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4528         warning.
4529         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4531 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4533         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4534         Changed to 0x5100.
4535         (GRUB_TERM_PPAGE): Changed to 0x4900.
4537 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4539         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4540         macros (they were i386-pc specific).
4541         * include/grub/sparc64/ieee1275/console.h: Likewise.
4542         * include/grub/efi/console.h: Likewise.
4544 2008-09-22  Bean  <bean123ch@gmail.com>
4546         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4547         resident and in attribute list.
4549         * include/grub/ntfs.h (BMP_LEN): Removed.
4551 2008-09-22  Bean  <bean123ch@gmail.com>
4553         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4554         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4556         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4557         error occurs, as grub_disk_open will call grub_disk_close, which will
4558         call p->close (scsi).
4560 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4562         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4563         (AC_PREREQ): Bumped to 2.59.
4564         (AC_TRY_COMPILE): Replace obsolete macro with ...
4565         (AC_COMPILE_IFELSE): ... this.
4566         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4567         (AC_LINK_IFELSE): ... this.
4569 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4571         * autogen.sh: Add a call to `gendistlist.sh'.
4573 2008-09-19  Christian Franke  <franke@computer.org>
4575         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4576         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4577         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4578         Export __enable_execute_stack() to modules.
4579         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4580         New function.
4582 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4584         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4585         Sort the list.
4587 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4589         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4590         #include <grub/util/hostdisk.h>.
4592 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4594         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4595         segments when their filesz is zero (grub_file_read() interprets
4596         zero-size as "read until EOF", which results in memory corruption).
4597         Use `lowest_segment' rather than 0 for calculating the current
4598         segment load address.
4600 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4602         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4603         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4604         clobbered useful information.
4606 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4608         * include/grub/util/biosdisk.h: Move to ...
4609         * include/grub/util/hostdisk.h: ... here.  Update all users.
4610         * util/biosdisk.c: Move to ...
4611         * util/hostdisk.c: ... here.  Update all users.
4613 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4615         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4616         variables.
4617         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4618         and length can be stored directly in the `mbi->mmap_addr' and
4619         `mbi->mmap_length' struct fields.
4621 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4623         * conf/i386.rmk: New file.  Provides declaration for building
4624         `cpuid.mod'.
4625         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4626         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4627         variables.
4628         Include `conf/i386.mk'.
4629         * conf/i386-efi.rmk: Likewise.
4630         * conf/x86_64-efi.rmk: Likewise.
4631         * conf/i386-coreboot.rmk: Likewise.
4632         * conf/i386-ieee1275.rmk: Likewise.
4634 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4636         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4637         Adds optimization support for BGR based modes.
4639         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4640         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4641         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4642         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4643         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4644         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4645         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4646         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4647         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4648         (grub_video_i386_vbeblit_index_index): Likewise.
4649         (grub_video_i386_vbeblit_replace_directN): Added.
4650         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4651         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4652         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4653         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4654         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4655         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4656         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4657         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4658         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4659         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4660         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4661         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4662         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4664         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4665         (grub_video_i386_vbefill_R8G8B8): Likewise.
4666         (grub_video_i386_vbefill_index): Likewise.
4667         (grub_video_i386_vbefill_direct32): Added.
4668         (grub_video_i386_vbefill_direct24): Likewise.
4669         (grub_video_i386_vbefill_direct16): Likewise.
4670         (grub_video_i386_vbefill_direct8): Likewise.
4672         * include/grub/video.h (grub_video_blit_format): Removed
4673         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4674         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4675         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4676         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4677         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4679         * video/video.c (grub_video_get_blit_format): Updated to use new
4680         blit formats.  Added handling for 16 bit color modes.
4682         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4683         fillers.
4684         (common_blitter): Updated to use new blitters.
4686         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4687         Removed.
4688         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4689         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4690         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4691         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4692         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4693         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4694         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4695         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4696         (grub_video_i386_vbeblit_index_index): Likewise.
4697         (grub_video_i386_vbeblit_replace_directN): Added.
4698         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4699         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4700         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4701         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4702         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4703         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4704         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4705         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4706         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4707         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4708         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4709         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4710         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4712         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4713         (grub_video_i386_vbefill_R8G8B8): Likewise.
4714         (grub_video_i386_vbefill_index): Likewise.
4715         (grub_video_i386_vbefill_direct32): Added.
4716         (grub_video_i386_vbefill_direct24): Likewise.
4717         (grub_video_i386_vbefill_direct16): Likewise.
4718         (grub_video_i386_vbefill_direct8): Likewise.
4720         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4721         types.
4723         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4724         types.
4726         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4727         blitter types.
4729         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4730         types.
4732 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4734         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4735         RAID level 1.
4737 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4739         * fs/iso9660.c (grub_iso9660_date): New structure.
4740         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4741         (grub_iso9660_uuid): New function.
4743 2008-09-05  Bean  <bean123ch@gmail.com>
4745         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4747         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4748         insensitive bit for names in Win32 and Win32 & DOS namespace.
4750         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4752         * include/grub/types.h (LONG_MAX): Likewise.
4754 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4756         * util/getroot.c: Include <config.h>.
4757         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4758         add support for /dev/md/N devices and handle LVM double dash escaping.
4760 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4762         * config.guess: Update to latest version from config git.
4763         * config.sub: Likewise.
4765 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4767         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4768         `disk->total_sectors'.
4770 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4772         * include/grub/normal.h: Fixed incorrect comment for
4773         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4775 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4777         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4778         values with defines.
4780         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4781         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4782         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4783         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4784         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4785         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4786         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4787         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4788         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4789         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4790         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4791         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4792         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4793         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4794         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4795         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4796         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4797         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4798         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4800 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4802         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4803         declaration.
4804         (grub_multiboot): Fix a few warnings.
4806 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4808         * loader/i386/pc/multiboot.c: Update comment not to say that
4809         boot_device support is unimplemented.
4811 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4813         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4814         or memory map support are unimplemented.
4816 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4818         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4820 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4822         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4823         total video memory in 'vbeinfo' output; show color format details for
4824         each video mode.
4826 2008-08-30  Pavel Roskin  <proski@gnu.org>
4828         * util/genmoddep.c: Remove for real this time.
4829         * DISTLIST: Remove util/genmoddep.c.
4831 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4833         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4834         as required by Multiboot spec (it was already 4-byte aligned, but
4835         only by chance).
4837 2008-08-29  Pavel Roskin  <proski@gnu.org>
4839         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4840         * kern/powerpc/ieee1275/startup.S: ... this.
4841         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4842         * DISTLIST: Likewise.
4844         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4845         grub/cpu/kernel.h.  Add start label for consistency with other
4846         platforms.  Add grub_prefix immediately after start.  Add jump
4847         to the code after grub_prefix.
4848         * include/grub/powerpc/kernel.h: Provide valid values for
4849         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4851 2008-08-29  Bean  <bean123ch@gmail.com>
4853         * configure.ac: Change host_os to cygwin for mingw.
4854         (asprintf): New check for function.
4856         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4857         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4859         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4860         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4861         sync, sleep and grub_util_get_disk_size for mingw.
4863         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4864         to get size in mingw.
4865         (open_device): Use flag O_BINARY if it's defined.
4866         (find_root_device): Add dummy code for mingw.
4868         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4869         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4870         (get_scsi_disk_name): Return 0 for mingw.
4872         * util/hostfs.c: #include <grub/util/misc.h>.
4873         (grub_hostfs_open): Use "rb" flag to open file, use
4874         grub_util_get_disk_size to get disk size for mingw.
4876         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4877         (asprintf): New function if HAVE_ASPRINTF is not set.
4878         (sync): New function for mingw.
4879         (sleep): Likewise.
4880         (grub_util_get_disk_size): Likewise.
4882 2008-08-28  Pavel Roskin  <proski@gnu.org>
4884         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4885         kern/time.c.
4887 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4889         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4891 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4893         Change find_grub_drive() syntax so it doesn't prevent it from
4894         detecting NULL names as errors.
4896         * util/biosdisk.c (find_grub_drive): Move free slot search code
4897         from here ...
4898         (find_free_slot): ... to here.
4899         (read_device_map): Use find_free_slot() to search for free slots.
4901 2008-08-27  Marco Gerards  <marco@gnu.org>
4903         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4904         (scsi_mod_SOURCES): New variable.
4905         (scsi_mod_CFLAGS): Likewise
4906         (scsi_mod_LDFLAGS): Likewise.
4908         * disk/scsi.c: New file.
4910         * include/grub/scsi.h: Likewise.
4912         * include/grub/scsicmd.h: Likewise.
4914         * disk/ata.c: Include <grub/scsi.h>.
4915         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4916         instead.
4917         (grub_ata_iterate): Skip ATAPI devices.
4918         (grub_ata_open): Only handle ATAPI devices.
4919         (struct grub_atapi_read): Removed.
4920         (grub_atapi_readsector): Likewise.
4921         (grub_ata_read): No longer handle ATAPI devices.
4922         (grub_ata_write): Likewise.
4923         (grub_atapi_iterate): New function.
4924         (grub_atapi_read): Likewise.
4925         (grub_atapi_write): Likewise.
4926         (grub_atapi_open): Likewise.
4927         (grub_atapi_close): Likewise.
4928         (grub_atapi_dev): New variable.
4929         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4930         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4932         * include/grub/disk.h (enum grub_disk_dev_id): Add
4933         `GRUB_DISK_DEVICE_SCSI_ID'.
4935 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4937         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4938         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4939         descriptive.
4941 2008-08-23  Bean  <bean123ch@gmail.com>
4943         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4944         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4945         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4946         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4947         dm_nv.mod.
4948         (raid5rec_mod_SOURCES): New macro.
4949         (raid5rec_mod_CFLAGS): Likewise.
4950         (raid5rec_mod_LDFLAGS): Likewise.
4951         (raid6rec_mod_SOURCES): Likewise.
4952         (raid6rec_mod_CFLAGS): Likewise.
4953         (raid6rec_mod_LDFLAGS): Likewise.
4954         (mdraid_mod_SOURCES): Likewise.
4955         (mdraid_mod_CFLAGS): Likewise.
4956         (mdraid_mod_LDFLAGS): Likewise.
4957         (dm_nv_mod_SOURCES): Likewise.
4958         (dm_nv_mod_CFLAGS): Likewise.
4959         (dm_nv_mod_LDFLAGS): Likewise.
4961         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4962         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4963         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4965         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4966         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4968         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4970         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4972         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4974         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4976         * disk/raid5_recover.c: New file.
4978         * disk/raid6_recover.c: Likewise.
4980         * disk/mdraid_linux.c: Likewise.
4982         * disk/dmraid_nvidia.c: Likewise.
4984         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4985         ULONG_MAX.
4987         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4988         calculate the size of raid device.
4989         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4990         different layout of raid5.
4991         (grub_raid_scan_device): Remove code specific to mdraid.
4992         (grub_raid_list): New variable.
4993         (free_array): New function.
4994         (grub_raid_register): Likewise.
4995         (grub_raid_unregister): Likewise.
4996         (grub_raid_rescan): Likewise.
4997         (GRUB_MOD_INIT): Don't iterate device here.
4998         (GRUB_MOD_FINI): Use free_array to release resource.
5000         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5001         (grub_raid5_recover_func_t): New function variable type.
5002         (grub_raid6_recover_func_t): Likewise.
5003         (grub_raid5_recover_func): New variable.
5004         (grub_raid6_recover_func): Likewise.
5005         (grub_raid_register): New function.
5006         (grub_raid_unregister): Likewise.
5007         (grub_raid_rescan): Likewise.
5008         (grub_raid_block_xor): Likewise.
5010         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5011         (CMD_CRC): New macro.
5012         (part): Removed.
5013         (read_file): Handle device as well as file.
5014         (cmd_crc): New function.
5015         (fstest): Handle multiple disks.
5016         (options): Remove part, raw and long, add root and diskcount.
5017         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5018         (main): Find the first non option entry and ignore subsequent options,
5019         add handling for the new options, support multiple disks.
5021         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5023 2008-08-23  Bean  <bean123ch@gmail.com>
5025         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5027         * genfslist.sh: Ignore kernel.mod.
5029         * genpartmaplist.sh: Likewise.
5031 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5033         * util/getroot.c (find_root_device): Skip anything that starts with
5034         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5036 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5038         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5039         * util/grub.d/00_header.in: Allow the administrator to change default
5040         gfxmode via ${GRUB_GFXMODE}.
5042 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5044         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5046 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5048         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5049         loader.
5050         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5051         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5053 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5055         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5056         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5058 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5060         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5061         (struct grub_virtual_screen): Remove `cursor_color'.
5062         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5063         initialization.
5064         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5066 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5068         Unify (identical) linux_normal.c files.
5069         * loader/i386/efi/linux_normal.c: Move from here ...
5070         * loader/linux_normal.c: ... to here.  Update all users.
5071         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5072         * loader/i386/ieee1275/linux_normal.c: Likewise.
5074 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5076         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5077         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5078         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5079         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5080         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5081         New macros.
5082         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5083         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5084         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5085         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5086         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5087         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5088         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5089         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5090         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5091         portably using grub_getxy().
5092         Replace `-EFI' with `-bzImage' in boot message.
5094 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5096         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5098 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5100         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5102         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5103         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5104         (grub_machine_mmap_iterate): New function declaration.
5105         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5106         structure.
5107         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5108         macros.
5110         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5111         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5112         Move e820 parsing from here ...
5113         * kern/i386/pc/mmap.c: New file.
5114         (grub_machine_mmap_iterate): ... to here.
5116         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5117         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5118         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5119         (grub_available_iterate): Redeclare to return `void', and redeclare
5120         its hook to use grub_uint64_t as addr and size parameters, and rename
5121         to ...
5122         (grub_machine_mmap_iterate): ... this.  Update all users.
5124         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5125         to make it more readable.  Rename to ...
5126         (grub_machine_mmap_iterate): ... this.
5128         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5129         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5130         (grub_multiboot): Allocate an extra region after the payload, and fill
5131         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5132         with the extra space.
5133         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5134         with the extra space.
5136 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5138         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5140 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5142         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5143         mdate-sh to the list `find' searches for.
5144         * DISTLIST: Regenerated.
5146 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5148         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5149         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5150         genmoddep.awk, gensymlist.sh.in.
5151         (DISTDIRS): Add bus, docs, hook, lib.
5152         * DISTLIST: Regenerated.
5153         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5155 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5157         * disk/raid.c (grub_raid_init): Handle/report errors set by
5158         grub_device_iterate().
5159         * disk/lvm.c (grub_lvm_init): Likewise.
5161 2008-08-15  Bean  <bean123ch@gmail.com>
5163         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5164         and datehook.mod.
5165         (datetime_mod_SOURCES): New macro.
5166         (datetime_mod_CFLAGS): Likewise.
5167         (datetime_mod_LDFLAGS): Likewise.
5168         (date_mod_SOURCES): Likewise.
5169         (date_mod_CFLAGS): Likewise.
5170         (date_mod_LDFLAGS): Likewise.
5171         (datehook_mod_SOURCES): Likewise.
5172         (datehook_mod_CFLAGS): Likewise.
5173         (datehook_mod_LDFLAGS): Likewise.
5175         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5176         and datehook.mod.
5177         (datetime_mod_SOURCES): New macro.
5178         (datetime_mod_CFLAGS): Likewise.
5179         (datetime_mod_LDFLAGS): Likewise.
5180         (date_mod_SOURCES): Likewise.
5181         (date_mod_CFLAGS): Likewise.
5182         (date_mod_LDFLAGS): Likewise.
5183         (datehook_mod_SOURCES): Likewise.
5184         (datehook_mod_CFLAGS): Likewise.
5185         (datehook_mod_LDFLAGS): Likewise.
5187         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5188         and datehook.mod.
5189         (datetime_mod_SOURCES): New macro.
5190         (datetime_mod_CFLAGS): Likewise.
5191         (datetime_mod_LDFLAGS): Likewise.
5192         (date_mod_SOURCES): Likewise.
5193         (date_mod_CFLAGS): Likewise.
5194         (date_mod_LDFLAGS): Likewise.
5195         (datehook_mod_SOURCES): Likewise.
5196         (datehook_mod_CFLAGS): Likewise.
5197         (datehook_mod_LDFLAGS): Likewise.
5199         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5200         and datehook.mod.
5201         (datetime_mod_SOURCES): New macro.
5202         (datetime_mod_CFLAGS): Likewise.
5203         (datetime_mod_LDFLAGS): Likewise.
5204         (date_mod_SOURCES): Likewise.
5205         (date_mod_CFLAGS): Likewise.
5206         (date_mod_LDFLAGS): Likewise.
5207         (datehook_mod_SOURCES): Likewise.
5208         (datehook_mod_CFLAGS): Likewise.
5209         (datehook_mod_LDFLAGS): Likewise.
5211         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5212         and datehook.mod.
5213         (datetime_mod_SOURCES): New macro.
5214         (datetime_mod_CFLAGS): Likewise.
5215         (datetime_mod_LDFLAGS): Likewise.
5216         (date_mod_SOURCES): Likewise.
5217         (date_mod_CFLAGS): Likewise.
5218         (date_mod_LDFLAGS): Likewise.
5219         (datehook_mod_SOURCES): Likewise.
5220         (datehook_mod_CFLAGS): Likewise.
5221         (datehook_mod_LDFLAGS): Likewise.
5223         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5225         * commands/date.c: New file.
5227         * hook/datehook.c: Likewise.
5229         * include/grub/lib/datetime.h: Likewise.
5231         * include/grub/i386/cmos.h: Likewise.
5233         * lib/datetime.c: Likewise.
5235         * lib/i386/datetime.c: Likewise.
5237         * lib/efi/datetime.c: Likewise.
5239 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5241         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5242         (grub_mkelfimage_SOURCES): New variable.
5243         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5245         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5246         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5247         * conf/powerpc-ieee1275.rmk: Likewise.
5248         * conf/i386-ieee1275.rmk: Likewise.
5250         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5251         * kern/i386/coreboot/init.c: Likewise.
5253         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5254         with `<grub/cpu/kernel.h>'.
5255         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5256         to ...
5257         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5258         * kern/i386/coreboot/startup.S: Likewise.
5260         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5261         (GRUB_MOD_GAP): Remove.
5262         * include/grub/powerpc/kernel.h: New file.
5263         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5264         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5265         * include/grub/i386/kernel.h: New file.
5266         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5267         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5268         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5270         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5271         `grub-mkelfimage'.
5272         Use --directory when invoking grub_mkimage.
5274         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5275         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5276         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5277         and GRUB_KERNEL_CPU_PREFIX.
5279 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5281         * include/grub/err.h (grub_err_printf): New function prototype.
5282         * util/misc.c (grub_err_printf): New function.
5283         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5284         grub_printf.
5285         * kern/err.c (grub_print_error): Use grub_err_printf.
5287 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5289         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5291 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5293         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5294         boot entry.
5296 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5298         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5299         of the relocation code from here ...
5300         (grub_multiboot): ... to here.
5301         (forward_relocator, backward_relocator): Move from here ...
5302         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5303         (grub_multiboot_backward_relocator): ... to here.
5304         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5305         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5306         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5307         (grub_multiboot_forward_relocator_end)
5308         (grub_multiboot_backward_relocator)
5309         (grub_multiboot_backward_relocator_end): New variables.
5311 2008-08-12  Bean  <bean123ch@gmail.com>
5313         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5315 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5317         * kern/i386/linuxbios/startup.S: Move from here ...
5318         * kern/i386/coreboot/startup.S: ... to here.
5320         * kern/i386/linuxbios/init.c: Move from here ...
5321         * kern/i386/coreboot/init.c: ... to here.
5323         * kern/i386/linuxbios/table.c: Move from here ...
5324         * kern/i386/coreboot/mmap.c: ... to here.
5326         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5328 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5330         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5331         errors.  Leave it to the upper layer to handle them.
5333 2008-08-09  Christian Franke  <franke@computer.org>
5335         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5336         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5337         Install `grub.d/10_windows' only on Cygwin.
5338         * configure.ac: Add subst of `target_os'.
5339         Check `target_os' also before setting TARGET_OBJ2ELF.
5340         Add `--enable-grub-pe2elf'.
5342 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5344         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5345         (grub_last_time): Change type to grub_uint64_t.
5346         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5347         (grub_disk_close): Likewise.
5349         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5350         (run_menu): Migrate code from to using grub_get_time_ms().
5352         * util/misc.c (grub_get_time_ms): New function.
5354 2008-08-08  Marco Gerards  <marco@gnu.org>
5356         * disk/ata.c (grub_ata_regget): Change return type to
5357         `grub_uint8_t'.
5358         (grub_ata_regget2): Likewise.
5359         (grub_ata_wait_status): New function.
5360         (grub_ata_wait_busy): Removed function, updated all users to use
5361         `grub_ata_wait_status'.
5362         (grub_ata_wait_drq): Likewise.
5363         (grub_ata_cmd): New function.
5364         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5365         error handling.
5366         (grub_ata_pio_write): Add error handling.
5367         (grub_atapi_identify): Likewise.
5368         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5369         handling.
5370         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5371         handling.  Actually use the detected registers.  Reorder the
5372         detection logic such that it is easier to read.
5373         (grub_ata_pciinit): Do not assign the same ID to each controller.
5374         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5375         handling.
5376         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5378         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5380 2008-08-08  Marco Gerards  <marco@gnu.org>
5382         * NEWS: Update.
5384 2008-08-07  Bean  <bean123ch@gmail.com>
5386         * include/grub/x86_64/pci.h: New file.
5388 2008-08-07  Christian Franke  <franke@computer.org>
5390         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5391         (TIMER2_GATE): Likewise.
5392         (grub_pit_wait): Add enable/disable of the timer2 gate
5393         bit of port 0x61.  This fixes a possible infinite loop.
5395 2008-08-07  Bean  <bean123ch@gmail.com>
5397         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5398         kern/i386/tsc.c and kern/i386/pit.c.
5400         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5401         x86_64 platform.
5403         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5404         <grub/i386/tsc.h>.
5406         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5408 2008-08-07  Bean  <bean123ch@gmail.com>
5410         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5412         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5414         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5415         multiple inclusion. Add #include <grub/types.h>.
5417 2008-08-06  Christian Franke  <franke@computer.org>
5419         * conf/common.rmk: Build and install `10_windows'.
5420         * util/grub.d/10_windows.in: New script.
5422 2008-08-06  Pavel Roskin  <proski@gnu.org>
5424         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5426 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5428         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5429         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5431 2008-08-06  Bean  <bean123ch@gmail.com>
5433         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5434         (grub_pxefs_fs_int): Remove dummy definition.
5435         (grub_pxefs_open): Use data->block_size to store the current block
5436         size setting.
5437         (grub_pxefs_read): Use block size stored in data->block_size. As the
5438         value of grub_pxe_blksize can be changed after the file is opened.
5440 2008-08-06  Bean  <bean123ch@gmail.com>
5442         * fs/i386/pc/pxe.c (curr_file): new variable.
5443         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5444         require the dummy internal file system anymore.
5445         (grub_pxefs_read): Removed.
5446         (grub_pxefs_close): Likewise.
5447         (grub_pxefs_fs_int): Likewise.
5448         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5449         connection when we switch file.
5450         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5452 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5454         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5455         `halt.mod'.
5456         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5457         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5459         * kern/i386/halt.c: New file.
5460         * kern/i386/reboot.c: Likewise.
5461         * include/grub/i386/reboot.h: Likewise.
5462         * include/grub/i386/halt.h: Likewise.
5464         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5465         Include `<grub/cpu/halt.h>'.
5466         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5467         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5469         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5470         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5471         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5472         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5473         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5474         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5475         from here ...
5476         * include/grub/i386/at_keyboard.h: ... to here.
5478 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5480         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5481         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5482         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5483         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5484         `kern/generic/millisleep.c'.
5486         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5487         instead of grub_get_rtc().
5488         (grub_tsc_init): Initialize `tsc_boot_time'.
5490         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5491         (grub_machine_init): Use grub_tsc_init() rather than
5492         installing an RTC-based handler via grub_install_get_time_ms().
5494         * kern/i386/pit.c: New file.
5495         * include/grub/i386/pit.h: Likewise.
5497 2008-08-05  Bean  <bean123ch@gmail.com>
5499         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5501         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5502         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5503         (pxe_mod_SOURCES): New macro.
5504         (pxe_mod_CFLAGS): Likewise.
5505         (pxe_mod_LDFLAGS): Likewise.
5506         (pxecmd_mod_SOURCES): Likewise.
5507         (pxecmd_mod_CFLAGS): Likewise.
5508         (pxecmd_mod_LDFLAGS): Likewise.
5510         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5511         (grub_pxe_call): Likewise.
5513         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5515         * commands/i386/pc/pxecmd.c: New file.
5517         * fs/i386/pc/pxe.c: Likewise.
5519         * include/grub/i386/pc/pxe.h: Likewise.
5521 2008-08-05  Bean  <bean123ch@gmail.com>
5523         * util/console.c (grub_console_cur_color): New variable.
5524         (grub_console_standard_color): Likewise.
5525         (grub_console_normal_color): Likewise.
5526         (grub_console_highlight_color): Likewise.
5527         (color_map): Likewise.
5528         (use_color): Likewise.
5529         (NUM_COLORS): New macro.
5530         (grub_ncurses_setcolorstate): Handle color properly.
5531         (grub_ncurses_setcolor): Don't change color here, just remember the
5532         settings, color will be set in grub_ncurses_setcolorstate.
5533         (grub_ncurses_getcolor): New function.
5534         (grub_ncurses_init): Initialize color pairs.
5535         (grub_ncurses_term): New member grub_ncurses_getcolor.
5537 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5539         High resolution timer support.  Implemented for x86 CPUs using TSC.
5540         Extracted generic grub_millisleep() so it's linked in only as needed.
5541         This requires a Pentium compatible CPU; if the RDTSC instruction is
5542         not supported, then it falls back on the generic grub_get_time_ms()
5543         implementation that uses the machine's RTC.
5545         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5546         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5547         `kern/generic/millisleep.c'.
5549         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5550         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5552         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5553         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5555         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5557         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5558         `kern/generic/millisleep.c'.
5560         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5562         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5564         * kern/generic/rtc_get_time_ms.c: New file.
5566         * kern/generic/millisleep.c: New file.
5568         * kern/misc.c: Don't include
5569         <kern/time.h> anymore.
5570         (grub_millisleep_generic): Removed.
5572         * commands/sleep.c (grub_interruptible_millisleep): Uses
5573         grub_get_time_ms() instead of grub_get_rtc().
5575         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5576         function.
5577         (grub_cpu_is_cpuid_supported): New inline function.
5578         (grub_cpu_is_tsc_supported): New inline function.
5579         (grub_tsc_init): New function prototype.
5580         (grub_tsc_get_time_ms): New function prototype.
5582         * kern/i386/tsc.c (grub_get_time_ms): New file.
5584         * include/grub/time.h: Include <grub/types.h.
5585         (grub_millisleep_generic): Removed.
5586         (grub_get_time_ms): New prototype.
5587         (grub_install_get_time_ms): New prototype.
5588         (grub_rtc_get_time_ms): New prototype.
5590         * kern/time.c (grub_get_time_ms): New function.
5591         (grub_install_get_time_ms): New function.
5593         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5594         <grub/time.h> anymore.
5595         (grub_millisleep): Removed.
5596         (grub_machine_init): Call grub_tsc_init.
5598         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5599         get_time_ms() implementation.
5601         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5602         (ieee1275_get_time_ms): New function.
5603         (grub_machine_init): Install get_time_ms() implementation.
5605         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5606         (grub_machine_init): Call grub_tsc_init().
5607         (grub_millisleep): Removed.
5609         * kern/ieee1275/init.c (grub_millisleep): Removed.
5610         (grub_machine_init): Install ieee1275_get_time_ms()
5611         implementation.
5612         (ieee1275_get_time_ms): New function.
5613         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5614         real work.
5616 2008-08-05  Marco Gerards  <marco@gnu.org>
5618         * disk/ata.c: Include <grub/pci.h>.
5619         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5620         (grub_ata_initialize): Rewritten.
5621         (grub_ata_device_initialize): New function.
5623 2008-08-04  Pavel Roskin  <proski@gnu.org>
5625         * kern/main.c: Include grub/mm.h.
5627 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5629         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5630         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5631         corruption problem).
5633 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5635         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5636         warnings introduced in my last commit.
5638 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5640         Make PCI available on all i386 architectures.
5642         * include/grub/i386/pc/pci.h: Move from here ...
5643         * include/grub/i386/pci.h: ... to here.
5645         * include/grub/i386/pc/pci.h: Remove.
5646         * include/grub/i386/efi/pci.h: Remove.
5647         * include/grub/x86_64/efi/pci.h: Remove.
5649         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5650         `<grub/cpu/pci.h>'.
5652         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5653         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5654         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5656         * conf/i386-ieee1275.rmk: Likewise.
5658 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5660         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5661         (grub_console_setcursor): Make it possible to set cursor off.
5663 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5665         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5666         of modules instead of assuming which platform provides what.
5667         * util/update-grub.in: Likewise.
5669 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5671         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5672         instead of `grub_install_dos_part' to determine whether a drive needs
5673         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5674         because it can be overridden when loading GRUB via Multiboot).
5676 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5678         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5680 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5682         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5683         of informational grub_dprintf() calls.
5685 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5687         * disk/memdisk.c (memdisk_size): Don't initialize.
5688         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5690         * include/grub/i386/pc/kernel.h
5691         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5692         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5693         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5694         (grub_arch_memdisk_size): Remove.
5696         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5697         field (was only used to transfer a constant).  Add `type' field to
5698         support multiple module types.
5699         (grub_module_iterate): New function.
5701         * kern/device.c (grub_device_open): Do not hide error messages
5702         when grub_disk_open() fails.  Use grub_print_error() instead.
5704         * kern/i386/pc/init.c (grub_arch_modules_addr)
5705         (grub_arch_memdisk_size): Remove functions.
5706         (grub_arch_modules_addr): Return the module address in high memory
5707         (now that it isn't copied anymore).
5709         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5710         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5711         decompression routine (grub_total_module_size already includes that
5712         now).  Don't copy modules back to low memory.
5714         * kern/main.c: Include `<grub/mm.h>'.
5715         (grub_load_modules): Split out (and use) ...
5716         (grub_module_iterate): ... this function, which iterates through
5717         module objects and runs a hook.
5718         Comment out grub_mm_init_region() call, as it would cause non-ELF
5719         modules to be overwritten.
5721         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5722         the memdisk image in its own region, make it part of the module list.
5723         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5724         (main): Parse --memdisk|-m option, and pass user-provided path as
5725         parameter to generate_image().
5726         (add_segments): Pass `memdisk_path' down to load_modules().
5727         (load_modules): Embed memdisk image in module section when requested.
5728         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5729         `header.type' instead of `header.offset'.
5731         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5732         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5733         (memdisk_mod_LDFLAGS): New variables.
5734         * conf/i386-coreboot.rmk: Likewise.
5735         * conf/i386-ieee1275.rmk: Likewise.
5737 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5739         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5740         (backward_relocator): New variables.  Used to allocate and relocate
5741         the payload, respectively.
5742         (grub_multiboot_load_elf32): Load into heap instead of requested
5743         address, install the appropriate relocator code in each bound of
5744         the payload, and set the entry point such that
5745         grub_multiboot_real_boot() will jump to one of them.
5747         * kern/i386/loader.S (grub_multiboot_payload_size)
5748         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5749         (grub_multiboot_payload_entry_offset): New variables.
5750         (grub_multiboot_real_boot): Set cpu context to what the relocator
5751         expects, and jump to the relocator instead of the payload.
5753         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5754         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5755         (grub_multiboot_payload_entry_offset): Export.
5757 2008-08-01  Bean  <bean123ch@gmail.com>
5759         * normal/menu_entry.c (editor_getline): Don't return the original
5760         string as result, as it will be released by lexer once it has done
5761         using it.
5763 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5765         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5766         within menuentries, not before them.
5767         util/grub.d/10_hurd.in: Likewise.
5769 2008-08-01  Bean  <bean123ch@gmail.com>
5771         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5772         (bufio_mod_SOURCES): New macro.
5773         (bufio_mod_CFLAGS): Likewise.
5774         (bufio_mod_LDFLAGS): Likewise.
5776         * include/grub/bufio.h: New file.
5778         * io/bufio.c: Likewise.
5780         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5781         (grub_video_reader_png): Use grub_buffile_open to open file.
5783         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5784         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5786         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5787         (grub_video_reader_tga): Use grub_buffile_open to open file.
5789         * font/manager.c: Include <grub/bufio.h>.
5790         (add_font): Use grub_buffile_open to open file.
5792 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5794         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5795         ELF segments, use a macro for arbitrarily accessing any of them instead
5796         of preparing a pointer that allows access to one at a time.
5797         (grub_multiboot_load_elf64): Likewise.
5799 2008-07-31  Bean  <bean123ch@gmail.com>
5801         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5802         GRUB_KERNEL_MACHINE_DATA_END.
5804 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5806         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5807         Increase from 0x50 to 0x60.
5808         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5809         use UUIDs to identify the root drive for them.  If that's not
5810         possible, abort.
5811         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5812         check, for cross-disk installs.
5814 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5816         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5817         is non-empty, use it to set the `prefix' environment variable instead
5818         of the usual approach.
5819         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5820         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5821         environment variable instead of dummy make_install_device().
5823         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5824         (start): Insert a data section, with `grub_prefix' variable.
5825         * kern/i386/linuxbios/startup.S: Likewise.
5827         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5828         New variable reference.
5829         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5830         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5831         to `start').
5832         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5833         section within startup.S (relative to `start').
5834         * include/grub/i386/coreboot/kernel.h: Likewise.
5836         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5837         Overwrite grub_prefix with its contents, at the beginning of the
5838         first segment.
5839         (main): Understand -p|--prefix.
5841 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5843         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5845 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5847         * term/i386/pc/vga_text.c (grub_console_cls): Use
5848         grub_console_gotoxy() to go back to beginning of the screen.
5849         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5851 2008-07-29  Christian Franke  <franke@computer.org>
5853         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5854         Add conversion of emulated mount points on Cygwin.
5856 2008-07-29  Christian Franke  <franke@computer.org>
5858         * util/update-grub.in: Add a check for admin
5859         group on Cygwin.
5860         Remove old `grub.cfg.new' before creation.
5861         Add `-f' to `mv' to handle the different filesystem
5862         semantics of Windows.
5864 2008-07-29  Bean  <bean123ch@gmail.com>
5866         * normal/main.c (get_line): Fix buffer overflow bug.
5868 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5870         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5871         (struct grub_apple_header): New struct.  Describes the layout of
5872         the partmap header.
5873         (apple_partition_map_iterate): Check the header magic as well as the
5874         partition magic (which was already being checked).
5876 2008-07-28  Pavel Roskin  <proski@gnu.org>
5878         * genmk.rb: Add a warning to the beginning of the output that
5879         it's a generated file and should not be edited.
5881 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5883         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5884         with the same number are found, just use issue a warning with
5885         grub_dprintf(), as this error has been reported to be non-fatal.
5887 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5889         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5890         information.
5892 2008-07-27  Bean  <bean123ch@gmail.com>
5894         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5895         (grub_fat_find_dir): Ignore case when comparing filename.
5897 2008-07-27  Bean  <bean123ch@gmail.com>
5899         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5900         smallino, as it's more descriptive, and i8count can be confused with
5901         the other field count.
5902         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5903         inode type.
5905 2008-07-27  Bean  <bean123ch@gmail.com>
5907         * commands/crc.c: New file.
5909         * lib/crc.c: Likewise.
5911         * include/grub/lib/crc.h: Likewise.
5913         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5915         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5916         (hexdump): Move this function to ...
5918         * lib/hexdump.c: ... here.
5920         * include/grub/hexdump.h: Renamed to ...
5922         * include/grub/lib/hexdump.h: ... this.
5924         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5926         * util/grub-editenv.c: Likewise.
5928         * include/envblk.h: Renamed to ...
5930         * include/lib/envblk.h: ... this.
5932         * util/envblk.c: Renamed to ...
5934         * lib/envblk.c: ... this.
5936         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5937         lib/hexdump.c.
5938         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5939         (pkglib_MODULES): Add crc.mod.
5940         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5941         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5942         (crc_mod_SOURCES): New macro.
5943         (crc_mod_CFLAGS): Likewise.
5944         (crc_mod_LDFLAGS): Likewise.
5946         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5948         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5950         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5952         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5954         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5956 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5958         * commands/help.c: Include <grub/term.h>.
5959         (TERM_WIDTH): Removed.  Updated all users.
5961 2008-07-27  Pavel Roskin  <proski@gnu.org>
5963         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5964         spurious warnings about a comment within a comment.
5966 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5968         * util/getroot.c (find_root_device): Skip devices that match
5969         /dev/dm-[0-9].  This lets the real device be found for any type of
5970         abstraction (LVM, EVMS, RAID..).
5971         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5972         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5973         device is found first, find_root_device() will now skip it.
5975 2008-07-24  Pavel Roskin  <proski@gnu.org>
5977         * include/grub/types.h: Use __builtin_bswap32() and
5978         __builtin_bswap64() with gcc 4.3 and newer.
5980 2008-07-24  Christian Franke  <franke@computer.org>
5982         * util/i386/pc/grub-install.in: If `--debug' is specified,
5983         pass `--verbose' to grub-setup.
5984         Abort script if make_system_path_relative_to_its_root() fails.
5986 2008-07-24  Bean  <bean123ch@gmail.com>
5988         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5989         variable `target_platform' should be `platform'.
5991 2008-07-24  Bean  <bean123ch@gmail.com>
5993         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5994         (grub_png_init_fixed_block): New function.
5995         (grub_png_decode_image_data): Handle fixed huffman code compression.
5997 2008-07-24  Bean  <bean123ch@gmail.com>
5999         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6000         (grub_pe2elf_SOURCES): New macro.
6001         (CLEANFILES): Add grub-pe2elf.
6003         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6004         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6005         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6006         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6007         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6008         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6009         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6010         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6011         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6012         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6013         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6014         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6015         (GRUB_PE32_DT_FUNCTION): Likewise.
6016         (GRUB_PE32_REL_I386_DIR32): Likewise.
6017         (GRUB_PE32_REL_I386_REL32): Likewise.
6018         (grub_pe32_symbol): New structure.
6019         (grub_pe32_reloc): Likewise.
6021         * util/grub-pe2elf.c: New file.
6023         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6024         start symbol in non pc platform.
6026         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6028         The following patches are from Christian Franke.
6030         * include/grub/dl.h: Remove .previous, gas supports this only
6031         for ELF format.
6033         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6034         Remove .type, gas supports this only for ELF format.
6036         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6037         nullbytes in symbol table. This fixes an infinite loop if table is
6038         zero filled.
6040         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6041         TARGET_IMG_LDFLAGS and EXEEXT.
6043         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6044         TARGET_IMG_LDFLAGS_AC.
6045         (grub_CHECK_STACK_ARG_PROBE): New function.
6047         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6049         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6051         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6052         to set TARGET_IMG_LD* accordingly.
6053         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6054         Add call to grub_CHECK_STACK_ARG_PROBE.
6055         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6057         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6059         * genmk.rb: Add EXEEXT to CLEANFILES.
6061 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6063         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6064         define the codes for arrows and lines used for the menu).
6065         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6066         as well.
6068         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6069         fonts, because the latter are too slow.
6071 2008-07-21  Bean  <bean123ch@gmail.com>
6073         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6074         a20. Run keyboard test last, as it will cause macbook to halt.
6076 2008-07-18  Pavel Roskin  <proski@gnu.org>
6078         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6079         load foreign architecture modules correctly anyway.  Keep
6080         support for loading host architecture modules, whether we
6081         compile them or not.
6083 2008-07-17  Pavel Roskin  <proski@gnu.org>
6085         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6086         change target_cpu.  The compiler default can mismatch target_cpu
6087         in any case.
6089         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6090         * kern/efi/efi.c: Likewise.
6092         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6093         target compiler is functional.
6094         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6095         are set up.
6097         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6098         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6099         adjustments from the rest, only do them if target is not
6100         explicitly given.  Merge other adjustments with the final sanity
6101         check.  Remove an extraneous check for supported CPU.  Be
6102         specific which CPU and which platform is not supported.
6104         * configure.ac: Default to pc platform for x86_64.
6106 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6108         Partial LinuxBIOS -> Coreboot rename.
6110         * conf/i386-linuxbios.rmk: Renamed to ...
6111         * conf/i386-coreboot.rmk: ... this.
6112         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6113         * configure.ac: Accept "coreboot" as input platform (but maintain
6114         compatibility with "linuxbios").
6115         * include/grub/i386/linuxbios: Renamed to ...
6116         * include/grub/i386/coreboot: ... this.
6118 2008-07-17  Bean  <bean123ch@gmail.com>
6120         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6121         (appleldr_mod_SOURCE): New variable.
6122         (appleldr_mod_CFLAGS): Likewise.
6123         (appleldr_mod_LDFLAGS): Likewise.
6124         (pci_mod_SOURCES): Likewise.
6125         (pci_mod_CFLAGS): Likewise.
6126         (pci_mod_LDFLAGS): Likewise.
6127         (lspci_mod_SOURCES): Likewise.
6128         (lspci_mod_CFLAGS): Likewise.
6129         (lspci_mod_LDFLAGS): Likewise.
6131         * conf/x86_64-efi.rmk: New file.
6133         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6134         macro.
6135         (grub_efidisk_write): Likewise.
6137         * include/efi/api.h (efi_call_0): New macro.
6138         (efi_call_1): Likewise.
6139         (efi_call_2): Likewise.
6140         (efi_call_3): Likewise.
6141         (efi_call_4): Likewise.
6142         (efi_call_5): Likewise.
6143         (efi_call_6): Likewise.
6145         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6146         grub_rescue_cmd_chainloader.
6148         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6149         (grub_pe32_optional_header): Change some fields based on i386 or
6150         x86_64 platform.
6151         (GRUB_PE32_PE32_MAGIC): Likewise.
6153         * include/grub/efi/uga_draw.h: New file.
6155         * include/grub/elf.h (STN_ABS): New constant.
6156         (R_X86_64_NONE): Relocation constant for x86_64.
6157         (R_X86_64_64): Likewise.
6158         (R_X86_64_PC32): Likewise.
6159         (R_X86_64_GOT32): Likewise.
6160         (R_X86_64_PLT32): Likewise.
6161         (R_X86_64_COPY): Likewise.
6162         (R_X86_64_GLOB_DAT): Likewise.
6163         (R_X86_64_JUMP_SLOT): Likewise.
6164         (R_X86_64_RELATIVE): Likewise.
6165         (R_X86_64_GOTPCREL): Likewise.
6166         (R_X86_64_32): Likewise.
6167         (R_X86_64_32S): Likewise.
6168         (R_X86_64_16): Likewise.
6169         (R_X86_64_PC16): Likewise.
6170         (R_X86_64_8): Likewise.
6171         (R_X86_64_PC8): Likewise.
6173         * include/grub/i386/efi/pci.h: New file.
6175         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6176         Change it value based on platform.
6177         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6178         (GRUB_E820_RAM): Likewise.
6179         (GRUB_E820_RESERVED): Likewise.
6180         (GRUB_E820_ACPI): Likewise.
6181         (GRUB_E820_NVS): Likewise.
6182         (GRUB_E820_EXEC_CODE): Likewise.
6183         (GRUB_E820_MAX_ENTRY): Likewise.
6184         (grub_e820_mmap): New structure.
6185         (linux_kernel_header): Change the efi field according to different
6186         kernel version, also field from linux_kernel_header.
6188         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6190         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6191         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6192         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6193         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6194         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6195         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6196         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6197         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6198         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6199         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6201         * include/grub/x86_64/efi/kernel.h: New file.
6203         * include/grub/x86_64/efi/loader.h: Likewise.
6205         * include/grub/x86_64/efi/machine.h: Likewise.
6207         * include/grub/x86_64/efi/pci.h: Likewise.
6209         * include/grub/x86_64/efi/time.h: Likewise.
6211         * include/grub/x86_64/linux.h: Likewise.
6213         * include/grub/x86_64/setjmp.h: Likewise.
6215         * include/grub/x86_64/time.h: Likewise.
6217         * include/grub/x86_64/types.h: Likewise.
6219         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6220          GRUB_TARGET_SIZEOF_VOID_P.
6222         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6223         (grub_efi_locate_handle): Likewise.
6224         (grub_efi_open_protocol): Likewise.
6225         (grub_efi_set_text_mode): Likewise.
6226         (grub_efi_stall): Likewise.
6227         (grub_exit): Likewise.
6228         (grub_reboot): Likewise.
6229         (grub_halt): Likewise.
6230         (grub_efi_exit_boot_services): Likewise.
6231         (grub_get_rtc): Likewise.
6233         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6234         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6235         (grub_efi_allocate_pages): Wrap efi calls.
6236         (grub_efi_free_pages): Wrap efi calls.
6237         (grub_efi_get_memory_map): Wrap efi calls.
6239         * kern/x86_64/dl.c: New file.
6241         * kern/x86_64/efi/callwrap.S: Likewise.
6243         * kern/x86_64/efi/startup.S: Likewise.
6245         * loader/efi/appleloader.c: Likewise.
6247         * loader/efi/chainloader.c (cmdline): New variable.
6248         (grub_chainloader_unload): Wrap efi calls.
6249         (grub_chainloader_boot): Likewise.
6250         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6251         command line.
6253         * loader/efi/chainloader_normal.c (chainloader_command):
6254         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6255         command line.
6257         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6258         method.
6259         (grub_e820_add_region): New function.
6260         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6261         booting.
6262         (grub_find_video_card): New function.
6263         (grub_linux_setup_video): New function.
6264         (grub_rescue_cmd_linux): Probe for video information.
6266         * normal/x86_64/setjmp.S: New file.
6268         * term/efi/console.c (map_char): New function.
6269         (grub_console_putchar): Map unicode char.
6270         (grub_console_checkkey): Wrap efi calls.
6271         (grub_console_getkey): Likewise.
6272         (grub_console_getwh): Likewise.
6273         (grub_console_gotoxy): Likewise.
6274         (grub_console_cls): Likewise.
6275         (grub_console_setcolorstate): Likewise.
6276         (grub_console_setcursor): Likewise.
6278         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6280 2008-07-16  Pavel Roskin  <proski@gnu.org>
6282         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6283         format strings.
6285         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6286         pointer, not an integer.  This fixes a warning and prevents
6287         precision loss on 64-bit systems.
6288         (relocate_addresses): Remove unneeded cast.
6290 2008-07-15  Pavel Roskin  <proski@gnu.org>
6292         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6294         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6296         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6297         Fix comparison between signed and unsigned.
6299         * include/grub/i386/ieee1275/console.h: Declare
6300         grub_console_init() and grub_console_fini().
6302         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6303         It's empty and unused.
6305         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6306         beginning to avoid warnings with some compilers.
6308         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6309         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6311 2008-07-14  Pavel Roskin  <proski@gnu.org>
6313         * kern/env.c (grub_register_variable_hook): Don't copy empty
6314         string, it leaks memory.  Pass "" to grub_env_set(), it should
6315         handle constant strings.
6317         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6318         * commands/cmp.c (grub_cmd_cmp): Likewise.
6319         * kern/dl.c (grub_dl_flush_cache): Likewise.
6320         (grub_dl_load_core): Likewise.
6321         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6322         (grub_elf64_load_phdrs): Likewise.
6324 2008-07-13  Pavel Roskin  <proski@gnu.org>
6326         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6327         between signed and unsigned.
6328         (LzmaEnc_Finish): Fix warning about an unused parameter.
6330 2008-07-13  Bean  <bean123ch@gmail.com>
6332         * Makefile.in (enable_lzo): New rule.
6334         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6336         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6338         * boot/i386/pc/lnxboot.S: #include <config.h>.
6340         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6341         its value according to the compression algorithm used, lzo or lzma.
6343         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6344         compression algorithm according to configure macro.
6346         * kern/i386/pc/startup.S (codestart): Likewise.
6348         * kern/i386/pc/lzma_decode.S: New file.
6350         * include/grub/lib/LzFind.h: Likewise.
6352         * include/grub/lib/LzHash.h: Likewise.
6354         * include/grub/lib/LzmaDec.h: Likewise.
6356         * include/grub/lib/LzmaEnc.h: Likewise.
6358         * include/grub/lib/LzmaTypes.h: Likewise.
6360         * lib/LzFind.c: Likewise.
6362         * lib/LzmaDec.c: Likewise.
6364         * lib/LzmaEnc.c: Likewise.
6366 2008-07-13  Bean  <bean123ch@gmail.com>
6368         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6369         (grub_ext4_extent_header): New structure.
6370         (grub_ext4_extent): Likewise.
6371         (grub_ext4_extent_idx): Likewise.
6372         (grub_ext4_find_leaf): New function.
6373         (grub_ext2_read_block): Handle extents.
6375 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6377         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6379 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6381         * util/grub.d/40_custom.in: New file. Example on how to add custom
6382         entries to /etc/grub.d.
6383         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6384         40_custom (implicitly, by merging all the grub.d rules).
6386 2008-07-11  Pavel Roskin  <proski@gnu.org>
6388         * commands/read.c (grub_getline): Fix invalid memory access.
6389         Don't add newline to the variable value.
6391         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6392         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6393         (serial_hw_get_port): Check validity of the port number.
6394         (grub_cmd_serial): Check return value of serial_hw_get_port().
6396 2008-07-07  Pavel Roskin  <proski@gnu.org>
6398         * boot/i386/pc/diskboot.S (notification_string): Replace
6399         "Loading kernel" with just "loading".  This is shorter, less
6400         confusing and saves a few bytes for possible future changes.
6402 2008-07-05  Pavel Roskin  <proski@gnu.org>
6404         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6405         size for ATAPI devices, they are undefined.  Output sector
6406         number in decimal form.
6408         * disk/ata.c: Use named constants for status bits.
6410 2008-07-04  Pavel Roskin  <proski@gnu.org>
6412         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6413         grub_addr_t before casting it to the void pointer to fix a
6414         warning.  Non-addressable regions are discarded earlier.
6415         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6416         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6417         (check_signature): Don't shadow table_header.
6418         (grub_linuxbios_table_iterate): Cast numeric constants to
6419         grub_linuxbios_table_header_t.
6420         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6421         grub_stop().
6423         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6424         prevent warnings.
6426         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6427         pointer, which can cause warnings.  Support 64-bit addresses.
6429         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6430         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6432 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6434         This fixes a performance issue when pc & gpt partmap iterators
6435         didn't abort iteration even after our hook found what it was
6436         looking for (often causing expensive probes of non-existent drives).
6438         Some callers relied on previous buggy behaviour, since they would
6439         raise an error when their own hooks caused early abortion of its
6440         iteration.
6442         * kern/device.c (grub_device_open): Improve error message.
6443         * disk/lvm.c (grub_lvm_open): Likewise.
6444         * disk/raid.c (grub_raid_open): Likewise.
6446         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6447         when hook requests it, independently of grub_errno.
6448         (pc_partition_map_probe): Do not fail when find_func() caused
6449         early abortion of pc_partition_map_iterate().
6451         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6452         when hook requests it, independently of grub_errno.
6453         (gpt_partition_map_probe): Do not fail when find_func() caused
6454         early abortion of gpt_partition_map_iterate().
6456         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6457         when hook requests it, independently of grub_errno.  Do not fail when
6458         part_map_iterate_hook() caused early abortion of p->iterate().
6460         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6461         when grub_partition_iterate() returned with non-zero.
6463 2008-07-03  Pavel Roskin  <proski@gnu.org>
6465         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6466         like we do in grub_ata_pio_read().
6467         (grub_ata_readwrite): Always write individual sectors.  Fix the
6468         sector count for the remainder.
6469         (grub_ata_write): Enable writing to ATA devices.  Correctly
6470         report error for ATAPI devices.
6472 2008-07-02  Pavel Roskin  <proski@gnu.org>
6474         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6475         warning.
6477         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6478         for every read sector, we already increment it for the whole
6479         batch.  This fixes reading more than 256 sectors at once.
6481         * util/grub-editenv.c (cmd_info): Cast argument to long
6482         explicitly.  ptrdiff_t reduces to int on i386.
6484         * util/grub-editenv.c (main): Be specific which parameter is
6485         missing.
6487         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6488         (memdisk): Make memdisk_orig_addr a pointer.
6490         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6491         for file offsets, use grub_off_t instead.  Fix printf format
6492         warnings.
6494         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6495         there.  Real unexpected warnings should not drown in the noise
6496         about known problems.
6498         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6499         grub_disk_addr_t for memory addresses.
6501         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6502         explicitly to fix a warning.
6504         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6506         * Makefile.in (MODULE_LDFLAGS): New variable.
6507         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6508         the linker accepts --build-id=none.
6509         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6510         MODULE_LDFLAGS.
6511         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6513         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6514         those in Linux XFS code.  Provide a way to access 64-bit parent
6515         inode.
6516         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6517         the end of struct grub_xfs_dir_header.
6519 2008-07-02  Bean  <bean123ch@gmail.com>
6521         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6522         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6523         and GRUB_IEEE1275_FLAG_NO_ANSI.
6525         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6526         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6527         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6529         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6530         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6532         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6533         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6535         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6536         esc sequence on non ANSI terminal.
6537         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6539         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6540         beginning of file.
6542 2008-07-02  Bean  <bean123ch@gmail.com>
6544         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6545         (grub_editenv_SOURCES): New variable.
6546         (pkglib_MODULES): Add loadenv.mod.
6547         (loadenv_mod_SOURCES): New variable.
6548         (loadenv_mod_CFLAGS): Likewise.
6549         (loadenv_mod_LDFLAGS): Likewise.
6551         * include/grub/envblk.h: New file.
6553         * util/envblk.c: New file.
6555         * util/grub-editenv.c: New file.
6557         * commands/loadenv.c: New file.
6559 2008-07-01  Pavel Roskin  <proski@gnu.org>
6561         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6562         not unsigned char.  This fixes warnings and is consistent with
6563         other tags.
6565         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6567         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6569         * term/tparm.c (analyze): Always set *popcount.
6571         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6572         cast to fix a warning.
6574         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6575         cast to suppress a warning.
6577         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6578         grub_fshelp_read_file() expects.
6580         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6581         write uuid as a 32-bit value in CPU byte order, so declare and
6582         use it as such.
6584         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6585         long if the format specifier expects it.
6586         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6587         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6588         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6589         long to fix a warning.
6590         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6591         grub_dprintf() arguments to fix warnings.
6593 2008-06-30  Pavel Roskin  <proski@gnu.org>
6595         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6596         install_bsd_part immediately before core.img is embedded or
6597         modified on disk.  This fixes core.img verification if core.img
6598         cannot be embedded.
6600         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6601         core_path to calculate the blocklist.
6602         Patch from Javier Martín <lordhabbit@gmail.com>
6604 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6606         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6607         block to disk block.
6608         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6609         Patch from Niels Böhm <bitbucket@arcor.de>
6611 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6613         * util/update-grub_lib.in (font_path): Search for fonts in
6614         /boot/grub first, which is more likely to be readable (we aren't
6615         deciding where fonts live, just looking for them).
6617 2008-06-26  Pavel Roskin  <proski@gnu.org>
6619         * util/biosdisk.c (read_device_map): Don't leave dead map
6620         entries for devices failing stat() check.
6622         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6623         core_path_dev for the core.img path on the target device.
6625 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6627         * disk/fs_uuid.c: New file.
6628         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6629         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6630         (fs_uuid_mod_LDFLAGS): New variables.
6631         * include/grub/disk.h (grub_disk_dev_id): Add
6632         `GRUB_DISK_DEVICE_UUID_ID'.
6633         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6634         implement iterate().
6636 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6638         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6639         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6640         Linux image includes no initrd.
6642 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6644         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6645         call to resolve the core image location that effectively appended the
6646         name twice.
6648 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6650         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6651         call from here ...
6653         * util/grub.d/10_hurd.in: ... to here ...
6654         * util/grub.d/10_linux.in: ... and here.
6656 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6658         * kern/main.c (grub_main): Export `prefix' variable immediately
6659         after it has been set by grub_machine_set_prefix().
6661 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6663         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6664         search result when not saving to variable, not the other way around.
6665         When saving to variable, abort iteration as soon as a match is found.
6667 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6669         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6670         check for partition that provides /boot/grub.  Its logic is flawed,
6671         as it prevents prepare_grub_to_access_device() from being called
6672         multiple times.
6674 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6676         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6677         "insmod" command directly when abstraction modules are needed,
6678         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6679         since it had already been processed).
6681 2008-06-19  Pavel Roskin  <proski@gnu.org>
6683         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6684         changed.  This is needed in case GRUB_LIBDIR changes.
6685         * conf/i386-ieee1275.rmk: Likewise.
6686         * conf/i386-linuxbios.rmk: Likewise.
6687         * conf/i386-pc.rmk: Likewise.
6688         * conf/powerpc-ieee1275.rmk: Likewise.
6690 2008-06-18  Pavel Roskin  <proski@gnu.org>
6692         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6693         kernel_elf_symlist.c to symlist.c for consistency with other
6694         architectures.  Update all users.
6695         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6697 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6699         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6700         it in prefix.
6702         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6703         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6704         a RAID device, run setup() for all members independently on whether
6705         LVM abstraction is being used.
6706         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6707         If grub-mkimage has set `*install_dos_part == -2', don't override this
6708         value.
6709         Perform *install_dos_part adjustments independently on whether
6710         we're embedding or not.
6711         Clarify error message when image is too big for embedding.
6712         Remove duplicate *install_dos_part stanza.
6714 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6716         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6717         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6718         variables.
6719         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6720         values in grub_ofconsole_normal_color and
6721         grub_ofconsole_highlight_color (they're not directly related to
6722         background and foreground).
6723         (grub_ofconsole_setcolorstate): Extract background and foreground
6724         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6726 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6728         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6729         /boot/grub for the check in last commit, not /boot (they could be
6730         different partitions).
6732 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6734         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6735         asked to setup access for the same partition that provides /boot,
6736         don't bother using UUIDs since our root already has the value we
6737         want.
6739 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6741         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6742         I2O devices.
6743         Patch from Sven Mueller <sven@debian.org>.
6745 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6747         * util/update-grub.in: Check for $EUID instead of $UID.
6748         Reported by Vincent Zweije.
6750 2008-06-16  Bean  <bean123ch@gmail.com>
6752         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6753         (grub_ext2_read_block): Likewise.
6754         (grub_ext2_read_inode): Likewise.
6755         (grub_ext2_mount): Likewise.
6756         (grub_ext2_close): Likewise.
6757         (grub_ext3_get_journal): Removed.
6759         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6760         (grub_reiserfs_read_symlink): Likewise.
6761         (grub_reiserfs_mount): Likewise.
6762         (grub_reiserfs_open): Likewise.
6763         (grub_reiserfs_read): Likewise.
6764         (grub_reiserfs_close): Likewise.
6765         (grub_reiserfs_get_journal): Removed.
6767         * fs/fshelp.c (grub_fshelp_read): Removed.
6768         (grub_fshelp_map_block): Likewise.
6770         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6771         (grub_fshelp_journal): Likewise.
6772         (grub_fshelp_read): Likewise.
6773         (grub_fshelp_map_block): Likewise.
6775 2008-06-16  Pavel Roskin  <proski@gnu.org>
6777         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6778         floating point anymore.
6779         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6781 2008-06-15  Pavel Roskin  <proski@gnu.org>
6783         * commands/ls.c (grub_ls_list_files): Use integer calculations
6784         for human readable format, avoid floating point use.
6785         * kern/misc.c (grub_ftoa): Remove.
6786         (grub_vsprintf): Remove floating point support.
6788 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6790         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6791         devices.
6792         Reported by Max Vozeler.
6794 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6796         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6797         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6798         skipped later.
6799         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6800         the beginning of the prefix.
6802         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6803         It is assumed that if we have a memdisk, grub-mkimage has set
6804         grub_prefix to include the "(memdisk)" drive in it.
6806 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6808         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6809         Initialize keyboard controller after registering the terminal, so that
6810         grub_printf() can be called from grub_keyboard_controller_init().
6812 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6814         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6815         extent-btree which is written as big endian on disk.
6816         Reported by Alain Greppin  <al@chilibi.org>.
6818 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6820         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6821         * util/i386/pc/grub-install.in (modules): Likewise.
6823 2008-06-13  Pavel Roskin  <proski@gnu.org>
6825         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6827 2008-06-13  Bean  <bean123ch@gmail.com>
6829         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6831         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6833         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6834         to indicate sparse block.
6836 2008-06-12  Pavel Roskin  <proski@gnu.org>
6838         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6839         number, grub_fshelp_read() does it for us.
6841         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6842         linear disk read with journal translation.
6843         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6844         * include/grub/fshelp.h: Declare grub_fshelp_read().
6846 2008-06-09  Pavel Roskin  <proski@gnu.org>
6848         * fs/minix.c (grub_minix_mount): Handle error reading
6849         superblock.
6851 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6853         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6854         don't append the RAID prefix afterwards.
6855         Reported by Clint Adams.
6857 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6859         Based on description from Pavel:
6860         * kern/disk.c (grub_disk_check_range): Rename to ...
6861         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6862         tasks performed by this function.
6864 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6866         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6867         `num_serial' (for consistency with other variables).
6868         (struct grub_ntfs_data): Add `uuid' member.
6869         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6870         (grub_ntfs_uuid): New function.
6871         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6873 2008-06-07  Pavel Roskin  <proski@gnu.org>
6875         * util/biosdisk.c (open_device): Revert last change to the
6876         function, it broke installation.  The sector needs to be
6877         different dependent on which device is opened.
6879 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6881         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6882         rest of GRUB, and breakage doesn't happen if its value were modified.
6884         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6885         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6886         a constant (same value).
6887         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6888         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6890 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6892         * util/biosdisk.c (open_device): Do not modify sector offset when
6893         accessing a partition.  kern/disk.c already handles this for us.
6895 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6897         * util/grub-emu.c (grub_machine_init): Move code in this function from
6898         here ...
6899         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6900         segfault in case grub_printf() is called).
6902         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6903         grub_probe.  Update all users not to explicitly add it again.
6904         (grub_device): New variable; contains corresponding device for grubdir.
6905         (fs_module, partmap_module, devabstraction_module): Pass
6906         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6907         every time.
6909 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6911         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6912         is found, print it (same layout as with labels).
6914 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6916         * util/biosdisk.c (get_drive): Rename to ...
6917         (find_grub_drive): ... this.  Update all users.
6919         (get_os_disk): Rename to ...
6920         (convert_system_partition_to_system_disk): ... this.  Update all users.
6922         (find_drive): Rename to ...
6923         (find_system_device): ... this.  Update all users.
6925 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6927         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6928         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6929         (make_device_map): Likewise.
6931 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6933         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6934         before dereferencing it.
6936         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6937         union with fat12/fat16-specific ones.  Add some new fields, including
6938         `num_serial' for both versions.
6939         (struct grub_fat_data): Add `uuid' member.
6940         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6941         names.  Initialize `data->uuid' using `num_serial'.
6942         (grub_fat_uuid): New function.
6943         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6945         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6946         (grub_reiserfs_uuid): New function.
6947         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6948         member.
6950         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6951         (grub_xfs_uuid): New function.
6952         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6954 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6956         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6957         code that is backward compatible with pre-uuid search command.
6959 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6961         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6962         floppies after everything else, to ensure floppy drive isn't accessed
6963         unnecessarily (patch from Bean).
6965 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6967         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6968         not print device names when we were asked to set a variable.
6970 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6972         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6973         using "cursor-on" and "cursor-off" commands (understood at least by
6974         the Open Firmware flavour on OLPC).
6976 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6978         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6979         on and off sequences.
6981 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6983         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6984         * util/update-grub.in: Likewise.
6986 2008-05-30  Pavel Roskin  <proski@gnu.org>
6988         * util/biosdisk.c (linux_find_partition): Simplify logic and
6989         make the code more universal.  Keep special processing for
6990         devfs, but use a simple rule for all other devices.  If the
6991         device ends with a number, append 'p' and the partition number.
6992         Otherwise, append only the partition number.
6994 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6996         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6997         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6998         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6999         the `root' parameter to Linux.
7001 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7003         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7004         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7005         --fs_uuid with --fs-uuid.
7006         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7007         all filesystems support them).
7009 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7011         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7012         grub_printf() flags, since we're printing in units of 2 bytes.
7014 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7016         * util/grub.d/00_header.in: Remove obsolete comment referencing
7017         convert_system_path_to_grub_path().
7018         * util/update-grub.in: Likewise.
7019         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7020         (convert_system_path_to_grub_path): Add a warning message explaining
7021         that this function is deprecated.  Rely on is_path_readable_by_grub()
7022         for the readability checks.
7023         (font_path): Use is_path_readable_by_grub() for the readability
7024         check rather than convert_system_path_to_grub_path().
7026 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7028         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7029         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7030         converting it first.
7031         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7032         grub.cfg for access to font file, and afterwards call it again to set
7033         the root device.
7035 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7037         * commands/search.c (options): Add --fs_uuid option.
7038         (search_fs_uuid): New function.
7039         (grub_cmd_search): Fix --set argument passing.
7040         Use search_fs_uuid() when requested via --fs_uuid.
7041         (grub_search_init): Update help message.
7042         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7043         and redeclare it as an array of 16-bit words.
7044         (grub_ext2_uuid): New function.
7045         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7046         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7047         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7048         (GRUB_DEVICE_BOOT_UUID): New variables.
7049         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7050         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7051         whenever possible.
7052         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7053         just assume `root' variable has the right value.
7054         * util/grub.d/10_linux.in: Likewise.
7055         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7056         via PRINT_FS_UUID.
7057         (main): Recognise `-t fs_uuid' argument.
7059 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7061         * util/biosdisk.c (map): Redefine structure to hold information
7062         about GRUB drive name.
7063         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7064         drive names.
7065         (call_hook): Remove.
7066         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7067         member.  Assume drive has partitions.
7068         (grub_util_biosdisk_open): Access device names via `.device' struct
7069         member.
7070         (open_device): Likewise.
7071         (find_drive): Likewise.
7072         (read_device_map): Adjust map[] usage to match the new struct
7073         definition.  Don't check for duplicates (still possible, but not cheap
7074         anymore).
7075         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7076         (make_device_name): Remove assumption of BIOS-like drive names.
7078 2008-05-30  Pavel Roskin  <proski@gnu.org>
7080         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7081         compiling execute.c doesn't need grub_script.tab.h anymore.
7082         (normal/command.c_DEPENDENCIES): Likewise.
7083         (normal/function.c_DEPENDENCIES): Likewise.
7084         * conf/i386-ieee1275.rmk: Likewise.
7085         * conf/i386-linuxbios.rmk: Likewise.
7086         * conf/i386-pc.rmk: Likewise.
7087         * conf/powerpc-ieee1275.rmk: Likewise.
7088         * conf/sparc64-ieee1275.rmk: Likewise.
7090 2008-05-29  Pavel Roskin  <proski@gnu.org>
7092         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7093         when scanning metadata for volume group name.
7095         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7096         a generated file, which may only be included from the files with
7097         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7098         use union YYSTYPE, as the later allows forward declaration.
7099         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7101 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7103         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7104         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7105         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7106         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7107         scan codes.
7109 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7111         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7112         control key combinations.
7114 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7116         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7117         * util/ieee1275/grub-install.in: ... to here.
7118         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7119         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7120         (grub_install_SOURCES): Likewise.
7122 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7124         * fs/affs.c: Update copyright year.
7125         * fs/ext2.c: Likewise.
7126         * fs/fshelp.c: Likewise.
7127         * fs/hfsplus.c: Likewise.
7128         * fs/ntfs.c: Likewise.
7129         * fs/xfs.c: Likewise.
7130         * include/grub/fshelp.h: Likewise.
7131         * util/grub-mkdevicemap.c: Likewise.
7133 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7135         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7136         might need to be fatfs to support some firmware implementations
7137         (e.g. OFW or EFI).
7139 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7141         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7142         devices.
7143         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7144         (make_device_map): Likewise.
7146 2008-05-20  Bean  <bean123ch@gmail.com>
7148         * fs/fshelp.c (grub_fshelp_map_block): New function.
7149         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7150         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7152         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7153         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7154         (grub_fshelp_journal): New structure.
7155         (grub_fshelp_map_block): New function prototype.
7156         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7157         (grub_fshelp_map_block): Likewise.
7159         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7160         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7161         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7162         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7163         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7164         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7165         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7166         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7167         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7168         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7169         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7170         (grub_ext2_sblock): New members for journal support.
7171         (grub_ext3_journal_header): New structure.
7172         (grub_ext3_journal_revoke_header): Likewise.
7173         (grub_ext3_journal_block_tag): Likewise.
7174         (grub_ext3_journal_sblock): Likewise.
7175         (grub_fshelp_node): New members logfile and journal.
7176         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7177         grub_fshelp_map_block to get real block number.
7178         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7179         number.
7180         (grub_ext2_read_inode): Likewise.
7181         (grub_ext3_get_journal): New function.
7182         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7183         (grub_ext2_close): Release memory used by journal.
7185         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7186         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7187         (grub_reiserfs_transaction_header): Renamed to
7188         grub_reiserfs_description_block, replace field data with real_blocks.
7189         (grub_reiserfs_commit_block): New structure.
7190         (grub_reiserfs_data): New member journal.
7191         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7192         number.
7193         (grub_reiserfs_read_symlink): Likewise.
7194         (grub_reiserfs_iterate_dir): Likewise.
7195         (grub_reiserfs_open): Likewise.
7196         (grub_reiserfs_read): Likewise.
7197         (grub_reiserfs_get_journal): New function.
7198         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7199         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7200         using grub_reiserfs_get_journal.
7201         (grub_reiserfs_close): Release memory used by journal.
7203         * fs/affs.c (grub_affs_read_block): Change block type to
7204         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7206         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7208         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7210         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7212         * fs/udf.c (grub_udf_read_block): Change block type to
7213         grub_disk_addr_t. Use type cast to avoid warning.
7215         * fs/xfs.c (grub_xfs_read_block): Likewise.
7217 2008-05-16  Christian Franke  <franke@computer.org>
7219         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7220         to ensure that break with ESC will always work.
7221         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7222         Remove ESC from keyboard queue.
7224 2008-05-16  Christian Franke  <franke@computer.org>
7226         * util/biosdisk.c: [__CYGWIN__] Add includes.
7227         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7228         (get_os_disk): Move variable declarations to OS specific
7229         parts to avoid warning.
7230         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7231         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7232         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7233         Cygwin.
7234         * util/getroot.c: [__CYGWIN__] Add includes.
7235         (strip_extra_slashes): Fix "/" case.
7236         [__CYGWIN__] (get_win32_path): New function.
7237         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7238         [__CYGWIN__] (find_root_device): Disable.
7239         [__CYGWIN__] (get_bootsec_serial): New function.
7240         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7241         [__linux__] (grub_guess_root_device): Add early returns to simplify
7242         structure.
7243         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7244         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7245         check for Linux only.
7247 2008-05-15  Bean  <bean123ch@gmail.com>
7249         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7250         keyboard hang problem in apple's intel mac.
7252 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7254         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7255         devices.
7256         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7257         (make_device_map): Likewise.
7258         Reported by Aurelien Jarno <aurel32@debian.org>
7260 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7262         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7263         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7264         (make_device_map): Output entries for xvd type disks.
7266 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7268         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7269         devices.
7270         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7271         (make_device_map): Likewise.
7272         Reported by Roland Dreier <rdreier@cisco.com>
7274 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7276         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7277         grub_strstr() call.  Correct a few mistakes in failure path handling.
7279 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7281         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7282         Do not print a trailing slash (therefore, the root directory is an
7283         empty string).
7284         (convert_system_path_to_grub_path): Do not remove trailing slash
7285         from make_system_path_relative_to_its_root() output.
7287         * util/i386/pc/grub-install.in: Add trailing slash to output from
7288         make_system_path_relative_to_its_root().
7290 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7292         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7293         ensures that output lines aren't intermangled with those sent to
7294         stderr (via grub_util_info()).
7295         * util/grub-probe.c (grub_refresh): Likewise.
7296         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7298 2008-05-05  Christian Franke  <franke@computer.org>
7300         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7301         Add Cygwin device names.
7302         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7303         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7304         (check_device): Return error instead of success on empty name.
7305         (make_device_map): Move label inside linux specific code to
7306         prevent compiler warning.
7308 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7310         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7311         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7312         first boot option.
7313         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7315 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7317         * docs/grub.cfg: New file (example GRUB configuration).
7319 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7321         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7322         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7323         and `disk/ieee1275/nand.c'.
7325 2008-04-25  Bean  <bean123ch@gmail.com>
7327         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7328         i386-linuxbios.
7330         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7331         change the buffer size to 4096 for cdrom device.
7333         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7334         and nand.mod.
7335         (_linux_mod_SOURCES): New variable.
7336         (_linux_mod_CFLAGS): Likewise.
7337         (_linux_mod_LDFLAGS): Likewise.
7338         (linux_mod_SOURCES): Likewise.
7339         (linux_mod_CFLAGS): Likewise.
7340         (linux_mod_LDFLAGS): Likewise.
7341         (nand_mod_SOURCES): Likewise.
7342         (nand_mod_CFLAGS): Likewise.
7343         (nand_mod_LDFLAGS): Likewise.
7345         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7346         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7347         type property. (nand device in olpc don't have this property)
7349         * include/grub/disk.h (grub_disk_dev_id): New macro
7350         GRUB_DISK_DEVICE_NAND_ID.
7352         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7353         function prototype.
7354         (grub_rescue_cmd_initrd): Likewise.
7356         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7357         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7358         ofw_cif_handler and ofw_idt, adjust padding number.
7360         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7361         GRUB_MACHINE_IEEE1275 is defined.
7363         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7364         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7366         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7367         on nested function heap_init.
7368         (grub_upper_mem): New variable for i386-ieee1275.
7369         (grub_get_extended_memory): New function for i386-ieee1275.
7370         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7372         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7373         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7374         property.
7376         * loader/i386/ieee1275/linux.c: New file.
7378         * loader/i386/ieee1275/linux_normal.c: New file.
7380         * disk/ieee1275/nand.c: New file.
7382 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7384         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7385         value.
7386         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7388 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7390         Restructures early code path on ieee1275 to unify grub_main() as
7391         the first C function that is executed in every platform.
7393         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7394         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7395         cmain().
7396         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7397         * kern/ieee1275/cmain.c (cmain): Rename to ...
7398         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7399         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7400         at the beginning.
7402 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7404         * util/update-grub.in: Fix syntax error when setting
7405         `GRUB_PRELOAD_MODULES'.
7406         Reported by Stephane Chazelas <stephane@artesyncp.com>
7408 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7410         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7411         section into account, newer toolchains generate unique build ids
7412         * configure.ac: remove the test for --build-id=none acceptance,
7413         we want build ids to be preserved
7414         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7415         far from other sections don't cause the raw binary images grow
7416         size
7418 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7420         * disk/lvm.c: Update copyright year.
7421         * kern/misc.c: Likewise.
7423 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7425         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7426         there is no memory left for physical volume name.
7428 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7430         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7431         volume name mapping to support bigger than 9 character names properly.
7433 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7435         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7436         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7438 2008-04-13  Christian Franke  <franke@computer.org>
7440         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7441         to create a floppy emulation boot CD when non emulation mode
7442         does not work.
7443         Enable Joliet CD filesystem extension.
7445 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7447         * kern/misc.c (grub_strncat): Fix off-by-one error.
7448         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7450         * kern/env.c (grub_env_context_close): Clear current context, not
7451         previous one.
7452         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7454         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7456 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7458         Improve robustness when handling LVM.
7460         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7461         (and leave `*p' unmodified).
7462         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7463         through it.
7464         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7465         iterating through it.
7466         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7467         through it.
7468         (grub_lvm_scan_device): Check the return value (and fail gracefully
7469         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7470         Don't assume `vg->pvs != NULL' when iterating through it.
7472 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7474         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7475         * genmk.rb (partmap): New variable.
7476         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7477         (#{partmap}): New target rule.
7478         * genpartmaplist.sh: New file.
7479         * Makefile.in (pkglib_DATA): Add partmap.lst.
7480         (partmap.lst): New target rule.
7481         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7482         modules (including all partition maps), instead of preloading them.
7484 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7486         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7487         `linux-boot-prober' (if installed) to detect other operating
7488         systems which are installed on the computer and add them to
7489         the boot menu.
7490         * conf/common.rmk: Build and install 30_os-prober.
7492 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7494         * kern/powerpc/ieee1275/init.c: Move from here ...
7495         * kern/ieee1275/init.c: ... to here.  Update all users.
7497         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7498         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7500         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7501         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7503         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7504         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7506 2008-04-10  Pavel Roskin  <proski@gnu.org>
7508         * configure.ac: Always use "_cv_" in cache variables for
7509         compatibility with Autoconf 2.62.
7511 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7513         Revert grub/machine/init.h addition by Pavel (since it breaks on
7514         i386-ieee1275 and others):
7515         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7516         * util/powerpc/ieee1275/misc.c: Likewise.
7518 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7520         * util/grub-probe.c (probe): Improve error message.
7522 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7524         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7525         (this prevents the presence of a bogus entry from ruining the whole
7526         thing).
7528 2008-04-06  Pavel Roskin  <proski@gnu.org>
7530         * util/biosdisk.c: Include grub/util/biosdisk.h.
7531         * util/grub-fstest.c (execute_command): Make static.
7532         * util/grub-mkdevicemap.c (check_device): Likewise.
7533         * util/i386/pc/misc.c: Include grub/machine/init.h.
7534         * util/powerpc/ieee1275/misc.c: Likewise.
7535         * util/lvm.c: Include grub/util/lvm.h.
7536         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7537         grub/cache.h.
7538         * util/raid.c: Include grub/util/raid.h.
7539         (grub_util_getdiskname): Make static.
7541         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7542         grub_hostfs_fini(), as they are called from grub_init_all() and
7543         grub_fini_all() respectively.  This fixes an infinite loop in
7544         grub-fstest due to double registration of hostfs.
7545         Reported by Christian Franke <Christian.Franke@t-online.de>
7547 2008-04-05  Pavel Roskin  <proski@gnu.org>
7549         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7550         all 8 functions.  Otherwise, probe function 0 only.
7552 2008-04-04  Pavel Roskin  <proski@gnu.org>
7554         * commands/lspci.c (grub_lspci_iter): Print the bus number
7555         correctly.
7557         * commands/lspci.c (grub_pci_classes): Fix typos.
7558         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7559         before device ID, as it's normally done.
7561         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7562         Fix signedness warnings.
7563         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7564         Likewise.
7565         * util/ieee1275/get_disk_name.c: Include config.h so that
7566         _GNU_SOURCE is defined and getline() is declared.  Mark an
7567         unused argument as such.  Fix a signedness warning.
7569 2008-04-02  Pavel Roskin  <proski@gnu.org>
7571         * genkernsyms.sh.in: Use more robust assignments for CC and
7572         srcdir.  Quote srcdir.
7573         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7574         the symbol table is not empty.
7576         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7577         * fs/cpio.c (grub_cpio_read): Likewise.
7579 2008-04-01  Pavel Roskin  <proski@gnu.org>
7581         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7582         * disk/host.c (grub_host_open): Likewise.
7583         * disk/loopback.c (grub_loopback_open): Likewise.
7584         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7585         disk->id as in disk/host.c, not a multi-character constant.
7587         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7588         later is obsolete, potentially dangerous and sets a bad example.
7589         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7590         * util/misc.c (grub_util_get_image_size): Likewise.
7592         * disk/loopback.c (options): Improve help for "--partitions".
7594         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7595         options to align them with the short options, e.g. "echo -e".
7597 2008-03-31  Bean  <bean123ch@gmail.com>
7599         * video/reader/png.c (grub_png_data): New member is_16bit and
7600         image_data.
7601         (grub_png_decode_image_header): Detect 16 bit png image.
7602         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7603         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7604         (grub_video_reader_png): Release memory occupied by image_data.
7606         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7607         4096 bytes.
7608         (grub_nfs_mount): Skip the test for sector per cluster.
7610         * include/grub/ntfs.h (MAX_SPC): Removed.
7612 2008-03-31  Bean  <bean123ch@gmail.com>
7614         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7615         (grub_probe_SOURCES): Add fs/afs.c.
7616         (grub_fstest_SOURCES): Likewise.
7617         (afs_mod_SOURCES): New variable.
7618         (afs_mod_CFLAGS): Likewise.
7619         (afs_mod_LDFLAGS): Likewise.
7621         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7622         (grub_emu_SOURCES): Likewise.
7624         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7626         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7628         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7630         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7632         * fs/afs.c: New file.
7634 2008-03-30  Pavel Roskin  <proski@gnu.org>
7636         * disk/host.c: Include grub/misc.h to fix a warning.
7637         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7638         warnings about implicit declarations.
7640         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7641         variable.
7642         * include/grub/i386/loader.h: Change declaration of
7643         grub_linux_boot() to match what grub_loader_set() expects.
7644         * util/getroot.c (grub_guess_root_device): Return const char* to
7645         fix a warning.
7646         * util/grub-probe.c (probe): Fix a warning about uninitialized
7647         abstraction_name variable.
7648         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7649         second argument as unused to fix a warning.
7651         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7652         missing grub_error() call.
7654         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7655         2.60 and newer uses it to define datadir.
7657         * commands/sleep.c: Fix warning about implicit declaration.
7658         * disk/memdisk.c: Likewise.
7659         * loader/aout.c: Likewise.
7660         * loader/i386/bsd_normal.c: Likewise.
7661         * util/grub-probe.c: Likewise.
7663         * commands/i386/cpuid.c (has_longmode): Make static.
7664         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7665         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7667         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7668         GDT.  This is more robust, as %ds can change.
7669         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7670         calling real_to_prot().
7671         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7673 2008-03-28  Pavel Roskin  <proski@gnu.org>
7675         * kern/i386/pc/startup.S: Assert that uncompressed functions
7676         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7677         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7678         code, as they push parts of the code (error handlers) beyond
7679         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7680         code as correctness and size.
7682 2008-03-28  Pavel Roskin  <proski@gnu.org>
7684         * kern/i386/pc/startup.S
7685         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7686         data block address to the real mode, keep offset minimal.  This
7687         works around a bug in AWARD BIOS on old Athlon systems, which
7688         makes CD detection hang.
7690 2008-03-26  Pavel Roskin  <proski@gnu.org>
7692         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7693         const.
7694         * include/grub/normal.h: Add grub_parse_color_name_pair()
7695         declaration.
7697 2008-03-24  Bean  <bean123ch@gmail.com>
7699         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7700         (cd_count): Removed.
7701         (cd_drive): New variable.
7702         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7703         (grub_biosdisk_call_hook): Likewise.
7704         (grub_biosdisk_iterate): Change cdrom detection method.
7705         (grub_biosdisk_open): Replace cd_start with cd_drive.
7706         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7707         detect cdrom device.
7709         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7710         Removed.
7711         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7712         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7713         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7714         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7715         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7716         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7717         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7718         (grub_biosdisk_cdrp): New structure.
7719         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7721         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7723         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7724         device.
7726         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7727         New function.
7729 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7731         Remove 2 TiB limit in ata.mod.
7732         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7733         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7734         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7735         grub_uint64_t instead of grub_uint32_t.
7737 2008-03-05  Bean  <bean123ch@gmail.com>
7739         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7740         (grub_multiboot): Set boot device.
7742         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7744 2008-03-02  Bean  <bean123ch@gmail.com>
7746         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7747         symlink_buffer.
7749 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7751         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7752         texinfo.tex.
7754         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7755         modified.
7757         * docs/fdl.texi: New file.
7759         * docs/mdate-sh: New file. Copied from gnulib.
7760         * docs/texinfo.tex: Likewise.
7762         * config.guess: Updated from gnulib.
7763         * install-sh: Likewise.
7765 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7767         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7768         (aout_mod_SOURCES): New variable.
7769         (aout_mod_CFLAGS): Likewise.
7770         (aout_mod_LDFLAGS): Likewise.
7772         * conf/i386-ieee1275.rmk: Likewise.
7774 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7776         * util/update-grub.in: Reorganise terminal validity check.  Accept
7777         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7778         Based on suggestion by Franklin PIAT.
7780 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7782         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7783         function.
7784         * util/getroot.c (grub_util_check_block_device): New function that
7785         returns the given argument if it is a block device and returns NULL else.
7786         * util/grub-probe.c (argument_is_device): New variable.
7787         (probe): Promote device_name from a variable to an argument. Receive
7788         device_name from grub_util_check_block_device() if path is NULL and from
7789         grub_guess_root_device() else. Do not free() device_name anymore.
7790         (options): Introduce new parameter '-d, --device'.
7791         (main): Add description of the new parameter to the help screen.
7792         Rename path variable to argument. Set argument_is_device if the '-d'
7793         option is given. Pass argument to probe() depending on
7794         argument_is_device.
7796 2008-02-24  Bean  <bean123ch@gmail.com>
7798         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7799         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7800         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7801         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7802         (GRUB_ISO9660_VOLDESC_END): Likewise.
7803         (grub_iso9660_primary_voldesc): New member escape.
7804         (grub_iso9660_data): New member joliet.
7805         (grub_iso9660_convert_string): New function.
7806         (grub_iso9660_mount): Detect joliet extension.
7807         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7808         (grub_iso9660_iso9660_label): Likewise.
7810         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7811         (grub_setup_SOURCES): Add fs/udf.c.
7812         (grub_fstest_SOURCES): Likewise.
7813         (udf_mod_SOURCES): New variable.
7814         (udf_mod_CFLAGS): Likewise.
7815         (udf_mod_LDFLAGS): Likewise.
7817         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7818         (grub_emu_SOURCES): Likewise.
7820         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7822         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7824         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7826         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7828         * fs/udf.c: New file.
7830 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7832         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7833         (normal/lexer.c_DEPENDENCIES): New variables.
7834         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7835         (normal/lexer.c_DEPENDENCIES): Likewise.
7836         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7837         (normal/lexer.c_DEPENDENCIES): Likewise.
7838         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7839         (normal/lexer.c_DEPENDENCIES): Likewise.
7840         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7841         (normal/lexer.c_DEPENDENCIES): Likewise.
7842         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7843         (normal/lexer.c_DEPENDENCIES): Likewise.
7845 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7847         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7848         since they were intended to be in hex.  This didn't break previously
7849         because of a bug in gpt_partition_map_iterate() (see below).
7851         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7852         when checking the validity of GPT header.
7853         Remove `partno', since it always provides the same information as `i'.
7855 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7857         * include/grub/efi/time.h: Fix a wrong comment.
7859 2008-02-19  Pavel Roskin  <proski@gnu.org>
7861         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7862         message.
7864 2008-02-19  Bean  <bean123ch@gmail.com>
7866         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7867         (aout_mod_SOURCES): New variable.
7868         (aout_mod_CFLAGS): Likewise.
7869         (aout_mod_LDFLAGS): Likewise.
7870         (_bsd_mod_SOURCES): New variable.
7871         (_bsd_mod_CFLAGS): Likewise.
7872         (_bsd_mod_LDFLAGS): Likewise.
7873         (bsd_mod_SOURCES): New variable.
7874         (bsd_mod_CFLAGS): Likewise.
7875         (bsd_mod_LDFLAGS): Likewise.
7877         * include/grub/aout.h: New file.
7879         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7881         * include/grub/i386/bsd.h: New file.
7883         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7884         to make it public.
7886         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7887         function is called, so that it's possible to change it inside the hook.
7888         (grub_elf64_load): Likewise.
7889         (grub_elf_file): Don't close the file if elf header is not found.
7890         (grub_elf_close): Close the file if grub_elf_file fails (The new
7891         grub_elf_file won't close it).
7892         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7893         (grub_elf64_size): Likewise.
7895         * kern/i386/loader.S (grub_unix_real_boot): New function.
7897         * loader/aout.c: New file.
7899         * loader/i386/bsd.c: New file.
7901         * loader/i386/bsd_normal.c: New file.
7903         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7905         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7906         can test other formats.
7908 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7910         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7911         (grub_gpt_partition_type_empty): Redefine with macro from
7912         `<grub/gpt_partition.h>'.
7913         (gpt_partition_map_iterate): Adjust partition type comparison.
7915         Export `entry' as partmap-specific `part.data' struct.
7916         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7918         * include/grub/gpt_partition.h (grub_gpt_header)
7919         (grub_gpt_partentry): ... to here (new file).
7921         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7923         (grub_gpt_partition_type_bios_boot): New const variable, defined
7924         with macro from `<grub/gpt_partition.h>'.
7926         (setup): Replace `first_start' with `embed_region', which keeps
7927         track of the embed region (and is partmap-agnostic).
7929         Replace find_first_partition_start() with find_usable_region(),
7930         which finds a usable region for embedding using partmap-specific
7931         knowledge (supports PC/MSDOS and GPT).
7933         Fix all assumptions that the embed region start at sector 1, using
7934         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7935         rather than `first_start' to calculate available size.
7937         In grub_util_info() message, replace "into after the MBR" with an
7938         indication of the specific sector our embed region starts at.
7940 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7942         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7943         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7944         `commands/reboot.c'.
7945         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7946         (halt_mod_SOURCES): Likewise.
7947         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7948         (halt_mod_SOURCES): Likewise.
7950 2008-02-17  Christian Franke  <franke@computer.org>
7952         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7954 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7956         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7957         set `first_start' to 0 for non-PC/MSDOS partition maps.
7959 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7961         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7962         do not assume partition map is PC/MSDOS before performing checks that
7963         are specific to that layout.
7965 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7967         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7968         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7969         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7971 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7973         * configure.ac: Only a cosmetic change on the handling of
7974         -fno-stack-protector.
7976 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7978         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7979         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7980         reboot.c.
7981         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7982         (halt_mod_SOURCES): New variable.
7983         (halt_mod_CFLAGS): Likewise.
7984         (halt_mod_LDFLAGS): Likewise.
7985         (reboot_mod_SOURCES): Likewise.
7986         (reboot_mod_CFLAGS): Likewise.
7987         (reboot_mod_LDFLAGS): Likewise.
7989         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7990         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7991         reboot.c.
7992         (halt_mod_SOURCES): Likewise.
7993         (reboot_mod_SOURCES): Likewise.
7995         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7996         commands/i386/pc/reboot.c by commands/reboot.c.
7997         (reboot_mod_SOURCES): Likewise.
7999         * commands/i386/pc/reboot.c: merge this file ...
8001         * commands/ieee1275/reboot.c: ... and this file ...
8003         * commands/reboot.c: ... to this file.
8004         Add some precompiler directive to include the correct header for
8005         each machine.
8007         * commands/ieee1275/halt.c: move this file ...
8009         * commands/halt.c: ... to here.
8010         Add some precompiler directive to include the correct header for
8011         each machine.
8013         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8014         (grub_halt): Likewise.
8016         * kern/efi/efi.c (grub_reboot): New function.
8017         (grub_halt): Likewise.
8019 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8021         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8022         /dev (like it is done for /dev/mapper).  This doesn't provide support
8023         for EVMS, but at least it is now easy to identify the problem when it
8024         arises.
8026 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8028         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8029         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8030         comparing it with -1, not 0.
8032 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8034         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8035         `disk/lvm.c'.
8036         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8037         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8039         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8040         `disk/lvm.c' to the end of the list.
8041         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8042         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8044 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8046         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8047         grub_print_error() instead.  This will let user know why we're entering
8048         rescue mode.
8049         Based on suggestions from Sam Morris.
8051 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8053         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8054         on remaining N args, instead of "--" arg N times.
8056 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8058         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8059         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8060         pattern for unknown glyphs.
8062 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8064         * configure.ac: Probe for `help2man'.
8065         * Makefile.in (builddir): New variable.
8066         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8067         or otherwise add a few flags/options to it.
8068         (install-local): For every executable utility or script that is
8069         installed, invoke $(HELP2MAN) to install a manpage based on --help
8070         output.
8072         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8073         that it doesn't prevent --help from working in build tree.
8075         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8076         with `bug-grub@gnu.org'.
8077         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8078         * util/update-grub.in (usage): New function.
8079         Implement proper argument check, with support for --help and --version
8080         (as well as existing -y).
8082 2008-02-09  Christian Franke  <franke@computer.org>
8084         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8085         avoid overwriting previous output.
8086         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8088 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8090         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8091         drawing the menu.
8093 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8095         * commands/sleep.c: New file.
8096         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8097         (sleep_mod_SOURCES): New variable.
8098         (sleep_mod_CFLAGS): Likewise.
8099         (sleep_mod_LDFLAGS): Likewise.
8101 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8103         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8104         situations in which we can deduce the RAID size and the superblock
8105         doesn't match it.
8107 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8109         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8110         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8111         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8113         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8114         and return a grub_diskmemberlist_t composed of physical array members.
8115         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8117         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8118         prototype.
8119         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8120         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8121         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8123         * util/grub-probe.c (probe): Move partmap probing code from here ...
8124         (probe_partmap): ... to here.
8125         (probe): Use probe_partmap() once for the disk we're probing, and
8126         additionally, when such disk contains a memberlist() struct member,
8127         once for each disk that is contained in the structure returned by
8128         memberlist().
8130 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8132         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8133         environment variable to 'all' in order to obtain debug output from
8134         non-util/ code.
8135         * util/i386/pc/grub-setup.c (main): Likewise.
8137 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8139         * disk/raid.c (grub_raid_scan_device): Check for
8140         `array->device[sb.this_disk.number]' rather than for
8141         `array->device[sb.this_disk.number]->name', since the latter is not
8142         guaranteed to be accessible.
8144 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8146         * disk/raid.c: Update copyright.
8147         * fs/cpio.c: Likewise.
8148         * include/grub/raid.h: Likewise.
8149         * loader/i386/pc/multiboot.c: Likewise.
8150         * util/hostfs.c: Likewise.
8152 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8154         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8155         to a grub_disk_t array.
8156         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8157         `device[x]'.
8158         (grub_raid_scan_device): Replace `device[x].name' accesses with
8159         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8161 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8163         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8164         grub_dprintf() calls.
8165         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8166         error message.
8168 2008-02-07  Christian Franke  <franke@computer.org>
8170         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8171         instead of fseek and ftell to support large files.
8172         (grub_hostfs_read): Likewise.
8174 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8176         Patch from Jeroen Dekkers.
8177         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8178         failure, since successfully reading all array members might not be
8179         required.
8181 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8183         * util/grub-probe.c (probe): Simplify partmap probing (with the
8184         assumption that the first word up to the underscore equals to
8185         the module name).
8187 2008-02-06  Christian Franke  <franke@computer.org>
8189         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8190         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8191         last block of a cpio or tar stream.
8192         Check for "TRAILER!!!" instead of any empty data
8193         block to detect last block of a cpio stream.
8194         (grub_cpio_dir): Fix constness of variable np.
8195         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8196         cpio or tar trailer is detected.  This fixes a crash
8197         on open of a non existing file.
8199 2008-02-05  Bean  <bean123ch@gmail.com>
8201         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8202         address of entry.
8203         (grub_multiboot_load_elf64): Likewise.
8204         (grub_multiboot): Initialize mbi structure.
8206         * util/grub-fstest.c: Don't include unused header file script.h.
8208         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8209         of file.
8210         (grub_fstest_SOURCES): Likewise.
8212 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8214         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8215         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8216         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8217         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8219         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8220         (translation_table): Replace hardcoded values with macros
8221         provided by `<grub/term.h>'.
8223         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8224         (keyboard_map): Correct/add a few values, with macros provided
8225         by `<grub/term.h>'.
8226         (keyboard_map_shift): Zero values that don't differ from their
8227         `keyboard_map' equivalents.
8228         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8229         Discard the second scan code that is always sent by Caps lock.
8230         Only use `keyboard_map_shift' when it provides a non-zero value,
8231         otherwise fallback to `keyboard_map'.
8233 2008-02-04  Bean  <bean123ch@gmail.com>
8235         * Makefile.in (enable_grub_fstest): New variable.
8237         * conf/common.rmk (grub_fstest_init.lst): New rule.
8238         (grub_fstest_init.h): Likewise.
8239         (grub_fstest_init.c): Likewise.
8240         (util/grub-fstest.c_DEPENDENCIES): New variable.
8241         (grub_fstest_SOURCES): Likewise.
8243         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8245         * util/grub-fstest.c: New file.
8247 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8249         Make grub-setup handle a separate root device.
8251         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8252         so that the root device can be compared with the destination
8253         device.
8254         When embedding the core image, if the root and destination devices
8255         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8256         0xFF.
8257         When not embedding, set ROOT_DRIVE to 0xFF.
8259 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8261         Add support for having a grub directory in a different drive. This
8262         is still only the data handling part.
8264         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8265         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8266         (grub_root_drive): New variable.
8268         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8269         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8270         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8271         as it was.
8273         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8275         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8276         macro.
8277         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8279         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8280         is bogus, because PXE booting does not specify any drive
8281         correctly.
8283         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8284         am not sure if this is really correct.
8286         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8287         is always identical to the boot drive when booting from a CD.
8289         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8290         longer.
8291         (root_drive): New variable.
8292         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8293         (setup_sectors): Push %dx right after popping it, because %dh will
8294         be modified later.
8295         (copy_buffer): Restore %dx.
8297 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8299         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8300         use `cdboot.img' for cdrom images.
8302 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8304         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8305         only setup gfxterm when `font' command has succeeded.
8307 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8309         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8310         (grub_rescue_cmd_multiboot_loader)
8311         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8313 2008-02-03  Pavel Roskin  <proski@gnu.org>
8315         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8316         %edx and %esi from stack only after grub_gate_a20() is called.
8317         grub_gate_a20() clobbers %edx.
8319 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8321         * configure.ac (AC_INIT): Bumped to 1.96.
8323         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8324         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8325         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8326         video/readers/png.c.
8328 2008-02-03  Bean  <bean123ch@gmail.com>
8330         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8331         (cdboot_img_SOURCES): New variable.
8332         (cdboot_img_ASFLAGS): New variable.
8333         (cdboot_img_LDFLAGS): New variable.
8335         * boot/i386/pc/cdboot.S: New file.
8337         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8338         (cd_count): Likewise.
8339         (grub_biosdisk_get_drive): Add support for cd device.
8340         (grub_biosdisk_call_hook): Likewise.
8341         (grub_biosdisk_iterate): Likewise.
8342         (grub_biosdisk_open): Likewise.
8343         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8344         (grub_biosdisk_rw): Support reading from cd device.
8345         (GRUB_MOD_INIT): Iterate cd devices.
8347         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8348         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8349         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8351         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8353 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8355         * commands/read.c: New file.
8356         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8357         (read_mod_SOURCES): New variable.
8358         (read_mod_CFLAGS): Likewise.
8359         (read_mod_LDFLAGS): Likewise.
8361 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8363         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8364         determining whether menu has to be displayed.
8366 2008-02-02  Marco Gerards  <marco@gnu.org>
8368         * bus/pci.c: New file.
8370         * include/grub/pci.h: Likewise.
8372         * include/grub/i386/pc/pci.h: Likewise.
8374         * commands/lspci.c: Likewise.
8376         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8377         `lspci.mod'.
8378         (pci_mod_SOURCES): New variable.
8379         (pci_mod_CFLAGS): Likewise.
8380         (pci_mod_LDFLAGS): Likewise.
8381         (lspci_mod_SOURCES): Likewise.
8382         (lspci_mod_CFLAGS): Likewise.
8383         (lspci_mod_LDFLAGS): Likewise.
8385 2008-02-02  Bean  <bean123ch@gmail.com>
8387         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8388         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8390         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8391         (grub_xfs_btree_node): New structure.
8392         (grub_xfs_btree_root): New structure.
8393         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8394         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8395         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8396         (GRUB_XFS_EXTENT_SIZE): Likewise.
8397         (grub_xfs_read_block): Support btree format type.
8398         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8399         Use directory block as basic unit.
8401         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8403         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8404         __attribute__ ((__regparm__ (1))).
8406 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8408         Correct a mistake in previous commit.
8410         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8411         top.
8412         (normal/command.c_DEPENDENCIES): New variable.
8414 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8416         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8417         top.
8418         (normal/command.c_DEPENDENCIES): New variable.
8419         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8420         * conf/i386-ieee1275.rmk: Likewise.
8421         * conf/i386-linuxbios.rmk: Likewise.
8422         * conf/i386-pc.rmk: Likewise.
8423         * conf/sparc64-ieee1275.rmk: Likewise.
8424         * conf/powerpc-ieee1275.rmk: Likewise.
8425         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8427         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8429 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8431         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8432         call at beginning of function.
8434 2008-01-31  Pavel Roskin  <proski@gnu.org>
8436         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8437         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8438         (grub_mkrescue_SOURCES): Likewise.
8439         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8441 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8443         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8444         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8445         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8446         (grub_probe_SOURCES): ... to here.
8448         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8449         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8450         * conf/i386-ieee1275.rmk: Likewise.
8451         * conf/i386-linuxbios.rmk: Likewise.
8452         * conf/powerpc-ieee1275.rmk: Likewise.
8454 2008-01-30  Tristan Gingold  <gingold@free.fr>
8456         * kern/rescue.c: Silently accept empty lines.
8458 2008-01-29  Bean  <bean123ch@gmail.com>
8460         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8461         (real_code_2): Code cleanup and change comment style.
8462         (move_memory): Avoid using 32-bit address mode.
8464 2008-01-29  Bean  <bean123ch@gmail.com>
8466         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8467         (png_mod_SOURCES): New variable.
8468         (png_mod_CFLAGS): Likewise.
8469         (png_mod_LDFLAGS): Likewise.
8471         * video/readers/png.c: New file.
8473 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8475         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8476         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8477         `ifndef GRUB_MOD_GAP' hack.
8478         * util/elf/grub-mkimage.c (add_segments): Likewise.
8480 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8482         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8483         `GRUB_MOD_GAP' for platforms in which it's not defined.
8484         * util/elf/grub-mkimage.c (add_segments): Likewise.
8486 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8488         Get grub-emu to build again (including parallel builds).
8490         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8491         Split into ...
8492         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8493         (normal/execute.c_DEPENDENCIES): ... this, ...
8494         (grub-emu_DEPENDENCIES): ... and this.
8496         * conf/i386-efi.rmk: Likewise.
8497         * conf/i386-linuxbios.rmk: Likewise.
8498         * conf/i386-ieee1275.rmk: Likewise.
8499         * conf/powerpc-ieee1275.rmk: Likewise.
8500         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8502 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8504         * NEWS: Add a few items.
8506 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8508         Fix parallel builds with grub-emu.  Based on earlier commit for
8509         grub-probe and grub-setup.
8511         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8512         (util/grub-emu.c_DEPENDENCIES): ... this.
8513         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8514         (util/grub-emu.c_DEPENDENCIES): ... this.
8515         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8516         (util/grub-emu.c_DEPENDENCIES): ... this.
8517         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8518         (util/grub-emu.c_DEPENDENCIES): ... this.
8519         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8520         (util/grub-emu.c_DEPENDENCIES): ... this.
8522 2008-01-27  Pavel Roskin  <proski@gnu.org>
8524         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8525         to create a gap between _end and the modules added to the image
8526         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8527         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8528         * util/elf/grub-mkimage.c (add_segments): Likewise.
8530 2008-01-26  Pavel Roskin  <proski@gnu.org>
8532         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8533         just return an error.
8535 2008-01-26  Bean  <bean123ch@gmail.com>
8537         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8538         (grub_reiserfs_get_item): Save offset of the next item.
8539         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8541 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8543         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8544         make all filesystem sources appear together (possibly fixing omissions
8545         while at it).
8546         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8547         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8548         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8549         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8551         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8552         add `kern/file.c'.
8553         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8554         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8555         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8556         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8558         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8559         (probe): Add a sanity check to make sure of our ability to read
8560         requested files when probing for filesystem type.
8562         * genmk.rb: Update copyright year (2007).
8564         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8565         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8566         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8567         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8568         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8569         : Remove function prototypes.
8571 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8573         Revert my previous commits (based on wrong assumption of how grub_errno
8574         works).
8576         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8577         * kern/file.c (grub_file_open): Likewise.
8579 2008-01-24  Pavel Roskin  <proski@gnu.org>
8581         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8582         that hang if GRUB tries to setup colors.
8583         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8584         colors for firmwares that don't support it.
8585         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8586         Recognize Open Hack'Ware, set flags to work around its
8587         limitations.
8589 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8591         * kern/file.c (grub_file_open): Do not account previous failures of
8592         unrelated functions when grub_errno is checked for.
8593         Reported by Oleg Strikov.
8595 2008-01-24  Bean  <bean123ch@gmail.com>
8597         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8598         (grub_ufs_sblock): New member volume name.
8599         (grub_ufs_find_file): Fix string copy bug.
8600         (grub_ufs_label): Implement this function properly.
8602         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8603         (grub_hfs_iterate_records): Use the correct file number for extents
8604         and catalog file. Fix problem in next index calculation.
8605         (grub_hfs_find_node): Replace recursive function call with loop.
8606         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8608 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8610         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8611         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8612         (grub_multiboot2_real_boot): New function prototype.
8614         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8615         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8617         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8618         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8620 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8622         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8623         #ifdef'ed out grub_printf().
8625 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8627         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8628         grub_dprintf calls, since they make "debug=all" mode unusable.
8629         (grub_console_checkkey): Likewise.
8631 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8633         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8634         `term/i386/pc/at_keyboard.c'.
8635         (pkglib_MODULES): Add `serial.mod'.
8636         (serial_mod_SOURCES): New variable.
8637         (serial_mod_CFLAGS): Likewise.
8638         (serial_mod_LDFLAGS): Likewise.
8640         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8641         `<grub/powerpc/ieee1275/console.h>'.
8642         (grub_keyboard_controller_init): New function prototype.
8643         (grub_console_checkkey): Likewise.
8644         (grub_console_getkey): Likewise.
8646         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8647         keyboard on i386.
8649         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8650         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8652 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8654         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8655         present, "(memdisk)/boot/grub" becomes the default prefix.
8657         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8658         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8659         allows users to overlay additional files into the image.
8661 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8663         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8664         and `machine/memory.h'.
8665         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8666         (_multiboot_mod_SOURCES): New variable.
8667         (_multiboot_mod_CFLAGS): Likewise.
8668         (_multiboot_mod_LDFLAGS): Likewise.
8669         (multiboot_mod_SOURCES): Likewise.
8670         (multiboot_mod_CFLAGS): Likewise.
8671         (multiboot_mod_LDFLAGS): Likewise.
8673         * include/grub/i386/ieee1275/loader.h: New file.
8675         * include/grub/i386/ieee1275/machine.h: Likewise.
8677         * include/grub/i386/ieee1275/memory.h: Likewise.
8679         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8680         variable declaration.
8681         (grub_os_area_size): Likewise.
8683         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8684         (grub_lower_mem, grub_upper_mem): New variables.
8685         (grub_stop_floppy): New function (just to make
8686         grub_multiboot2_real_boot() happy).
8688         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8689         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8690         (grub_stop): New function.
8691         Include `"../realmode.S"' and `"../loader.S"'.
8693         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8694         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8696         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8697         rely on grub_multiboot2_real_boot() for final boot.
8699 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8701         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8702         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8703         device that doesn't look like an SD card.
8704         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8705         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8706         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8707         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8708         found.
8710 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8712         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8713         avoid claiming over our own code.
8715 2008-01-22  Bean  <bean123ch@gmail.com>
8717         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8718         (jpeg_mod_SOURCES): New variable.
8719         (jpeg_mod_CFLAGS): Likewise.
8720         (jpeg_mod_LDFLAGS): Likewise.
8722         * video/readers/jpeg.c : New file.
8724 2008-01-22  Bean  <bean123ch@gmail.com>
8726         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8727         there are no more items.
8729 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8731         * kern/mm.c (grub_mm_init_region): Improve debug message.
8733 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8735         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8736         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8737         address.
8738         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8739         a C macro.
8740         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8741         Indicates start of upper memory.
8742         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8743         (generate_image): Abort when image size is big enough to corrupt
8744         upper memory.
8746         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8747         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8748         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8749         instead of hardcoding 0xA0000.
8750         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8751         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8752         instead of hardcoding 0xA0000.
8754 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8756         * disk/memdisk.c (memdisk_size): New variable.
8757         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8758         `memdisk_size'.
8759         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8760         image to dynamic memory.
8761         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8762         `memdisk_size'.  Free memdisk block.
8764 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8766         Fix detection of very small filesystems (like tar).
8768         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8769         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8770         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8771         a problem with this disk).
8773 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8775         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8776         on grub_biosdisk_rw_standard() error.
8778 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8780         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8781         recent changes.
8782         * kern/elf.c: Likewise.
8783         * kern/ieee1275/ieee1275.c: Likewise.
8784         * kern/powerpc/ieee1275/openfw.c: Likewise.
8785         * term/ieee1275/ofconsole.c: Likewise.
8787 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8789         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8791         * include/grub/kernel.h (grub_arch_memdisk_addr)
8792         (grub_arch_memdisk_size): Moved from here ...
8794         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8795         (grub_arch_memdisk_size): ... to here.
8797 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8799         Mostly based on bugfix from Bean.
8801         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8802         attribute with hook() parameter.
8803         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8804         declaration.
8805         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8806         attribute with hook() parameter.
8807         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8808         declaration.
8810 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8812         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8813         (pkglib_MODULES): Add `memdisk.mod'.
8814         (memdisk_mod_SOURCES): New variable.
8815         (memdisk_mod_CFLAGS): Likewise.
8816         (memdisk_mod_LDFLAGS): Likewise.
8818         * disk/memdisk.c: New file.
8820         * include/grub/disk.h (grub_disk_dev_id): Add
8821         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8823         * include/grub/i386/pc/kernel.h
8824         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8825         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8826         (grub_kernel_image_size): New variable declaration.
8827         (grub_total_module_size): Likewise.
8828         (grub_memdisk_image_size): Likewise.
8830         * include/grub/i386/pc/memory.h
8831         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8833         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8834         (grub_arch_memdisk_addr): New variable declaration.
8835         (grub_arch_memdisk_size): Likewise.
8837         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8838         (grub_arch_memdisk_size): Likewise.
8840         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8841         (codestart): Replace hardcoded `0x100000' with
8842         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8844         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8845         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8846         not NULL, append the contents of the file it refers to, at the end of
8847         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8848         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8849         (options): Add "memdisk"|'m' option.
8850         (main): Parse --memdisk|-m option, and pass user-provided path as
8851         parameter to generate_image().
8853 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8855         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8856         grub_dprintf() calls from here ...
8857         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8859 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8861         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8863         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8864         declaration.
8865         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8866         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8867         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8868         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8869         property).
8870         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8871         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8873 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8875         Get rid of confusing function (superseded by
8876         `grub_ieee1275_get_integer_property')
8877         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8878         prototype.
8879         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8880         function.
8881         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8882         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8883         in native endianness from grub_ieee1275_get_integer_property().
8885 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8887         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8888         command after "shut-down", since implementations differ on which
8889         the command for halt is.
8891 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8893         * include/grub/i386/linuxbios/console.h: Add header protection.
8894         (grub_keyboard_controller_init): New function prototype.
8895         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8896         (KEYBOARD_COMMAND_READ): Likewise.
8897         (KEYBOARD_COMMAND_WRITE): Likewise.
8898         (KEYBOARD_SCANCODE_SET1): Likewise.
8899         (grub_keyboard_controller_write): New function.
8900         (grub_keyboard_controller_read): Likewise.
8901         (grub_keyboard_controller_init): Likewise.
8903         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8904         (grub_console_init): On coreboot/LinuxBIOS, call
8905         grub_keyboard_controller_init().
8907 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8909         PowerPC changes provided by Pavel Roskin.
8911         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8912         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8913         don't rely on cmain() doing it.
8914         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8915         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8917 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8919         * include/grub/i386/linuxbios/memory.h
8920         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8921         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8922         receive `table_header' as argument.  Instead, probe for it in the
8923         known memory ranges where it can be present.
8924         (grub_available_iterate): Do not pass a fixed `table_header' address
8925         to grub_linuxbios_table_iterate().
8927 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8929         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8930         * conf/i386-ieee1275.rmk: New file.
8931         * include/grub/i386/ieee1275/console.h: Likewise.
8932         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8933         * include/grub/i386/ieee1275/kernel.h: Likewise.
8934         * include/grub/i386/ieee1275/time.h: Likewise.
8935         * kern/i386/ieee1275/init.c: Likewise.
8936         * kern/i386/ieee1275/startup.S: Likewise.
8938 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8940         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8941         when pointers are 32-bit (but still do set it to one when they are
8942         64-bit).
8944 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8946         * include/grub/ieee1275/ieee1275.h
8947         (grub_ieee1275_get_integer_property): New function prototype.
8949         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8950         (grub_ieee1275_get_integer_property): New function.  Wraps around
8951         grub_ieee1275_get_property() to handle endianness.
8953         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8954         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8955         where appropriate.
8956         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8957         (grub_map): Likewise.
8958         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8960 2008-01-15  Bean  <bean123ch@gmail.com>
8962         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8963         (grub_script_execute_cmdline): Reset grub_errno.
8965         * normal/main.c (read_config_file): Reset grub_errno.
8967         * normal/parse.y (script_init): New.
8968         (script): Move function and menuentry here.
8969         (delimiter): New.
8970         (command): Add delimiter at the end of command.
8971         (commands): Adjust to match the new command.
8972         (commandblock): Remove grub_script_lexer_record_start.
8973         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8974         (if): Use the new commands.
8976         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8978 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8980         * normal/menu.c (run_menu): Move timeout message from here ...
8981         (print_timeout): ... to here.
8982         (run_menu): Use print_timeout() once during initial draw to print
8983         the whole message, and again in every clock tick to update only
8984         the number of seconds.
8986 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8988         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8989         actual size of `available' from grub_ieee1275_get_property(), and
8990         restrict parsing to that bound.
8992 2008-01-15  Christian Franke  <franke@computer.org>
8994         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8995         (argp_program_version): Remove variable.
8996         (argp_program_bug_address): Likewise.
8997         (options): Convert from struct argp_option to struct option.
8998         (struct arguments): Remove.
8999         (parse_opt): Remove.
9000         (usage): New function.
9001         (main): Replace struct args members by simple variables.
9002         Replace argp_parse() by getopt_long().
9003         Add switch to evaluate options.
9004         Add missing "(...)" around root_dev in prefix string.
9006 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9008         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9009         for grub_ieee1275_exit(), in order to improve portability.
9011 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9013         * util/grub.d/10_linux.in (prefix): Define.
9014         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9016 2008-01-13  Pavel Roskin  <proski@gnu.org>
9018         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9019         grub_errno if no errors have been detected.
9021 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9023         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9024         (grub_util_get_dev_abstraction): New function prototype.
9026         * util/getroot.c: Include `<grub/util/getroot.h>'
9027         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9028         (grub_util_get_dev_abstraction): ... here (new function).
9030         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9031         `PRINT_ABSTRACTION'.
9032         (probe): Probe for abstraction type when requested.
9033         (main): Understand `--target=abstraction'.
9035         * util/i386/efi/grub-install.in: Add abstraction module to core
9036         image when it is found to be necessary.
9037         * util/i386/pc/grub-install.in: Likewise.
9038         * util/powerpc/ieee1275/grub-install.in: Likewise.
9040         * util/update-grub_lib.in (font_path): Return system path without
9041         converting to GRUB path.
9042         * util/update-grub.in: Convert system path returned by font_path()
9043         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9044         abstraction module is needed for loading fonts (if any).  Export
9045         that as `GRUB_PRELOAD_MODULES'.
9046         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9047         insmod commands).
9049 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9051         Remove some unused code from reiserfs.
9053         * fs/reiserfs.c (struct grub_reiserfs_key)
9054         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9055         (struct grub_reiserfs_node_body): Removed.
9056         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9057         Likewise.
9058         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9059         Likewise.
9060         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9061         Likewise.
9062         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9063         Likewise.
9064         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9065         Likewise.
9066         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9067         Likewise.
9068         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9069         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9070         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9072 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9074         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9075         Determines if a file is garbage left by packaging systems, etc.
9076         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9077         for processing /etc/grub.d scripts.
9078         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9079         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9080         as a condition for processing Linux images.
9082 2008-01-10  Pavel Roskin  <proski@gnu.org>
9084         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9085         to compile reiserfs.c on PowerPC.
9087 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9089         * kern/device.c (grub_device_iterate): Do not abort device iteration
9090         when one of the devices cannot be opened.
9091         * kern/disk.c (grub_disk_open): Do not account previous failures of
9092         unrelated functions when grub_errno is checked for.
9094 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9096         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9097         `! grub_linux_is_bzimage', change order of address comparison to make
9098         it more intuitive, and improve "too big zImage" error message.
9100 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9102         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9103         `$(update-grub_DATA)'.
9104         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9105         targets.
9107 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9109         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9110         which instruction is modified by grub-setup during installation
9111         (since it wasn't obvious by only looking at this file).
9113 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9115         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9116         listing actual TODO items.
9118 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9120         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9121         correctly.
9122         (grub_reiserfs_get_key_offset): Likewise.
9123         (grub_reiserfs_set_key_offset): Likewise.
9124         (grub_reiserfs_set_key_type): Likewise.
9125         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9127         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9128         better to remove the bitfield version completely.
9130 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9132         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9133         allocated from the heap, due to the fshelp implementation.
9134         (grub_reiserfs_dir): Free NODE, due to the same reason.
9136 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9138         Mostly from Vincent Pelletier:
9140         * fs/reiserfs.c: New file.
9142         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9143         (reiserfs_mod_SOURCES): New variable.
9144         (reiserfs_mod_CFLAGS): Likewise.
9145         (reiserfs_mod_LDFLAGS): Likewise.
9147         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9148         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9149         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9150         normal/color.c.
9152 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9154         * normal/color.c: Remove `<grub/env.h>'.
9156 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9158         * include/grub/normal.h: Include <grub/env.h>.
9160 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9162         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9163         usage example with `(hd0,1)'.
9164         Reported by Samuel Thibault.
9166 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9168         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9169         (grub_linux_boot_zimage): Rename to ...
9170         (grub_linux_boot): ... this.
9171         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9172         (grub_linux_boot_zimage): Conditionalize zImage copy.
9174         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9175         (grub_linux_boot_bzimage): Remove prototype.
9176         (grub_linux_boot_zimage): Rename to ...
9177         (grub_linux_boot): ... this.
9179         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9180         (grub_linux_boot): Remove function.
9182 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9184         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9185         (grub_env_write_color_highlight): Likewise.
9186         (grub_wait_after_message): Likewise.
9188         * normal/color.c: New file.
9190         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9191         (normal_mod_DEPENDENCIES): Likewise.
9193         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9194         (normal_mod_DEPENDENCIES): Likewise.
9196         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9197         (normal_mod_DEPENDENCIES): Likewise.
9199         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9200         (normal_mod_DEPENDENCIES): Likewise.
9202         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9203         for waiting after a message is printed.
9204         * normal/main.c (read_config_file): Likewise.
9205         (grub_normal_init): Register grub_env_write_color_normal() and
9206         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9207         `color_highlight' variables as global.
9209         * normal/menu.c (grub_wait_after_message): New function.
9210         (grub_color_menu_normal): New variable.  Replaces ...
9211         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9212         (grub_color_menu_highlight): New variable.  Replaces ...
9213         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9214         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9215         `GRUB_TERM_COLOR_STANDARD'.
9216         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9217         `normal_code' and `highlight_code' to `old_color_normal' and
9218         `old_color_highlight', respectively.
9219         (grub_menu_init_page): Update colors when drawing the menu, based on
9220         `menu_color_normal' and `menu_color_highlight' variables.
9221         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9222         a message is printed.
9224 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9226         * kern/env.c (grub_env_context_open): Propagate hooks for global
9227         variables to new context.
9229         * kern/main.c (grub_set_root_dev): Export `root' variable.
9231 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9233         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9234         discs unconditionally, since udev and others have options to provide
9235         them.
9237 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9239         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9241 2008-01-04  Christian Franke  <franke@computer.org>
9243         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9244         of eisa_mmap.
9246 2008-01-03  Pavel Roskin  <proski@gnu.org>
9248         * kern/i386/linuxbios/init.c: Put "void" to all function
9249         declarations with no arguments.
9250         * kern/powerpc/ieee1275/init.c: Likewise.
9251         * term/i386/pc/at_keyboard.c: Likewise.
9252         * term/i386/pc/vga_text.c: Likewise.
9253         * util/grub-mkdevicemap.c: Likewise.
9255 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9257         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9258         message when loaded image is out of bounds.
9259         (grub_multiboot_load_elf64): Likewise.
9261 2008-01-02  Pavel Roskin  <proski@gnu.org>
9263         * util/grub.d/10_linux.in: Try version without ".old" when
9264         looking for initrd.  It's better to use initrd from the newer
9265         kernel of the same version than no initrd at all.
9267 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9269         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9271 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9273         * include/grub/video.h: Added grub_video_unmap_color and
9274         grub_video_get_active_render_target.
9275         (grub_video_adapter): Added unmap_color and get_active_render_target.
9277         * video/video.c: Added grub_video_unmap_color and
9278         grub_video_get_active_render_target.
9279         (grub_video_get_info): Changed method to accept NULL pointer as an
9280         argument to allow detection of active video adapter.
9282         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9283         grub_video_vbe_unmap_color_int.
9284         Added grub_video_vbe_unmap_color and
9285         grub_video_vbe_get_active_render_target.
9286         (grub_video_vbe_adapter): Added unmap_color and
9287         get_active_render_target.
9289         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9290         with grub_video_vbe_unmap_color_int.
9292         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9293         (DEFAULT_NORMAL_COLOR): Likewise.
9294         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9295         (DEFAULT_FG_COLOR): Removed.
9296         (DEFAULT_BG_COLOR): Likewise.
9297         (DEFAULT_CURSOR_COLOR): Changed value.
9298         (grub_virtual_screen): Added standard_color_setting,
9299         normal_color_setting, highlight_color_setting and term_color.
9300         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9301         (bitmap_width): Added.
9302         (bitmap_height): Likewise.
9303         (bitmap): Likewise.
9304         (set_term_color): Likewise.
9305         (grub_virtual_screen_setup): Changed to use new terminal coloring
9306         settings.
9307         (grub_gfxterm_init): Added init for bitmap.
9308         (grub_gfxterm_fini): Added destroy for bitmap.
9309         (redraw_screen_rect): Updated to use background bitmap and new
9310         terminal coloring.
9311         (scroll_up): Added optimization for case when there is no bitmap.
9312         (grub_gfxterm_cls): Fixed to use correct background color.
9313         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9314         coloring.
9315         (grub_virtual_screen_setcolor): Likewise.
9316         (grub_virtual_screen_getcolor): Added.
9317         (grub_gfxterm_background_image_cmd): Likewise.
9318         (grub_video_term): Added setcolor and getcolor.
9319         (MOD_INIT): Added registration of background_image command.
9320         (MOD_TERM): Added unregistration for background_image command.
9322 2007-12-30  Pavel Roskin  <proski@gnu.org>
9324         * loader/multiboot_loader.c: Fix multiboot command
9325         unregistration.  Fix all typos in the word "multiboot".
9327 2007-12-29  Pavel Roskin  <proski@gnu.org>
9329         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9330         support for initrd names used in Fedora.
9332 2007-12-26  Bean  <bean123ch@gmail.com>
9334         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9335         (cpio_mod_SOURCES): New variable.
9336         (cpio_mod_CFLAGS): Likewise.
9337         (cpio_mod_LDFLAGS): Likewise.
9339         * fs/cpio.c: New file.
9341         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9343         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9345         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9347         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9349 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9351         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9352         (grub_getcolor): New function.
9354         * kern/term.c (grub_getcolor): New function.
9355         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9356         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9357         (print_entry): Set normal and highlight colors to
9358         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9359         respectively, before printing and restore them to old
9360         values afterwards.
9361         (grub_menu_init_page): Likewise.  Fill an additional colored space
9362         that would otherwise be left blank.
9364         * term/efi/console.c (grub_console_getcolor): New function.
9365         (struct grub_console_term.getcolor): New variable.
9366         * term/i386/pc/console.c (grub_console_getcolor): New function.
9367         (struct grub_console_term.getcolor): New variable.
9368         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9369         (struct grub_console_term.getcolor): New variable.
9371         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9372         (struct grub_console_term.setcolor): Remove variable.
9373         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9374         (struct grub_console_term.setcolor): Remove variable.
9375         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9376         (struct grub_console_term.setcolor): Remove variable.
9377         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9378         (struct grub_console_term.setcolor): Remove variable.
9380 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9382         * configure.ac: Search for possible unifont.hex locations, and
9383         define UNIFONT_HEX if found.
9385         * Makefile.in (UNIFONT_HEX): Define variable.
9386         (DATA): Rename to ...
9387         (PKGLIB): ... this.  Update all users.
9388         (PKGDATA): New variable.
9389         (pkgdata_IMAGES): Rename to ...
9390         (pkglib_IMAGES): ... this. Update all users.
9391         (pkgdata_MODULES): Rename to ...
9392         (pkglib_MODULES): ... this. Update all users.
9393         (pkgdata_PROGRAMS): Rename to ...
9394         (pkglib_PROGRAMS): ... this. Update all users.
9395         (pkgdata_DATA): Rename to ...
9396         (pkglib_DATA): ... this. Update all users.
9397         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9398         (unicode.pff, ascii.pff): New rules.
9399         (all-local): Add `$(PKGDATA)' dependency.
9400         (install-local): Process `$(PKGDATA)'.
9402         * util/update-grub_lib.in (font_path): Search for *.pff files in
9403         a few more locations, including `${pkgdata}'.
9405 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9407         Patch from Bean  <bean123ch@gmail.com>:
9408         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9409         `size'.
9411 2007-12-21  Bean  <bean123ch@gmail.com>
9413         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9414         (ntfscomp_mod_SOURCES): New variable.
9415         (ntfscomp_mod_CFLAGS): Likewise.
9416         (ntfscomp_mod_LDFLAGS): Likewise.
9418         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9419         (grub_probe_SOURCES): Likewise.
9420         (grub_emu_SOURCES): Likewise.
9422         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9423         (grub_emu_SOURCES): Likewise.
9425         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9426         (grub_emu_SOURCES): Likewise.
9428         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9429         (grub_emu_SOURCES): Likewise.
9431         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9432         (read_run_list): Renamed to grub_ntfs_read_run_list.
9433         (decomp_nextvcn): Moved to ntfscomp.c.
9434         (decomp_getch): Likewise.
9435         (decomp_get16): Likewise.
9436         (decomp_block): Likewise.
9437         (read_block): Likewise.
9438         (read_data): Partially moved to ntfscomp.c.
9439         (fixup): Change unsigned to grub_uint16_t.
9440         (read_mft): Change unsigned long to grub_uint32_t.
9441         (read_attr): Likewise.
9442         (read_data): Likewise.
9443         (read_run_data): Likewise.
9444         (read_run_list): Likewise.
9445         (read_mft): Likewise.
9447         * fs/ntfscomp.c: New file.
9449         * include/grub/ntfs.h: New file.
9451 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9453         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9454         IDE disk check, since Linux is known to support 20 IDE disks.
9455         Reported by Colin Watson.
9457 2007-12-15  Bean  <bean123ch@gmail.com>
9459         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9460         (lnxboot_img_SOURCES): New variable.
9461         (lnxboot_img_ASFLAGS): Likewise.
9462         (lnxboot_img_LDFLAGS): Likewise.
9464         * boot/i386/pc/lnxboot.S: New file.
9466 2007-11-24  Pavel Roskin  <proski@gnu.org>
9468         * configure.ac: Test if '--build-id=none' is supported by the
9469         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9470         objcopy to generate incorrect binary files (binutils
9471         2.17.50.0.18-1 as shipped by Fedora 8).
9472         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9473         linking, so that build ID doesn't break the test.
9475 2007-11-24  Pavel Roskin  <proski@gnu.org>
9477         * include/grub/i386/time.h: use "void" in the argument list
9478         of grub_cpu_idle().
9479         * include/grub/powerpc/time.h: Likewise.
9480         * include/grub/sparc64/time.h: Likewise.
9482 2007-11-18  Christian Franke  <franke@computer.org>
9484         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9485         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9486         This fixes the problem that function keys did not work in grub-emu.
9488 2007-11-18  Christian Franke  <franke@computer.org>
9490         * disk/host.c (grub_host_open): Remove attribute unused from
9491         name parameter. Add check for "host". This fixes the problem
9492         that grub-emu does not find partitions.
9494 2007-11-18  Christian Franke  <franke@computer.org>
9496         * util/hostfs.c (is_dir): New function.
9497         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9498         (grub_hostfs_read): Add missing fseek().
9499         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9500         of grub-emu on "ls (host)".
9502 2007-11-18  Christian Franke  <franke@computer.org>
9504         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9505         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9506         to 64 bit boundary by default.
9508 2007-11-18  Bean  <bean123ch@gmail.com>
9510         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9511         (hexdump_mod_SOURCES): New variable.
9512         (hexdump_mod_CFLAGS): Likewise.
9513         (hexdump_mod_LDFLAGS): Likewise.
9515         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9517         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9519         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9521         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9523         * include/grub/hexdump.h: New file.
9525         * commands/hexdump.c: New file.
9527 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9529         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9530         in grub_outb() calls.
9531         (beep_on): Likewise.
9533 2007-11-10  Christian Franke  <franke@computer.org>
9535         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9536         (grub_menu_run): Likewise.
9538 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9540         * include/grub/i386/efi/machine.h: New file.
9541         * include/grub/i386/linuxbios/machine.h: Likewise.
9542         * include/grub/i386/pc/machine.h: Likewise.
9543         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9544         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9546         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9547         (serial_hw_io_addr): New variable.
9548         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9549         instead of `(unsigned short *) 0x400'.
9551 2007-11-10  Bean  <bean123ch@gmail.com>
9553         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9555 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9557         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9558         (vga_mod_SOURCES): Added.
9559         (vga_mod_CFLAGS): Likewise.
9560         (vga_mod_LDFLAGS): Likewise.
9562         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9563         grub_outb() calls.
9564         (set_map_mask): Likewise.
9565         (set_read_map): Likewise.
9566         (set_read_address): Likewise.
9567         (vga_font): Removed variable.
9568         (get_vga_glyph): Removed function.
9569         (invalidate_char): Likewise.
9570         (write_char): Changed to use grub_font_get_glyph() for font
9571         information.
9572         (grub_vga_putchar): Likewise.
9573         (grub_vga_getcharwidth): Likewise.
9575 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9577         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9578         flags.
9579         (pxeboot_img_LDFLAGS): Likewise.
9580         (diskboot_img_LDFLAGS): Likewise.
9581         (kernel_img_LDFLAGS): Likewise.
9583 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9585         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9586         in grub_outb() calls.
9587         (serial_hw_init): Likewise.
9589 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9591         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9592         spaces.  Skip non-regular files.
9594 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9596         * kern/disk.c (grub_disk_firmware_fini)
9597         (grub_disk_firmware_is_tainted): New variables.
9599         * include/grub/disk.h (grub_disk_firmware_fini)
9600         (grub_disk_firmware_is_tainted): Likewise.
9602         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9603         (grub_disk_biosdisk_fini): ... to here.
9604         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9605         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9606         is set.  Register grub_disk_biosdisk_fini() in
9607         `grub_disk_firmware_fini'.
9609         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9610         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9611         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9612         to finish existing firmware disk interface.
9614         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9615         (ata_mod_SOURCES): New variable.
9616         (ata_mod_CFLAGS): Likewise.
9617         (ata_mod_LDFLAGS): Likewise.
9619 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9621         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9622         (grub_ata_wait): Reimplement using grub_millisleep().
9624         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9625         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9627 2007-11-03  Marco Gerards  <marco@gnu.org>
9629         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9630         (CRTC_ADDR_PORT): New macro.
9631         (CRTC_DATA_PORT): Likewise.
9632         (CRTC_CURSOR): Likewise.
9633         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9634         (CRTC_CURSOR_ADDR_LOW): Likewise.
9635         (update_cursor): New function.
9636         (grub_console_real_putchar): Call `update_cursor'.
9637         (grub_console_gotoxy): Likewise.
9638         (grub_console_cls): Set the default color when clearing the
9639         screen.
9640         (grub_console_setcursor): Implemented.
9642 2007-11-03  Marco Gerards  <marco@gnu.org>
9644         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9645         become activate.
9646         (grub_ata_pio_write): Likewise.
9648         (grub_atapi_identify): Wait after issuing an ATA command.
9649         (grub_atapi_packet): Likewise.
9650         (grub_ata_identify): Likewise.
9651         (grub_ata_readwrite): Likewise.
9653 2007-11-03  Marco Gerards  <marco@gnu.org>
9655         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9656         (grub_ata_pio_write): Likewise.
9657         (grub_ata_readwrite): Use `grub_error', instead of
9658         returning `grub_errno'.
9660 2007-11-03  Marco Gerards  <marco@gnu.org>
9662         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9663         grub_ata_pio_write once for every single sector, instead of for
9664         multiple sectors.
9666 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9668         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9670         * conf/i386-linuxbios.rmk: New file.
9672         * kern/i386/pc/hardware.c: Likewise.
9673         * term/i386/pc/at_keyboard.c: Likewise.
9674         * term/i386/pc/vga_text.c: Likewise.
9676         * include/grub/i386/linuxbios/boot.h: Likewise.
9677         * include/grub/i386/linuxbios/console.h: Likewise.
9678         * include/grub/i386/linuxbios/init.h: Likewise.
9679         * include/grub/i386/linuxbios/kernel.h: Likewise.
9680         * include/grub/i386/linuxbios/loader.h: Likewise.
9681         * include/grub/i386/linuxbios/memory.h: Likewise.
9682         * include/grub/i386/linuxbios/serial.h: Likewise.
9683         * include/grub/i386/linuxbios/time.h: Likewise.
9685         * kern/i386/linuxbios/init.c: Likewise.
9686         * kern/i386/linuxbios/startup.S: Likewise.
9687         * kern/i386/linuxbios/table.c: Likewise.
9689 2007-10-31  Marco Gerards  <marco@gnu.org>
9691         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9692         (ata_mod_SOURCES): New variable.
9693         (ata_mod_CFLAGS): Likewise.
9694         (ata_mod_LDFLAGS): Likewise.
9696         * disk/ata.c: New file.
9698         * include/grub/disk.h (grub_disk_dev_id): Add
9699         `GRUB_DISK_DEV_ATA_ID'.
9701 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9703         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9704         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9706         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9707         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9709         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9710         `<grub/types.h>'.
9712         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9714 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9716         * include/grub/types.h (ULONG_MAX): Define macro.
9718 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9720         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9721         `"../realmode.S"'.
9722         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9724 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9726         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9727         (pkgdata_MODULES): Add `biosdisk.mod'.
9728         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9729         variables.
9731         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9732         (grub_biosdisk_init): Replace with ...
9733         (GRUB_MOD_INIT(biosdisk)): ... this.
9734         (grub_biosdisk_fini): Replace with ...
9735         (GRUB_MOD_FINI(biosdisk)): ... this.
9737         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9738         (grub_machine_init): Remove call to grub_biosdisk_init().
9739         (grub_machine_fini): Remove call to grub_machine_fini().
9741         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9743 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9745         * include/grub/time.h: New file.
9746         * include/grub/i386/time.h: Likewise.
9747         * include/grub/powerpc/time.h: Likewise.
9748         * include/grub/sparc64/time.h: Likewise.
9750         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9751         instances to ...
9752         (KERNEL_MACHINE_TIME_HEADER): ... this.
9753         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9754         instances to ...
9755         (KERNEL_MACHINE_TIME_HEADER): ... this.
9756         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9757         instances to ...
9758         (KERNEL_MACHINE_TIME_HEADER): ... this.
9760         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9761         (grub_millisleep): New function.
9762         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9763         (grub_millisleep): New function.
9764         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9765         Remove `grub/machine/time.h' include.
9766         (grub_millisleep): New function.
9767         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9768         Remove `grub/machine/time.h' include.
9769         (grub_millisleep): New function.
9771         * include/grub/misc.h (grub_div_roundup): New function.
9773         * kern/misc.c: Include `<grub/time.h>'.
9774         (grub_millisleep_generic): New function.
9776         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9777         Add `time.h'.
9778         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9779         Add `time.h'.
9780         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9781         `machine/time.h'.  Add `time.h'.
9782         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9784 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9786         * include/grub/misc.h (grub_max): New function.
9788 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9790         * util/misc.c (grub_util_info): Call fflush() before returning.
9792 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9794         * genmk.rb (Image): Copy `extra_flags' from here ...
9795         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9797         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9798         to `argc' and `args' arguments.
9800 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9802         * kern/i386/loader.S: New file.
9804         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9805         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9806         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9807         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9808         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9809         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9810         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9811         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9812         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9813         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9814         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9815         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9816         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9817         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9819         * kern/i386/realmode.S: New file.
9821         * kern/i386/pc/startup.S (protstack): Moved from here ...
9822         * kern/i386/realmode.S (protstack)... to here.
9823         * kern/i386/pc/startup.S (gdt): Moved from here ...
9824         * kern/i386/realmode.S (gdt)... to here.
9825         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9826         * kern/i386/realmode.S (prot_to_real)... to here.
9828         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9829         `kern/i386/realmode.S'.
9831 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9833         * include/grub/i386/loader.h: New file.
9835         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9836         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9837         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9838         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9839         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9840         * include/grub/i386/loader.h (grub_linux_prot_size)
9841         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9842         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9843         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9844         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9846         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9848 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9850         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9851         filesystem when dev->disk is unset.
9852         Do probe for filesystem even when dev->disk->has_partitions is set.
9853         In case a filesystem is found, always report it.
9854         In case it isn't, if dev->disk->has_partitions is set, report that
9855         a partition table was found instead of reporting that no filesystem
9856         could be identified.
9858 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9860         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9861         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9863         * include/grub/types.h (grub_host_to_target16): New macro.
9864         (grub_host_to_target32): Likewise.
9865         (grub_host_to_target64): Likewise.
9866         (grub_target_to_host16): Likewise.
9867         (grub_target_to_host32): Likewise.
9868         (grub_target_to_host64): Likewise.
9870         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9871         Renamed from to ...
9872         (GRUB_MOD_ALIGN): ...this.  Update all users.
9874         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9875         grub_host_to_target32.
9876         Replace grub_be_to_cpu32 with grub_target_to_host32.
9877         (load_modules): Likewise.
9878         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9879         Replace grub_be_to_cpu32 with grub_target_to_host32.
9880         Replace grub_cpu_to_be16 with grub_host_to_target16.
9881         Replace grub_cpu_to_be32 grub_host_to_target32.
9883 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9885         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9886         * util/elf/grub-mkimage.c: ... here.
9888         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9889         `util/powerpc/ieee1275/grub-mkimage.c'.
9891 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9893         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9894         and make it easier to figure out.
9895         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9896         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9897         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9898         leave us with less than HEAP_MIN_SIZE total heap.
9899         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9901 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9903         * include/grub/i386/io.h: New file.
9904         * commands/i386/pc/play.c (inb): Removed.
9905         (outb): Removed.
9906         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9907         with grub_outb().
9908         * term/i386/pc/serial.c  (inb): Removed.
9909         (outb): Removed.
9910         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9911         with grub_outb().
9912         * term/i386/pc/vga.c  (inb): Removed.
9913         (outb): Removed.
9914         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9915         with grub_outb().
9917 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9919         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9920         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9921         Reported by Marcin Kurek.
9923 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9925         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9926         SmartFirmware version updates (as released by Sven Luther), and avoid
9927         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9928         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9929         known broken.
9931 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9933         From Hitoshi Ozeki:
9934         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9935         when merging two regions.
9937 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9939         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9940         * normal/completion.c (grub_normal_do_completion): Likewise.
9941         Reported by Hitoshi Ozeki.
9943 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9945         Do not use devices at boot in chainloading.
9947         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9948         (boot_part_addr): Likewise.
9949         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9950         with BOOT_DRIVE and BOOT_PART_ADDR.
9951         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9952         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9954 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9956         Patch from Simon Peter <dn.tlp@gmx.net>:
9957         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9958         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9959         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9960         util/i386/pc/grub-setup.c_DEPENDENCIES.
9961         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9962         util/grub-probe.c_DEPENDENCIES.
9963         * conf/powerpc-ieee1275.rmk: Likewise.
9965 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9967         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9968         to tell grub-mkdevicemap how to name devices.
9969         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9970         feature).
9972         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9973         util/i386/get_disk_name.c.
9974         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9975         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9976         util/ieee1275/get_disk_name.c.
9978         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9980         * DISTLIST: Add util/i386/get_disk_name.c and
9981         util/ieee1275/get_disk_name.c.
9983         * util/grub-mkdevicemap.c: Replace device naming logic with
9984         grub_util_get_disk_name() calls.
9986 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9988         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9989         (so that it works for both plural and singular quantities).
9991 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9993         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9994         so that [xz] isn't taken into account when determining order.
9996 2007-08-02  Marco Gerards  <marco@gnu.org>
9998         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9999         `include/multiboot2.h', `include/grub/elfload.h',
10000         `include/multiboot.h', `include/grub/multiboot.h',
10001         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10002         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10003         `kern/elf.c', `loader/multiboot_loader.c',
10004         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10005         `loader/i386/pc/multiboot2.c',
10006         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10007         `util/i386/pc/grub-mkrescue.in'.  Remove
10008         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10009         `include/grub/i386/pc/util/biosdisk.h' and
10010         `include/grub/powerpc/ieee1275/multiboot.h'.
10012 2007-08-02  Bean  <bean123ch@gmail.com>
10014         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10015         (ntfs_mod_SOURCES): New variable.
10016         (ntfs_mod_CFLAGS): Likewise.
10017         (ntfs_mod_LDFLAGS): Likewise.
10019         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10020         (grub_probe_SOURCES): Likewise.
10021         (grub_emu_SOURCES): Likewise.
10023         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10024         (grub_emu_SOURCES): Likewise.
10026         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10027         (grub_emu_SOURCES): Likewise.
10029         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10031         * fs/ntfs.c: New file.
10033 2007-08-02  Bean  <bean123ch@gmail.com>
10035         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10037         * file.h (grub_file): Likewise.
10039         * fshelp.h (grub_fshelp_read_file): Likewise.
10041         * util/i386/pc/grub-setup.c (setup): Likewise.
10042         (save_first_sector): Likewise.
10043         (save_blocklists): Likewise.
10045         * fs/affs.c (grub_affs_read_file): Likewise.
10047         * fs/ext2.c (grub_ext2_read_file): Likewise.
10049         * fs/fat.c (grub_fat_read_data): Likewise.
10051         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10053         * fs/hfs.c (grub_hfs_read_file): Likewise.
10055         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10057         * fs/jfs.c (grub_jfs_read_file): Likewise.
10059         * fs/minix.c (grub_minix_read_file): Likewise.
10061         * fs/sfs.c (grub_sfs_read_file): Likewise.
10063         * fs/ufs.c (grub_ufs_read_file): Likewise.
10065         * fs/xfs.c (grub_xfs_read_file): Likewise.
10067         * command/blocklist.c (read_blocklist): Likewise.
10068         (print_blocklist): Likewise.
10070 2007-08-02  Marco Gerards  <marco@gnu.org>
10072         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10073         `util/hostfs.c'.
10075         * disk/host.c: New file.
10077         * util/hostfs.c: Likewise.
10079         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10080         return `GRUB_ERR_BAD_FS'.
10081         * fs/sfs.c (grub_sfs_mount): Likewise.
10082         * fs/xfs.c (grub_xfs_mount): Likewise.
10084         * include/grub/disk.h (enum grub_disk_dev_id): Add
10085         `GRUB_DISK_DEVICE_HOST_ID'.
10087         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10089 2007-07-24  Jerone Young  <jerone@gmail.com>
10091         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10092         modules for compilation.
10093         * conf/powerpc-ieee1275.rmk: Likewise.
10095         * include/multiboot.h: Move multiboot definitions to one file. Rename
10096         many definitions to not get grub specific.
10097         * include/multiboot2.h: Create header with multiboot 2 definitions.
10098         * include/grub/multiboot.h: Header for grub specific function
10099         prototypes and definitions.
10100         * include/grub/multiboot2.h: Likewise.
10101         * include/grub/multiboot_loader.h: Likewise.
10102         * include/grub/i386/pc/multiboot.h: Removed.
10103         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10105         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10106         and 2 to allow for one multiboot and module commands.
10107         * loader/multiboot2.c: Add multiboot2 functionality.
10108         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10109         and definition names.
10110         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10111         2 functions.
10112         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10113         ieee1275 specific multiboot2 code.
10115         * kern/i386/pc/startup.S: Change headers and definition names for
10116         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10118 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10120         * geninitheader.sh: Process file specified in first parameter rather
10121         than hardcoding grub_modules_init.lst.
10122         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10123         than hardcoding grub_modules_init.h.
10125         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10126         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10127         grub_probe_init.[ch] and grub_setup_init.[ch].
10129         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10130         grub_modules_init.h with grub_emu_init.h.
10131         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10132         grub_probe_init.[ch] files.
10133         * conf/i386-efi.rmk: Likewise.
10134         * conf/i386-pc.rmk: Likewise.
10135         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10136         grub_setup_init.[ch] files.
10138         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10139         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10140         to initialize modules rather than a list of hardcoded functions.
10141         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10142         grub_init_all() to initialize modules rather than a list of hardcoded
10143         functions.
10145 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10147         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10148         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10150 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10152         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10153         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10154         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10155         flag when running on SmartFirmware.
10156         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10157         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10158         was set.
10160         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10161         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10162         rather than decreasing it.
10164         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10165         there's not enough space to do it, fail in the same way as when it
10166         can't be done because there are no partitions.
10168         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10169         when nvsetenv failed.
10171 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10173         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10174         because this rule is automatically generated.
10175         (grub-mkrescue): Removed for the same reason as above.
10177 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10179         Migrate to GNU General Public License Version 3.
10181         * COPYING: Replaced with the plain text version of GPLv3.
10183         * config.guess: Updated from gnulib.
10184         * config.sub: Likewise.
10186         * geninit.sh: Output a GPLv3 copyright notice.
10187         * geninitheader.sh: Likewise.
10188         * genmodsrc.sh: Likewise.
10189         * gensymlist.sh.in: Likewise.
10191         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10192         * boot/i386/pc/diskboot.S: Likewise.
10193         * boot/i386/pc/pxeboot.S: Likewise.
10194         * commands/blocklist.c: Likewise.
10195         * commands/boot.c: Likewise.
10196         * commands/cat.c: Likewise.
10197         * commands/cmp.c: Likewise.
10198         * commands/configfile.c: Likewise.
10199         * commands/echo.c: Likewise.
10200         * commands/help.c: Likewise.
10201         * commands/ls.c: Likewise.
10202         * commands/search.c: Likewise.
10203         * commands/terminal.c: Likewise.
10204         * commands/test.c: Likewise.
10205         * commands/videotest.c: Likewise.
10206         * commands/i386/cpuid.c: Likewise.
10207         * commands/i386/pc/halt.c: Likewise.
10208         * commands/i386/pc/play.c: Likewise.
10209         * commands/i386/pc/reboot.c: Likewise.
10210         * commands/i386/pc/vbeinfo.c: Likewise.
10211         * commands/i386/pc/vbetest.c: Likewise.
10212         * commands/ieee1275/halt.c: Likewise.
10213         * commands/ieee1275/reboot.c: Likewise.
10214         * commands/ieee1275/suspend.c: Likewise.
10215         * disk/loopback.c: Likewise.
10216         * disk/lvm.c: Likewise.
10217         * disk/raid.c: Likewise.
10218         * disk/efi/efidisk.c: Likewise.
10219         * disk/i386/pc/biosdisk.c: Likewise.
10220         * disk/ieee1275/ofdisk.c: Likewise.
10221         * font/manager.c: Likewise.
10222         * fs/affs.c: Likewise.
10223         * fs/ext2.c: Likewise.
10224         * fs/fat.c: Likewise.
10225         * fs/fshelp.c: Likewise.
10226         * fs/hfs.c: Likewise.
10227         * fs/hfsplus.c: Likewise.
10228         * fs/iso9660.c: Likewise.
10229         * fs/jfs.c: Likewise.
10230         * fs/minix.c: Likewise.
10231         * fs/sfs.c: Likewise.
10232         * fs/ufs.c: Likewise.
10233         * fs/xfs.c: Likewise.
10234         * hello/hello.c: Likewise.
10235         * include/grub/acorn_filecore.h: Likewise.
10236         * include/grub/arg.h: Likewise.
10237         * include/grub/bitmap.h: Likewise.
10238         * include/grub/boot.h: Likewise.
10239         * include/grub/cache.h: Likewise.
10240         * include/grub/device.h: Likewise.
10241         * include/grub/disk.h: Likewise.
10242         * include/grub/dl.h: Likewise.
10243         * include/grub/elfload.h: Likewise.
10244         * include/grub/env.h: Likewise.
10245         * include/grub/err.h: Likewise.
10246         * include/grub/file.h: Likewise.
10247         * include/grub/font.h: Likewise.
10248         * include/grub/fs.h: Likewise.
10249         * include/grub/fshelp.h: Likewise.
10250         * include/grub/gzio.h: Likewise.
10251         * include/grub/hfs.h: Likewise.
10252         * include/grub/kernel.h: Likewise.
10253         * include/grub/loader.h: Likewise.
10254         * include/grub/lvm.h: Likewise.
10255         * include/grub/misc.h: Likewise.
10256         * include/grub/mm.h: Likewise.
10257         * include/grub/net.h: Likewise.
10258         * include/grub/normal.h: Likewise.
10259         * include/grub/parser.h: Likewise.
10260         * include/grub/partition.h: Likewise.
10261         * include/grub/pc_partition.h: Likewise.
10262         * include/grub/raid.h: Likewise.
10263         * include/grub/rescue.h: Likewise.
10264         * include/grub/script.h: Likewise.
10265         * include/grub/setjmp.h: Likewise.
10266         * include/grub/symbol.h: Likewise.
10267         * include/grub/term.h: Likewise.
10268         * include/grub/terminfo.h: Likewise.
10269         * include/grub/tparm.h: Likewise.
10270         * include/grub/types.h: Likewise.
10271         * include/grub/video.h: Likewise.
10272         * include/grub/efi/api.h: Likewise.
10273         * include/grub/efi/chainloader.h: Likewise.
10274         * include/grub/efi/console.h: Likewise.
10275         * include/grub/efi/console_control.h: Likewise.
10276         * include/grub/efi/disk.h: Likewise.
10277         * include/grub/efi/efi.h: Likewise.
10278         * include/grub/efi/pe32.h: Likewise.
10279         * include/grub/efi/time.h: Likewise.
10280         * include/grub/i386/linux.h: Likewise.
10281         * include/grub/i386/setjmp.h: Likewise.
10282         * include/grub/i386/types.h: Likewise.
10283         * include/grub/i386/efi/kernel.h: Likewise.
10284         * include/grub/i386/efi/loader.h: Likewise.
10285         * include/grub/i386/efi/time.h: Likewise.
10286         * include/grub/i386/pc/biosdisk.h: Likewise.
10287         * include/grub/i386/pc/boot.h: Likewise.
10288         * include/grub/i386/pc/chainloader.h: Likewise.
10289         * include/grub/i386/pc/console.h: Likewise.
10290         * include/grub/i386/pc/init.h: Likewise.
10291         * include/grub/i386/pc/kernel.h: Likewise.
10292         * include/grub/i386/pc/loader.h: Likewise.
10293         * include/grub/i386/pc/memory.h: Likewise.
10294         * include/grub/i386/pc/multiboot.h: Likewise.
10295         * include/grub/i386/pc/serial.h: Likewise.
10296         * include/grub/i386/pc/time.h: Likewise.
10297         * include/grub/i386/pc/vbe.h: Likewise.
10298         * include/grub/i386/pc/vbeblit.h: Likewise.
10299         * include/grub/i386/pc/vbefill.h: Likewise.
10300         * include/grub/i386/pc/vbeutil.h: Likewise.
10301         * include/grub/i386/pc/vga.h: Likewise.
10302         * include/grub/ieee1275/ieee1275.h: Likewise.
10303         * include/grub/ieee1275/ofdisk.h: Likewise.
10304         * include/grub/powerpc/libgcc.h: Likewise.
10305         * include/grub/powerpc/setjmp.h: Likewise.
10306         * include/grub/powerpc/types.h: Likewise.
10307         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10308         * include/grub/powerpc/ieee1275/console.h: Likewise.
10309         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10310         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10311         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10312         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10313         * include/grub/powerpc/ieee1275/time.h: Likewise.
10314         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10315         * include/grub/sparc64/libgcc.h: Likewise.
10316         * include/grub/sparc64/setjmp.h: Likewise.
10317         * include/grub/sparc64/types.h: Likewise.
10318         * include/grub/sparc64/ieee1275/console.h: Likewise.
10319         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10320         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10321         * include/grub/sparc64/ieee1275/time.h: Likewise.
10322         * include/grub/util/biosdisk.h: Likewise.
10323         * include/grub/util/getroot.h: Likewise.
10324         * include/grub/util/lvm.h: Likewise.
10325         * include/grub/util/misc.h: Likewise.
10326         * include/grub/util/raid.h: Likewise.
10327         * include/grub/util/resolve.h: Likewise.
10328         * io/gzio.c: Likewise.
10329         * kern/device.c: Likewise.
10330         * kern/disk.c: Likewise.
10331         * kern/dl.c: Likewise.
10332         * kern/elf.c: Likewise.
10333         * kern/env.c: Likewise.
10334         * kern/err.c: Likewise.
10335         * kern/file.c: Likewise.
10336         * kern/fs.c: Likewise.
10337         * kern/loader.c: Likewise.
10338         * kern/main.c: Likewise.
10339         * kern/misc.c: Likewise.
10340         * kern/mm.c: Likewise.
10341         * kern/parser.c: Likewise.
10342         * kern/partition.c: Likewise.
10343         * kern/rescue.c: Likewise.
10344         * kern/term.c: Likewise.
10345         * kern/efi/efi.c: Likewise.
10346         * kern/efi/init.c: Likewise.
10347         * kern/efi/mm.c: Likewise.
10348         * kern/i386/dl.c: Likewise.
10349         * kern/i386/efi/init.c: Likewise.
10350         * kern/i386/efi/startup.S: Likewise.
10351         * kern/i386/pc/init.c: Likewise.
10352         * kern/i386/pc/lzo1x.S: Likewise.
10353         * kern/i386/pc/startup.S: Likewise.
10354         * kern/ieee1275/ieee1275.c: Likewise.
10355         * kern/powerpc/cache.S: Likewise.
10356         * kern/powerpc/dl.c: Likewise.
10357         * kern/powerpc/ieee1275/cmain.c: Likewise.
10358         * kern/powerpc/ieee1275/crt0.S: Likewise.
10359         * kern/powerpc/ieee1275/init.c: Likewise.
10360         * kern/powerpc/ieee1275/openfw.c: Likewise.
10361         * kern/sparc64/cache.S: Likewise.
10362         * kern/sparc64/dl.c: Likewise.
10363         * kern/sparc64/ieee1275/init.c: Likewise.
10364         * kern/sparc64/ieee1275/openfw.c: Likewise.
10365         * loader/efi/chainloader.c: Likewise.
10366         * loader/efi/chainloader_normal.c: Likewise.
10367         * loader/i386/efi/linux.c: Likewise.
10368         * loader/i386/efi/linux_normal.c: Likewise.
10369         * loader/i386/pc/chainloader.c: Likewise.
10370         * loader/i386/pc/chainloader_normal.c: Likewise.
10371         * loader/i386/pc/linux.c: Likewise.
10372         * loader/i386/pc/linux_normal.c: Likewise.
10373         * loader/i386/pc/multiboot.c: Likewise.
10374         * loader/i386/pc/multiboot_normal.c: Likewise.
10375         * loader/powerpc/ieee1275/linux.c: Likewise.
10376         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10377         * normal/arg.c: Likewise.
10378         * normal/cmdline.c: Likewise.
10379         * normal/command.c: Likewise.
10380         * normal/completion.c: Likewise.
10381         * normal/execute.c: Likewise.
10382         * normal/function.c: Likewise.
10383         * normal/lexer.c: Likewise.
10384         * normal/main.c: Likewise.
10385         * normal/menu.c: Likewise.
10386         * normal/menu_entry.c: Likewise.
10387         * normal/misc.c: Likewise.
10388         * normal/parser.y: Likewise.
10389         * normal/script.c: Likewise.
10390         * normal/i386/setjmp.S: Likewise.
10391         * normal/powerpc/setjmp.S: Likewise.
10392         * normal/sparc64/setjmp.S: Likewise.
10393         * partmap/acorn.c: Likewise.
10394         * partmap/amiga.c: Likewise.
10395         * partmap/apple.c: Likewise.
10396         * partmap/gpt.c: Likewise.
10397         * partmap/pc.c: Likewise.
10398         * partmap/sun.c: Likewise.
10399         * term/gfxterm.c: Likewise.
10400         * term/terminfo.c: Likewise.
10401         * term/efi/console.c: Likewise.
10402         * term/i386/pc/console.c: Likewise.
10403         * term/i386/pc/serial.c: Likewise.
10404         * term/i386/pc/vesafb.c: Likewise.
10405         * term/i386/pc/vga.c: Likewise.
10406         * term/ieee1275/ofconsole.c: Likewise.
10407         * util/biosdisk.c: Likewise.
10408         * util/console.c: Likewise.
10409         * util/genmoddep.c: Likewise.
10410         * util/getroot.c: Likewise.
10411         * util/grub-emu.c: Likewise.
10412         * util/grub-mkdevicemap.c: Likewise.
10413         * util/grub-probe.c: Likewise.
10414         * util/lvm.c: Likewise.
10415         * util/misc.c: Likewise.
10416         * util/raid.c: Likewise.
10417         * util/resolve.c: Likewise.
10418         * util/update-grub.in: Likewise.
10419         * util/update-grub_lib.in: Likewise.
10420         * util/grub.d/00_header.in: Likewise.
10421         * util/grub.d/10_hurd.in: Likewise.
10422         * util/grub.d/10_linux.in: Likewise.
10423         * util/i386/efi/grub-install.in: Likewise.
10424         * util/i386/efi/grub-mkimage.c: Likewise.
10425         * util/i386/pc/grub-install.in: Likewise.
10426         * util/i386/pc/grub-mkimage.c: Likewise.
10427         * util/i386/pc/grub-mkrescue.in: Likewise.
10428         * util/i386/pc/grub-setup.c: Likewise.
10429         * util/i386/pc/misc.c: Likewise.
10430         * util/powerpc/ieee1275/grub-install.in: Likewise.
10431         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10432         * util/powerpc/ieee1275/misc.c: Likewise.
10433         * video/bitmap.c: Likewise.
10434         * video/video.c: Likewise.
10435         * video/i386/pc/vbe.c: Likewise.
10436         * video/i386/pc/vbeblit.c: Likewise.
10437         * video/i386/pc/vbefill.c: Likewise.
10438         * video/i386/pc/vbeutil.c: Likewise.
10439         * video/readers/tga.c: Likewise.
10441 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10443         * conf/i386-efi.rmk: Replace obsolete reference to
10444         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10445         with util/getroot.c.
10446         * conf/powerpc-ieee1275.rmk: Likewise.
10447         * conf/sparc64-ieee1275.rmk: Likewise.
10449         * util/grub-emu.c (main): Fix unchecked pointer handling.
10451 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10453         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10454         invocation to fail, in order to support partition-less media.
10456         * util/i386/pc/grub-install.in: Likewise.
10458         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10459         which fs or partmap modules are needed (akin to its sister scripts).
10461         Also use grub-probe to get rid of unportable /proc/mounts check.
10463         Print the same informational message that the other scripts do, before
10464         exiting.
10466 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10468         * util/update-grub_lib.in (font_path): New function.  Determine whether
10469         a font file can be found and, if so, echo the GRUB path to it.
10471         * util/update-grub.in: Handle multiple terminals depending on user
10472         input, platform availability and font file presence.  Propagate
10473         variables of our findings to /etc/grub.d/ children.
10475         * util/grub.d/00_header.in: Handle multiple terminals, based on
10476         environment setup by update-grub.
10478 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10480         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10482 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10484         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10485         indicate end of data section in kernel image.
10486         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10487         GRUB_KERNEL_MACHINE_DATA_END.
10489         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10490         space for it.
10491         * kern/i386/efi/startup.S: Likewise.
10493         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10494         during image generation.  Implement --prefix option to override this
10495         patch.
10496         * util/i386/efi/grub-mkimage.c: Likewise.
10498         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10499         code to make path relative to its root into a separate function.
10501         * util/i386/pc/grub-install.in: Use newly provided
10502         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10503         pass the result to grub-install --prefix.
10505 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10507         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10508         DEFAULT_DEVICE_MAP.
10509         * util/grub-emu.c: Use above definitions from misc.h instead of
10510         defining them.
10511         * util/grub-mkdevicemap.c: Likewise.
10512         * util/i386/pc/grub-setup.c: Likewise.
10513         * util/grub-probe.c: Likewise.
10514         (probe): Abort with grub_util_error() when either
10515         grub_guess_root_device or grub_util_get_grub_dev fails.
10517 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10519         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10520         "pager" assignment.
10521         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10522         "pcdata".
10523         * util/grub-probe.c (probe): Likewise for "drive_name".
10525 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10527         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10528         not just the cdrom one.
10530 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10532         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10533         Add --pkglibdir=DIR option to override pkglibdir.
10534         Mention --image-type=TYPE in help output.
10535         Fix --grub-mkimage (it was a no-op).
10536         Abort gracefully when no parameter is given.
10538 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10540         * util/i386/pc/grub-mkrescue.in: New file.
10541         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10542         * Makefile.in: Handle bin_SCRIPTS.
10544 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10546         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10547         list of video modes.
10549 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10551         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10552         file doesn't exist, or if it is in a filesystem grub can't read.
10554         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10555         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10556         header comment to fit in 80 columns when the variables are resolved.
10558         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10559         could be identified by update-grub.  Remove redundant check for
10560         unifont.pff existence (since convert_system_path_to_grub_path now
10561         handles that).
10563 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10565         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10567         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10569         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10571 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10573         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10575         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10576         grub_apple_partition_map_fini.
10578         * util/biosdisk.c
10579         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10580         to access >2 TiB disks).
10582         Print disk->total_sectors with %llu instead of %lu, since this
10583         variable is always 64-bit (prevents wrong disk size from being displayed
10584         on either >2 TiB disk or big-endian CPU).
10586         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10587         into a generic case that supports all (sane) partition maps.
10589         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10590         breaks big-endian.
10592         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10593         and grub_apple_partition_map_fini() after that.
10595 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10597         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10599         * util/grub.d/00_header.in: Only enable gfxterm when
10600         convert_system_path_to_grub_path() succeeds.
10602 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10604         * util/update-grub_lib.in: New file.
10605         * DISTLIST: Add update-grub_lib.in.
10606         * conf/common.rmk: Generate update-grub_lib and install it in
10607         $(lib_DATA).
10608         * Makefile.in: Add install routine for $(lib_DATA).
10610         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10611         function provided by update-grub_lib to support arbitrary paths of
10612         unifont.pff.
10613         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10614         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10616 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10618         * commands/i386/cpuid.c: New module.
10619         * DISTLIST: Add it.
10620         * conf/i386-efi.rmk: Enable cpuid.mod.
10621         * conf/i386-pc.rmk: Likewise.
10623 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10625         * kern/disk.c (grub_disk_read): Check return value of
10626         grub_realloc().
10628 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10630         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10631         arrays.
10632         * disk/raid.c (grub_raid_open): Likewise.
10634 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10636         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10637         stack instead of on the heap.
10639         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10640         before doing a read on it.
10642         * configure.ac: Only use -fno-stack-protector for the target
10643         environment.
10645 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10647         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10648         __attribute_ ((unused)) to mode_type argument.
10650         * util/getroot.c (grub_guess_root_device): Fix #endif.
10652         * kern/misc.c (memcmp): Fix prototype.
10654         * include/grub/partition.h [GRUB_UTIL]
10655         (grub_gpt_partition_map_init): Add prototype.
10656         (grub_gpt_partition_map_fini): Likewise.
10658         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10659         at the right place.
10661         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10662         (grub_fat_read_data): Likewise.
10663         (grub_fat_find_dir): Likewise.
10665         * font/manager.c (find_glyph): Make table a const.
10666         (grub_font_get_glyph): Remove bitmap from if statement.
10668 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10670         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10671         code, first search for device in /dev/mapper, then in /dev.
10672         (grub_util_get_grub_dev): New function.
10673         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10674         prototype.
10675         * util/grub-probe.c (probe): Remove check for RAID, call
10676         grub_util_get_grub_dev() instead of
10677         grub_util_biosdisk_get_grub_dev().
10678         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10679         grub_util_biosdisk_get_grub_dev().
10680         * util/i386/pc/grub-setup.c (main): Likewise.
10682 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10684         * DISTLIST: Update for the latest changes.
10685         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10686         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10687         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10688         grub/util/biosdisk.h.
10689         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10690         grub/util/biosdisk.h.
10692 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10694         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10696 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10698         * util/i386/efi/grub-install.in: New.
10699         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10700         newly added grub-install.
10701         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10702         include.
10703         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10704         grub/util/biosdisk.h.
10705         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10706         grub/util/biosdisk.h.
10708 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10710         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10711         * include/grub/util/biosdisk.h: ... here.
10712         * util/i386/pc/biosdisk.c: Moved to ...
10713         * util/biosdisk.c: ... here.
10714         * util/i386/pc/getroot.c: Moved to ...
10715         * util/getroot.c: ... here.
10716         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10717         * util/grub-mkdevicemap.c: ... here.
10718         * util/i386/pc/grub-probe.c: Moved to ...
10719         * util/grub-probe.c: ... here.
10721 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10723         * util/update-grub.in: Remove duplicated line in grub.cfg header
10724         message.
10726 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10728         * util/update-grub.in: Fix a few assumptions about the devices holding
10729         /, /boot and /boot/grub being the same.
10730         * util/grub.d/00_header.in: Likewise.
10731         * util/grub.d/10_hurd.in: Likewise.
10732         * util/grub.d/10_linux.in: Likewise.
10734         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10735         patterns.  Use that to define the `.old' suffix as older than `'.
10737         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10739         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10740         the grub.cfg header message.
10742 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10744         * util/update-grub.in: Create device.map if it doesn't already exist,
10745         before attempting to run grub-probe.
10746         Check for grub-probe and grub-mkdevicemap with the same code
10747         grub-install is using.
10748         Remove test mode.
10750 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10752         * Makefile.in: Add the datarootdir autoconf variable.
10754 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10756         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10757         fail gracefully if dev->disk->partition == NULL.
10759 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10761         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10762         determine partition map module.
10763         * util/i386/pc/grub-install.in: Use this feature to decide which
10764         partition module to load, instead of hardcoding pc and gpt.
10766 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10768         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10769         source directory differs from build directory.
10771 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10773         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10774         initialisation.
10776 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10778         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10780 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10782         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10783         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10785 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10787         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10788         (grub_probe_SOURCES): Likewise.
10789         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10790         GPT and initialize dos_part and bsd_part accordingly.
10791         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10792         install_bsd_part.
10793         (main): Activate gpt module for use during partition identification,
10794         and deactivate it afterwards.
10795         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10796         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10797         partition identification, and deactivate it afterwards.
10799 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10801         * term/i386/pc/console.c (grub_console_fini): Call
10802         grub_term_set_current() before grub_term_unregister().
10804 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10806         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10807         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10808         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10809         and update-grub_DATA.
10810         * conf/common.rmk: Build and install update-grub components.
10811         * conf/common.mk: Regenerate.
10812         * util/update-grub.in: New.  Core of update-grub.
10813         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10814         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10815         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10816         * util/grub.d/README: New.  Document grub.d directory layout.
10818 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10820         * util/grub-emu.c: Move initialization functions
10821         grub_util_biosdisk_init() and grub_init_all() before
10822         grub_util_biosdisk_get_grub_dev(), which relies on them.
10824 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10826         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10827         it is used later.
10829 2007-04-18  Jerone Young  <jerone@gmail.com>
10831         * kernel/elf.c: Add missing parenthesis for conditional statement
10832         stanza.
10834 2007-04-10  Jerone Young  <jerone@gmail.com>
10836         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10837         continue on and look for device node with real device name.
10839 2007-04-10  Jerone Young  <jerone@gmail.com>
10841         * configure.ac: Add argument for autoconf to use transformation
10842         ability.
10843         * Makefile.in: Add autoconf package transformation code.
10844         * util/i386/pc/grub-install.in: Likewise.
10845         * util/powerpc/ieee1275/grub-install.in: Likewise.
10847 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10849         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10850         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10851         (EXT2_REVISION): Likewise.
10852         (EXT2_INODE_SIZE): Likewise.
10853         (struct grub_ext2_block_group): Added a missing member
10854         "used_dirs".
10855         (grub_ext2_read_inode): Divide by the inode size in a superblock
10856         instead of 128 to obtain INODES_PER_BLOCK.
10857         Use the macro EXT2_INODE_SIZE instead of directly using
10858         SBLOCK->INODE_SIZE.
10860 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10862         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10863         superblock instead of the structure size to compute an
10864         offset. This fixes the problem that GRUB could not read a
10865         filesystem when inode size is different from 128-byte.
10867 2007-03-05  Marco Gerards  <marco@gnu.org>
10869         * normal/main.c (read_config_file): When "menu" is not set, create
10870         an initial context.
10872 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10874         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10875         (HEAP_LIMIT): New macro.
10876         (grub_claim_heap): Claim memory up to `heaplimit'.
10878 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10880         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10881         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10882         (_start): Likewise.
10883         (grub_arch_modules_addr): Return address after `_end'.
10884         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10885         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10886         (add_segments): Calculate `_end' from phdr size and location.
10887         (ALIGN_UP): Moved to ...
10888         * include/grub/misc.h: here.
10889         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10890         New macro.
10891         (GRUB_IEEE1275_MODULE_BASE): Removed.
10893 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10895         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10896         loop boundary.
10898 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10900         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10901         All users updated.
10902         (grub_elf64_load_hook_t): Likewise.
10903         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10904         debug output.
10906 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10908         * kern/mm.c: Update copyright.
10909         (grub_mm_debug): Correct syntax error.
10910         (grub_mm_dump_free): New function.
10911         (grub_debug_free): Call `grub_free'.
10912         * include/grub/mm.h: Update copyright.
10913         (grub_mm_dump_free): Add declaration.
10915 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10917         * include/grub/ieee1275/ieee1275.h: Update copyright.
10918         * kern/powerpc/ieee1275/init.c: Likewise.
10919         * kern/powerpc/ieee1275/openfw.c: Likewise.
10921         * loader/powerpc/ieee1275/linux.c: Likewise.
10922         * include/grub/elfload.h: Likewise.
10923         * kern/elf.c: Likewise.
10924         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10925         callers.
10926         (grub_elf64_load): Likewise.
10927         (grub_elf32_load_segment): Move to a nested function.
10928         (grub_elf64_load_segment): Likewise.
10930 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10932         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10933         prototype.
10934         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10935         (grub_heap_len): Likewise.
10936         (HEAP_SIZE): New macro.
10937         (grub_claim_heap): New function.
10938         (grub_machine_init): Don't claim heap directly.  Call
10939         `grub_claim_heap'.
10940         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10941         (grub_available_iterate): New function.
10943 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10945         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10946         * configure.ac: Use it for testing the HOST and TARGET compilers.
10948 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10950         * Makefile.in (enable_grub_emu): New variable.
10951         * configure.ac (--enable-grub-emu): New option.
10952         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10953         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10954         * conf/i386-pc.rmk: Likewise.
10955         * conf/powerpc-ieee1275.rmk: Likewise.
10956         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10958 2006-12-12  Marco Gerards  <marco@gnu.org>
10960         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10962         * kern/env.c (grub_env_unset): Don't free the member `value' when
10963         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10964         pointer.
10966         * normal/main.c (current_menu): Removed.
10967         (free_menu): Unset the `menu' environment variable.
10968         (grub_normal_menu_addentry): Make use of the environment variable
10969         `menu', instead of using the global `current_menu'.  Allocate
10970         memory for the sourcecode of this entry.
10971         (read_config_file): New argument `nested', changed all callers.
10972         Only in the case of a new context, initialize a new menu.  Set the
10973         `menu' environment variable.
10974         (grub_normal_execute): Don't set and unset the environment
10975         variable `menu' here anymore.  Only free the menu when leaving the
10976         context.
10978         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10979         leak.
10981 2006-12-11  Marco Gerards  <marco@gnu.org>
10983         * normal/menu_entry.c (run): Fix off by one bug so the last line
10984         is executed.  Move the loader check to outside the loop.
10986 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10988         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10990 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10992         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10993         the number of sectors.  Reported by Andrey Shuvikov
10994         <mr_hyro@yahoo.com>.
10996 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10998         * kern/disk.c (grub_disk_read): When there is a read error, always
10999         try to read only the necessary data.
11001         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11002         disk/raid.c.
11003         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11004         prototype.
11005         [GRUB_UTIL] (grub_raid_fini): Likewise.
11006         [GRUB_UTIL] (grub_lvm_init): Likewise.
11007         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11008         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11009         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11010         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11011         and grub_raid_fini().
11013 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11015         * include/grub/types.h (__unused): Rename to UNUSED.
11016         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11017         (grub_elf64_size): Likewise.
11019 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11021         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11022         grub_error_push and grub_error_pop in the error-handling path.
11023         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11024         length.
11026 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11028         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11029         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11030         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11031         (kernel_elf_SOURCES): Likewise.
11032         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11033         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11034         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11035         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11036         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11037         (elf_mod_SOURCES): New variable.
11038         (elf_mod_CFLAGS): Likewise.
11039         (elf_mod_LDFLAGS): Likewise.
11040         * include/grub/types.h (__unused): New macro.
11041         * include/grub/elfload.h: New file.
11042         * kern/elf.c: Likewise.
11043         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11044         (ELF32_LOADMASK): New macro.
11045         (ELF64_LOADMASK): Likewise.
11046         (vmlinux): Removed.
11047         (grub_linux_load32): New function.
11048         (grub_linux_load64): Likewise.
11049         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11050         Use grub_elf_t instead of grub_file_t.
11052 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11054         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11055         `catch_result' to struct set_color_args.
11057 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11059         * normal/menu.c: Include grub/script.h.
11060         * normal/menu_entry.c: Likewise.
11061         * include/grub/normal.h: Do not include grub/script.h.
11063 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11065         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11067 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11069         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11070         disk.
11071         (grub_disk_close): Print debug messages when closing a disk.
11072         (grub_disk_read): Print debug messages when disk read fails.
11073         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11074         filesystem type.
11075         * kern/partition.c: Include misc.h.
11076         (grub_partition_iterate): Print debug messages when detecting
11077         partition type.
11079 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11081         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11082         is negative.
11083         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11085 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11087         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11088         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11090 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11092         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11093         instead of sizeof(lv). Patch by Michael Guntsche.
11095 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11097         * disk/lvm.c: Rename VGS to VG_LIST.
11098         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11099         (grub_lvm_open): Likewise.
11100         Thanks to Michael Guntsche for finding this bug.
11102 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11104         * configure.ac (AC_INIT): Bumped to 1.95.
11106 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11108         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11109         with "/dev/.static/dev/md".
11111 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11113         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11114         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11115         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11116         DRIVE_NAME are always freed.
11118         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11119         DOS_PART, as a DOS partition is counted from one instead of zero
11120         now. Reported by Robert Millan.
11122 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11124         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11125         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11126         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11127         string returned by grub_guess_root_device.
11128         * util/i386/pc/grub-setup.c: Likewise.
11129         * util/i386/pc/grub-probefs.c: Likewise.
11131         * util/i386/pc/grub-probefs.c: Rename to ...
11132         * util/i386/pc/grub-probe.c: ... this.
11133         * DISTLIST: Remove grub-probefs, add grub-probe.
11134         * conf/i386-efi.rmk: Likewise.
11135         * conf/i386-pc.rmk: Likewise.
11136         * util/i386/pc/grub-install.in: Likewise.
11138         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11139         choose which information we want to print.
11141 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11143         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11144         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11145         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11146         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11147         video/readers/tga.c and video/i386/pc/vbeutil.c.
11149 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11151         Added support for RAID and LVM.
11153         * disk/lvm.c: New file.
11154         * disk/raid.c: Likewise.
11155         * include/grub/lvm.h: Likewise.
11156         * include/grub/raid.h: Likewise.
11157         * include/grub/util/lvm.h: Likewise.
11158         * include/grub/util/raid.h: Likewise.
11159         * util/lvm.c: Likewise.
11160         * util/raid.c: Likewise.
11162         * include/grub/disk.h (grub_disk_dev_id): Add
11163         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11164         (grub_disk_get_size): New prototype.
11165         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11166         returns a partition.
11167         (grub_disk_get_size): New function.
11169         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11170         verbatim if grub_install_dos_part is -2.
11172         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11173         and LVM devices.
11175         * util/i386/pc/grub-setup.c (setup): New argument
11176         MUST_EMBED. Force embedding of GRUB when the argument is
11177         true. Close FILE before returning.
11178         (main): Add support for RAID and LVM.
11180         * conf/common.rmk: Add RAID and LVM modules.
11181         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11182         util/lvm.c.
11183         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11185         * kern/misc.c (grub_strstr): New function.
11186         * include/grub/misc.h (grub_strstr): New prototype.
11188 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11190         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11192 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11194         * kern/misc.c (grub_strtoull): Guess the base only if not
11195         specified.
11197 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11199         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11200         PowerMac support.
11202 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11204         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11206         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11207         Remove `flags' argument.  All callers changed.
11208         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11209         (IEEE1275_IHANDLE_INVALID): New variable.
11210         (IEEE1275_CELL_INVALID): New variable.
11211         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11212         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11213         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11214         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11215         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11216         codes from Open Firmware.  All callers updated.
11217         (grub_ieee1275_next_property): Directly return Open Firmware return
11218         code.
11219         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11220         Standardize error checking from `grub_ieee1275_get_property'.
11221         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11222         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11224 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11226         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11227         `instance_to_package_args' to `instance_to_path_args'.
11229         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11230         `grub_ieee1275_chosen'.
11232         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11233         `grub_ieee1275_interpret'.
11235 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11237         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11239 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11241         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11242         (__cmpdi): Likewise.
11244         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11245         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11246         `grub_ssize_t'.
11248         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11250         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11251         to type `grub_ssize_t'.
11252         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11254 2006-09-22  Marco Gerards  <marco@gnu.org>
11256         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11257         newlines.
11259 2006-09-22  Marco Gerards  <marco@gnu.org>
11261         * commands/echo.c: New file.
11263         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11265         * conf/common.rmk (echo_mod_SOURCES): New variable.
11266         (echo_mod_CFLAGS): Likewise.
11267         (echo_mod_LDFLAGS): Likewise.
11269 2006-09-22  Marco Gerards  <marco@gnu.org>
11271         * normal/main.c (get_line): Malloc memory instead of using
11272         preallocated memory.  Removed the arguments `cmdline' and
11273         `max_len'.  Updated all callers.
11275 2006-09-22  Marco Gerards  <marco@gnu.org>
11277         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11278         (normal_mod_DEPENDENCIES): Likewise.
11280         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11281         (normal_mod_DEPENDENCIES): Likewise.
11283         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11285 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11287         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11288         programs.
11289         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11290         (normal_mod_DEPENDENCIES): Likewise.
11291         * conf/i386-pc.mk: Regenerate.
11292         * conf/i386-efi.mk: Likewise
11293         * conf/common.mk: Likewise.
11294         * conf/powerpc-ieee1275.mk: Likewise.
11295         * conf/sparc64-ieee1275.mk: Likewise.
11297 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11299         Sync with i386 version.
11300         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11301         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11303 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11305         Import from GRUB Legacy (lib/device.c):
11306         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11307         (init_device_map) [__linux__]: Add support for I2O devices.
11309 2006-09-14  Marco Gerards  <marco@gnu.org>
11311         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11312         `-melf_i386'.
11314 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11316         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11317         /boot/grub/*.lst.
11319         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11321         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11322         before adding it to device.map.
11324 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11326         * genmk.rb: Let GCC generate dependencies the first time it
11327         compiles a file; using the -MD option.
11328         * conf/common.mk: Regenerate.
11329         * conf/i386-pc.mk: Likewise.
11330         * conf/i386-efi.mk: Likewise.
11331         * conf/powerpc-ieee1275.mk: Likewise.
11332         * conf/sparc64-ieee1275.mk: Likewise.
11334 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11336         Move the prototypes of grub_setjmp and grub_longjmp to
11337         cpu/setjmp.h, so that each architecture may specify different
11338         attributes.
11340         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11341         (grub_longjmp): Likewise.
11342         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11343         (grub_longjmp): Likewise.
11344         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11345         (grub_longjmp): Likewise.
11347         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11348         [!GRUB_UTIL] (grub_longjmp): Removed.
11350 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11352         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11353         "color!" method does not return any value.
11355 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11357         * include/grub/bitmap.h: New file.
11359         * include/grub/i386/pc/vbeutil.h: Likewise.
11361         * video/bitmap.c: Likewise.
11363         * video/readers/tga.c: Likewise.
11365         * video/i386/pc/vbeutil.c: Likewise.
11367         * commands/videotest.c: Code cleanup and updated to reflect to new
11368         video API.
11370         * term/gfxterm.c: Likewise.
11372         * video/video.c: Likewise.
11374         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11375         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11376         (bitmap_mod_SOURCES): New entry.
11377         (bitmap_mod_CFLAGS): Likewise.
11378         (bitmap_mod_LDFLAGS): Likewise.
11379         (tga_mod_SOURCES): Likewise.
11380         (tga_mod_CFLAGS): Likewise.
11381         (tga_mod_LDFLAGS): Likewise.
11383         * include/grub/video.h (grub_video_blit_operators): New enum type.
11384         (grub_video_render_target): Changed as forward declaration and moved
11385         actual definition to be video driver specific.
11386         (grub_video_adapter.blit_bitmap): Added blitting operator.
11387         (grub_video_adapter.blit_render_target): Likewise.
11388         (grub_video_blit_bitmap): Likewise.
11389         (grub_video_blit_render_target): Likewise.
11391         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11392         driver specific render target definition.
11393         (grub_video_vbe_map_rgba): Added driver internal helper.
11394         (grub_video_vbe_unmap_color): Updated to use
11395         grub_video_i386_vbeblit_info.
11396         (grub_video_vbe_get_video_ptr): Likewise.
11398         * include/grub/i386/pc/vbeblit.h
11399         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11400         grub_video_i386_vbeblit_info.
11401         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11402         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11403         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11404         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11405         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11406         (grub_video_i386_vbeblit_index_index): Likewise.
11407         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11408         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11409         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11410         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11411         operator.
11412         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11413         operator.
11415         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11416         include/grub/i386/pc/vbeblit.h.
11418         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11419         Updated to use grub_video_i386_vbeblit_info.
11420         (grub_video_i386_vbefill_R8G8B8): Likewise.
11421         (grub_video_i386_vbefill_index): Likewise.
11422         (grub_video_i386_vbefill): Added generic filler.
11424         * video/i386/pc/vbefill.c: Updated to reflect changes on
11425         include/grub/i386/pc/vbefill.h.
11427         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11428         grub_video_i386_vbeblit_info.
11429         (grub_video_vbe_unmap_color): Likewise.
11430         (grub_video_vbe_blit_glyph): Likewise.
11431         (grub_video_vbe_scroll): Likewise.
11432         (grub_video_vbe_draw_pixel): Removed function.
11433         (grub_video_vbe_get_pixel): Likewise.
11434         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11435         updated code to use it.
11436         (common_blitter): Added common blitter for render target and bitmap.
11437         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11438         (grub_video_vbe_blit_render_target): Likewise.
11440 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11442         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11443         is in text mode if there is no console control protocol instance
11444         available.
11446 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11448         * include/grub/video.h: Code cleanup.
11450         * include/grub/i386/pc/vbe.h: Likewise.
11452         * video/i386/pc/vbe.c: Likewise.
11454         * video/i386/pc/vbeblit.c: Likewise.
11456         * video/i386/pc/vbefill.c: Likewise.
11458         * video/video.c: Likewise.  Also added more comments.
11460 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11462         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11463         (struct grub_biosdisk_dap): Likewise.
11465         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11466         linkage settings for all functions.
11468 2006-07-12  Marco Gerards  <marco@gnu.org>
11470         * configure.ac (--enable-mm-debug): Fix typo.
11472         * genkernsyms.sh.in: Use proper quoting for `CC'.
11474 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11476         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11477         (normal_mod_ASFLAGS): Remove "-m32".
11479 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11481         * util/misc.c: Include config.h.
11482         [!HAVE_MEMALIGN]: Do not include malloc.h.
11483         (grub_memalign): Use posix_memalign, if present. Then, use
11484         memalign, if present. Otherwise, emit an error.
11486         * util/grub-emu.c: Do not include malloc.h.
11488         * include/grub/util/misc.h: Include unistd.h. This is required for
11489         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11490         D. Eades III <hde@foobar-qux.org>.
11492         * configure.ac (AC_GNU_SOURCE): Added.
11493         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11494         type.
11496 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11498         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11499         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11501 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11503         * include/grub/types.h (grub_host_addr_t): Rename to
11504         grub_target_addr_t.
11505         (grub_host_off_t): Rename to grub_target_off_t.
11506         (grub_host_size_t): Rename to grub_target_size_t.
11507         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11508         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11510         * include/grub/kernel.h (struct grub_module_header): Change type
11511         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11512         (grub_module_info): Likewise.
11514 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11516         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11517         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11518         Velazquez <jesus.velazquez@gmail.com>.
11520 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11522         Count partitions from 1 instead of 0 in the string representation
11523         of partitions. Still use 0-based internally.
11525         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11526         (sun_partition_map_iterate): Use grub_partition_t instead of
11527         struct grub_partition *. Cast DESC->START_CYLINDER to
11528         grub_uint64_t after converting the endian.
11529         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11530         (sun_partition_map_get_name): Add 1 to P->INDEX.
11532         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11533         PCDATA->DOS_PART.
11534         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11536         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11537         zero instead of one.
11538         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11539         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11541         * partmap/apple.c (apple_partition_map_iterate): Change the type
11542         of POS to unsigned.
11543         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11544         (apple_partition_map_get_name): Add 1 into P->INDEX.
11546         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11547         of POS to unsigned.
11548         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11549         calculate the offset of a partition.
11550         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11551         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11553         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11554         SECTOR to grub_disk_addr_t.
11555         (acorn_partition_map_iterate): Likewise.
11556         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11557         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11558         top.
11559         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11561         * kern/i386/pc/init.c (make_install_device): Add 1 into
11562         GRUB_INSTALL_DOS_PART.
11564         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11565         conditional.
11567 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11569         Clean up the code to support 64-bit addressing in disks and
11570         files. This change is not enough for filesystems yet.
11572         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11573         type of "start" to grub_uint64_t.
11574         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11575         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11576         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11577         convert addresses.
11579         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11580         to grub_disk_addr_t.
11582         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11583         string.
11585         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11587         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11588         to char *.
11590         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11592         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11594         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11596         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11597         to grub_off_t, to detect an error from grub_file_seek.
11598         (grub_multiboot_load_elf32): Likewise.
11600         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11601         maximum unsigned long value when an overflow is detected.
11602         (grub_strtoull): New function.
11603         (grub_divmod64): Likewise.
11604         (grub_lltoa): use grub_divmod64.
11606         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11607         grub_disk_addr_t.
11608         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11609         the pointer to next character. Use grub_strtoull instead of
11610         grub_strtoul.
11611         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11612         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11613         respectively.
11615         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11616         return value is signed.
11617         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11618         test if OFFSET is less than zero, as OFFSET is unsigned now.
11620         * kern/disk.c (struct grub_disk_cache): Change the type of
11621         "sector" to grub_disk_addr_t.
11622         (grub_disk_cache_get_index): Change the type of SECTOR to
11623         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11624         unsigned after shifting.
11625         (grub_disk_cache_invalidate): Change the type of SECTOR to
11626         grub_disk_addr_t.
11627         (grub_disk_cache_unlock): Likewise.
11628         (grub_disk_cache_store): Likewise.
11629         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11630         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11631         grub_disk_addr_t and grub_uint64_t, respectively.
11632         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11633         body, as the value of OFFSET is tweaked by
11634         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11635         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11636         respectively.
11637         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11638         body, as the value of OFFSET is tweaked by
11639         grub_disk_check_range. Change the types of LEN and N to
11640         grub_size_t.
11642         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11643         and "saved_offset" to grub_off_t.
11644         (test_header): Cast BUF to char *.
11645         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11646         to char *.
11647         (grub_gzio_read): Change the types of OFFSET and SIZE to
11648         grub_off_t and grub_size_t, respectively.
11650         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11651         Removed.
11652         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11653         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11654         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11655         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11656         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11658         * include/grub/types.h (grub_off_t): Unconditionally set to
11659         grub_uint64_t.
11660         (grub_disk_addr_t): Changed to grub_uint64_t.
11662         * include/grub/partition.h (struct grub_partition): Change the
11663         types of "start", "len" and "offset" to grub_disk_addr_t,
11664         grub_uint64_t and grub_disk_addr_t, respectively.
11665         (grub_partition_get_start): Return grub_disk_addr_t.
11666         (grub_partition_get_len): Return grub_uint64_t.
11668         * include/grub/misc.h (grub_strtoull): New prototype.
11669         (grub_divmod64): Likewise.
11671         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11672         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11673         grub_off_t, respectively.
11674         All callers and references changed.
11676         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11677         grub_size_t in "read".
11678         All callers and references changed.
11680         * include/grub/file.h (struct grub_file): Change the types of
11681         "offset" and "size" to grub_off_t and grub_off_t,
11682         respectively. Change the type of SECTOR to grub_disk_addr_t in
11683         "read_hook".
11684         (grub_file_read): Change the type of LEN to grub_size_t.
11685         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11686         grub_off_t.
11687         (grub_file_size): Return grub_off_t.
11688         (grub_file_tell): Likewise.
11689         All callers and references changed.
11691         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11692         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11693         "write".
11694         (struct grub_disk): Change the type of "total_sectors" to
11695         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11696         "read_hook".
11697         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11698         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11699         (grub_disk_write): Likewise.
11700         All callers and references changed.
11702         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11703         char * for grub_strncmp to silence gcc.
11704         (grub_iso9660_mount): Likewise.
11705         (grub_iso9660_mount): Likewise.
11706         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11707         return statement.
11708         (grub_iso9660_iterate_dir): Likewise.
11709         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11711         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11712         LEN to grub_disk_addr_t and grub_size_t, respectively.
11714         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11716         * fs/jfs.c (grub_jfs_read_file): Likewise.
11718         * fs/minix.c (grub_jfs_read_file): Likewise.
11720         * fs/sfs.c (grub_jfs_read_file): Likewise.
11722         * fs/ufs.c (grub_jfs_read_file): Likewise.
11724         * fs/xfs.c (grub_jfs_read_file): Likewise.
11726         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11727         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11728         respectively.
11730         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11731         BLKNR to -1 instead of returning GRUB_ERRNO.
11732         (grub_ext2_read_file): Change the types of SECTOR and
11733         LEN to grub_disk_addr_t and grub_size_t, respectively.
11735         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11736         LEN to grub_disk_addr_t and grub_size_t, respectively.
11738         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11739         grub_file_read.
11741         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11742         string. Do not cast SECTOR explicitly.
11744         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11745         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11746         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11747         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11748         over 2TB and LBA mode is not supported, raise an error.
11749         (get_safe_sectors): New function.
11750         (grub_biosdisk_read): Use get_safe_sectors.
11751         (grub_biosdisk_write): Likewise.
11753         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11754         (grub_efidisk_write): Likewise.
11756         * disk/loopback.c (delete_loopback): Cosmetic changes.
11757         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11758         correctly.
11759         (grub_loopback_open): Likewise.
11760         (grub_loopback_read): Likewise. Also, change the type of POS to
11761         grub_off_t, and fix the usage of grub_memset.
11763         * commands/i386/pc/play.c: Include grub/machine/time.h.
11765         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11766         print FILE->SIZE.
11768         * commands/configfile.c: Include grub/env.h.
11770         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11771         GRUB_ERRNO directly instead. Change the type of POS to
11772         grub_off_t. Follow the coding standard.
11774         * commands/blocklist.c: Include grub/partition.h.
11775         (grub_cmd_blocklist): Return an error if the underlying device is
11776         not a disk. Take the starting sector of a partition into account,
11777         if a partition is used.
11779         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11780         a length field.
11781         (lba_mode): Support 64-bit addresses.
11782         (chs_mode): Likewise.
11783         (copy_buffer): Adapted to the new offsets of a length field and a
11784         segment field.
11785         (blocklist_default_start): Allocate 64-bit space.
11787         * boot/i386/pc/boot.S (force_lba): Removed.
11788         (boot_drive): Moved to under KERNEL_SECTOR.
11789         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11790         space.
11791         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11792         is useless.
11793         (lba_mode): Refactored to support a 64-bit address. More size
11794         optimization.
11795         (setup_sectors): Likewise.
11797 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11799         * DISTLIST: Added include/grub/i386/linux.h. Removed
11800         include/grub/i386/pc/linux.h
11802         * configure.ac (AC_INIT): Bumped to 1.94.
11804         * config.guess: Updated from gnulib.
11805         * config.sub: Likewise.
11806         * install-sh: Likewise.
11807         * mkinstalldirs: Likewise.
11809 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11811         * conf/common.rmk (grub_modules_init.lst): Depended on
11812         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11813         MODSRCFILES.
11815         * genmk.rb (PModule::rule): Reverted the previous change.
11817 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11819         * conf/common.rmk (grub_modules_init.lst): Depends on
11820         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11821         that the target does not exist before producing.
11822         (grub_modules_init.h): Remove the target before generating.
11823         (grub_emu_init.c): Likewise.
11825         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11827 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11829         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11830         for the target-specific tests. Make sure that we also have the
11831         up-to-date target variables for those tests.
11833 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11835         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11836         (PModule::rule): Likewise.
11838 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11840         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11841         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11842         target-specific flags should be prefixed.
11843         (PModule::rule): Likewise.
11845 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11847         * configure.ac (CMP): Check if cmp is available explicitly.
11849 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11851         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11852         (target_cpu): New variable.
11853         (pkglibdir): Use target_cpu instead of host_cpu.
11855         * util/i386/pc/grub-install.in (host_cpu): Removed.
11856         (target_cpu): New variable.
11857         (pkglibdir): Use target_cpu instead of host_cpu.
11859         * util/genmoddep.c: Removed.
11861         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11862         instead of GRUB_HOST_SIZEOF_VOID_P.
11863         * kern/dl.c: Likewise.
11865         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11866         ...
11867         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11868         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11869         (GRUB_TARGET_SIZEOF_LONG): ... this.
11870         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11871         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11872         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11873         to ...
11874         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11875         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11876         (GRUB_TARGET_SIZEOF_LONG): ... this.
11877         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11878         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11879         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11880         to ...
11881         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11882         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11883         (GRUB_TARGET_SIZEOF_LONG): ... this.
11884         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11885         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11887         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11888         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11889         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11890         instead of GRUB_HOST_SIZEOF_LONG.
11891         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11892         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11893         GRUB_CPU_WORDS_BIGENDIAN.
11894         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11895         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11896         grub_host_ssize_t.
11898         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11899         (genmoddep_SOURCES): Likewise.
11900         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11901         (genmoddep_SOURCES): Likewise.
11902         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11903         (genmoddep_SOURCES): Likewise.
11904         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11905         Likewise.
11906         (genmoddep_SOURCES): Likewise.
11908         * genmoddep.awk: New file.
11910         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11911         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11912         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11913         (PModule::rule): Likewise.
11914         (Program::rule): Likewise.
11915         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11916         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11917         respectively.
11919         * configure.ac: Rewritten intensively to use host and target
11920         instead of build and host, respectively.
11922         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11923         (host_cpu): Removed.
11924         (target_cpu): New variable.
11925         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11926         (BUILD_CC): Removed.
11927         (BUILD_CFLAGS): Likewise.
11928         (BUILD_CPPFLAGS): Likewise.
11929         (TARGET_CC): New variable.
11930         (TARGET_CFLAGS): Likewise.
11931         (TARGET_CPPFLAGS): Likewise.
11932         (TARGET_LDFLAGS): Likewise.
11933         (AWK): Likewise.
11934         (include): Use target_cpu instead of host_cpu.
11935         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11937         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11939 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11941         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11942         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11943         field 'false' to 'exec_on_false'.
11944         (grub_script_create_cmdif): Renamed argument names to reflect above
11945         changes.
11947         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11949         * normal/script.c (grub_script_create_cmdif): Likewise.
11951 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11953         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11954         top.
11955         (grub_hfsplus_btree_recptr): Likewise.
11956         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11957         FILEBLOCK both to pass a block number and store next block
11958         number.
11959         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11960         overflow file correctly. Specify errors appropriately, because
11961         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11962         grub_hfsplus_btree_recptr to get the pointer to a found key.
11963         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11964         is found.
11966         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11967         linux.mod.
11968         (_linux_mod_SOURCES): New variable.
11969         (_linux_mod_CFLAGS): Likewise.
11970         (_linux_mod_LDFLAGS): Likewise.
11971         (linux_mod_SOURCES): Likewise.
11972         (linux_mod_CFLAGS): Likewise.
11973         (linux_mod_LDFLAGS): Likewise.
11975         * DISTLIST: Added loader/i386/efi/linux.c,
11976         loader/i386/efi/linux_normal.c and
11977         include/grub/i386/efi/loader.h.
11979         * loader/i386/efi/linux.c: New file.
11980         * loader/i386/efi/linux_normal.c: Likewise.
11981         * include/grub/i386/efi/loader.h: Likewise.
11983 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11985         * commands/blocklist.c: New file.
11987         * DISTLIST: Added commands/blocklist.c.
11989         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11990         color for the background, and a darker color for the foreground.
11991         (grub_console_checkkey): Return READ_KEY.
11992         (grub_console_cls): Set the background to
11993         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11995         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11997         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11998         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12000         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12001         prototype.
12003         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12004         BG. The spec is wrong again.
12006         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12007         prototype.
12008         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12010         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12011         commands/blocklist.c.
12012         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12014         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12015         (blocklist_mod_SOURCES): New variable.
12016         (blocklist_mod_CFLAGS): Likewise.
12017         (blocklist_mod_LDFLAGS): Likewise.
12019 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12021         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12022         duplication.
12023         (lba_mode): Use %eax more intensively to reduce the code size.
12025 2006-05-20  Marco Gerards  <marco@gnu.org>
12027         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12029         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12030         for `menuentry'.
12031         (script): Accept leading newlines.
12032         (newlines): New rule to describe 0 or more newlines.
12033         (commands): Accept `command' with trailing newline.  Fixed the
12034         order in which arguments were passed to `grub_script_add_cmd'.
12035         Accept commands separated by newlines.
12036         (function): Changed to accept newlines.
12037         (menuentry) Rewritten.
12039         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12040         front of the list, instead of to the end.
12042 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12044         * util/i386/pc/grub-install.in (bindir): New variable.
12045         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12046         Shaver <lbgwjl@gmail.com>.
12048 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12050         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12051         grub/machine/linux.h
12052         * loader/i386/pc/linux.c: Likewise.
12054         * include/grub/i386/pc/linux.h: Moved to ...
12055         * include/grub/i386/linux.h: ... here.
12057         * include/grub/i386/linux.h (struct linux_kernel_params): New
12058         struct.
12060 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12062         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12063         checking.
12064         (grub_video_vbe_blit_glyph): Likewise.
12065         (grub_video_vbe_blit_bitmap): Likewise.
12066         (grub_video_vbe_blit_render_target): Likewise.
12068 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12070         * configure.ac (--with-platform): Properly quote the square
12071         brackets.
12073 2006-05-08  Marco Gerards  <marco@gnu.org>
12075         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12076         this...
12077         (kernel_elf_HEADERS): ...to this.  Updated all users.
12078         (grubof_symlist.c): Renamed from this...
12079         (kernel_elf_symlist.c): ...to this.  Updated all users.
12080         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12081         (grubof_SOURCES): Renamed from this...
12082         (kernel_elf_SOURCES): ...to this.
12083         (grubof_HEADERS): Renamed from this...
12084         (kernel_elf_HEADERS): ...to this.
12085         (grubof_CFLAGS): Renamed from this...
12086         (kernel_elf_CFLAGS): ...to this.
12087         (grubof_ASFLAGS): Renamed from this...
12088         (kernel_elf_ASFLAGS): ...to this.
12089         (grubof_LDFLAGS): Renamed from this...
12090         (kernel_elf_LDFLAGS): ...to this.
12092         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12093         this...
12094         (kernel_elf_HEADERS): ...to this.  Updated all users.
12095         (grubof_symlist.c): Renamed from this...
12096         (kernel_elf_symlist.c): ...to this.  Updated all users.
12097         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12098         (grubof_SOURCES): Renamed from this...
12099         (kernel_elf_SOURCES): ...to this.
12100         (grubof_HEADERS): Renamed from this...
12101         (kernel_elf_HEADERS): ...to this.
12102         (grubof_CFLAGS): Renamed from this...
12103         (kernel_elf_CFLAGS): ...to this.
12104         (grubof_ASFLAGS): Renamed from this...
12105         (kernel_elf_ASFLAGS): ...to this.
12106         (grubof_LDFLAGS): Renamed from this...
12107         (kernel_elf_LDFLAGS): ...to this.
12109         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12110         `kernel.elf' instead of `grubof'.
12112 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12114         Add --with-platform to configure. Use pkglibdir instead of
12115         pkgdatadir. This is reported by Roger Leigh.
12117         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12118         (host_vendor): Likewise.
12119         (host_os): Likewise.
12120         (pkgdatadir): Likewise.
12121         (platform): New variable.
12122         (pkglibdir): Likewise.
12123         Use PKGLIBDIR instead of PKGDATADIR.
12125         * util/i386/pc/grub-install.in (datadir): Removed.
12126         (host_vendor): Likewise.
12127         (host_os): Likewise.
12128         (pkgdatadir): Likewise.
12129         (platform): New variable.
12130         (pkglibdir): Likewise.
12131         Use PKGLIBDIR instead of PKGDATADIR.
12133         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12134         instead of GRUB_DATADIR.
12135         (main): Likewise.
12136         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12137         (main): Likewise.
12138         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12139         (main): Likewise.
12141         * configure.ac (--with-platform): New option.
12142         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12144         * Makefile.in: Include a makefile based on PLATFORM instead of
12145         HOST_VENDOR.
12146         (pkgdatadir): Not appended by the machine type.
12147         (pkglibdir): Appended by the machine type.
12148         (host_vendor): Removed.
12149         (platform): New variable.
12150         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12151         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12152         (uninstall): Likewise.
12154 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12156         Use the environment context in the menu. Remove the commands
12157         "default" and "timeout", and use variables instead.
12159         * normal/menu.c: Include grub/env.h.
12160         (print_entry): Cast TITLE to silence gcc.
12161         (get_timeout): New function.
12162         (set_timeout): Likewise.
12163         (get_entry_number): Likewise.
12164         (run_menu): Use a default entry, a fallback entry and a timeout
12165         in the environment variables "default", "fallback" and
12166         "timeout". Also, tweak the default entry if it is not within the
12167         current menu entries.
12168         (grub_menu_run): Use a fallback entry in the environment variable
12169         "fallback".
12171         * normal/main.c (read_config_file): Do not initialize
12172         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12173         NEWMENU->TIMEOUT.
12174         (grub_normal_execute): Use a data slot to store the menu.
12176         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12177         fallback_entry and timeout.
12178         (struct grub_menu_list): Removed.
12179         (grub_menu_list_t): Likewise.
12180         (struct grub_context): Likewise.
12181         (grub_context_t): Likewise.
12182         (grub_context_get): Likewise.
12183         (grub_context_get_current_menu): Likewise.
12184         (grub_context_push_menu): Likewise.
12185         (grub_context_pop_menu): Likewise.
12186         (grub_default_init): Likewise.
12187         (grub_default_fini): Likewise.
12188         (grub_timeout_init): Likewise.
12189         (grub_timeout_fini): Likewise.
12191         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12192         and timeout.mod.
12193         (normal_mod_SOURCES): Removed normal/context.c.
12195         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12196         commands/default.c, commands/timeout.c and normal/context.c.
12197         (normal_mod_SOURCES): Removed normal/context.c.
12199         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12200         commands/timeout.c and normal/context.c.
12201         (normal_mod_SOURCES): Removed normal/context.c.
12203         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12204         commands/default.c, commands/timeout.c and normal/context.c.
12205         (normal_mod_SOURCES): Removed normal/context.c.
12207         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12208         timeout.mod.
12209         (default_mod_SOURCES): Removed.
12210         (default_mod_CFLAGS): Likewise.
12211         (default_mod_LDFLAGS): Likewise.
12212         (timeout_mod_SOURCES): Removed.
12213         (timeout_mod_CFLAGS): Likewise.
12214         (timeout_mod_LDFLAGS): Likewise.
12216         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12217         normal/context.c.
12219         * commands/default.c: Removed.
12220         * commands/timeout.c: Likewise.
12221         * normal/context.c: Likewise.
12223 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12225         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12227 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12229         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12230         "next" to "prev" for readability.
12231         (struct grub_env_sorted_var): New struct.
12232         (grub_env_context): Renamed to ...
12233         (initial_context): ... this.
12234         (grub_env_var_context): Renamed to ...
12235         (current_context): ... this.
12236         (grub_env_find): Look only at CURRENT_CONTEXT.
12237         (grub_env_context_open): Rewritten to copy exported variables from
12238         previous context.
12239         (grub_env_context_close): Rewritten according to the new
12240         scheme. Also, add an assertion to prevent the initial context from
12241         removed.
12242         (grub_env_insert): Removed the code for the sorted list.
12243         (grub_env_remove): Likewise.
12244         (grub_env_export): Simply mark the variable with
12245         GRUB_ENV_VAR_GLOBAL.
12246         (grub_env_set): A cosmetic change for naming consistency.
12247         (grub_env_get): Likewise.
12248         (grub_env_unset): Likewise.
12249         (grub_env_iterate): Rewritten to sort variables within this
12250         function.
12251         (grub_register_variable_hook): Fixed for naming consistency. Call
12252         grub_env_find again, only if NAME is not found at the first time.
12253         (mangle_data_slot_name): New function.
12254         (grub_env_set_data_slot): Likewise.
12255         (grub_env_get_data_slot): Likewise.
12256         (grub_env_unset_data_slot): Likewise.
12258         * include/grub/env.h (grub_env_var_type): New enum.
12259         (GRUB_ENV_VAR_LOCAL): New constant.
12260         (GRUB_ENV_VAR_GLOBAL): Likewise.
12261         (GRUB_ENV_VAR_DATA): Likewise.
12262         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12263         "type".
12264         (grub_env_set): Replace VAR with NAME for consistency.
12265         (grub_register_variable_hook): Likewise.
12266         (grub_env_export): Specify the name of the argument.
12267         (grub_env_set_data_slot): New prototype.
12268         (grub_env_get_data_slot): Likewise.
12269         (grub_env_unset_data_slot): Likewise.
12271 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12273         Extend the loader so that GRUB can accept a loader which comes
12274         back to GRUB when a loaded image exits. Also, this change adds
12275         support for a chainloader on EFI.
12277         * term/efi/console.c: Include grub/misc.h.
12278         (grub_console_checkkey): Display a scan code on the top for
12279         debugging. This will be removed once the EFI port gets stable.
12280         Correct the scan code mapping.
12282         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12283         allocate memory from larger regions, in order to reduce the number
12284         of allocated regions. Otherwise, the MacOSX loader panics.
12285         (filter_memory_map): Avoid less than 1MB for compatibility with
12286         other loaders.
12287         (add_memory_regions): Allocate from the tail of a region, if
12288         possible, to avoid allocating a region near to 1MB, for the MacOSX
12289         loader.
12291         * kern/efi/init.c (grub_efi_set_prefix): Specify
12292         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12294         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12295         argument IMAGE_HANDLE and specify it to get a loaded image.
12296         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12297         grub_efi_get_loaded_image.
12298         (grub_efi_get_filename): Divide the length by the size of
12299         grub_efi_char16_t.
12300         (grub_efi_get_device_path): New function.
12301         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12302         the length by the size of grub_efi_char16_t for a file path device
12303         path node.
12305         * kern/loader.c (grub_loader_noreturn): New variable.
12306         (grub_loader_set): Accept a new argument NORETURN. Set
12307         GRUB_LOADER_NORETURN to NORETURN.
12308         All callers changed.
12309         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12310         grub_machine_fini.
12312         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12313         prototype.
12314         (grub_efi_get_loaded_image): Take an argument to specify an image
12315         handle.
12317         * include/grub/loader.h (grub_loader_set): Added one more argument
12318         NORETURN.
12320         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12321         instead of grub_efi_open_protocol.
12322         (grub_efidisk_get_device_name): Likewise.
12323         (grub_efidisk_close): Print a newline.
12324         (grub_efidisk_get_device_handle): Fixed to use
12325         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12326         GRUB_EFI_DEVICE_PATH_TYPE.
12328         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12329         * kern/efi/efi.c (device_path_guid): ... here.
12331         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12332         chain.mod.
12333         (kernel_mod_HEADERS): Added efi/disk.h.
12334         (_chain_mod_SOURCES): New variable.
12335         (_chain_mod_CFLAGS): Likewise.
12336         (_chain_mod_LDFLAGS): Likewise.
12337         (chain_mod_SOURCES): Likewise.
12338         (chain_mod_CFLAGS): Likewise.
12339         (chain_mod_LDFLAGS): Likewise.
12341         * DISTLIST: Added include/grub/efi/chainloader.h,
12342         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12344         * include/grub/efi/chainloader.h: New file.
12345         * loader/efi/chainloader.c: Likewise.
12346         * loader/efi/chainloader_normal.c: Likewise.
12348 2006-04-30  Marco Gerards  <marco@gnu.org>
12350         * commands/configfile.c (grub_cmd_source): New function.
12351         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12352         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12354 2006-04-30  Marco Gerards  <marco@gnu.org>
12356         * normal/execute.c (grub_script_execute_cmd): Change the return
12357         type to `grub_err_t'.  Correctly return the error.
12358         (grub_script_execute_cmdline): In case a command line is not a
12359         command or a function, try to interpret it as an assignment.
12361 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12363         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12364         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12365         skip a node whose name is obviously invalid as UTF-16,
12366         i.e. contains a NUL character. Stop the iteration when the last
12367         directory entry is found. Instead of using the return value of
12368         grub_hfsplus_btree_iterate_node, store the value in RET and use
12369         it, because the iterator can be stopped by the last directory
12370         entry.
12372 2006-04-30  Marco Gerards  <marco@gnu.org>
12374         * include/grub/env.h (grub_env_export): New prototype.  Reported
12375         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12377 2006-04-30  Marco Gerards  <marco@gnu.org>
12379         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12380         size of the extents in a catalog file record.
12382 2006-04-29  Marco Gerards  <marco@gnu.org>
12384         * commands/configfile.c (grub_cmd_configfile): Execute the
12385         configfile within its own context.
12387         * include/grub/env.h (grub_env_context_open): New prototype.
12388         (grub_env_context_close): Likewise.
12390         * kern/env.c (grub_env): Removed.
12391         (grub_env_sorted): Likewise.
12392         (grub_env_context): New variable.
12393         (grub_env_var_context): Likewise.
12394         (grub_env_find): Search both the active context and the global
12395         context.
12396         (grub_env_context_open): New function.
12397         (grub_env_context_close): Likewise.
12398         (grub_env_insert): Likewise.
12399         (grub_env_remove): Likewise.
12400         (grub_env_export): Likewise.
12401         (grub_env_set): Changed to use helper functions to avoid code
12402         duplication.
12403         (grub_env_iterate): Rewritten so both the current context and the
12404         global context are being used.
12406         * normal/command.c (export_command): New function.
12407         (grub_command_init): Register the `export' function.
12409 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12411         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12412         explicitly to suppress gcc's warnings.
12413         * fs/fat.c (grub_fat_find_dir): Likewise.
12414         (grub_fat_label): Likewise.
12415         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12416         (grub_xfs_mount): Likewise.
12417         (grub_xfs_label): Likewise.
12418         * fs/affs.c (grub_affs_mount): Likewise.
12419         (grub_affs_label): Likewise.
12420         (grub_affs_iterate_dir): Likewise.
12421         * fs/sfs.c (grub_sfs_mount): Likewise.
12422         (grub_sfs_iterate_dir): Likewise.
12423         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12424         * fs/hfs.c (grub_hfs_mount): Likewise.
12425         (grub_hfs_cmp_catkeys): Likewise.
12426         (grub_hfs_find_dir): Likewise.
12427         (grub_hfs_dir): Likewise.
12428         (grub_hfs_label): Likewise.
12429         * fs/jfs.c (grub_jfs_mount): Likewise.
12430         (grub_jfs_opendir): Likewise.
12431         (grub_jfs_getent): Likewise.
12432         (grub_jfs_lookup_symlink): Likewise.
12433         (grub_jfs_label): Likewise.
12434         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12435         (grub_hfsplus_iterate_dir): Likewise.
12436         (grub_hfsplus_btree_iterate_node): Made static.
12438         * util/grub-emu.c (prefix): New variable.
12439         (grub_machine_set_prefix): New function.
12440         (main): Do not set the environment variable "prefix" here. Only
12441         set PREFIX, which is used later by grub_machine_set_prefix.
12443         * include/grub/video.h: Do not include grub/symbol.h.
12444         (grub_video_register): Not exported. This symbol is not defined in
12445         the kernel.
12446         (grub_video_unregister): Likewise.
12447         (grub_video_iterate): Likewise.
12448         (grub_video_setup): Likewise.
12449         (grub_video_restore): Likewise.
12450         (grub_video_get_info): Likewise.
12451         (grub_video_get_blit_format): Likewise.
12452         (grub_video_set_palette): Likewise.
12453         (grub_video_get_palette): Likewise.
12454         (grub_video_set_viewport): Likewise.
12455         (grub_video_get_viewport): Likewise.
12456         (grub_video_map_color): Likewise.
12457         (grub_video_map_rgb): Likewise.
12458         (grub_video_map_rgba): Likewise.
12459         (grub_video_fill_rect): Likewise.
12460         (grub_video_blit_glyph): Likewise.
12461         (grub_video_blit_bitmap): Likewise.
12462         (grub_video_blit_render_target): Likewise.
12463         (grub_video_scroll): Likewise.
12464         (grub_video_swap_buffers): Likewise.
12465         (grub_video_create_render_target): Likewise.
12466         (grub_video_delete_render_target): Likewise.
12467         (grub_video_set_active_render_target): Likewise.
12469         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12470         Undefined.
12471         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12473         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12474         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12475         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12476         instead of $(srcdir)/genkernsyms.sh.
12478         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12479         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12480         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12481         instead of $(srcdir)/genkernsyms.sh.
12483         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12484         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12485         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12486         instead of $(srcdir)/genkernsyms.sh.
12488         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12489         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12490         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12491         instead of $(srcdir)/genkernsyms.sh.
12493         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12494         genkernsyms.sh.
12496         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12497         genkernsyms.sh.
12498         (gensymlist.sh): New target.
12499         (genkernsyms.sh): Likewise.
12501         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12502         genkernsyms.sh.in and gensymlist.sh.in.
12504         * genkernsyms.sh: Removed.
12505         * gensymlist.sh: Likewise.
12507         * genkernsyms.sh.in: New file.
12508         * gensymlist.sh.in: Likewise.
12510 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12512         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12513         clobber "prefix", since we may have already set it manually.
12515 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12517         * kern/misc.c (abort): New alias for grub_abort.
12519 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12521         A new machine-specific function "grub_machine_set_prefix" is
12522         defined. This is called after loading modules, so that a prefix
12523         initialization can use modules. Also, this change adds an
12524         intensive debugging feature for the memory manager via the
12525         configure option "--enable-mm-debug".
12527         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12528         PART.LEN.
12530         * kern/sparc64/ieee1275/init.c (abort): Removed.
12531         (grub_stop): Likewise.
12532         (grub_exit): New function.
12533         (grub_set_prefix): Renamed to ...
12534         (grub_machine_set_prefix): ... this.
12535         (grub_machine_init): Do not call grub_set_prefix.
12537         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12538         (grub_machine_set_prefix): ... this.
12539         (grub_machine_init): Do not call grub_set_prefix.
12541         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12542         (grub_machine_init): Do not set the prefix here.
12544         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12546         * kern/efi/init.c: Include grub/mm.h.
12547         (grub_efi_set_prefix): New function.
12549         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12550         (grub_efi_get_filename): New function.
12551         (grub_print_device_path): Renamed to ...
12552         (grub_efi_print_device_path): ... this.
12554         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12555         [MM_DEBUG] (grub_realloc): Likewise.
12556         [MM_DEBUG] (grub_free): Likewise.
12557         [MM_DEBUG] (grub_memalign): Likewise.
12558         [MM_DEBUG] (grub_mm_debug): New variable.
12559         [MM_DEBUG] (grub_debug_malloc): New function.
12560         [MM_DEBUG] (grub_debug_free): New function.
12561         [MM_DEBUG] (grub_debug_realloc): New function.
12562         [MM_DEBUG] (grub_debug_memalign): New function.
12564         * kern/misc.c (grub_abort): Print a newline to distinguish
12565         the message.
12567         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12568         grub_set_root_dev after loading modules. This is necessary when
12569         setting a prefix depends on modules.
12571         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12572         (grub_efi_print_device_path): ... this.
12573         (grub_efi_get_filename): New prototype.
12574         (grub_efi_set_prefix): Likewise.
12576         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12577         and grub/disk.h.
12578         (grub_efidisk_get_device_handle): New prototype.
12579         (grub_efidisk_get_device_name): Likewise.
12581         * include/grub/mm.h: Include config.h.
12582         (MM_DEBUG): Removed.
12583         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12584         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12585         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12586         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12587         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12588         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12589         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12590         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12591         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12593         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12595         * disk/efi/efidisk.c: Include grub/partition.h.
12596         (iterate_child_devices): New function.
12597         (add_device): First, compare only last device path nodes, so that
12598         devices are sorted by the types.
12599         (grub_efidisk_get_device_handle): New function.
12600         (grub_efidisk_get_device_name): Likewise.
12602         * configure.ac (--enable-mm-debug): New option to enable the
12603         memory manager debugging feature. This makes the binary much
12604         bigger, so is disabled by default.
12606 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12608         Use grub_abort instead of grub_stop, and grub_exit must be
12609         define in each architecture now. Also, this change adds support
12610         for EFI disks.
12612         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12613         (grub_getkey): New function.
12614         (grub_term_get_current): Likewise.
12616         * util/i386/pc/grub-setup.c: Include grub/term.h.
12617         (grub_getkey): New function.
12618         (grub_term_get_current): Likewise.
12620         * util/misc.c (grub_stop): Renamed to ...
12621         (grub_exit): ... this.
12623         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12624         (grub_exit): ... this.
12625         (grub_machine_init): Use grub_abort instead of abort.
12626         (grub_stop): Removed.
12628         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12629         abort.
12631         * kern/i386/pc/startup.S (grub_exit): New function.
12632         (cold_reboot): New label.
12634         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12635         (grub_efi_init): Call grub_efidisk_init.
12636         (grub_efi_fini): Call grub_efidisk_fini.
12638         * kern/efi/efi.c: Include grub/mm.h.
12639         (grub_efi_console_control_guid): Renamed to ...
12640         (console_control_guid): ... this.
12641         (grub_efi_loaded_image_guid): Renamed to ...
12642         (loaded_image_guid): ... this.
12643         (grub_efi_locate_handle): New function.
12644         (grub_efi_open_protocol): Likewise.
12645         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12646         GRUB_EFI_CONSOLE_CONTROL_GUID.
12647         (grub_efi_exit): Removed.
12648         (grub_stop): Likewise.
12649         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12650         (grub_exit): New function.
12651         (grub_print_device_path): Likewise.
12653         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12654         (grub_enter_rescue_mode): Register "exit".
12656         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12657         (grub_abort): New function.
12659         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12661         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12663         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12665         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12666         (grub_print_device_path): New prototype.
12667         (grub_efi_locate_handle): Likewise.
12668         (grub_efi_open_protocol): Likewise.
12670         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12671         * disk/efi/efidisk.c: Likewise.
12673         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12675         * include/grub/efi/console_control.h
12676         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12678         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12679         last 8 bytes as an array.
12680         (GRUB_EFI_DISK_IO_GUID): New macro.
12681         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12682         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12683         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12684         grub_uint8_t.
12685         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12686         (struct grub_efi_device_path): Rename the member "sub_type" to
12687         "subtype".
12688         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12689         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12690         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12691         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12692         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12693         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12694         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12695         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12696         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12697         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12698         (struct grub_efi_pci_device_path): New structure.
12699         (grub_efi_pci_device_path_t): New type.
12700         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12701         (struct grub_efi_pccard_device_path): New structure.
12702         (grub_efi_pccard_device_path_t): New type.
12703         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12704         (struct grub_efi_memory_mapped_device_path): New structure.
12705         (grub_efi_memory_mapped_device_path_t): New type.
12706         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12707         (struct grub_efi_vendor_device_path): New structure.
12708         (grub_efi_vendor_device_path_t): New type.
12709         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12710         (struct grub_efi_controller_device_path): New structure.
12711         (grub_efi_controller_device_path_t): New type.
12712         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12713         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12714         (struct grub_efi_acpi_device_path): New structure.
12715         (grub_efi_acpi_device_path_t): New type.
12716         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12717         (struct grub_efi_expanded_acpi_device_path): New structure.
12718         (grub_efi_expanded_acpi_device_path_t): New type.
12719         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12720         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12721         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12722         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12723         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12724         (struct grub_efi_atapi_device_path): New structure.
12725         (grub_efi_atapi_device_path_t): New type.
12726         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12727         (struct grub_efi_fibre_channel_device_path): New structure.
12728         (grub_efi_fibre_channel_device_path_t): New type.
12729         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12730         (struct grub_efi_1394_device_path): New structure.
12731         (grub_efi_1394_device_path_t): New type.
12732         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12733         (struct grub_efi_usb_device_path): New structure.
12734         (grub_efi_usb_device_path_t): New type.
12735         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12736         (struct grub_efi_usb_class_device_path): New structure.
12737         (grub_efi_usb_class_device_path_t): New type.
12738         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12739         (struct grub_efi_i2o_device_path): New structure.
12740         (grub_efi_i2o_device_path_t): New type.
12741         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12742         (struct grub_efi_mac_address_device_path): New structure.
12743         (grub_efi_mac_address_device_path_t): New type.
12744         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12745         (struct grub_efi_ipv4_device_path): New structure.
12746         (grub_efi_ipv4_device_path_t): New type.
12747         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12748         (struct grub_efi_ipv6_device_path): New structure.
12749         (grub_efi_ipv6_device_path_t): New type.
12750         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12751         (struct grub_efi_infiniband_device_path): New structure.
12752         (grub_efi_infiniband_device_path_t): New type.
12753         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12754         (struct grub_efi_uart_device_path): New structure.
12755         (grub_efi_uart_device_path_t): New type.
12756         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12757         (struct grub_efi_vendor_messaging_device_path): New structure.
12758         (grub_efi_vendor_messaging_device_path_t): New type.
12759         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12760         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12761         (struct grub_efi_hard_drive_device_path): New structure.
12762         (grub_efi_hard_drive_device_path_t): New type.
12763         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12764         (struct grub_efi_cdrom_device_path): New structure.
12765         (grub_efi_cdrom_device_path_t): New type.
12766         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12767         (struct grub_efi_vendor_media_device_path): New structure.
12768         (grub_efi_vendor_media_device_path_t): New type.
12769         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12770         (struct grub_efi_file_path_device_path): New structure.
12771         (grub_efi_file_path_device_path_t): New type.
12772         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12773         (struct grub_efi_protocol_device_path): New structure.
12774         (grub_efi_protocol_device_path_t): New type.
12775         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12776         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12777         (struct grub_efi_bios_device_path): New structure.
12778         (grub_efi_bios_device_path_t): New type.
12779         (struct grub_efi_disk_io): New structure.
12780         (grub_efi_disk_io_t): New type.
12781         (struct grub_efi_block_io_media): New structure.
12782         (grub_efi_block_io_media_t): New type.
12783         (struct grub_efi_block_io): New structure.
12784         (grub_efi_block_io_t): New type.
12786         * include/grub/misc.h (grub_stop): Removed.
12787         (grub_exit): New prototype.
12788         (grub_abort): Likewise.
12790         * include/grub/disk.h (enum grub_disk_dev_id): Added
12791         GRUB_DISK_DEVICE_EFIDISK_ID.
12793         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12794         disk/efi/efidisk.c.
12795         (kernel_syms.lst): Remove the target if an error occurs.
12797 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12799         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12800         as it was simply too buggy.
12802 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12804         * kern/misc.c (grub_lltoa): New function.
12805         (grub_vsprintf): Added support for the long long suffix,
12806         i.e. "ll".
12808 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12810         * Makefile.in (LDFLAGS): Add variable.
12811         (LD): Remove variable.
12812         * configure.ac: Add -m32 to LDFLAGS.
12813         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12814         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12815         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12816         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12817         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12818         variables.
12819         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12820         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12821         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12823 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12825         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12826         length for unknown glyph.
12828 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12830         Add support for pre-loaded modules into the EFI port.
12832         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12833         completely. Accept one more argument DIR. The caller has changed.
12835         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12837         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12838         (grub_efi_loaded_image_guid): New variable.
12839         (grub_efi_get_loaded_image): New function.
12840         (grub_arch_modules_addr): Likewise.
12842         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12843         prototype.
12845         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12846         (struct grub_efi_loaded_image): New structure.
12847         (grub_efi_loaded_image_t): New type.
12849 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12851         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12852         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12853         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12855 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12857         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12859 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12861         * DISTLIST: Added include/grub/efi/console.h,
12862         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12863         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12865         * include/grub/efi/console.h: New file.
12866         * include/grub/efi/time.h: Likewise.
12867         * include/grub/i386/efi/kernel.h: Likewise.
12868         * kern/efi/init.c: Likewise.
12869         * kern/efi/mm.c: Likewise.
12870         * term/efi/console.c: Likewise.
12872         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12873         (grub_stop): Removed.
12874         (grub_get_rtc): Likewise.
12875         (grub_machine_init): Simply call grub_efi_init.
12876         (grub_machine_fini): Call grub_efi_fini.
12878         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12879         (grub_efi_output_string): Removed.
12880         (grub_efi_stall): New function.
12881         (grub_stop): Likewise.
12882         (grub_get_rtc): Likewise.
12884         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12885         (grub_efi_stall): New prototype.
12886         (grub_efi_allocate_pages): Likewise.
12887         (grub_efi_free_pages): Likewise.
12888         (grub_efi_get_memory_map): Likewise.
12889         (grub_efi_mm_init): Likewise.
12890         (grub_efi_mm_fini): Likewise.
12891         (grub_efi_init): Likewise.
12892         (grub_efi_fini): Likewise.
12894         * include/grub/i386/efi/time.h: Do not include
12895         grub/symbol.h. Include grub/efi/time.h.
12896         (GRUB_TICKS_PER_SECOND): Removed.
12897         (grub_get_rtc): Likewise.
12899         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12900         Added padding. The EFI spec is buggy.
12901         (GRUB_EFI_BLACK): New macro.
12902         (GRUB_EFI_BLUE): Likewise.
12903         (GRUB_EFI_GREEN): Likewise.
12904         (GRUB_EFI_CYAN): Likewise.
12905         (GRUB_EFI_RED): Likewise.
12906         (GRUB_EFI_MAGENTA): Likewise.
12907         (GRUB_EFI_BROWN): Likewise.
12908         (GRUB_EFI_LIGHTGRAY): Likewise.
12909         (GRUB_EFI_BRIGHT): Likewise.
12910         (GRUB_EFI_DARKGRAY): Likewise.
12911         (GRUB_EFI_LIGHTBLUE): Likewise.
12912         (GRUB_EFI_LIGHTGREEN): Likewise.
12913         (GRUB_EFI_LIGHTCYAN): Likewise.
12914         (GRUB_EFI_LIGHTRED): Likewise.
12915         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12916         (GRUB_EFI_YELLOW): Likewise.
12917         (GRUB_EFI_WHITE): Likewise.
12918         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12919         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12920         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12921         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12922         (GRUB_EFI_BACKGROUND_RED): Likewise.
12923         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12924         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12925         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12926         (GRUB_EFI_TEXT_ATTR): Likewise.
12928         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12929         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12930         (kernel_mod_HEADERS): Added efi/time.h.
12932 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12934         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12935         include/grub/efi/api.h, include/grub/efi/console_control.h,
12936         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12937         include/grub/i386/efi/time.h, kern/efi/efi.c,
12938         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12939         and util/i386/efi/grub-mkimage.c.
12941         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12943         * genmk.rb (PModule#rule): Do not export symbols if
12944         #{prefix}_EXPORTS is set to "no".
12946         * conf/i386-efi.mk: New file.
12947         * conf/i386-efi.rmk: Likewise.
12948         * include/grub/efi/api.h: Likewise.
12949         * include/grub/efi/console_control.h: Likewise.
12950         * include/grub/efi/efi.h: Likewise.
12951         * include/grub/efi/pe32.h: Likewise.
12952         * include/grub/i386/efi/time.h: Likewise.
12953         * kern/efi/efi.c: Likewise.
12954         * kern/i386/efi/init.c: Likewise.
12955         * kern/i386/efi/startup.S: Likewise.
12956         * util/i386/efi/grub-mkimage.c: Likewise.
12958 2006-04-17  Marco Gerards  <marco@gnu.org>
12960         * include/grub/script.h: Include <grub/parser.h> and
12961         "grub_script.tab.h".
12962         (struct grub_lexer_param): New struct.
12963         (struct grub_parser_param): Likewise.
12964         (grub_script_create_arglist): Pass the state in an argument.
12965         (grub_script_add_arglist): Likewise.
12966         (grub_script_create_cmdline): Likewise.
12967         (grub_script_create_cmdblock): Likewise.
12968         (grub_script_create_cmdif): Likewise.
12969         (grub_script_create_cmdmenu): Likewise.
12970         (grub_script_add_cmd): Likewise.
12971         (grub_script_arg_add): Likewise.
12972         (grub_script_lexer_ref): Likewise.
12973         (grub_script_lexer_deref): Likewise.
12974         (grub_script_lexer_record_start): Likewise.
12975         (grub_script_lexer_record_stop): Likewise.
12976         (grub_script_mem_record): Likewise.
12977         (grub_script_mem_record_stop): Likewise.
12978         (grub_script_malloc): Likewise.
12979         (grub_script_yylex): Likewise.
12980         (grub_script_yyparse): Likewise.
12981         (grub_script_yyerror): Likewise.
12982         (grub_script_yylex): Likewise.
12983         (grub_script_lexer_init): Return the state.
12985         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12986         (grub_script_lexer_done): Likewise.
12987         (grub_script_lexer_getline): Likewise.
12988         (grub_script_lexer_refs): Likewise.
12989         (script): Likewise.
12990         (newscript): Likewise.
12991         (record): Likewise.
12992         (recording): Likewise.
12993         (recordpos): Likewise.
12994         (recordlen): Likewise.
12995         (grub_script_lexer_init): Return the state instead of setting
12996         global variables.
12997         (grub_script_lexer_ref): Use the newly added argument for state
12998         instead of globals.
12999         (grub_script_lexer_deref): Likewise.
13000         (grub_script_lexer_record_start): Likewise.
13001         (grub_script_lexer_record_stop): Likewise.
13002         (recordchar): Likewise.
13003         (nextchar): Likewise.
13004         (grub_script_yylex2): Likewise.
13005         (grub_script_yylex): Likewise.
13006         (grub_script_yyerror): Likewise.
13008         * normal/parser.y (func_mem): Removed variable.
13009         (menu_entry): Likewise.
13010         (err): Likewise.
13011         (%lex-param): New parser option.
13012         (%parse-param): Likewise.
13013         (script): Always return the AST.
13014         (argument): Pass the state around.
13015         (arguments): Likewise.
13016         (grubcmd): Likewise.
13017         (commands): Likewise.
13018         (function): Likewise.
13019         (menuentry): Likewise.
13020         (if_statement): Likewise.
13021         (if): Likewise.
13023         * normal/script.c (grub_script_memused): Removed variable.
13024         (grub_script_parsed): Likewise.
13025         (grub_script_malloc): Added a state argument.  Use that instead of
13026         global variables.
13027         (grub_script_mem_record): Likewise.
13028         (grub_script_mem_record_stop): Likewise.
13029         (grub_script_arg_add): Likewise.
13030         (grub_script_add_arglist): Likewise.
13031         (grub_script_create_cmdline): Likewise.
13032         (grub_script_create_cmdif): Likewise.
13033         (grub_script_create_cmdmenu): Likewise.
13034         (grub_script_add_cmd): Likewise.
13035         (grub_script_parse): Setup the state before calling the parser.
13037 2006-04-16  Marco Gerards  <marco@gnu.org>
13039         * normal/command.c (grub_command_init): Remove the title command.
13041         * normal/lexer.c (grub_script_yylex): Renamed from this...
13042         (grub_script_yylex2): ... to this.
13043         (grub_script_yylex): New function.  Temporary
13044         introduced to filter some tokens.
13045         (grub_script_yyerror): Print a newline.
13047         * normal/main.c (read_config_file): Output information about the
13048         lines that contain errors.  Wait for a key after all lines have
13049         been processed.  Don't return an empty menu.
13051         * normal/parser.y (func_mem): Don't initialize.
13052         (menu_entry): Likewise.
13053         (err): New variable.
13054         (script): Don't return anything when an error was encountered.
13055         (ws, returns): Removed rules.
13056         (argument): Disabled concatenated variable support.
13057         (arguments): Remove explicit separators.
13058         (grubcmd): Likewise.
13059         (function): Likewise.
13060         (menuentry): Likewise.
13061         (if): Likewise.
13062         (commands): Likewise.  Add error handling.
13064         * normal/script.c (grub_script_create_cmdline): If
13065         `grub_script_parsed' is 0, assume the parser encountered an error.
13067 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13069         * configure.ac: Add support for EFI. Fix the typo
13070         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13072 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13074         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13075         foreign multibyte characters should be shown correctly.
13077 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13079         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13080         calculation.
13081         (read_config_file): Made it to close file before returning.
13083 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13085         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13086         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13087         video/i386/pc/vbefill.c.
13089         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13090         video/i386/pc/vbefill.c.
13092         * include/grub/video.h (grub_video_blit_format): New enum.
13093         (grub_video_mode_info): Added new member blit_format.
13094         (grub_video_get_blit_format): New function prototype.
13096         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13097         function prototype.
13098         (grub_video_vbe_map_rgb): Likewise.
13099         (grub_video_vbe_unmap_color): Likewise.
13101         * include/grub/i386/pc/vbeblit.h: New file.
13103         * include/grub/i386/pc/vbefill.h: New file.
13105         * video/video.c (grub_video_get_blit_format): New function.
13106         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13107         (grub_video_vbe_map_rgb): Likewise.
13108         (grub_video_vbe_unmap_color): Likewise.
13110         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13111         optimized fills.
13112         (grub_video_vbe_blit_render_target): Changed to use more optimized
13113         blits.
13114         (grub_video_vbe_setup): Added detection for optimized settings.
13115         (grub_video_vbe_create_render_target): Likewise.
13117         * video/i386/pc/vbeblit.c: New file.
13119         * video/i386/pc/vbefill.c: New file.
13121 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13123         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13124         here...
13126         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13127         parsing to support both hex and dec ranges.  If filename was missing
13128         show usage information.
13130 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13132         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13133         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13135         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13136         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13137         (video_mod_SOURCES): Added.
13138         (video_mod_CFLAGS): Likewise.
13139         (video_mod_LDFLAGS): Likewise.
13140         (gfxterm_mod_SOURCES): Likewise.
13141         (gfxterm_mod_CFLAGS): Likewise.
13142         (gfxterm_mod_LDFLAGS): Likewise.
13143         (videotest_mod_SOURCES): Likewise.
13144         (videotest_mod_CFLAGS): Likewise.
13145         (videotest_mod_LDFLAGS): Likewise.
13146         (vesafb_mod_SOURCES): Removed.
13147         (vesafb_mod_CFLAGS): Likewise.
13148         (vesafb_mod_LDFLAGS): Likewise.
13149         (vga_mod_SOURCES): Likewise.
13150         (vga_mod_CFLAGS): Likewise.
13151         (vga_mod_LDFLAGS): Likewise.
13153         * commands/videotest.c: New file.
13155         * font/manager.c (fill_with_default_glyph): Modified to use
13156         grub_font_glyph.
13157         (grub_font_get_glyph): Likewise.
13158         (fontmanager): Renamed from this...
13159         (font_manager): ... to this.
13161         * include/grub/font.h (grub_font_glyph): Added new structure.
13162         (grub_font_get_glyph): Modified to use grub_font_glyph.
13164         * include/grub/misc.h (grub_abs): Added as inline function.
13166         * include/grub/video.h: New file.
13168         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13169         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13170         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13171         (grub_vbe_get_controller_info): Renamed from this...
13172         (grub_vbe_bios_get_controller_info): ... to this.
13173         (grub_vbe_get_mode_info): Renamed from this...
13174         (grub_vbe_bios_get_mode_info): ... to this.
13175         (grub_vbe_set_mode): Renamed from this...
13176         (grub_vbe_bios_set_mode): ... to this.
13177         (grub_vbe_get_mode): Renamed from this...
13178         (grub_vbe_bios_get_mode): ... to this.
13179         (grub_vbe_set_memory_window): Renamed from this...
13180         (grub_vbe_bios_set_memory_window): ... to this.
13181         (grub_vbe_get_memory_window): Renamed from this...
13182         (grub_vbe_bios_get_memory_window): ... to this.
13183         (grub_vbe_set_scanline_length): Renamed from this...
13184         (grub_vbe_set_scanline_length): ... to this.
13185         (grub_vbe_get_scanline_length): Renamed from this...
13186         (grub_vbe_bios_get_scanline_length): ... to this.
13187         (grub_vbe_set_display_start): Renamed from this...
13188         (grub_vbe_bios_set_display_start): ... to this.
13189         (grub_vbe_get_display_start): Renamed from this...
13190         (grub_vbe_bios_get_display_start): ... to this.
13191         (grub_vbe_set_palette_data): Renamed from this...
13192         (grub_vbe_bios_set_palette_data): ... to this.
13193         (grub_vbe_set_pixel_rgb): Removed.
13194         (grub_vbe_set_pixel_index): Likewise.
13196         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13197         from this...
13198         (grub_vbe_bios_get_controller_info): ... to this.
13199         (grub_vbe_get_mode_info): Renamed from this...
13200         (grub_vbe_bios_get_mode_info): ... to this.
13201         (grub_vbe_set_mode): Renamed from this...
13202         (grub_vbe_bios_set_mode): ... to this.
13203         (grub_vbe_get_mode): Renamed from this...
13204         (grub_vbe_bios_get_mode): ... to this.
13205         (grub_vbe_set_memory_window): Renamed from this...
13206         (grub_vbe_bios_set_memory_window): ... to this.
13207         (grub_vbe_get_memory_window): Renamed from this...
13208         (grub_vbe_bios_get_memory_window): ... to this.
13209         (grub_vbe_set_scanline_length): Renamed from this...
13210         (grub_vbe_set_scanline_length): ... to this.
13211         (grub_vbe_get_scanline_length): Renamed from this...
13212         (grub_vbe_bios_get_scanline_length): ... to this.
13213         (grub_vbe_set_display_start): Renamed from this...
13214         (grub_vbe_bios_set_display_start): ... to this.
13215         (grub_vbe_get_display_start): Renamed from this...
13216         (grub_vbe_bios_get_display_start): ... to this.
13217         (grub_vbe_set_palette_data): Renamed from this...
13218         (grub_vbe_bios_set_palette_data): ... to this.
13219         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13220         getting corrupted after calling it.  Added more pushes and pops.
13221         (grub_vbe_bios_set_mode): Likewise.
13222         (grub_vbe_bios_get_mode): Likewise.
13223         (grub_vbe_bios_get_memory_window): Likewise.
13224         (grub_vbe_bios_set_scanline_length): Likewise.
13225         (grub_vbe_bios_get_scanline_length): Likewise.
13226         (grub_vbe_bios_get_display_start): Likewise.
13227         (grub_vbe_bios_set_palette_data): Likewise.
13229         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13230         (cl_insert): Likewise.
13231         (cl_delete): Likewise.
13233         * term/gfxterm.c: New file.
13235         * term/i386/pc/vesafb.c: Removed file.
13237         * video/video.c: New file.
13239         * video/i386/pc/vbe.c (real2pm): Added new function.
13240         (grub_video_vbe_draw_pixel): Likewise.
13241         (grub_video_vbe_get_video_ptr): Likewise.
13242         (grub_video_vbe_get_pixel): Likewise
13243         (grub_video_vbe_init): Likewise.
13244         (grub_video_vbe_fini): Likewise.
13245         (grub_video_vbe_setup): Likewise.
13246         (grub_video_vbe_get_info): Likewise.
13247         (grub_video_vbe_set_palette): Likewise.
13248         (grub_video_vbe_get_palette): Likewise.
13249         (grub_video_vbe_set_viewport): Likewise.
13250         (grub_video_vbe_get_viewport): Likewise.
13251         (grub_video_vbe_map_color): Likewise.
13252         (grub_video_vbe_map_rgb): Likewise.
13253         (grub_video_vbe_map_rgba): Likewise.
13254         (grub_video_vbe_unmap_color): Likewise.
13255         (grub_video_vbe_fill_rect): Likewise.
13256         (grub_video_vbe_blit_glyph): Likewise.
13257         (grub_video_vbe_blit_bitmap): Likewise.
13258         (grub_video_vbe_blit_render_target): Likewise.
13259         (grub_video_vbe_scroll): Likewise.
13260         (grub_video_vbe_swap_buffers): Likewise.
13261         (grub_video_vbe_create_render_target): Likewise.
13262         (grub_video_vbe_delete_render_target): Likewise.
13263         (grub_video_vbe_set_active_render_target): Likewise.
13264         (grub_vbe_set_pixel_rgb): Remove function.
13265         (grub_vbe_set_pixel_index): Likewise.
13266         (index_color_mode): Remove static variable.
13267         (active_mode): Likewise.
13268         (framebuffer): Likewise.
13269         (bytes_per_scan_line): Likewise.
13270         (grub_video_vbe_adapter): Added new static variable.
13271         (framebuffer): Likewise.
13272         (render_target): Likewise.
13273         (initial_mode): Likewise.
13274         (mode_in_use): Likewise.
13275         (mode_list): Likewise.
13277 2006-03-10  Marco Gerards  <marco@gnu.org>
13279         * configure.ac (AC_INIT): Bumped to 1.93.
13281         * DISTLIST: Added `include/grub/hfs.h'.
13283 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13285         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13286         18H, which might help the BIOS falling back to next boot media.
13288 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13290         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13291         Poe Chen <poe.poechen@gmail.com>.
13293 2006-01-17  Marco Gerards  <marco@gnu.org>
13295         * include/grub/normal.h: Include <grub/script.h>.
13296         (grub_command_list): Removed struct.
13297         (grub_command_list_t): Removed type.
13298         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13299         members `commands' and `sourcecode'.
13300         * include/grub/script.h: Add inclusion guards.
13301         (grub_script_cmd_menuentry): New struct.
13302         (grub_script_execute_menuentry): New prototype.
13303         (grub_script_lexer_record_start): Likewise.
13304         (grub_script_lexer_record_stop): Likewise.
13305         * normal/execute.c (grub_script_execute_menuentry): New function.
13306         * normal/lexer.c (record, recording, recordpos, recordlen): New
13307         variables.
13308         (grub_script_lexer_record_start): New function.
13309         (grub_script_lexer_record_stop): Likewise.
13310         (recordchar): Likewise.
13311         (nextchar): Likewise.
13312         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13313         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13314         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13315         (current_menu): New variable.
13316         (free_menu): Mainly rewritten.
13317         (grub_normal_menu_addentry): New function.
13318         (read_config_file): Rewritten.
13319         * normal/menu.c (run_menu_entry): Mainly rewritten.
13320         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13321         the menu entry.
13322         (run): Mainly rewritten.
13323         * normal/parser.y (menu_entry): New variable.
13324         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13325         (menuentry): New rule.
13326         (command): Add `menuentry'.
13327         (if_statement): Allow additional returns before `fi'.
13328         * normal/script.c (grub_script_create_cmdmenu): New function.
13330 2006-01-03  Marco Gerards  <marco@gnu.org>
13332         * INSTALL: GNU Bison is required.
13333         * configure.ac: Rewritten the test to detect Bison.
13334         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13335         <xun.sun.cn@gmail.com>.
13337 2006-01-03  Marco Gerards  <marco@gnu.org>
13339         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13340         the HFS+ filesystem to filesystem blocks.
13341         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13342         GCC warning is silenced.
13344 2006-01-03  Marco Gerards  <marco@gnu.org>
13346         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13347         read from disk from big endian to host byte order.
13349 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13351         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13352         documentation.
13353         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13354         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13355         embedded HFS+ filesystem.
13356         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13357         (grub_hfs_sblock): Move from here...
13358         * include/grub/hfs.h: To here...  New file.
13359         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13360         documentation.
13361         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13362         New macros.
13363         (grub_hfsplus_volheader): Change type of member `magic' to
13364         `grub_uint16_t'.
13365         (grub_hfsplus_data): Add new member `embedded_offset'.
13366         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13367         returned block.
13368         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13369         Calculate the offset.
13371 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13373         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13374         Removed.
13375         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13377 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13379         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13380         ENV->NAME is NULL after allocating ENV->VALUE.
13382 2005-12-25  Marco Gerards  <marco@gnu.org>
13384         * kern/env.c (grub_env_set): Rewritten the error handling code.
13386 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13388         * geninit.sh: Made more robust, and more portable.
13390 2005-12-25  Marco Gerards  <marco@gnu.org>
13392         Add support for Apple HFS+ filesystems.
13394         * fs/hfsplus.c: New file.
13396         * DISTLIST: Added `fs/hfsplus.c'.
13398         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13399         (hfsplus_mod_SOURCES): New variable.
13400         (hfsplus_mod_CFLAGS): Likewise.
13401         (hfsplus_mod_LDFLAGS): Likewise.
13402         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13403         (grub_setup_SOURCES): Likewise.
13404         (grub_mkdevicemap_SOURCES): Likewise.
13405         (grub_emu_SOURCES): Likewise.
13406         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13408         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13410         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13412 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13414         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13415         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13416         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13417         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13418         normal/lexer.c, normal/parser.y, normal/script.c, and
13419         partmap/gpt.c.
13420         Removed kern/sparc64/cache.c.
13422         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13423         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13424         grub_emu_init.c.
13426         * configure.ac (AC_INIT): Bumped to 1.92.
13428 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13430         * kern/err.c (grub_error_push): Added new function to support error
13431         stacks.
13432         (grub_error_pop): Likewise.
13433         (grub_error_stack_items): New local variable to support error stacks.
13434         (grub_error_stack_pos): Likewise.
13435         (grub_error_stack_assert): Likewise.
13436         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13437         stack depth.
13438         (grub_print_error): Added support to print errors from error stack.
13440         * include/grub/err.h (grub_error_push): Added function prototype.
13441         (grub_error_pop): Likewise.
13443 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13445         * configure.ac: Accept `powerpc64' as host_cpu.
13446         (amd64): Rename to `biarch32'.
13448         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13449         non-cacheline-aligned addresses.
13451         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13452         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13453         if `size' is non-zero.
13455 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13457         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13458         and `cd' to make sure the filename is not prefixed with a
13459         directory name.
13460         (pkgdata_MODULES): Add `gpt.mod'.
13461         (gpt_mod_SOURCES): New variable.
13462         (gpt_mod_CFLAGS): Likewise.
13463         (gpt_mod_LDFLAGS): Likewise.
13465         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13467         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13468         New macro.
13470         * partmap/gpt.c: New file.
13472         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13473         GPT partition map is detected.
13475 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13477         * commands/i386/pc/play.c: New file.
13478         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13479         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13480         macros.
13482 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13484         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13485         ((unused))' to silence gcc warning.
13487 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13489         * configure.ac: Correct `AC_PROG_YACC' test.
13491 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13493         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13494         check before installing files.
13496 2005-11-22  Mike Small  <smallm@panix.com>
13498         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13499         number regex so multidigit numbers are recognized correctly.
13501 2005-11-22  Mike Small  <smallm@panix.com>
13503         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13504         debugging message before attempting to claim memory.
13505         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13506         multiple addresses in case of failure.
13508 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13510         * term/tparm.c (get_space): Remove empty `if' statement.
13512         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13514         * kern/parser.c (check_varstate): Rename `state' to 's'.
13516 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13518         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13519         variable definitions to the beginning of each function.  Sort stack
13520         variables by size.
13521         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13522         `buf' argument to `char *'.
13524 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13526         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13527         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13528         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13529         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13530         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13531         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13532         configfile.mod, search.mod, gzio.mod and test.mod.
13533         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13534         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13535         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13536         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13537         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13538         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13539         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13540         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13541         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13542         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13543         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13544         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13545         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13546         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13547         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13548         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13549         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13550         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13551         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13552         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13553         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13554         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13555         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13557         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13558         `grep --include'.
13559         (pkgdata_MODULES): Add test.mod.
13561 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13563         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13564         appending to variables with "+=".
13565         (PModule): Use full pathname to generate *.lst filenames.
13567         * Makefile.in: Fixed list rules moved from genmk.rb.
13568         (.DELETE_ON_ERROR): New special target.
13569         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13571         * conf/i386-pc.rmk: Include conf/common.mk.
13572         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13573         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13574         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13575         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13576         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13577         configfile.mod, search.mod, gzio.mod and test.mod.
13578         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13579         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13580         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13581         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13582         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13583         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13584         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13585         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13586         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13587         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13588         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13589         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13590         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13591         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13592         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13593         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13594         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13595         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13596         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13597         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13598         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13599         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13600         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13601         here...
13602         * conf/common.rmk: ... to here.  New file.
13604         * conf/common.mk: New file.
13606 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13608         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13609         (grub_script.tab.c): ... here.
13611         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13612         (grub_script.tab.c): ... here.
13614         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13615         (grub_script.tab.c): ... here.
13617         * normal/command.c (grub_command_find): Fixed a memory leak of
13618         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13620 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13622         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13623         "@" which marks the start of a comment on ARM.
13624         (VARIABLE): Likewise.
13626 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13628         Add support for Linux/ADFS partition tables.
13630         * partmap/acorn.c: New file.
13632         * include/grub/acorn_filecore.h: Likewise.
13634         * DISTLIST: Added `partmap/acorn.c' and
13635         `include/grub/acorn_filecore.h'.
13637         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13638         `partmap/acorn.c'.
13639         (pkgdata_MODULES): Add `acorn.mod'.
13640         (acorn_mod_SOURCES): New variable.
13641         (acorn_mod_CFLAGS): Likewise.
13643         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13644         `partmap/acorn.c'.
13645         (pkgdata_MODULES): Add `acorn.mod'.
13646         (acorn_mod_SOURCES): New variable.
13647         (acorn_mod_CFLAGS): Likewise.
13649         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13650         (pkgdata_MODULES): Add `acorn.mod'.
13651         (acorn_mod_SOURCES): New variable.
13652         (acorn_mod_CFLAGS): Likewise.
13653         (acorn_mod_LDFLAGS): Likewise.
13655         * include/types.h (grub_disk_addr_t): New typedef.
13657 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13659         * geninit.sh: New file.
13661         * geninitheader.sh: Likewise.
13663         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13664         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13665         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13666         * commands/configfile.c (grub_configfile_init)
13667         (grub_configfile_fini): Likewise.
13668         * commands/default.c (grub_default_init, grub_default_fini):
13669         Likewise.
13670         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13671         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13672         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13673         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13674         Likewise.
13675         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13676         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13677         Likewise.
13678         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13679         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13680         Likewise.
13681         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13682         Likewise.
13683         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13684         Likewise.
13685         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13686         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13687         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13688         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13689         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13690         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13691         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13692         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13693         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13694         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13695         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13696         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13697         * partmap/amiga.c (grub_amiga_partition_map_init)
13698         (grub_amiga_partition_map_fini): Likewise.
13699         * partmap/apple.c (grub_apple_partition_map_init)
13700         (grub_apple_partition_map_fini): Likewise.
13701         * partmap/pc.c (grub_pc_partition_map_init)
13702         (grub_pc_partition_map_fini): Likewise.
13703         * partmap/sun.c (grub_sun_partition_map_init,
13704         grub_sun_partition_map_fini): Likewise.
13705         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13706         Likewise.
13708         * util/grub-emu.c: Include <grub_modules_init.h>.
13709         (main): Don't initialize and de-initialize any modules directly,
13710         use `grub_init_all' and `grub_fini_all' instead.
13712         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13713         `grub_vesafb_mod_init'.
13714         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13715         all users.
13716         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13717         `grub_vga_mod_init'.  Updated all users.
13718         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13720         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13721         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13722         rules.
13724         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13725         Generate a function to initialize the module in utilities.
13726         Updated all callers.
13727         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13728         initialize the module in utilities.  Updated all callers.
13730 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13732         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13733         escape sequence and a literal ^L to clear the screen.
13735         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13736         when returning from Open Firmware.
13738 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13740         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13741         (grub_ofconsole_height): Likewise.
13742         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13743         manually insert a '\n'.
13744         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13745         `grub_ofconsole_height'.  Return early if these are already set.
13747 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13749         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13750         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13751         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13752         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13753         and `normal/script.c'.
13754         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13755         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13756         (test_mod_SOURCES): New variable.
13757         (test_mod_CFLAGS): Likewise.
13758         (test_mod_LDFLAGS): Likewise.
13759         (pkgdata_MODULES): Add `test.mod'.
13760         (grub_script.tab.c): New rule.
13761         (grub_script.tab.h): Likewise.
13763 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13765         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13766         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13767         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13768         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13769         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13770         (test_mod_SOURCES): New variable.
13771         (test_mod_CFLAGS): Likewise.
13772         (pkgdata_MODULES): Add `test.mod'.
13773         (grub_script.tab.c): New rule.
13774         (grub_script.tab.h): Likewise.
13776 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13778         Add initial scripting support.
13780         * commands/test.c: New file.
13781         * include/grub/script.h: Likewise.
13782         * normal/execute.c: Likewise.
13783         * normal/function.c: Likewise.
13784         * normal/lexer.c: Likewise.
13785         * normal/parser.y: Likewise.
13786         * normal/script.c: Likewise.
13788         * configure.ac: Add `AC_PROG_YACC' test.
13790         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13791         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13792         `normal/function.c' and `normal/script.c'.
13793         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13794         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13795         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13796         variables.
13797         (pkgdata_MODULES): Add `test.mod'.
13798         (grub_script.tab.c): New rule.
13799         (grub_script.tab.h): Likewise.
13801         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13803         * include/grub/normal.h (grub_test_init): New prototype.
13804         (grub_test_fini): Likewise.
13806         * normal/command.c: Include <grub/script.h>.
13807         (grub_command_execute): Rewritten.
13809         * util/grub-emu.c (main): Call `grub_test_init' and
13810         `grub_test_fini'.
13812 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13814         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13815         to 0.
13816         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13817         there are no pending characters.
13819 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13821         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13822         `grub_strndup' to drop device arguments. Replace unnecessary
13823         `grub_strndup' with `grub_strdup'.
13825 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13827         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13828         `debug' environment variable has been set.
13830 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13832         * Makefile.in (install-local): Use $(DATA).
13833         (uninstall): Likewise.
13834         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13835         (sbin_UTILITIES): ... to here.
13836         (sbin_SCRIPTS): New variable.
13837         (grub_install_SOURCES): New variable.
13838         * util/powerpc/ieee1275/grub-install.in: New file.
13839         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13840         variable.
13841         (add_segments): Call `grub_util_get_path'.
13843 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13845         From Timothy Baldwin:
13846         * commands/ls.c (grub_ls_list_files): Close FILE with
13847         grub_file_close.
13848         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13850 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13852         * include/grub/parser.h: New file.
13854         * kern/parser.c: Likewise.
13856         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13857         (grub_setup_SOURCES): Likewise.
13858         (grub_probefs_SOURCES): Likewise.
13859         (grub_emu_SOURCES): Likewise.
13860         (kernel_img_HEADERS): Add `parser.h'.
13862         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13863         (grub_emu_SOURCES): Add `kern/parser.c'.
13864         (grubof_SOURCES): Likewise.
13866         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13867         (grubof_SOURCES): Add `kern/parser.c'.
13869         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13871         * kern/misc.c (grub_split_cmdline): Removed function.
13873         * kern/rescue.c: Include <grub/parser.h>.
13874         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13875         of `grub_split_cmdline'.
13877         * normal/command.c: Include <grub/parser.h>.
13878         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13879         of `grub_split_cmdline'.
13881         * normal/completion.c: Include <grub/parser.h>.
13882         (cmdline_state): New variable.
13883         (iterate_dir): End the filename with a quote depending on the
13884         command line state.
13885         (get_state): new function.
13886         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13887         split the arguments and determine the current argument.  When the
13888         argument string is not quoted, escape all spaces.
13890 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13892         * normal/sparc64/setjmp.S: New file.
13894 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13896         * include/grub/sparc64/libgcc.h: New file.
13897         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13898         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13899         normal/sparc64/setjmp.c.
13901 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13903         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13904         * kern/sparc64/cache.S: New file.
13905         * kern/sparc64/cache.c: Removed.
13906         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13907         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13908         -mtune=ultrasparc.
13909         (COMMON_LDFLAGS): Add -melf64_sparc.
13910         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13911         (grubof_SOURCES): Use cache.S instead of cache.c.
13912         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13913         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13914         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13915         commented though.
13916         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13917         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13918         (linux_mod_CFLAGS): Commented out.
13919         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13920         out because module isn't built.
13921         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13922         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13923         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13924         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13925         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13926         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13927         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13928         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13929         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13930         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13931         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13932         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13933         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13934         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13936 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13938         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13939         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13940         longer, because HFS should not be used on PC.
13942 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13944         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13945         consistently within the loop.
13947 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13949         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13950         directory can not be read.
13952 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13954         * configure.ac (AC_INIT): Increase the version number to 1.91.
13956         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13957         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13958         term/i386/pc/serial.c.
13960 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13962         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13963         file size must be permitted.
13965         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13966         between %ah and %al.
13968 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13970         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13971         grub_uint64_t.
13972         Call the hook with a NUL-terminated filename.
13973         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13974         grub_cpu_to_be32.
13976         * kern/term.c (cursor_state): New variable.
13977         (grub_term_set_current): Reset the cursor state on a new
13978         terminal.
13979         (grub_setcursor): Rewritten to use CURSOR_STATE.
13980         (grub_getcursor): New function.
13982         * include/grub/term.h (grub_getcursor): New prototype.
13984         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13985         integers on ARM. Reported by Timothy Baldwin
13986         <T.E.Baldwin99@members.leeds.ac.uk>.
13988 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13990         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13991         allocated.
13992         (grub_sfs_dir): Likewise.
13994 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13996         Add support for the SFS filesystem.
13998         * fs/sfs.c: New file.
14000         * DISTLIST: Added `fs/sfs.c'.
14002         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14003         (grub_probefs_SOURCES): Likewise.
14004         (grub_emu_SOURCES): Likewise.
14005         (pkgdata_MODULES): Add `sfs.mod'.
14006         (sfs_mod_SOURCES): New variable.
14007         (sfs_mod_CFLAGS): Likewise.
14008         (sfs_mod_LDFLAGS): Likewise.
14010         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14011         (pkgdata_MODULES): Add `sfs.mod'.
14012         (sfs_mod_SOURCES): New variable.
14013         (sfs_mod_CFLAGS): Likewise.
14015         * util/grub-emu.c (main): Call `grub_sfs_init' and
14016         `grub_sfs_fini'.
14018         * include/grub/fs.h (grub_sfs_init): New prototype.
14019         (grub_sfs_fini): Likewise.
14021 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14023         Add support for the AFFS filesystem.
14025         * fs/affs.c: New file.
14027         * DISTLIST: Added `fs/affs.c'.
14029         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14030         (grub_probefs_SOURCES): Likewise.
14031         (grub_emu_SOURCES): Likewise.
14032         (pkgdata_MODULES): Add `affs.mod'.
14033         (affs_mod_SOURCES): New variable.
14034         (affs_mod_CFLAGS): Likewise.
14035         (affs_mod_LDFLAGS): Likewise.
14037         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14038         (pkgdata_MODULES): Add `affs.mod'.
14039         (affs_mod_SOURCES): New variable.
14040         (affs_mod_CFLAGS): Likewise.
14042         * util/grub-emu.c (main): Call `grub_affs_init' and
14043         `grub_affs_fini'.
14045         * include/grub/fs.h (grub_affs_init): New prototype.
14046         (grub_affs_fini): Likewise.
14048 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14050         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14052 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14054         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14055         `-m32' to CFLAGS.
14057         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14058         linking.
14060         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14061         (COMMON_LDFLAGS): New variable.
14062         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14063         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14064         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14065         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14066         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14067         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14068         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14069         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14070         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14071         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14072         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14073         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14074         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14075         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14076         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14077         variables.
14078         (normal_mod_ASFLAGS): Add `-m32'.
14080         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14081         (grub_host_size_t, grub_host_ssize_t): New types.
14082         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14083         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14084         `GRUB_HOST_SIZEOF_VOID_P'.
14086         * include/grub/kernel.h (struct grub_module_header): Type of
14087         member offset changed to `grub_host_off_t'.  Type of member size
14088         changed to `grub_host_size_t'.
14089         (struct grub_module_info): Type of member offset changed to
14090         `grub_host_off_t'.  Type of member size changed to
14091         `grub_host_size_t'.
14093 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14095         Make GRUB's kernel compliant to Multiboot Specification.
14097         * kern/i386/pc/startup.S (multiboot_header): New label.
14098         (multiboot_entry): Likewise.
14099         (multiboot_trampoline): Likewise.
14101         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14102         Increased to 0x4A0.
14104         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14105         put parentheses after a question mark.
14106         [!GRUB_UTIL] (my_mod): New variable.
14108         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14110 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14112         Adds support for the XFS filesystem.  Btrees are not supported
14113         yet.
14115         * fs/xfs.c: New file.
14117         * DISTLIST: Added `fs/xfs.c'.
14119         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14120         (grub_probefs_SOURCES): Likewise.
14121         (grub_emu_SOURCES): Likewise.
14122         (pkgdata_MODULES): Add `xfs.mod'.
14123         (xfs_mod_SOURCES): New variable.
14124         (xfs_mod_CFLAGS): Likewise.
14126         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14127         (pkgdata_MODULES): Add `xfs.mod'.
14128         (xfs_mod_SOURCES): New variable.
14129         (xfs_mod_CFLAGS): Likewise.
14131         * util/grub-emu.c (main): Call `grub_xfs_init' and
14132         `grub_xfs_fini'.
14134         * include/grub/fs.h (grub_xfs_init): New prototype.
14135         (grub_xfs_fini): Likewise.
14138 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14140         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14141         color modes, allow greater than 16 colors to be configured as
14142         a default palette.
14144 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14146         * normal/completion.c (complete_arguments): Add the qualifier
14147         const into OPTIONS.
14149         From Omniflux <omniflux+lists@omniflux.com>:
14150         * include/grub/terminfo.h: New file.
14151         * include/grub/tparm.h: Likewise.
14152         * include/grub/i386/pc/serial.h: Likewise.
14153         * term/terminfo.c: Likewise.
14154         * term/tparm.c: Likewise.
14155         * term/i386/pc/serial.c: Likewise.
14156         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14157         serial.mod.
14158         (terminfo_mod_SOURCES): New variable.
14159         (terminfo_mod_CFLAGS): Likewise.
14160         (serial_mod_SOURCES): Likewise.
14161         (serial_mod_CFLAGS): Likewise.
14163 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14165         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14166         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14167         and kern/powerpc/ieee1275/cmain.c, respectively.
14169         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14170         * kern/powerpc/ieee1275/crt0.S: ... here.
14172         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14173         * kern/powerpc/ieee1275/cmain.c: ... here.
14175         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14176         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14177         instead of boot/powerpc/ieee1275/crt0.S and
14178         boot/powerpc/ieee1275/cmain.c, respectively.
14180         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14181         sectors. It was not used anyway.
14183 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14185         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14186         `unused parameter' warning.
14188 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14190         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14191         function.
14192         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14193         getcharwidth.
14195 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14197         * include/grub/normal.h (enum grub_completion_type): Added
14198         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14200         * normal/cmdline.c (print_completion): Handle
14201         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14202         * normal/menu_entry.c (store_completion): Likewise.
14204         * normal/completion.c (complete_arguments): New function.
14205         (grub_normal_do_completion): Call `complete_arguments' when the
14206         current words start with a dash.
14208 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14210         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14211         `gzio.mod' instead of `io.mod').
14213 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14215         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14216         (DISTDIRS): Added io and video.
14217         Rewrite the search routine to make an output consistently.
14219         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14220         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14221         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14222         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14223         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14224         util/powerpc/ieee1275/misc.c.
14226         * include/grub/gzio.h: New file.
14227         * io/gzio.c: Likewise.
14229         * kern/file.c (grub_file_close): Call grub_device_close only if
14230         FILE->DEVICE is not NULL.
14232         * include/grub/mm.h [!NULL] (NULL): New macro.
14234         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14236         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14237         (pkgdata_MODULES): Added gzio.mod.
14238         (gzio_mod_SOURCES): New variable.
14239         (gzio_mod_CFLAGS): Likewise.
14241         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14242         (pkgdata_MODULES): Added gzio.mod.
14243         (gzio_mod_SOURCES): New variable.
14244         (gzio_mod_CFLAGS): Likewise.
14246         * commands/cat.c: Include grub/gzio.h.
14247         (grub_cmd_cat): Use grub_gzfile_open instead of
14248         grub_file_open.
14250         * commands/cmp.c: Include grub/gzio.h.
14251         (grub_cmd_cmp): Use grub_gzfile_open instead of
14252         grub_file_open.
14254         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14255         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14256         grub_file_open.
14257         (grub_rescue_cmd_module): Likewise.
14259 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14261         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14262         kern/sparc64/ieee1275/init.c because it contains _start.
14263         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14265 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14267         * configure.ac: Add support for sparc64 host with ieee1275
14268         firmware.
14269         * configure: Generated from configure.ac.
14270         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14271         instead of int.
14272         (grub_ofdisk_read): Likewise.
14273         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14274         pointers as (void *) to remove a warning.
14275         (grub_ofdisk_close): Likewise.
14276         (grub_ofdisk_read): Likewise.
14277         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14278         returns, so make it return void to remove a warning.
14279         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14280         Corresponding prototype change.
14281         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14282         values, and cast the pointers as (void *) to remove a warning.
14283         (grub_mm_dump): Likewise.
14284         * conf/sparc64-ieee1275.mk: New file.
14285         * conf/sparc64-ieee1275.rmk: Likewise.
14286         * include/grub/sparc64/setjmp.h: Likewise.
14287         * include/grub/sparc64/types.h: Likewise.
14288         * include/grub/sparc64/ieee1275/console.h: Likewise.
14289         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14290         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14291         * include/grub/sparc64/ieee1275/time.h: Likewise.
14292         * kern/sparc64/cache.c: Likewise.
14293         * kern/sparc64/dl.c: Likewise.
14294         * kern/sparc64/ieee1275/init.c: Likewise.
14295         * kern/sparc64/ieee1275/openfw.c: Likewise.
14297 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14299         * util/console.c (grub_ncurses_putchar): If C is greater than
14300         0x7f, set C to a question mark.
14301         (grub_ncurses_getcharwidth): New function.
14302         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14303         getcharwidth.
14305         * normal/menu.c (print_entry): Made aware of Unicode. First,
14306         convert TITLE to UCS-4, and predict the cursor position by
14307         grub_getcharwidth.
14309         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14310         const to SRC.
14311         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14313 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14315         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14316         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14317         grub_strcat.
14319         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14320         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14321         grub_strcpy and grub_strlen. Take it into account that a space
14322         character is inserted as a delimiter.
14324 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14326         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14327         invalid magic in the error.
14329         * commands/search.c: New file.
14331         * util/grub-emu.c (main): Call grub_search_init and
14332         grub_search_fini.
14334         * kern/rescue.c (grub_rescue_print_disks): Removed.
14335         (grub_rescue_print_devices): New function.
14336         (grub_rescue_cmd_ls): Use grub_device_iterate with
14337         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14338         grub_rescue_print_disks.
14340         * kern/partition.c (grub_partition_iterate): Return the result of
14341         PARTMAP->ITERATE instead of GRUB_ERRNO.
14343         * kern/device.c: Include grub/partition.h.
14344         (grub_device_iterate): New function.
14346         * include/grub/partition.h (grub_partition_iterate): Return int
14347         instead of grub_err_t.
14349         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14350         prototype.
14351         [GRUB_UTIL] (grub_search_fini): Likewise.
14353         * include/grub/device.h (grub_device_iterate): New prototype.
14355         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14356         commands/search.c.
14357         (pkgdata_MODULES): Added search.mod.
14358         (search_mod_SOURCES): New variable.
14359         (search_mod_CFLAGS): Likewise.
14361         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14362         (pkgdata_MODULES): Added search.mod.
14363         (search_mod_SOURCES): New variable.
14364         (search_mod_CFLAGS): Likewise.
14366         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14367         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14368         All callers changed.
14370         * DISTLIST: Added commands/search.c.
14372 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14374         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14375         conversion.
14376         (grub_getcharwidth): New function.
14378         * kern/misc.c (grub_utf8_to_ucs4): New function.
14380         * include/grub/term.h (struct grub_term): Added a new member
14381         "getcharwidth".
14382         (grub_getcharwidth): New prototype.
14384         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14386         * term/i386/pc/console.c (map_char): New function. Segregated from
14387         grub_console_putchar.
14388         (grub_console_putchar): Use map_char.
14389         (grub_console_getcharwidth): New function.
14390         (grub_console_term): Specified grub_console_getcharwidth as
14391         getcharwidth.
14393         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14394         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14396         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14397         GRUB_ERRNO.
14398         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14399         on grub_strtoul completely.
14400         (write_char): Declare local variables in the beginning of the
14401         function.
14402         (grub_vesafb_getcharwidth): New function.
14403         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14404         getcharwidth.
14406 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14408         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14409         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14410         commands/i386/pc/vbetest.c.
14412         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14413         call grub_vbe_get_controller_info again, because the returned
14414         information is volatile.
14415         (grub_vbe_set_video_mode): Mostly rewritten.
14416         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14417         grub_vbe_status_t correctly.
14418         (grub_vbe_get_video_mode_info): Likewise.
14419         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14420         several if statements.
14422         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14423         * commands/i386/pc/vbeinfo.c: ... this.
14425         * commands/i386/pc/vbe_test.c: Renamed to ...
14426         * commands/i386/pc/vbetest.c: ... this.
14428         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14429         ...
14430         (grub_cmd_vbeinfo): ... this. Save video modes before
14431         iterating. Skip a video mode, if it is not available, not enough
14432         information is given or it is monochrome. Show the memory
14433         model. Leave the interpretation of MODEVAR to grub_strtoul
14434         completely.
14435         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14436         (GRUB_MOD_FINI): Likewise.
14438         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14439         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14440         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14441         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14442         grub_strtoul completely.
14443         (real2pm): Removed.
14444         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14445         (GRUB_MOD_FINI): Likewise.
14447         * normal/misc.c: Include grub/mm.h.
14449         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14450         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14451         (vbe_list_modes_mod_SOURCES): Removed.
14452         (vbe_list_modes_mod_CFLAGS): Likewise.
14453         (vbe_test_mod_SOURCES): Likewise.
14454         (vbe_test_mod_CFLAGS): Likewise.
14455         (vbeinfo_mod_SOURCES): New variable.
14456         (vbeinfo_mod_CFLAGS): Likewise.
14457         (vbetest_mod_SOURCES): Likewise.
14458         (vbetest_mod_CFLAGS): Likewise.
14460 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14462         * normal/misc.c: New file.
14464         * DISTLIST: Added normal/misc.c.
14466         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14467         DISK to HOOK. Call HOOK with DISK.
14468         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14469         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14470         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14472         * normal/menu_entry.c (struct screen): Added a new member
14473         "completion_shown".
14474         (completion_buffer): New global variable.
14475         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14476         (store_completion): New function.
14477         (complete): Likewise.
14478         (clear_completions): Likewise.
14479         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14480         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14481         a tab, call complete.
14483         * normal/completion.c (disk_dev): Removed.
14484         (print_simple_completion): Likewise.
14485         (print_partition_completion): Likewise.
14486         (print_func): New global variable.
14487         (add_completion): Do not take the arguments WHAT or PRINT any
14488         longer. Added a new argument TYPE. Instead of printing directly,
14489         call PRINT_FUNC if not NULL.
14490         All callers changed.
14491         (complete_device): Use a local variable DEV instead of
14492         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14493         (grub_normal_do_completion): Take a new argument HOOK. Do not
14494         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14495         empty string, return NULL instead.
14496         All callers changed.
14498         * normal/cmdline.c (print_completion): New function.
14500         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14501         to HOOK.
14502         All callers changed.
14504         * kern/disk.c (grub_print_partinfo): Removed.
14506         * include/grub/partition.h (struct grub_partition_map): Add a new
14507         argument DISK into HOOK of ITERATE.
14508         (grub_partition_iterate): Add a new argument DISK to HOOK.
14510         * include/grub/normal.h (enum grub_completion_type): New enum.
14511         (grub_completion_type_t): New type.
14512         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14513         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14514         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14515         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14516         (grub_normal_do_completion): Added a new argument HOOK.
14517         (grub_normal_print_device_info): New prototype.
14519         * include/grub/disk.h (grub_print_partinfo): Removed.
14521         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14522         (normal_mod_SOURCES): Likewise.
14523         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14524         (normal_mod_SOURCES): Likewise.
14526         * commands/ls.c (grub_ls_list_disks): Use
14527         grub_normal_print_device_info instead of grub_print_partinfo. Free
14528         PNAME.
14529         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14530         duplicating the code.
14532 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14534         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14535         follow GCS more precisely.
14536         * commands/i386/pc/vbe_test.c: Likewise.
14537         * include/grub/i386/pc/vbe.h: Likewise.
14538         * term/i386/pc/vesafb.c: Likewise.
14539         * video/i386/pc/vbe.c: Likewise.
14541 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14543         * DISTLIST: Added term/i386/pc/vesafb.c
14544         DISTLIST: Added video/i386/pc/vbe.c
14545         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14546         DISTLIST: Added commands/i386/pc/vbe_test.c.
14547         * commands/i386/pc/vbe_list_modes.c: New file.
14548         * commands/i386/pc/vbe_test.c: Likewise.
14549         * term/i386/pc/vesafb.c: Likewise.
14550         * video/i386/pc/vbe.c: Likewise.
14551         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14552         (grub_vbe_probe) Added prototype.
14553         (grub_vbe_set_video_mode) Likewise.
14554         (grub_vbe_get_video_mode) Likewise.
14555         (grub_vbe_get_video_mode_info) Likewise.
14556         (grub_vbe_set_pixel_rgb) Likewise.
14557         (grub_vbe_set_pixel_index) Likewise.
14558         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14559         (pkgdata_MODULES): Added vesafb.mod.
14560         (pkgdata_MODULES): Added vbe_list_modes.mod.
14561         (pkgdata_MODULES): Added vbe_test.mod.
14562         (vbe_mod_SOURCES): Added.
14563         (vbe_mod_CFLAGS): Likewise.
14564         (vesafb_mod_SOURCES): Likewise.
14565         (vesafb_mod_CFLAGS): Likewise.
14566         (vbe_list_modes_mod_SOURCES): Likewise.
14567         (vbe_list_modes_mod_CFLAGS): Likewise.
14568         (vbe_test_mod_SOURCES): Likewise.
14569         (vbe_test_mod_CFLAGS): Likewise.
14571 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14573         * normal/command.c (grub_command_execute): If INTERACTIVE is
14574         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14575         CMDLINE. Disable the pager if INTERACTIVE is true.
14576         All callers are changed.
14578         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14579         before reading a config file.
14580         * normal/main.c (read_config_file): Even if a command is not
14581         found, register it if it is within an entry.
14583         * util/grub-emu.c: Include sys/types.h and unistd.h.
14584         (options): Added --hold.
14585         (struct arguments): Added a new member "hold".
14586         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14587         missing.
14588         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14589         cleared by a debugger, if it is not zero.
14591         * include/grub/normal.h (grub_command_execute): Add an argument
14592         INTERACTIVE.
14594 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14596         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14598 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14600         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14601         program with another one, because the old one didn't detect a bug
14602         in gcc-3.4. Always use regparm 2, because the new test is still
14603         not enough for gcc-4.0. Someone must investigate a simple test
14604         case which detects a bug in gcc-4.0.
14606 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14608         * DISTLIST: Added normal/completion.c.
14610         * normal/completion.c: New file.
14612         * term/i386/pc/console.c (grub_console_getwh): New function.
14613         (grub_console_term): Assign grub_console_getwh to getwh.
14615         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14616         function is defined in normal/completion.c as
14617         grub_normal_do_completion.
14618         (grub_cmdline_get): Use grub_normal_do_completion instead of
14619         grub_tab_complete.
14621         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14622         returns non-zero, otherwise return 0.
14623         (grub_partition_iterate): First, probe the partition map. Then,
14624         call ITERATE only for this partition map.
14626         * kern/misc.c (grub_strncmp): Rewritten.
14628         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14629         returns non-zero. Otherwise return 0.
14631         * include/grub/partition.h (grub_partition_map_iterate): Return
14632         int instead of void.
14634         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14636         * include/grub/misc.h (grub_strncmp): Change the type of N to
14637         grub_size_t.
14639         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14640         of void.
14642         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14643         unsigned explicitly before comparing it with I.
14645         * kern/main.c (grub_env_write_root): Add the attribute unused into
14646         VAR.
14648         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14649         normal/completion.c.
14650         (normal_mod_SOURCES): Likewise.
14651         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14652         (normal_mod_SOURCES): Likewise.
14654         * normal/command.c (grub_iterate_commands): If ITERATE returns
14655         non-zero, return one immediately.
14657 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14659         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14660         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14661         descriptions.
14662         (grub_vbe_get_controller_info): New function.
14663         (grub_vbe_get_mode_info): Likewise.
14664         (grub_vbe_set_mode): Likewise.
14665         (grub_vbe_get_mode): Likewise.
14666         (grub_vbe_set_memory_window): Likewise.
14667         (grub_vbe_get_memory_window): Likewise.
14668         (grub_vbe_set_scanline_length): Likewise.
14669         (grub_vbe_get_scanline_length): Likewise.
14670         (grub_vbe_set_display_start): Likewise.
14671         (grub_vbe_get_display_start): Likewise.
14672         (grub_vbe_set_palette_data): Likewise.
14673         * include/grub/i386/pc/vbe.h: New file.
14675 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14677         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14678         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14679         * DISTLIST: Likewise.
14680         * kern/ieee1275/of.c: Moved to ...
14681         * kern/ieee1275/ieee1275.c: ... here.
14683 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14685         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14686         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14687         Pass 0 as `end' parameter to grub_strtoul().
14689 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14691         * include/grub/powerpc/ieee1275/console.h: Do not include
14692         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14693         ifdef.
14694         (grub_console_cur_color): Remove i386-specific prototype.
14695         (grub_console_real_putchar): Likewise.
14696         (grub_console_checkkey): Likewise.
14697         (grub_console_getkey): Likewise.
14698         (grub_console_getxy): Likewise.
14699         (grub_console_gotoxy): Likewise.
14700         (grub_console_cls): Likewise.
14701         (grub_console_setcursor): Likewise.
14702         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14703         Include <grub/machine/console.h>.
14704         * term/ieee1275/ofconsole.c: Likewise.
14706 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14708         * Makefile.in (LIBLZO): New variable.
14710         * configure.ac: Check for LZO version 2.
14712         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14713         lzo/lzo1x.h instead of lzo1x.h.
14715         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14716         of -llzo.
14718         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14719         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14721         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14722         copying the data from PARTITION to P.
14724 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14726         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14727         negative, unload the module.
14729         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14730         map is "pc_partition_map" but not "pc".
14731         (usage): Fix the description. The options are --boot-image and
14732         --core-image but not --boot-file or --core-file.
14733         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14734         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14735         DEFAULT_DIRECTORY.
14737         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14738         --core-file. Specify INSTALL_DEVICE as an argument.
14740         * util/console.c: Include config.h.
14741         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14742         [HAVE_NCURSES_H]: Include ncurses.h.
14743         [HAVE_CURSES_H]: Include curses.h.
14744         [!A_NORMAL] (A_NORMAL): Defined as zero.
14745         [!A_STANDOUT] (A_STANDOUT): Likewise.
14747         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14748         -lncurses.
14749         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14751         * configure.ac: Check for curses libraries and headers.
14753         * Makefile.in (LIBCURSES): New variable.
14755         * genmk.rb (Script::rule): Set the executable bits.
14757         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14758         name of the PC partition map is "pc_partition_map" but not "pc".
14760 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14762         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14763         (modules): Likewise.
14764         (usage): Added descriptions for --modules and --grub-probefs.
14765         Handle --modules and --grub-probefs. Save the arguments in MODULES
14766         and GRUB_PROBEFS, respectively.
14767         Auto-detect a filesystem module against GRUBDIR. If the result is
14768         empty and modules are not specified explicitly, abort the
14769         installation. Add the result to MODULES.
14771         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14772         disk/powerpc/ieee1275/ofdisk.c,
14773         include/grub/powerpc/ieee1275/init.h and
14774         term/powerpc/ieee1275/ofconsole.c.
14775         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14776         term/ieee1275/ofconsole.c.
14778         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14780         * COPYING: Upgraded to the latest version. Only the address of the
14781         FSF office has changed.
14783 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14785         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14786         kern/ieee1275.c with kern/ieee1275/of.c.
14788         * kern/ieee1275.c: Moved to ...
14789         * kern/ieee1275/of.c: ... here.
14791 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14793         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14794         readability.
14796         * config.guess: Updated to the latest version from gnulib.
14797         * config.sub: Likewise.
14798         * install.sh: Likewise.
14799         * mkinstalldirs: Likewise.
14801         * include/grub/console.h: Removed. This file is arch-specific. Do
14802         not put this in include/grub.
14804         * include/grub/i386/pc/console.h: Resurrected.
14806         * util/console.c: Include grub/machine/console.h instead of
14807         grub/console.h.
14808         * util/grub-emu.c: Likewise.
14810 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14812         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14813         hardcoded value.
14815         From Vincent Pelletier  <subdino2004@yahoo.fr>
14816         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14817         Redefined to use grub_getwh.
14818         (grub_term): New member named getwh.
14819         (grub_getwh): New prototype.
14820         * kern/term.c (grub_getwh): New function.
14821         * term/i386/pc/console.c (grub_console_getwh): New function.
14822         (grub_console_term): New member `getwh'.
14823         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14824         (grub_vga_term): New member `getwh'.
14825         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14826         grub_ssize_t.
14827         (grub_ofconsole_getw): New function.
14828         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14829         (grub_ofconsole_term): New field named getwh and new initial
14830         value.
14832 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14834         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14835         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14836         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14837         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14838         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14839         of <grub/machine/ieee1275.h>.
14840         * commands/ieee1275/reboot.c: Likewise.
14841         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14842         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14843         parameter structs to use new type `grub_ieee1275_cell_t'.
14844         * term/powerpc/ieee1275/ofconsole.c: Move ...
14845         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14846         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14847         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14848         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14849         to return int.
14850         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14851         Remove unused prototypes.  All users updated.
14852         * include/grub/powerpc/ieee1275/console.h: Removed.
14853         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14854         `grub_ieee1275_cell_t'.
14855         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14856         Cast comparisons with -1 to the correct type.
14857         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14858         type to match `grub_ieee1275_entry_fn'.
14860 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14862         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14864         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14865         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14866         partmap/sun.c.
14867         (grub_probefs_SOURCES): New variable.
14869         * util/i386/pc/grub-probefs.c: New file.
14871         * util/i386/pc/grub-setup.c (main): Call
14872         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14873         grub_hfs_init and grub_jfs_init to initialize the system. Call
14874         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14875         grub_pc_partition_map_fini to finish the system.
14877 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14879         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14880         function.
14881         (grub_multiboot_load_elf32): Likewise.
14882         (grub_multiboot_is_elf64): Likewise.
14883         (grub_multiboot_load_elf64): Likewise.
14884         (grub_multiboot_load_elf): Likewise.
14885         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14886         an ELF32 or ELF64 file.
14887         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14889         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14890         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14891         NULL before calling FS->LABEL.
14892         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14893         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14894         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14895         before calling FS->LABEL.
14897 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14899         * util/i386/pc/grub-install.in (datadir): New variable.
14900         (libdir): Removed.
14901         (pkgdatadir): New variable.
14902         (pkglibdir): Removed.
14904 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14906         * DISTLIST: Added util/i386/pc/grub-install.in.
14908         * util/i386/pc/grub-install.in: New file.
14910         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14911         (grub_install_SOURCES): Likewise.
14913         * genmk.rb: Added support for scripts.
14914         (Script): New class.
14915         (scripts): New variable.
14917         * Makefile.in (install-local): Install sbin_SCRIPTS by
14918         INSTALL_SCRIPT.
14919         (uninstall): Remove sbin_SCRIPTS.
14921         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14922         device, try to get a GRUB device by
14923         grub_util_biosdisk_get_grub_dev.
14924         Free DEST_DEV.
14926         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14927         description for --device-map.
14929 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14931         Change the semantics of variable hooks. They now return strings
14932         instead of error values.
14934         * util/i386/pc/grub-setup.c: Include grub/env.h.
14935         (setup): Use grub_device_set_root instead of grub_env_set.
14937         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14938         grub_env_get instead of grub_device_set_root and
14939         grub_device_get_root, respectively.
14941         * kern/main.c (grub_env_write_root): New function.
14942         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14943         grub_env_set instead of grub_device_set_root.
14945         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14946         many variables.
14947         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14948         rather than calling ENV->WRITE_HOOK afterwards.
14949         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14950         passing a pointer of a pointer.
14951         (grub_register_variable_hook): Change the types of "read_hook" and
14952         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14953         respectively.
14954         Allocate the default empty string on the heap, because this string
14955         may be freed later.
14957         * kern/device.c: Include grub/env.h.
14958         (grub_device_set_root): Removed.
14959         (grub_device_get_root): Likewise.
14960         (grub_device_open): Use grub_env_get instead of
14961         grub_device_get_root.
14963         * include/grub/env.h (grub_env_read_hook_t): New type.
14964         (grub_env_write_hook_t): Likewise.
14965         (grub_env_var): Change the types of "read_hook" and "write_hook"
14966         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14967         (grub_register_variable_hook): Likewise.
14969         * include/grub/device.h (grub_device_set_root): Removed.
14970         (grub_device_set_root): Likewise.
14972         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14973         make sure that DIRNAME terminates with '/', so that
14974         grub_fat_find_dir will fail if PATH is not a directory.
14976         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14977         from DIRNAME.
14978         Use the qualifier auto for print_files and print_files_long.
14979         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14980         as a regular file.
14981         Put a newline only if there is no error.
14982         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14983         used.
14985 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14987         * kern/partition.c (grub_partition_probe): Initialize PART to
14988         NULL. Otherwise, when no partition map is registered, this returns
14989         a garbage.
14991 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14993         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14994         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14995         valid.
14997 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14999         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15000         information on each device, if it does not have partitions. Print
15001         "Device" instead of "Disk", because this function is not specific
15002         to disk devices.
15004         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15005         static to ensure that it is put on the memory rather than a
15006         register.
15008 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15010         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15011         (grub_cat_init): Likewise.
15012         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15013         (options): Likewise.
15014         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15015         (grub_configfile_init): Likewise.
15016         * font/manager.c (GRUB_MOD_INIT): Likewise.
15017         * commands/help.c (GRUB_MOD_INIT): Likewise.
15018         (grub_help_init): Likewise.
15019         * normal/command.c (grub_command_init): Likewise.
15020         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15021         * disk/loopback.c (grub_loop_init): Likewise.
15022         (GRUB_MOD_INIT): Likewise.
15023         * commands/ls.c (grub_ls_init): Likewise.
15024         (GRUB_MOD_INIT): Likewise.
15025         (options): Likewise.
15026         * commands/boot.c (grub_boot_init): Likewise.
15027         (GRUB_MOD_INIT): Likewise.
15028         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15029         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15030         (GRUB_MOD_INIT): Likewise.
15031         * commands/cmp.c (grub_cmp_init): Likewise.
15032         (GRUB_MOD_INIT): Likewise.
15034         * normal/arg.c: Use <> instead of "" to include header files.
15035         (SHORT_ARG_HELP): New macro.
15036         (SHORT_ARG_USAGE): Likewise.
15037         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15038         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15039         descriptions.
15040         (find_short): Check if C is 'h' or 'u' explicitly.
15041         (grub_arg_show_help): Use space characters instead of tabs. Treat
15042         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15043         are shown with --help and --usage only if they are not used for
15044         the command itself.
15045         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15046         'h' and 'u'.
15048         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15049         const into "longarg". Change the type of "shortarg" to int.
15051 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15053         * boot/i386/pc/boot.S (boot_drive_check): New label.
15055         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15056         macro.
15058         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15059         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15061 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15063         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15064         When turning off Gate A20, skip the check and return immediately,
15065         because this is not fatal usually.
15067 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15069         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15070         be 0x7C00 instead of 0x8000.
15072         * boot/i386/pc/pxeboot.S: Rewritten.
15074         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15075         EXT_C.
15076         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15077         result.
15079 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15081         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15082         robustness. This routine now supports a BIOS call and System
15083         Control Port A to modify the gate A20.
15085         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15086         Increased to 0x440.
15088 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15090         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15091         device path and resulting ihandle.
15092         (grub_ofdisk_close): dprintf the ihandle being closed.
15093         (grub_ofdisk_read): dprintf function parameters.
15094         * kern/mm.c (grub_mm_init_region): Likewise.
15095         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15096         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15097         size, and boot arguments.
15098         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15099         before loading into memory.
15100         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15101         before loading into memory.
15103 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15105         * kern/mm.c: Added much documentation.
15106         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15107         8, set to 5 instead of 8.
15109 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15111         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15113         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15114         (grub_mkdevicemap_SOURCES): New variable.
15116         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15117         lib/device.c of GRUB Legacy.
15119 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15121         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15122         instead of PATH is NULL.
15124 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15126         * commands/cmp.c (BUFFER_SIZE): New macro.
15127         (grub_cmd_cmp): Close the right file at the right time.  Compare
15128         only data just read.  Don't report files of different  size as
15129         identical.  Dynamically allocate buffers.  Move variable
15130         declarations at the beginning of function.
15132 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15134         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15135         reverse.
15137 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15139         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15140         when backspace is pressed at beginning of line.
15142 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15144         * DISTLIST: Added genfslist.sh.
15146         * normal/main.c (fs_module_list): New variable.
15147         (autoload_fs_module): New function.
15148         (read_fs_list): Likewise.
15149         (grub_normal_execute): Call read_fs_list.
15151         * kern/fs.c (grub_fs_autoload_hook): New variable.
15152         (grub_fs_probe): Added support for auto-loading.
15154         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15155         (grub_fs_module_list_t): New type.
15157         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15158         (grub_fs_autoload_hook): New prototype.
15160         * genfslist.sh: New file.
15162         * genmk.rb: Added a rule to generate a filesystem list.
15164 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15166         * configure.ac: Fix the test for cross-compiling.
15168         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15169         define GRUB_UTIL anymore.
15171         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15172         so this function works on other systems than just big endian.
15173         (load_modules): Likewise.
15174         (add_segments): Likewise.
15176 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15178         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15179         contains `l' modifier, get a long from va_arg().
15181 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15183         * kern/mm.c (grub_free): If the next free block which is being
15184         merged is the first free block, set the first block to the block
15185         being freed.
15186         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15188 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15190         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15191         `grub_ieee1275_chosen'.
15193 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15195         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15196         (grub_ieee1275_chosen): New variable.
15197         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15198         `chosen'.
15199         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15200         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15201         Rename first argument to `phandle' for consistency.
15202         (grub_ieee1275_get_property_length): Likewise.
15203         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15204         to grub_ieee1275_phandle_t.
15205         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15206         Move export next to declaration.
15207         (grub_ieee1275_chosen): New variable.
15208         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15209         Correct cosmetic typo.
15210         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15211         `grub_ieee1275_chosen'.
15212         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15213         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15214         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15215         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15216         `grub_ieee1275_chosen'.
15218 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15220         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15221         /chosen/bootargs.
15222         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15223         /chosen/bootargs as "variable=value" pairs.
15225 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15227         * include/grub/misc.h (grub_dprintf): New macro.
15228         (grub_real_dprintf): New prototype.
15229         (grub_strword): Likewise.
15230         (grub_iswordseparator): Likewise.
15231         * kern/misc.c (grub_real_dprintf): New function.
15232         (grub_strword): Likewise.
15233         (grub_iswordseparator): Likewise.
15235 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15237         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15238         (roundup): Remove macro.
15239         (grub_ieee1275_flags): Make static.
15240         (grub_ieee1275_realmode): Remove.
15241         (grub_ieee1275_test_flag): New function.
15242         (grub_ieee1275_set_flag): Likewise.
15243         (find_options): Rename to `grub_ieee1275_find_options'; update
15244         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15245         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15246         (cmain): New prototype.
15247         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15248         `grub_ieee1275_flags' directly.
15249         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15250         machine/biosdisk.h.
15251         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15252         Don't include grub/machine/init.h.
15253         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15254         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15255         Remove prototype.
15256         (grub_ieee1275_realmode): Likewise.
15257         (grub_ieee1275_flag): New enum.
15258         (grub_ieee1275_test_flag): New prototype.
15259         (grub_ieee1275_set_flag): New prototype.
15260         * include/grub/powerpc/ieee1275/init.h: Remove file.
15261         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15262         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15263         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15264         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15265         comment.
15266         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15267         `grub_ieee1275_test_flag'.
15268         (grub_ieee1275_encode_devname): Likewise.
15270 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15272         * include/grub/powerpc/ieee1275/ieee1275.h
15273         (grub_ieee1275_encode_devname): New prototype.
15274         (grub_ieee1275_get_filename): Likewise.
15275         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15276         function.
15277         (grub_set_prefix): Likewise.
15278         (grub_machine_init): Call grub_set_prefix.
15279         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15280         (grub_parse_type): New enum.
15281         (grub_ieee1275_get_devargs): New function.
15282         (grub_ieee1275_get_devname): Likewise.
15283         (grub_ieee1275_parse_args): Likewise.
15284         (grub_ieee1275_get_filename): Likewise.
15285         (grub_ieee1275_encode_devname): Likewise.
15287 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15289         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15290         `grub_loader_unset'.
15292 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15294         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15295         instead of grub_ieee1275_interpret.
15296         (grub_halt_init): New function.
15297         (grub_halt_fini): Likewise.
15298         (GRUB_MOD_INIT): Correct message grammar.
15299         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15300         instead of grub_ieee1275_interpret.
15301         (grub_reboot_init): New function.
15302         (grub_reboot_fini): Likewise.
15303         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15304         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15305         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15306         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15307         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15308         function.
15309         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15310         Add prototype.
15311         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15312         prototype.
15313         (grub_halt): Likewise.
15314         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15315         (cmain): Remove __attribute__((unused)).
15316         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15317         (grub_heap_len): Likewise.
15318         (grub_machine_fini): New function.
15319         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15320         (grub_halt): Likewise.
15321         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15322         function.
15323         * util/powerpc/ieee1275/misc.c: New file.
15325 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15327         * DISTLIST: New file.
15328         * gendistlist.sh: Likewise.
15330         * Makefile.in (COMMON_DISTFILES): Removed.
15331         (BOOT_DISTFILES): Likewise.
15332         (CONF_DISTFILES): Likewise.
15333         (DISK_DISTFILES): Likewise.
15334         (FS_DISTFILES): Likewise.
15335         (INCLUDE_DISTFILES): Likewise.
15336         (KERN_DISTFILES): Likewise.
15337         (LOADER_DISTFILES): Likewise.
15338         (TERM_DISTFILES): Likewise.
15339         (UTIL_DISTFILES): Likewise.
15340         (DISTFILES): Likewise.
15341         (uninstall): Uninstall files in $(pkgdata_DATA).
15342         (DISTLIST): New target.
15343         (distdir): Use the contents of the file DISTLIST to get a list of
15344         distributed files.
15346 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15348         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15349         descriptor. This is ported from GRUB Legacy.
15351         * gencmdlist.sh: Added an extra semicolon to make it work with
15352         old sed versions. Reported by Robert Bihlmeyer
15353         <robbe@orcus.priv.at>.
15355 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15357         Automatic loading of commands is supported.
15359         * normal/main.c (read_command_list): New function.
15360         (grub_normal_execute): Call read_command_list.
15362         * normal/command.c (grub_register_command): Return zero or CMD.
15363         Allocate CMD->NAME from the heap.
15364         Initialize CMD->MODULE_NAME to zero.
15365         Find the same name as well. If the same command is found and it is
15366         a dummy command, overwrite members. If it is not a dummy command,
15367         return zero.
15368         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15369         (grub_command_find): If a dummy command is found, load a module
15370         and retry to find a command only once.
15372         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15373         make sure that each command is loaded.
15375         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15376         macro.
15377         (struct grub_command): Remove const from the member `name'.
15378         Add a new member `module_name'.
15379         (grub_register_command): Return grub_command_t.
15381         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15382         sure that each command is loaded.
15384         * genmk.rb (PModule::rule): Specify a module name without the
15385         suffix ".mod" to gencmdlist.sh.
15387 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15389         * gencmdlist.sh: New file.
15391         * genmk.rb (PModule::rule): Generate a rule for a command list.
15392         Clean command.lst.
15393         Generate command.lst from $(COMMANDFILES).
15395         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15396         (DATA): Added $(pkgdata_DATA).
15397         (install-local): Install files in $(pkgdata_DATA).
15399 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15401         * term/i386/pc/vga.c (debug_command): Removed.
15402         (GRUB_MOD_INIT): Do not register the command "debug".
15404         From Hollis Blanchard:
15405         * commands/configfile.c: New file.
15406         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15407         commands/configfile.c.
15408         (pkgdata_MODULES): Added configfile.mod.
15409         (configfile_mod_SOURCES): New variable.
15410         (configfile_mod_CFLAGS): Likewise.
15411         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15412         commands/configfile.c.
15413         (pkgdata_MODULES): Added configfile.mod.
15414         (configfile_mod_SOURCES): New variable.
15415         (configfile_mod_CFLAGS): Likewise.
15416         * util/grub-emu.c (main): Call grub_configfile_init and
15417         grub_configfile_fini.
15418         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15419         prototype.
15420         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15422 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15424         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15425         address.
15427         * commands/help.c (grub_cmd_help): Do not print newlines after
15428         the last command in print_command_help.
15430 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15432         * commands/default.h: New file.
15433         * commands/timeout.h: Likewise.
15434         * normal/context.c: Likewise.
15436         * util/misc.c: Do not include sys/times.h.
15437         Include sys/time.h and grub/machine/time.h.
15438         (grub_get_rtc): Rewritten with gettimeofday.
15440         * util/grub-emu.c (main): Call grub_default_init and
15441         grub_timeout_init before grub_normal_init, and call
15442         grub_timeout_fini and grub_default_fini after grub_main.
15444         * util/console.c (grub_ncurses_checkkey): Return the read
15445         character or -1.
15447         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15448         timeouts.
15450         * normal/main.c (read_config_file): Push MENU. If this fails,
15451         print an error and wait for a user input.
15452         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15453         If a menu is empty or an error occurs, pop MENU.
15454         (grub_normal_execute): Pop and free MENU after grub_menu_run
15455         returns.
15457         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15459         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15460         include time.h.
15461         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15462         without GRUB_UTIL.
15463         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15464         time.h.
15465         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15466         without GRUB_UTIL.
15468         * include/grub/normal.h (struct grub_menu_list): New struct.
15469         (grub_menu_list_t): New type.
15470         (struct grub_context): New struct.
15471         (grub_context_t): New type.
15472         (grub_register_command): Got rid of EXPORT_FUNC.
15473         (grub_unregister_command): Likewise.
15474         (grub_context_get): New prototype.
15475         (grub_context_get_current_menu): Likewise.
15476         (grub_context_push_menu): Likewise.
15477         (grub_context_pop_menu): Likewise.
15478         [GRUB_UTIL] (grub_default_init): Likewise.
15479         [GRUB_UTIL] (grub_default_fini): Likewise.
15480         [GRUB_UTIL] (grub_timeout_init): Likewise.
15481         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15483         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15484         commands/timeout.c and normal/context.c.
15485         (pkgdata_MODULES): Added default.mod and timeout.mod.
15486         (normal_mod_SOURCES): Added normal/context.c.
15487         (default_mod_SOURCES): New variable.
15488         (default_mod_CFLAGS): Likewise.
15489         (timeout_mod_SOURCES): Likewise.
15490         (timeout_mod_CFLAGS): Likewise.
15491         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15492         conf/i386-pc.rmk.
15493         (pkgdata_MODULES): Added default.mod and timeout.mod.
15494         (normal_mod_SOURCES): Added normal/context.c.
15495         (default_mod_SOURCES): New variable.
15496         (default_mod_CFLAGS): Likewise.
15497         (timeout_mod_SOURCES): Likewise.
15498         (timeout_mod_CFLAGS): Likewise.
15500         * Makefile.in (all-local): Added $(MKFILES).
15502 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15504         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15505         (grub_emu_SOURCES): Likewise.
15506         (pkgdata_MODULES): Add `sun.mod'.
15507         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15508         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15509         `partmap/sun.c'.
15510         (pkgdata_MODULES): Add `sun.mod'.
15511         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15512         * include/grub/partition.h (grub_sun_partition_map_init): New
15513         prototype.
15514         (grub_sun_partition_map_fini): Likewise.
15515         * partmap/sun.c: New file.
15516         * util/grub-emu.c (main): Initialize and de-initialize the sun
15517         partitionmap support.
15519 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15521         This implements an Emacs-like menu entry editor.
15523         * normal/menu_entry.c: New file.
15525         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15526         characters to ASCII.
15527         (saved_char): New variable.
15528         (grub_ncurses_checkkey): Rewritten completely.
15529         (grub_ncurses_getkey): Likewise.
15530         (grub_ncurses_init): Call raw instead of cbreak.
15532         * normal/menu.c (print_entry): Do not put a space.
15533         (init_page): Renamed to ...
15534         (grub_menu_init_page): ... this. All callers changed.
15535         (edit_menu_entry): Removed.
15536         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15538         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15540         * kern/misc.c (grub_vprintf): Call grub_refresh.
15542         * normal/menu.c (DISP_LEFT): Renamed to ...
15543         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15544         * normal/menu.c (DISP_UP): Renamed to ...
15545         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15546         * normal/menu.c (DISP_RIGHT): Renamed to ...
15547         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15548         * normal/menu.c (DISP_DOWN): Renamed to ...
15549         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15550         * normal/menu.c (DISP_HLINE): Renamed to ...
15551         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15552         * normal/menu.c (DISP_VLINE): Renamed to ...
15553         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15554         * normal/menu.c (DISP_UL): Renamed to ...
15555         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15556         * normal/menu.c (DISP_UR): Renamed to ...
15557         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15558         * normal/menu.c (DISP_LL): Renamed to ...
15559         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15560         * normal/menu.c (DISP_LR): Renamed to ...
15561         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15562         * normal/menu.c (TERM_WIDTH): Renamed to ...
15563         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15564         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15565         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15566         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15567         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15568         * normal/menu.c (TERM_MARGIN): Renamed to ...
15569         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15570         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15571         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15572         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15573         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15574         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15575         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15576         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15577         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15578         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15579         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15580         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15581         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15582         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15583         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15584         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15585         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15586         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15587         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15588         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15589         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15590         All callers changed.
15592         * include/grub/normal.h: New prototype.
15594         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15595         normal/menu_entry.c.
15596         (normal_mod_SOURCES): Likewise.
15597         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15598         (normal_mod_SOURCES): Likewise.
15600 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15602         * include/grub/normal.h (grub_halt_init): New prototype.
15603         (grub_halt_fini): Likewise.
15604         (grub_reboot_init): Likewise.
15605         (grub_reboot_fini): Likewise.
15607         * util/grub-emu.c: Include signal.h.
15608         (main_env): New global variable.
15609         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15610         catch C-c.
15611         (grub_machine_fini): New function.
15612         (main): Call grub_halt_init and grub_reboot_init before
15613         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15614         Call setjmp with MAIN_ENV to go back afterwards.
15615         Call grub_machine_fini right before return.
15617         * include/grub/util/misc.h: Include setjmp.h.
15618         (main_env): New prototype.
15620         * include/grub/kernel.h (grub_machine_fini): New prototype.
15621         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15622         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15624         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15625         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15626         * term/i386/pc/console.c (grub_console_fini): Likewise.
15628         * util/i386/pc/misc.c: New file.
15630         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15631         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15632         commands/i386/pc/reboot.c.
15634 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15636         * include/grub/dl.h (grub_dl_check_header): New prototype.
15637         (grub_arch_dl_check_header): Change return type to grub_err_t,
15638         remove size parameter and export function.  Update all callers.
15639         * kern/dl.c (grub_dl_check_header): New function.
15640         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15641         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15642         are inside the core.
15643         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15644         independent ELF header checks.
15645         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15646         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15647         `grub_dl_check_header' instead of explicit checks.  Check for the
15648         ELF type.
15649         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15650         `grub_dl_check_header' instead of explicit checks.  Remove arch
15651         specific ELF header checks.
15653         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15654         argument SIZE.
15656 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15658         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15659         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15661 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15663         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15664         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15665         (part_map_iterate): Clear `grub_errno' and return 0 if
15666         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15667         * partmap/amiga.c (amiga_partition_map_iterate): Return
15668         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15669         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15671 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15673         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15674         help info.
15676 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15678         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15679         Removed prototype.
15680         (grub_rescue_cmd_linux): New prototype.
15681         (grub_rescue_cmd_initrd): Likewise.
15682         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15683         `bi_rec'.
15684         (grub_linux_release_mem): Release the memory for the initrd.
15685         (grub_load_linux): Renamed from this...
15686         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15687         Changed `entry' not to be static.  Loop over memory regions to
15688         find another one when the default fails.
15689         (grub_rescue_cmd_initrd): New function.
15690         (grub_linux_init): Remove function.
15691         (grub_linux_fini): Likewise.
15692         (GRUB_MOD_INIT): Register `initrd'.
15693         (GRUB_MOD_FINI): Unregister `initrd'.
15694         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15695         Function removed.
15696         (grub_linux_normal_fini): Likewise.
15697         (GRUB_MOD_INIT): Register `initrd'.
15698         (GRUB_MOD_FINI): Unregister `initrd'.
15700 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15702         * commands/help.c: New file.
15703         * normal/arg.c (show_help): Renamed to...
15704         (grub_arg_show_help): ... this.
15705         * commands/i386/pc/halt.c: New file.
15706         * commands/i386/pc/reboot.c: Likewise.
15707         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15708         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15709         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15710         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15711         variables.
15712         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15713         `commands/help.c'.
15714         (pkgdata_MODULES): Add `help.mod'.
15715         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15716         * grub/i386/pc/init.h (grub_reboot): New prototype.
15717         (grub_halt): Likewise.
15718         * include/grub/normal.h (grub_arg_show_help): New prototype.
15719         (grub_help_init): Likewise.
15720         (grub_help_fini): Likewise.
15721         * util/grub-emu.c (main): Initialize and deinitialize the help
15722         command.
15724         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15726         * normal/command.c (grub_command_init): Fixed the description of
15727         the `set' and `unset' commands.
15729 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15731         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15732         function.
15733         * commands/ieee1275/halt.c: New file.
15734         * commands/ieee1275/reboot.c: Likewise.
15735         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15736         `__attribute__ ((unused))'.  Some GCS related fixed.
15737         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15738         (grub_suspend_fini): Likewise.
15739         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15740         and `halt.mod'.
15741         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15742         (halt_mod_CFLAGS): New variables.
15743         * include/grub/powerpc/ieee1275/ieee1275.h
15744         (grub_ieee1275_interpret): New prototype.
15746 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15748         * include/grub/misc.h (memmove): New prototype.
15749         (memcpy): Likewise.
15751 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15753         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15754         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15756 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15758         * kern/misc.c (grub_strndup): Function rewritten.
15760 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15762         * normal/menu.c (TERM_WIDTH): Macro redefined.
15763         (TERM_TOP_BORDER_Y): Likewise.
15764         (draw_border): Replaced while-loop by a for-loop.  Make the number
15765         of lines consistent with the number of lines displayed in
15766         print_entries.  Added a margin below the rectangle.
15767         (print_entry): Make the entry fit in the rectangle.
15768         (print_entries): Display the scroll arrows next to the right
15769         border.
15771 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15773         * fs/minix.c (grub_minix_find_file): Reserve more space for
15774         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15775         `grub_strncpy' to copy `path' into it.
15777 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15779         Add the loopback device, a device via which files can be accessed
15780         as devices.
15782         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15783         (pkgdata_MODULES): Add loopback.mod.
15784         (loopback_mod_SOURCES): New variable.
15785         (loopback_mod_CFLAGS): Likewise.
15786         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15787         `disk/loopback.c'.
15788         (pkgdata_MODULES): Add loopback.mod.
15789         (loopback_mod_SOURCES): New variable.
15790         (loopback_mod_CFLAGS): Likewise.
15791         * disk/loopback.c: new file.
15792         * include/grub/normal.h (grub_loop_init): New prototype.
15793         (grub_loop_fini): New prototype.
15794         * util/grub-emu.c (main): Initialize and de-initialize loopback
15795         support.
15796         * include/grub/disk.h (grub_disk_dev_id): Add
15797         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15799 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15801         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15802         function.
15803         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15804         (suspend_mod_SOURCES): New variable.
15805         (suspend_mod_CFLAGS): Likewise.
15806         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15807         New prototype.
15808         * commands/ieee1275/suspend.c: New file.
15810 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15812         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15813         ((unused))' to `__attribute__ ((used))'.
15814         (GRUB_MOD_FINI): Likewise.
15815         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15816         * genmk.rb (PModule): Assign space to common symbols when linking
15817         modules.
15819 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15821         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15822         `unsigned' arguments to `grub_size_t'.
15823         (grub_malloc): Likewise.
15824         (grub_realloc): Likewise.
15825         (grub_memalign): Likewise.
15826         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15827         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15828         * util/misc.c (grub_malloc): Likewise.
15829         (grub_realloc): Likewise.
15830         * kern/mm.c (get_header_from_pointer): Change the casts to
15831         `unsigned' into a cast to `grub_size_t'.
15833         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15834         point to `currnode' when `currnode' is changed.
15836         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15837         Schottelius <nico-linux@schottelius.org>.
15839 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15841         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15842         (note_path): Remove variable.
15843         (GRUB_IEEE1275_NOTE_NAME): New macro.
15844         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15845         (grub_ieee1275_note_hdr): New structure.
15846         (grub_ieee1275_note_desc): Likewise.
15847         (grub_ieee1275_note): Likewise.
15848         (load_note): Remove `dir' argument.  All callers updated.  Remove
15849         `note_img' and `path'.  Do not load a file from `note_path'.
15850         Initialize a struct grub_ieee1275_note and write that to `out'.
15851         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15853 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15855         * util/misc.c (grub_util_read_image): Revert last change.  It
15856         called `grub_util_read_at', which seeks from the beginning of the
15857         file.
15859 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15861         * TODO: Add note about endianness in grub-mkimage.
15862         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15863         section.
15864         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15865         (grub_mkimage_SOURCES): New target.
15866         * include/grub/kernel.h (grub_start_addr): Remove variable.
15867         (grub_end_addr): Likewise.
15868         (grub_total_module_size): Likewise.
15869         (grub_kernel_image_size): Likewise.
15870         (GRUB_MODULE_MAGIC): New constant.
15871         (grub_module_info): New structure.
15872         (grub_arch_modules_addr): New prototype.
15873         (grub_get_end_addr): Remove prototype.
15874         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15875         * include/grub/powerpc/ieee1275/kernel.h: New file.
15876         * include/grub/util/misc.h (grub_util_get_fp_size): New
15877         prototype.
15878         (grub_util_read_at): Likewise.
15879         (grub_util_write_image_at): Likewise.
15880         * kern/main.c (grub_get_end_addr): Remove function.
15881         (grub_load_modules): Call grub_arch_modules_addr instead of using
15882         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15883         the grub_module_info fields instead of calling grub_get_end_addr
15884         as loop conditions.  Move grub_add_unused_region code here.
15885         (grub_add_unused_region): Remove function.
15886         * kern/i386/pc/init.c: Include grub/cache.h.
15887         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15888         one call to add_mem_region.
15889         (grub_arch_modules_addr): New function.
15890         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15891         (grub_total_module_size): Likewise.
15892         Include grub/machine/kernel.h.
15893         (grub_arch_modules_addr): New function.
15894         * util/grub-emu.c (grub_end_addr): Remove variable.
15895         (grub_total_module_size): Likewise.
15896         (grub_arch_modules_addr): New function.
15897         * util/misc.c: Include unistd.h.
15898         (grub_util_get_fp_size): New function.
15899         (grub_util_read_at): Likewise.
15900         (grub_util_write_image_at): Likewise.
15901         (grub_util_read_image): Call grub_util_read_at.
15902         (grub_util_write_image): Call grub_util_write_image_at.
15903         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15904         additional memory in kernel_img for a struct grub_module_info.
15905         Fill in that grub_module_info.
15906         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15908 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15910         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15911         New function.
15912         * include/grub/powerpc/ieee1275/ieee1275.h
15913         (grub_ieee1275_milliseconds): New prototype.
15914         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15915         Change to 1000.
15916         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15917         grub_ieee1275_milliseconds.
15919 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15921         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15922         variable.
15923         (find_options): New function.
15924         (cmain): Call find_options.
15925         * include/grub/powerpc/ieee1275/ieee1275.h
15926         (grub_ieee1275_realmode): New extern variable.
15927         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15928         grub_map if grub_ieee1275_realmode is false.
15930 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15932         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15933         lines are inserted and make it work like readline.  Reported by
15934         Vincent Pelletier <subdino2004@yahoo.fr>.
15936 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15938         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15940         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15941         `kern/powerpc/cache.S'.
15943 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15945         * genmk.rb: Handle the `Program' class in the main loop.  Written
15946         by Johan Rydberg <jrydberg@gnu.org>.
15947         (Program): New class.
15948         (programs): New variable.
15949         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15950         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15951         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15952         (help_arch): Function removed.
15953         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15954         `powerpc/libgcc.h' and `loader.h'.
15955         (pkgdata_PROGRAMS): New variable.
15956         (sbin_UTILITIES): Variable removed.
15957         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15958         (grubof_SOURCES): Variable re-defined so it only includes the
15959         core functionality.
15960         (grubof_CFLAGS): Remove `-DGRUBOF'.
15961         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15962         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15963         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15964         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15965         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15966         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15967         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15968         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15969         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15970         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15971         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15972         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15973         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15974         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15975         (pc_mod_CFLAGS): New variables.
15976         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15977         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15978         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15979         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15980         Moved from here...
15981         * include/grub/i386/pc/init.h (grub_os_area_addr)
15982         (rub_os_area_size): ... to here.
15983         * include/grub/powerpc/ieee1275/ieee1275.h
15984         (grub_ieee1275_entry_fn): Export symbol.
15985         * include/grub/powerpc/ieee1275/init.h: New file.
15986         * include/grub/powerpc/libgcc.h: Likewise.
15987         * include/grub/cache.h: Likewise.
15988         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15989         <hollis@penguinppc.org>.
15990         * kern/dl.c: Include <grub/cache.h>.
15991         (grub_dl_flush_cache): New function.
15992         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15993         for this module.
15994         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15995         (grub_console_init): Removed prototypes.
15996         (grub_machine_init): Don't initialize the modules anymore.
15997         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15998         static.
15999         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16000         Macro undef removed.
16001         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16002         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16003         relocation `R_PPC_REL32'.  Return an error when the relocation is
16004         unknown.
16005         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16006         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16007         * util/misc.c (grub_arch_sync_caches): Likewise.
16009 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16011         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16012         `symlist.c', add `grubof_symlist.c'.
16013         (symlist.c): Variable removed.
16014         (grubof_HEADERS): Variable added.
16015         (grubof_symlist.c): New target.
16016         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16017         `kernel_img_HEADERS'.
16018         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16019         * kern/powerpc/dl.c: New file.
16020         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16021         Function removed.
16022         (grub_arch_dl_relocate_symbols): Likewise.
16023         (grub_register_exported_symbols): Likewise.
16025 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16027         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16028         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16029         to fail instead.  Reported by Vincent Pelletier
16030         <subdino2004@yahoo.fr>.
16032         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16033         it is not allocated.  Reported by Vincent Pelletier
16034         <subdino2004@yahoo.fr>.
16036         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16037         output so the output looks better.
16039 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16041         Modulize the partition map support and add support for the amiga
16042         partition map.
16044         * commands/ls.c: Include <grub/partition.h> instead of
16045         <grub/machine/partition.h>.
16046         * kern/disk.c: Likewise.
16047         * kern/rescue.c: Likewise.
16048         * loader/i386/pc/chainloader.c: Likewise.
16049         * normal/cmdline.c: Likewise.
16050         * kern/powerpc/ieee1275/init.c: Likewise.
16051         (grub_machine_init): Call `grub_pc_partition_map_init',
16052         `grub_amiga_partition_map_init' and
16053         `grub_apple_partition_map_init'.
16054         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16055         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16056         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16057         `partition.h' and `pc_partition.h'.
16058         (grub_setup_SOURCES): Remove
16059         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16060         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16061         (grub_emu_SOURCES): Likewise.
16062         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16063         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16064         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16065         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16066         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16067         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16068         (grubof_SOURCES): Likewise.
16069         * disk/i386/pc/partition.c: File removed.
16070         * disk/powerpc/ieee1275/partition.c: Likewise.
16071         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16072         * include/grub/i386/pc/partition.h: Likewise.
16073         * kern/partition.c: New file.
16074         * partmap/amiga.c: Likewise.
16075         * partmap/apple.c: Likewise.
16076         * partmap/pc.c: Likewise.
16077         * include/grub/partition.h: Likewise..
16078         * include/grub/pc_partition.h: Likewise.
16079         * util/grub-emu.c: Include <grub/partition.h> instead of
16080         <grub/machine/partition.h>.
16081         (main): Call `grub_pc_partition_map_init',
16082         `grub_amiga_partition_map_init' and
16083         `grub_apple_partition_map_init' and deinitialize afterwards.
16084         * util/i386/pc/biosdisk.c: Include `#include
16085         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16086         `<grub/machine/partition.h>'.
16087         * util/i386/pc/grub-setup.c: Likewise.
16088         * util/i386/pc/biosdisk.c: Likewise.
16089         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16090         partition information in case of a PC partition.
16091         * util/i386/pc/grub-setup.c: Include `#include
16092         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16093         `<grub/machine/partition.h>'.
16094         (setup): Only access the PC specific partition information in case
16095         of a PC partition.
16097 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16099         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16100         (grub_longjmp): Likewise.
16101         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16102         20.
16103         * normal/powerpc/setjmp.S: New file.
16104         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16105         `normal/powerpc/setjmp.S'.
16106         (grubof_CFLAGS): Add `-DGRUBOF'.
16107         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16108         [GRUB_UTIL && !GRUBOF].
16110 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16112         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16113         property named `name'.  Correctly handle the error returned by
16114         `grub_ieee1275_finddevice' if a device can not be opened.
16116 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16118         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16119         `actual' for negativity.
16120         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16121         kern/fshelp.c.
16123 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16125         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16126         (PAGE_OFFSET): New macro.
16127         (CRTC_ADDR_PORT): Likewise.
16128         (CRTC_DATA_PORT): Likewise.
16129         (START_ADDR_HIGH_REGISTER): Likewise.
16130         (START_ADDR_LOW_REGISTER): Likewise.
16131         (GRAPHICS_ADDR_PORT): Likewise.
16132         (GRAPHICS_DATA_PORT): Likewise.
16133         (READ_MAP_REGISTER): Likewise.
16134         (INPUT_STATUS1_REGISTER): Likewise.
16135         (INPUT_STATUS1_VERTR_BIT): Likewise.
16136         (page): New variable.
16137         (wait_vretrace): New function.
16138         (set_read_map): Likewise.
16139         (set_start_address): Likewise.
16140         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16141         the right page.
16142         (check_vga_mem): Take the page into account.
16143         (write_char): Likewise.
16144         (write_cursor): Likewise.
16145         (scroll_up): Likewise.  Copy the page to the page that is not
16146         shown and switch between both pages.
16147         (grub_vga_putchar): Fix off by one error.
16148         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16149         account.
16151 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16153         Add support for iso9660 (including rockridge).
16155         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16156         (iso9660_mod_SOURCES): New variable.
16157         (iso9660_mod_CFLAGS): Likewise.
16158         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16159         * include/grub/fs.h (grub_iso9660_init): New prototype.
16160         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16161         * fs/iso9660.c: New file.
16163         * include/grub/misc.h (grub_strncat): New prototype.
16164         * kern/misc.c (grub_strncat): New function.
16166         * fs/hfs.c (grub_hfs_mount): Translate the error
16167         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16168         * fs/jfs.c (grub_jfs_mount): Likewise.
16169         * fs/ufs.c (grub_ufs_mount): Likewise.
16171 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16173         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16174         which initialized BAT registers.
16175         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16176         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16177         Move from here...
16178         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16179         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16180         ... to here.
16181         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16182         (grub_mapclaim): Likewise.
16183         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16184         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16185         hand.
16187 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16189         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16190         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16191         -ffreestanding and -msoft-float.
16193 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16195         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16196         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16197         set in grub_ieee1275_flags.
16199 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16201         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16202         prototype.
16203         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16204         grub_console_init first.
16205         Change the memory range used for grub_ieee1275_claim and
16206         grub_mm_init_region.
16207         Print an error message if the claim fails.
16208         Include <grub/misc.h>.
16210 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16212         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16213         Call grub_children_iterate for device nodes of type `scsi',
16214         `ide', or `ata'.
16215         (grub_ofdisk_open): Remove manual device alias resolution.
16216         Fix memory leak when device cannot be opened.
16217         * include/grub/powerpc/ieee1275/ieee1275.h
16218         (grub_children_iterate): New prototype.
16219         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16220         New function.
16221         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16222         Return -1 if args.size was -1.
16224 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16226         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16227         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16228         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16229         Open Firmware's memory for it; claim memory from _start to _end.
16230         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16231         (_end): New extern.
16232         (_start): Zero BSS from __bss_start to _end.
16233         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16234         New extern.
16235         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16237 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16239         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16240         -1 if args.base was -1.
16242 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16244         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16245         escape sequence instead of a literal ^L. Also call
16246         grub_ofconsole_gotoxy.
16248 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16250         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16251         void *  arguments to grub_addr_t.  All callers updated.  Also make
16252         the `result' argument optional.
16253         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16254         All callers updated.
16256 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16258         * commands/ls.c (grub_ls_list_files): Use the string following the
16259         initial ')', if present, as the filesystem path.
16260         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16262         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16264 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16266         Make the source code of the menu interface more readable.
16268         * normal/menu.c: Include grub/mm.h.
16269         (TERM_WIDTH): New macro.
16270         (TERM_HEIGHT): Likewise.
16271         (TERM_INFO_HEIGHT): Likewise.
16272         (TERM_MARGIN): Likewise.
16273         (TERM_SCROLL_WIDTH): Likewise.
16274         (TERM_TOP_BORDER_Y): Likewise.
16275         (TERM_LEFT_BORDER_X): Likewise.
16276         (TERM_BORDER_WIDTH): Likewise.
16277         (TERM_MESSAGE_HEIGHT): Likewise.
16278         (TERM_BORDER_HEIGHT): Likewise.
16279         (TERM_NUM_ENTRIES): Likewise.
16280         (TERM_FIRST_ENTRY_Y): Likewise.
16281         (TERM_ENTRY_WIDTH): Likewise.
16282         (TERM_CURSOR_X): Likewise.
16283         (draw_border): Use macros instead of magic numbers.
16284         (print_entry): Likewise.
16285         (print_entries): Likewise.
16286         (run_menu): Likewise. Also, handle the key 'e'.
16287         (run_menu_entry): Ignore empty command lines.
16288         (print_message): Added a new argument EDIT. If EDIT is true,
16289         print a different message.
16290         (init_page): Likewise.
16291         (edit_menu_entry): New function. Not implemented yet.
16293 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16295         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16296         can be loaded from normal mode.
16298         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16299         `multiboot.mod'.
16300         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16301         (multiboot_mod_CFLAGS): New variables.
16302         * loader/i386/pc/linux_normal.c: New file.
16303         * loader/i386/pc/multiboot_normal.c: Likewise.
16305         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16306         attribute `unused'.
16308         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16309         `fdiro' to read the mode information from instead of `diro'.
16311         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16312         looking up a symlink.
16314         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16315         macro.
16316         * normal/command.c (grub_command_execute): Don't parse the
16317         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16318         flags of the command.
16320         * normal/menu.c (grub_menu_run): Fix typo.
16322 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16324         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16326         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16327         `y + 1' instead of `y - 1'.
16329         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16331 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16333         From Hollis Blanchard <hollis@penguinppc.org>:
16334         * kern/misc.c (memmove): New alias for grub_memmove.
16335         (memcmp): New alias for grub_memcmp.
16336         (memset): New alias for grub_memset.
16337         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16338         Change "int handle" to "grub_ieee1275_phandle_t handle".
16339         * include/grub/powerpc/ieee1275/ieee1275.h
16340         (grub_ieee1275_get_property): Likewise.
16342 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16344         Added normal mode command `chainloader' as module chain.mod, which
16345         depends on normal.mod and _chain.mod.
16347         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16348         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16349         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16350         Deleted prototype.
16351         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16352         but arguments parsing moved to ...
16353         (grub_chainloader_cmd): ... here.  New function.
16354         * include/grub/i386/pc/chainloader.h: New file.
16355         * loader/i386/pc/chainloader_normal.c: Likewise.
16357 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16359         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16360         (grub_mkimage_LDFLAGS): Likewise.
16361         (grub_emu_SOURCES): Likewise.
16362         (kernel_img_HEADERS): Added fshelp.h.
16363         * fs/ext2.c: Include <grub/fshelp.h>.
16364         (FILETYPE_REG): New macro.
16365         (FILETYPE_INO_REG): Likewise.
16366         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16367         Changed all users.
16368         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16369         all users.
16370         (grub_fshelp_node): New struct.
16371         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16372         to a pointer.
16373         (grub_ext2_get_file_block): Removed function.
16374         (grub_ext2_read_block): New function.
16375         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16376         This function was written.
16377         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16378         (grub_ext2_find_file): Removed function.
16379         (grub_ext2_read_symlink): New function.
16380         (grub_ext2_iterate_dir): Likewise.
16381         (grub_ext2_open): Rewritten.
16382         (grub_ext2_dir): Rewritten.
16383         * include/grub/fshelp.h: New file.
16384         * fs/fshelp.c: Likewise.
16386 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16388         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16389         (print_message): Add a missing newline.
16390         (run_menu): Added timeout support.
16391         (run_menu_entry): New local function.
16392         (grub_menu_run): Added support for booting.
16394         * kern/loader.c (grub_loader_is_loaded): New function.
16396         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16397         (grub_get_rtc): Exported.
16399         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16400         (grub_get_rtc): Exported.
16402         * include/grub/normal.h (struct grub_command_list): Remove
16403         constant from the member `command'.
16405         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16407         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16409         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16411 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16413         Add support for the JFS filesystem.
16415         * fs/jfs.c: New file.
16416         * include/grub/fs.h (grub_jfs_init): New prototype.
16417         (grub_jfs_fini): New prototype.
16418         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16419         (grub_emu_SOURCES): Likewise.
16420         (pkgdata_MODULES): Add jfs.mod.
16421         (jfs_mod_SOURCES): New variable.
16422         (jfs_mod_CFLAGS): Likewise.
16423         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16424         (grubof_SOURCES): Likewise.
16425         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16427         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16428         endian to the host endian.
16429         (grub_fat_utf16_to_utf8): Move function from there...
16430         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16431         the endianness of the source string anymore.
16432         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16434 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16436         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16437         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16438         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16439         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16441         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16442         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16443         for `node_found' and `it_dir'.
16444         (grub_hfs_dir): Add prototype for `dir_hook'.
16446         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16447         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16448         and `indir32' to silence a gcc warning.
16450         * include/grub/fs.h (grub_hfs_init): New prototype.
16451         (grub_hfs_fini): Likewise.
16454 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16456         Each disk device has its own id now. This is useful to make use
16457         of multiple disk devices.
16459         * include/grub/disk.h (grub_disk_dev_id): New enum.
16460         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16461         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16463         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16464         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16466         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16467         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16469         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16470         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16472         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16473         "id" which is used by the cache manager.
16475         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16476         of just "GRUB".
16478 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16480         * fs/hfs.c: New file.
16481         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16482         (grub_emu_SOURCES): Likewise.
16483         (pkgdata_MODULES): Add hfs.mod.
16484         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16485         (grubof_SOURCES): Likewise.
16486         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16488         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16489         * kern/misc.c (grub_strncasecmp): Add function.
16491 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16493         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16494         with parentheses.
16496         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16497         (grub_ext2_dir): In case the directory entry type is unknown, read
16498         it from the inode.
16500 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16502         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16503         grub_load_linux instead of grub_rescue_cmd_linux as second
16504         argument of grub_rescue_register_command.
16506         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16508 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16510         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16511         function.
16512         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16513         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16514         `loader/powerpc/ieee1275/linux.c',
16515         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16516         * include/grub/powerpc/ieee1275/ieee1275.h
16517         (grub_ieee1275_release): New prototype.
16518         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16519         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16520         normal, boot, linux and linux_normal.
16521         * loader/powerpc/ieee1275/linux.c: New file.
16522         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16524 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16526         * normal/arg.c (grub_arg_parse): Correct error handling after
16527         reallocating the argumentlist (check if `argl' is not null instead
16528         of checking if `args' is not null).
16529         * kern/mm.c (grub_realloc): Return the same pointer when using the
16530         same region, instead of returning the header address.
16532 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16534         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16535         one block instead of two when looking for the initial partition.
16536         (grub_partition_probe): Initialize the local variable `p' with 0.
16537         Use base 10 for the grub_strtoul call.
16538         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16539         need for one local variable.
16540         (grub_strtoul): Don't add the new value to `num', instead of that
16541         just assign it.
16543 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16545         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16546         (pxeboot_img_SOURCES): New variable.
16547         (pxeboot_img_ASFLAGS): Likewise.
16548         (pxeboot_img_LDFLAGS): Likewise.
16549         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16550         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16551         <lode_leroy@hotmail.com>.
16553 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16555         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16556         there was no input.
16558 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16560         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16561         the history buffer logic.
16563 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16565         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16566         (FILETYPE_INO_SYMLINK): New macros.
16567         (grub_ext2_find_file): Check if the node is a directory using the
16568         inode stat information instead of using the filetype in the
16569         dirent.  Exclude the first character of an absolute symlink.
16570         (grub_ext2_dir): Mask out the filetype part of the mode member of
16571         the inode.
16573 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16575         Add support for UFS version 1 and 2.  Add support for the minix
16576         filesystem version 1 and 2, both the variants with 14 and 30 long
16577         filenames.
16579         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16580         fs/minix.c.
16581         (grub_emu_SOURCES): Likewise.
16582         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16583         (ufs_mod_SOURCES): New variable.
16584         (ufs_mod_CFLAGS): Likewise.
16585         (minix_mod_SOURCES): Likewise.
16586         (minix_mod_CFLAGS): Likewise.
16587         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16588         fs/minix.c.
16589         (grubof_SOURCES): Likewise.
16590         * fs/ufs.c: New file.
16591         * fs/minix.c: New file.
16592         * include/grub/fs.h (grub_ufs_init): New prototype.
16593         (grub_ufs_fini): Likewise.
16594         (grub_minix_init): Likewise.
16595         (grub_minix_fini): Likewise.
16596         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16597         minix fs.
16599 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16601         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16602         commands/ls.c, commands/terminal.c, commands/boot.c,
16603         commands/cmp.c and commands/cat.c.
16604         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16606         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16607         "env.h"
16609 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16611         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16612         and grub_, respectively. Because the conversion is trivial and
16613         mechanical, I omit the details here. Please refer to the CVS
16614         if you need more information.
16616 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16618         * include/pupa: Renamed to ...
16619         * include/grub: ... this.
16620         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16621         * util/i386/pc/grub-mkimage.c: ... this.
16622         * util/i386/pc/pupa-setup.c: Renamed to ...
16623         * util/i386/pc/grub-setup.c: ... this.
16624         * util/pupa-emu.c: Renamed to ...
16625         * util/grub-emu.c: ... this.
16627 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16629         Add support for the newworld apple macintosh (PPC).  This has been
16630         tested on the powerbook 2000 only.  It only adds support for
16631         generic ieee1275 functions, console and disk support.  This should
16632         be easy to port to other architectures with support for Open
16633         Firmware.
16635         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16636         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16637         specific tests are only executed while building for the i386.
16638         Inverse test for crosscompile.
16639         * genmk.rb (Utility): Allow assembler files.
16640         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16641         * conf/powerpc-ieee1275.rmk: New file.
16642         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16643         * disk/powerpc/ieee1275/partition.c: Likewise.
16644         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16645         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16646         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16647         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16648         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16649         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16650         * include/pupa/powerpc/ieee1275/loader.h
16651         * include/pupa/powerpc/setjmp.h: Likewise.
16652         * include/pupa/powerpc/types.h: Likewise.
16653         * kern/powerpc/ieee1275/init.c: Likewise.
16654         * kern/powerpc/ieee1275/openfw.c: Likewise.
16655         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16657         These files were written by Johan Rydberg
16658         (jrydberg@night.trouble.net) and I only modified them slightly.
16660         * boot/powerpc/ieee1275/cmain.c: New file.
16661         * boot/powerpc/ieee1275/crt0.S: Likewise.
16662         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16663         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16665 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16667         * Makefile.in: Update copyright.
16668         * genmodsrc.sh: Likewise.
16669         * gensymlist.sh: Likewise.
16670         * term/i386/pc/vga.c: Indent correctly.
16672         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16673         bugreporting address.
16674         * util/i386/pc/pupa-setup.c (usage): Likewise,
16675         (main): Call pupa_ext2_init and pupa_ext2_fini.
16677         * fs/fat.c (log2): Renamed to ...
16678         (fat_log2): ... this.
16679         All callers changed.
16680         * kern/misc.c (memcpy): Alias to pupa_memmove.
16681         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16682         lvalue cast.
16683         * util/console.c (pupa_ncurses_fini): Return 0.
16685         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16686         Move fail label here.
16687         [__GNU__]: Don't warn when using stat.
16688         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16689         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16690         long int. Use strtol instead of strtoul.
16692 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16694         * commands/boot.c: New file.
16695         * commands/cat.c: Likewise.
16696         * commands/cmp.c: Likewise.
16697         * commands/ls.c: Likewise.
16698         * commands/terminal.c: Likewise.
16699         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16700         (pupa_register_command): Changed interface to match the new
16701         argument parser.
16702         (pupa_command_execute): Changed (almost rewritten) so it uses
16703         pupa_split_command.  Added support for setting variables using the
16704         syntax `foo=bar'.
16705         (rescue_command): Changed to work with the new argument parser.
16706         (terminal_command): Moved from here to commands/terminal.c.
16707         (set_command): New function.
16708         (unset_command): New function.
16709         (insmod_command): New function.
16710         (rmmod_command): New function.
16711         (lsmod_command): New function.
16712         (pupa_command_init): Don't initialize the command terminal
16713         anymore.  Initialize the commands set, unset, insmod, rmmod and
16714         lsmod.
16715         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16716         (kernel_img_HEADERS): Add arg.h and env.h.
16717         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16718         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16719         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16720         normal/arg.c.
16721         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16722         terminal.mod.
16723         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16724         (boot_mod_SOURCES): New variable.
16725         (terminal_mod_SOURCES): Likewise.
16726         (ls_mod_SOURCES): Likewise.
16727         (cmp_mod_SOURCES): Likewise.
16728         (cat_mod_SOURCES): Likewise.
16730         * normal/arg.c: New file.
16731         * kern/env.c: Likewise.
16732         * include/pupa/arg.h: Likewise.
16733         * include/pupa/env.h: Likewise.
16734         * font/manager.c (font_command): Changed to match argument parsing
16735         interface changes.
16736         (PUPA_MOD_INIT): Likewise.
16737         * hello/hello.c (pupa_cmd_hello): Likewise.
16738         (PUPA_MOD_INIT): Likewise.
16739         * include/pupa/disk.h: Include <pupa/device.h>.
16740         (pupa_print_partinfo): New prototype.
16741         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16742         (pupa_dl_get_prefix): Likewise.
16743         * include/pupa/misc.h: Include <pupa/err.h>.
16744         (pupa_isgraph): New prototype.
16745         (pupa_isdigit): Likewise.
16746         (pupa_split_cmdline): Likewise.
16747         * include/pupa/normal.h: Include <pupa/arg.h>.
16748         (pupa_command): Changed the prototype of the member `func' to
16749         match the argument parsing interface.  Added member `options'.
16750         (pupa_register_command): Updated to match function.
16751         (pupa_arg_parse): New prototype.
16752         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16753         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16754         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16755         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16756         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16757         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16758         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16759         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16760         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16761         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16762         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16763         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16764         * kern/disk.c: Include <pupa/file.h>.
16765         (pupa_print_partinfo): New function.
16766         * kern/dl.c: Include <pupa/env.h>.
16767         (pupa_dl_dir): Variable removed.
16768         (pupa_dl_load): Use the environment variable `prefix' instead of
16769         the variable pupa_dl_dir.
16770         (pupa_dl_set_prefix): Function removed.
16771         (pupa_dl_get_prefix): Likewise.
16772         * kern/i386/pc/init.c: Include <pupa/env.h>.
16773         (pupa_machine_init): Use the environment variable `prefix' instead of
16774         using pupa_dl_set_prefix to set the prefix.
16775         * kern/main.c: Include <pupa/env.h>.
16776         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16777         using pupa_dl_get_prefix to get the prefix.
16778         * kern/misc.c: Include <pupa/env.h>.
16779         (pupa_isdigit): New function.
16780         (pupa_isgraph): Likewise.
16781         (pupa_ftoa): Likewise.
16782         (pupa_vsprintf): Added support for printing values of the type
16783         `double'.  Make it possible to format variable output when using
16784         formatting like `%1.2%f'.
16785         (pupa_split_cmdline): New function.
16786         * kern/rescue.c: Include <pupa/env.h>.
16787         (next_word): Removed function.
16788         (pupa_rescue_cmd_prefix): Likewise.
16789         (pupa_rescue_cmd_set): New function.
16790         (pupa_rescue_cmd_unset): New function.
16791         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16792         split the command line instead of splitting it here.  Added
16793         support for setting variables using the syntax `foo=bar'.  Don't
16794         initialize the prefix command anymore.  Initialized the set and
16795         unset commands.
16796         * normal/cmdline.c: Include <pupa/env.h>.
16797         (pupa_tab_complete): Added prototypes for print_simple_completion,
16798         print_partition_completion, add_completion, iterate_commands,
16799         iterate_dev, iterate_part and iterate_dir. Moved code to print
16800         partition information from here to kern/disk.c.
16801         (pupa_cmdline_run): Don't check if the function exists anymore.
16802         * normal/main.c: Include <pupa/env.h>.
16803         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16804         instead of using pupa_dl_get_prefix to get the prefix.
16805         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16806         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16807         warning.
16808         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16809         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16810         ((unused))' to silence a gcc warning.
16811         (pupa_vga_setcolor): Likewise.
16812         (debug_command): Changed to match argument parsing
16813         interface changes.
16814         * util/pupa-emu.c: Include <pupa/env.h>.
16815         (options): Added 0's for unused fields to silence a gcc warning.
16816         (argp): Likewise.
16817         (main): Use the environment variable `prefix' instead of using
16818         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16819         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16820         and terminal.
16822         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16823         * util/misc.c: Include <malloc.h>.
16824         (pupa_malloc): Rewritten so errors are correctly reported.
16825         (pupa_realloc): Likewise.
16826         (pupa_memalign): Likewise.
16827         (pupa_mm_init_region): Declare unused variables with
16828         `__attribute__ ((unused))' to silence a gcc warning.
16829         * normal/i386/setjmp.S: Remove tab at the end of the file to
16830         silence a gcc warning.
16831         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16832         variables with `__attribute__ ((unused))' to silence a gcc
16833         warning.
16834         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16835         local variable i unsigned to silence a gcc warning.
16837         * kern/term.c: Include <pupa/misc.h>.
16838         (pupa_more_lines): New variable.
16839         (pupa_more): Likewise.
16840         (pupa_putcode): When the pager is active pause at the end of every
16841         screen.
16842         (pupa_set_more): New function.
16843         * include/pupa/term.h (pupa_set_more): New prototype.
16846 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16848         Now this project is GRUB 2 rather than PUPA. The location of
16849         the CVS repository was moved to GRUB's.
16851         * configure.ac: Use bug-grub as the reporting address.
16852         Use GRUB instead of PUPA.
16853         Change the version number to 1.90.
16855 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16857         * genkernsyms.sh: Updated copyright information.
16858         * genmk.rb: Likewise.
16859         * genmodsrc.sh: Likewise.
16860         * gensymlist.sh: Likewise.
16861         * boot/i386/pc/boot.S: Likewise.
16862         * boot/i386/pc/diskboot.S: Likewise.
16863         * disk/i386/pc/biosdisk.c: Likewise.
16864         * disk/i386/pc/partition.c: Likewise.
16865         * font/manager.c: Likewise.
16866         * fs/ext2.c: Likewise.
16867         * fs/fat.c: Likewise.
16868         * include/pupa/boot.h: Likewise.
16869         * include/pupa/device.h: Likewise.
16870         * include/pupa/disk.h: Likewise.
16871         * include/pupa/dl.h: Likewise.
16872         * include/pupa/elf.h: Likewise.
16873         * include/pupa/err.h: Likewise.
16874         * include/pupa/file.h: Likewise.
16875         * include/pupa/font.h: Likewise.
16876         * include/pupa/fs.h: Likewise.
16877         * include/pupa/kernel.h: Likewise.
16878         * include/pupa/loader.h: Likewise.
16879         * include/pupa/misc.h: Likewise.
16880         * include/pupa/mm.h: Likewise.
16881         * include/pupa/net.h: Likewise.
16882         * include/pupa/normal.h: Likewise.
16883         * include/pupa/rescue.h: Likewise.
16884         * include/pupa/setjmp.h: Likewise.
16885         * include/pupa/symbol.h: Likewise.
16886         * include/pupa/term.h: Likewise.
16887         * include/pupa/types.h: Likewise.
16888         * include/pupa/i386/setjmp.h: Likewise.
16889         * include/pupa/i386/types.h: Likewise.
16890         * include/pupa/i386/pc/biosdisk.h: Likewise.
16891         * include/pupa/i386/pc/boot.h: Likewise.
16892         * include/pupa/i386/pc/console.h: Likewise.
16893         * include/pupa/i386/pc/init.h: Likewise.
16894         * include/pupa/i386/pc/kernel.h: Likewise.
16895         * include/pupa/i386/pc/linux.h: Likewise.
16896         * include/pupa/i386/pc/loader.h: Likewise.
16897         * include/pupa/i386/pc/memory.h: Likewise.
16898         * include/pupa/i386/pc/multiboot.h: Likewise.
16899         * include/pupa/i386/pc/partition.h: Likewise.
16900         * include/pupa/i386/pc/time.h: Likewise.
16901         * include/pupa/i386/pc/vga.h: Likewise.
16902         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16903         * include/pupa/util/getroot.h: Likewise.
16904         * include/pupa/util/misc.h: Likewise.
16905         * include/pupa/util/resolve.h: Likewise.
16906         * kern/device.c: Likewise.
16907         * kern/disk.c: Likewise.
16908         * kern/dl.c: Likewise.
16909         * kern/err.c: Likewise.
16910         * kern/file.c: Likewise.
16911         * kern/fs.c: Likewise.
16912         * kern/loader.c: Likewise.
16913         * kern/main.c: Likewise.
16914         * kern/misc.c: Likewise.
16915         * kern/mm.c: Likewise.
16916         * kern/rescue.c: Likewise.
16917         * kern/term.c: Likewise.
16918         * kern/i386/dl.c: Likewise.
16919         * kern/i386/pc/init.c: Likewise.
16920         * kern/i386/pc/lzo1x.S: Likewise.
16921         * kern/i386/pc/startup.S: Likewise.
16922         * loader/i386/pc/chainloader.c: Likewise.
16923         * loader/i386/pc/linux.c: Likewise.
16924         * loader/i386/pc/multiboot.c: Likewise.
16925         * normal/cmdline.c: Likewise.
16926         * normal/command.c: Likewise.
16927         * normal/main.c: Likewise.
16928         * normal/menu.c: Likewise.
16929         * normal/i386/setjmp.S: Likewise.
16930         * term/i386/pc/console.c: Likewise.
16931         * term/i386/pc/vga.c: Likewise.
16932         * util/console.c: Likewise.
16933         * util/genmoddep.c: Likewise.
16934         * util/misc.c: Likewise.
16935         * util/pupa-emu.c: Likewise.
16936         * util/resolve.c: Likewise.
16937         * util/unifont2pff.rb: Likewise.
16938         * util/i386/pc/biosdisk.c: Likewise.
16939         * util/i386/pc/getroot.c: Likewise.
16940         * util/i386/pc/pupa-mkimage.c: Likewise.
16941         * util/i386/pc/pupa-setup.c: Likewise.
16943 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16945         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16946         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16947         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16948         reading and reset it after reading.
16949         (pupa_ext2_close): Return PUPA_ERR_NONE.
16951         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16952         Correct value.
16953         (struct linux_kernel_header): Add kernel_version and
16954         initrd_addr_max.
16955         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16956         pupa_file_read succeeds.
16957         (pupa_rescue_cmd_initrd): Implement.
16959 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16961         * fs/ext2.c (pupa_ext2_label): New function.
16962         (pupa_ext2_fs): Added label.
16963         * fs/fat.c (pupa_fat_label): New function.
16964         (pupa_fat_fs): Added label.
16965         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16967         * kern/misc.c (pupa_strndup): New function.
16968         * include/pupa/misc.h (pupa_strndup): New prototype.
16970         * include/pupa/normal.h: Include <pupa/err.h>.
16971         (pupa_set_history): New prototype.
16972         (pupa_iterate_commands): New prototype.
16973         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16974         <pupa/disk.h>, <pupa/file.h>.
16975         (hist_size): New variable.
16976         (hist_lines): Likewise.
16977         (hist_end): Likewise.
16978         (hist_used): Likewise.
16979         (pupa_set_history): New function.
16980         (pupa_history_get): Likewise.
16981         (pupa_history_add): Likewise.
16982         (pupa_history_replace): Likewise.
16983         (pupa_tab_complete): Likewise.
16984         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16985         completion shows partitionnames while completing partitions, this
16986         feature was suggested by Jeff Bailey.
16987         * normal/command.c (pupa_iterate_commands): New function.
16988         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16989         (pupa_normal_init): Initialize history buffer.
16990         (PUPA_MOD_INIT): Likewise.
16991         (pupa_normal_fini): Free the history buffer.
16992         (PUPA_MOD_FINI): Likewise.
16994         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16995         key.
16997         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16998         * configure.ac [i386]: Check for regparam bug.
16999         (NESTED_FUNC_ATTR) [! i386]: Defined.
17001 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17003         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17004         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17005         (pupa_emu_SOURCES): New variable.
17006         (pupa_emu_LDFLAGS): Likewise.
17007         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17008         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17009         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17010         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17011         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17012         (pupa_jmp_buf): New typedef.
17013         (pupa_setjmp) [PUPA_UTIL]: New macro.
17014         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17015         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17016         (pupa_refresh): New prototype.
17017         * include/pupa/util/getroot.h: New file.
17018         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17019         it.
17020         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17021         (pupa_rescue_cmd_cat): Likewise.
17022         (pupa_rescue_cmd_ls): Likewise.
17023         (pupa_rescue_cmd_testload): Likewise.
17024         (pupa_rescue_cmd_lsmod): Likewise.
17025         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17026         * normal/menu.c (run_menu): Likewise.
17027         * kern/term.c (pupa_cls): Likewise.
17028         (pupa_refresh): New function.
17029         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17030         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17031         * util/console.c: New file.
17033         * util/i386/pc/getroot.c: New file.
17034         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17035         (pupa_putchar): New function.
17036         (pupa_refresh): Likewise.
17037         (xgetcwd): Function moved to ...
17038         (strip_extra_slashes): Likewise.
17039         (get_prefix): Likewise.
17040         * util/i386/pc/getroot.c: ... here.
17041         (find_root_device): Function moved and renamed to...
17042         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17043         Changed all callers.
17044         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17045         and renamed to...
17046         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17047         Changed all callers.
17048         * util/misc.c (pupa_memalign): New function.
17049         (pupa_mm_init_region): Likewise.
17050         (pupa_register_exported_symbols): Likewise.
17051         (pupa_putchar): Function removed.
17052         * util/pupa-emu.c: New file.
17054 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17056         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17057         (_multiboot_mod_SOURCES): New variable.
17058         (_multiboot_mod_CFLAGS): Likewise.
17059         * loader/i386/pc/multiboot.c: New file.
17060         * include/pupa/i386/pc/multiboot.h: Likewise.
17061         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17062         (pupa_multiboot_real_boot): New function.
17063         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17064         (pupa_multiboot_real_boot): New prototype.
17065         (pupa_rescue_cmd_multiboot): Likewise
17066         (pupa_rescue_cmd_module): Likewise.
17068         * kern/loader.c (pupa_loader_set): Continue when
17069         pupa_loader_unload_func() fails.
17070         (pupa_loader_unset): New function.
17071         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17073         * kern/misc.c (pupa_stpcpy): New function.
17074         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17076 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17078         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17079         for available extensions.
17081         * include/pupa/i386/pc/time.h: New file.
17082         * kern/disk.c: Include <pupa/machine/time.h>.
17083         (PUPA_CACHE_TIMEOUT): New macro.
17084         (pupa_last_time): New variable.
17085         (pupa_disk_open): Flush the cache when there was a timeout.
17086         (pupa_disk_close): Reset the timer.
17087         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17088         pupa_currticks.
17089         * util/misc.c: Include <sys/times.h>
17090         (pupa_get_rtc): New function.
17092 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17094         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17095         as blocks.
17096         (pupa_ext2_get_file_block): Use blocks member.
17098         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17099         first block. Return -1 instead of pupa_errno on error.
17101 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17103         * README: In the pupa-mkimage example use _chain instead of chain
17104         and ext2 instead of fat.
17105         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17106         adding journal playback for ext2fs.
17107         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17108         (pkgdata_MODULES): Added ext2.mod.
17109         (ext2_mod_SOURCES): New variable.
17110         (ext2_mod_CFLAGS): Likewise.
17111         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17112         * include/pupa/misc.h (pupa_strncpy): New prototype.
17113         (pupa_strcat): Likewise.
17114         (pupa_strncmp): Likewise.
17115         * kern/misc.c (pupa_strcat): Enable function.
17116         (pupa_strncpy): New function.
17117         (pupa_strncmp): Likewise.
17118         * fs/ext2.c: New file.
17120         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17121         when the read failed before retrying.
17122         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17123         (_FILE_OFFSET_BITS): Likewise.
17124         * configure.ac: Added AC_SYS_LARGEFILE.
17126 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17128         * genmk.rb (PModule#rule): Make sure to get only symbol names
17129         from the output of nm.
17130         Reported by Robert Millan <zeratul2@wanadoo.es>.
17132 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17134         I forgot to check in these changes for a long time. This adds
17135         incomplete support for VGA console, and this is still very
17136         buggy. Also, a lot of consideration is required for I18N,
17137         UNICODE, and VGA font issues. Therefore, assume that this is
17138         such that "better than nothing".
17140         * font/manager.c: New file.
17141         * include/pupa/font.h: Likewise.
17142         * include/pupa/i386/pc/vga.h: Likewise.
17143         * term/i386/pc/vga.c: Likewise.
17144         * util/unifont2pff.rb: Likewise.
17146         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17147         (pkgdata_MODULES): Added vga.mod and font.mod.
17148         (vga_mod_SOURCES): New variables.
17149         (vga_mod_CFLAGS): Likewise.
17150         (font_mod_SOURCES): Likewise.
17151         (font_mod_CFLAGS): Likewise.
17153         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17155         * include/pupa/term.h: Include pupa/err.h.
17156         (struct pupa_term): Added init and fini.
17157         Changed the argument of putchar to pupa_uint32_t.
17159         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17160         (pupa_console_real_putchar): New prototype.
17161         (pupa_console_putchar): Removed.
17162         (pupa_console_checkkey): Exported.
17163         (pupa_console_getkey): Likewise.
17165         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17166         characters.
17168         * kern/term.c (pupa_term_set_current): Rewritten.
17169         (pupa_putchar): Likewise.
17170         (pupa_putcode): New function.
17172         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17173         (pupa_console_real_putchar): ... this.
17174         (pupa_vga_set_mode): New function.
17175         (pupa_vga_get_font): Likewise.
17177         * normal/command.c: Include pupa/term.h.
17178         (terminal_command): New function.
17179         (pupa_command_init): Register the command "terminal".
17181         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17182         (DISP_UP): Likewise.
17183         (DISP_RIGHT): Likewise.
17184         (DISP_DOWN): Likewise.
17185         (DISP_HLINE): Likewise.
17186         (DISP_VLINE): Likewise.
17187         (DISP_UL): Likewise.
17188         (DISP_UR): Likewise.
17189         (DISP_LL): Likewise.
17190         (DISP_LR): Likewise.
17192         * term/i386/pc/console.c (pupa_console_putchar): New function.
17194 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17196         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17197         FIX. Reverse the path_list.
17199         * include/pupa/normal.h: Export pupa_register_command and
17200         pupa_unregister_command.
17202         * hello/hello.c (pupa_cmd_hello): New module.
17203         * conf/i386-pc.rmk: Added hello.mod.
17205 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17207         * kern/i386/pc/lzo1x.S: New file.
17209         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17210         (compress_kernel): New variable.
17211         (generate_image): Heavily modified to support compressing a
17212         large part of the core image.
17214         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17215         leak.
17216         (pupa_util_load_image): New function.
17218         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17219         (pupa_compressed_size): New variable.
17220         (codestart): Enable Gate A20 here.
17221         Decompress the compressed part of the core image.
17222         Rearrange the code to put functions and variables which are
17223         required for initialization in the non-compressed part.
17224         Include lzo1x.S.
17226         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17227         here.
17229         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17231         * include/pupa/i386/pc/kernel.h
17232         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17233         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17234         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17235         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17236         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17238         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17240         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17241         (Utility#rule): Likewise.
17243         * configure.ac: Check if LZO is available.
17245 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17247         * include/pupa/normal.h: New file.
17248         * include/pupa/setjmp.h: Likewise.
17249         * include/pupa/i386/setjmp.h: Likewise.
17250         * normal/cmdline.c: Likewise.
17251         * normal/command.c: Likewise.
17252         * normal/main.c: Likewise.
17253         * normal/menu.c: Likewise.
17254         * normal/i386/setjmp.S: Likewise.
17256         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17257         (pupa_rescue_cmd_initrd): Likewise.
17259         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17260         Likewise.
17262         * kern/i386/pc/startup.S (translation_table): New variable.
17263         (translate_keycode): New function.
17264         (pupa_console_getkey): Call translate_keycode.
17266         * kern/rescue.c (attempt_normal_mode): New function.
17267         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17268         it failed, print a message.
17270         * kern/mm.c (pupa_real_malloc): Print more information when a
17271         free magic is broken.
17272         (pupa_free): If the first free header is not free actually, set
17273         it to P.
17275         * kern/main.c (pupa_load_normal_mode): Just load the module
17276         "normal".
17277         (pupa_main): Don't print the message
17278         "Entering into rescue mode..." here.
17280         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17281         Declared.
17282         (pupa_rescue_cmd_initrd): Likewise.
17283         (pupa_rescue_cmd_initrd): Likewise.
17285         * include/pupa/symbol.h (FUNCTION): Specify the type.
17286         (VARIABLE): Likewise.
17288         * include/pupa/err.h (pupa_err_t): Added
17289         PUPA_ERR_UNKNOWN_COMMAND.
17291         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17292         (pupa_dl_get_prefix): Likewise.
17294         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17295         Added _chain.mod and _linux.mod instead of chain.mod and
17296         linux.mod.
17297         (chain_mod_SOURCES): Renamed to ...
17298         (_chain_mod_SOURCES): ... this.
17299         (chain_mod_CFLAGS): Renamed to ...
17300         (_chain_mod_CFLAGS): ... this.
17301         (linux_mod_SOURCES): Renamed to ...
17302         (_linux_mod_SOURCES): ... this.
17303         (linux_mod_CFLAGS): Renamed to ...
17304         (_linux_mod_CFLAGS): ... this.
17305         (normal_mod_SOURCES): New variable.
17306         (normal_mod_CFLAGS): Likewise.
17307         (normal_mod_ASFLAGS): Likewise.
17309 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17311         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17312         possible.
17314         * kern/dl.c (pupa_dl_ref): Refer depending modules
17315         recursively.
17316         (pupa_dl_unref): Unrefer depending modules recursively.
17317         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17318         a module is unloaded before one depending on that module is
17319         unloaded.
17320         (pupa_dl_unload): Unload depending modules explicitly,
17321         if possible.
17323 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17325         * include/pupa/i386/pc/linux.h: New file.
17326         * loader/i386/pc/linux.c: Likewise.
17328         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17329         Removed.
17330         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17331         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17332         of PUPA_CHAINLOADER_BOOT_SECTOR.
17334         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17335         (pupa_linux_prot_size): New variable.
17336         (pupa_linux_tmp_addr): Likewise.
17337         (pupa_linux_real_addr): Likewise.
17338         (pupa_linux_boot_zimage): New function.
17339         (pupa_linux_boot_bzimage): Likewise.
17341         * kern/i386/pc/init.c (struct mem_region): New structure.
17342         (MAX_REGIONS): New macro.
17343         (mem_regions): New variable.
17344         (num_regions): Likewise.
17345         (pupa_os_area_addr): Likewise.
17346         (pupa_os_area_size): Likewise.
17347         (pupa_lower_mem): Likewise.
17348         (pupa_upper_mem): Likewise.
17349         (add_mem_region): New function.
17350         (compact_mem_regions): Likewise.
17351         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17352         the size of the conventional memory and that of so-called upper
17353         memory (before the first memory hole).
17354         Instead of adding each found region to free memory, use
17355         add_mem_region and add them after removing overlaps.
17356         Also, add only 1/4 of the upper memory to free memory. The rest
17357         is used for loading OS images. Maybe this is ad hoc, but this
17358         makes it much easier to relocate OS images when booting.
17360         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17361         (pupa_enter_rescue_mode): Don't register initrd and module.
17363         * kern/mm.c: Include pupa/dl.h.
17365         * kern/main.c: Include pupa/file.h and pupa/device.h.
17367         * kern/loader.c (pupa_loader_load_module_func): Removed.
17368         (pupa_loader_load_module): Likewise.
17370         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17371         ``.o''.
17373         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17374         (pupa_linux_tmp_addr): Likewise.
17375         (pupa_linux_real_addr): Likewise.
17376         (pupa_linux_boot_zimage): Likewise.
17377         (pupa_linux_boot_bzimage): Likewise.
17379         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17380         (pupa_upper_mem): Likewise.
17381         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17382         module is too dangerous.
17384         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17385         (pupa_os_area_size): Likewise.
17386         (pupa_loader_set): Remove the first argument. Loader doesn't
17387         manage modules or initrd any longer.
17388         (pupa_loader_load_module): Removed.
17390         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17391         (linux_mod_SOURCES): New variable.
17392         (linux_mod_CFLAGS): Likewise.
17394 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17396         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17397         the length of a blocklist correctly.
17399         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17400         Use ioctl only if the OS file is a block device.
17401         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17402         not very useful for normal files.
17404         * kern/main.c (pupa_set_root_dev): New function.
17405         (pupa_load_normal_mode): Likewise.
17406         (pupa_main): Call those above.
17408         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17409         pupa_uint16_t.
17411         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17413 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17415         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17416         (setup): Configure the installed partition information and the
17417         dl prefix.
17419         * loader/i386/pc/chainloader.c (my_mod): New variable.
17420         (pupa_chainloader_unload): New function.
17421         (pupa_rescue_cmd_chainloader): Refer itself.
17422         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17424         * kern/i386/pc/startup.S (install_partition): Removed.
17425         (version_string): Likewise.
17426         (config_file): Likewise.
17427         (pupa_install_dos_part): New variable.
17428         (pupa_install_bsd_part): Likewise.
17429         (pupa_prefix): Likewise.
17430         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17432         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17433         and pupa/misc.h.
17434         (make_install_device): New function.
17435         (pupa_machine_init): Set the dl prefix.
17437         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17438         (buf): Renamed to ...
17439         (linebuf): ... this.
17440         (pupa_rescue_cmd_prefix): New function.
17441         (pupa_rescue_cmd_insmod): Likewise.
17442         (pupa_rescue_cmd_rmmod): Likewise.
17443         (pupa_rescue_cmd_lsmod): Likewise.
17444         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17445         rmmod and lsmod.
17447         * kern/mm.c (pupa_memalign): If failed even after invalidating
17448         disk caches, unload unneeded modules and retry.
17450         * kern/misc.c (pupa_memmove): New function.
17451         (pupa_memcpy): Removed.
17452         (pupa_strcpy): New function.
17453         (pupa_itoa): Made static.
17455         * kern/dl.c (pupa_dl_iterate): New function.
17456         (pupa_dl_ref): Likewise.
17457         (pupa_dl_unref): Likewise.
17458         (pupa_dl_unload): Return if succeeded or not.
17459         (pupa_dl_unload_unneeded): New function.
17460         (pupa_dl_unload_all): Likewise.
17461         (pupa_dl_init): Renamed to ...
17462         (pupa_dl_set_prefix): ... this.
17463         (pupa_dl_get_prefix): New function.
17465         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17466         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17467         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17468         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17469         (pupa_install_dos_part): Declared.
17470         (pupa_install_bsd_part): Likewise.
17471         (pupa_prefix): Likewise.
17472         (pupa_boot_drive): Likewise.
17474         * include/pupa/types.h: Fix a typo.
17476         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17477         pupa_memmove.
17478         (pupa_memmove): Declared.
17479         (pupa_strcpy): Likewise.
17481         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17482         pupa_mod_init takes one argument, its own module.
17483         (pupa_dl_unload_unneeded): Declared.
17484         (pupa_dl_unload_all): Likewise.
17485         (pupa_dl_ref): Likewise.
17486         (pupa_dl_unref): Likewise.
17487         (pupa_dl_iterate): Likewise.
17488         (pupa_dl_init): Renamed to ...
17489         (pupa_dl_set_prefix): ... this.
17490         (pupa_dl_get_prefix): Declared.
17492         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17493         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17494         unloaded.
17495         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17496         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17498         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17499         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17501 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17503         * util/i386/pc/pupa-setup.c (setup): Define the internal
17504         function find_first_partition_start at the top level, because GCC
17505         3.0.x cannot compile internal functions in deeper scopes
17506         correctly.
17507         (find_root_device): Use lstat instead of stat.
17508         Don't follow symbolic links.
17509         Fix the path-constructing code.
17511         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17512         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17513         by a BLKGETSIZE ioctl first, because block devices don't fill
17514         the member st_mode of the structure stat on Linux.
17515         [__linux__] (linux_find_partition): Use a temporary buffer
17516         REAL_DEV for the working space. Copy it to DEV before returning.
17517         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17518         buffer cache consistent.
17519         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17520         strncmp. The previous value was merely wrong.
17521         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17523         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17524         FAT size is 12. The previous value was merely wrong.
17526         * kern/main.c (pupa_main): Don't split the starting message from
17527         newlines.
17529         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17530         LF, because BIOS goes crazy about character attributes in this
17531         case.
17533 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17535         * include/i386/pc/util/biosdisk.h: New file.
17536         * util/i386/pc/biosdisk.c: Likewise.
17537         * util/i386/pc/pupa-setup.c: Likewise.
17539         * Makefile.in (INCLUDE_DISTFILES): Added
17540         include/pupa/i386/pc/util/biosdisk.h.
17541         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17542         directory util/i386/pc.
17543         (install-local): Added a rule for sbin_UTILITIES.
17544         (uninstall): Likewise.
17546         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17548         * util/misc.c (xrealloc): New function.
17549         (pupa_malloc): Likewise.
17550         (pupa_free): Likewise.
17551         (pupa_realloc): Likewise.
17552         (pupa_stop): Likewise.
17553         (pupa_putchar): Likewise.
17555         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17557         * include/pupa/util/misc.h (xrealloc): Declared.
17559         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17560         macro.
17561         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17562         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17564         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17565         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17567         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17568         way should be implemented.
17569         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17571         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17572         the size of NAME for safety.
17573         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17574         0x88.
17576         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17577         (pupa_setup_SOURCES): Likewise.
17579         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17581 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17583         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17584         bunch of pushl's from pusha, because this destroys the return
17585         value.
17587 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17589         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17590         This means that any missing prototypes could be fatal. Also, you
17591         must take care when writing assembly code. See the comments at
17592         the beginning of startup.S, for more details.
17594         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17595         compilation mechanism.
17596         (pupa_chainloader_real_boot): Likewise.
17597         (pupa_biosdisk_rw_int13_extensions): Likewise.
17598         (pupa_biosdisk_rw_standard): Likewise.
17599         (pupa_biosdisk_check_int13_extensions): Likewise.
17600         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17601         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17602         (pupa_get_memsize): Likewise.
17603         (pupa_get_mmap_entry): Likewise.
17604         (pupa_console_putchar): Likewise.
17605         (pupa_console_setcursor): Likewise.
17606         (pupa_getrtsecs): Use pushl instead of push.
17608         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17609         memory instead of the stack for a mmap entry, because some
17610         BIOSes may ignore the maximum size and overflow.
17612         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17614         * genmk.rb (PModule#rule): Compile automatically generated
17615         sources with module-specific CFLAGS as well as other sources.
17617 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17619         * configure.ac: Check ld.
17620         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17621         respectively, before checking endianness and sizes.
17623         * Makefile.in (LD): New variable.
17625 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17627         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17629 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17631         * Changelog: New file.