2009-06-11 Colin Watson <cjwatson@ubuntu.com>
[grub2/jjazz.git] / ChangeLog
blob354072e565b9bfff6226a53e28599156e29cb14e
1 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
3         * util/grub.d/10_linux.in: Capitalise "Linux".
5         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
7 2009-06-11  Pavel Roskin  <proski@gnu.org>
9         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
10         fix a gcc warning and ensure that the function won't ever exit.
12         * kern/i386/ieee1275/init.c: Add missing prototype for
13         grub_stop_floppy().
15         * loader/ieee1275/multiboot2.c [__i386__]: Include
16         grub/cpu/multiboot.h.
18         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
19         casts to short - they are not portable and cause warnings.  Fix
20         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
22 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
24         Drivemap fixes
26         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
27         new function
28         (grub_get_root_biosnumber_saved): new variable
29         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
30         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
31         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
32         %dx after the call if necessary
33         * conf/common.rmk (pkglib_MODULES): remove boot.mod
34         (boot_mod_SOURCES): remove
35         (boot_mod_CFLAGS): remove
36         (boot_mod_LDFLAGS): remove
37         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
38         (boot_mod_SOURCES): new variable
39         (boot_mod_CFLAGS): likewise
40         (boot_mod_LDFLAGS): likewise
41         * conf/i386-efi.rmk: likewise
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         * conf/x86_64-efi.rmk: likewise
47         * include/grub/i386/pc/biosnum.h: new file
48         * lib/i386/pc/biosnum.c: likewise
49         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
50         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
51         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
53 2009-06-10  Pavel Roskin  <proski@gnu.org>
55         * io/gzio.c (test_header): Don't reuse one buffer for all data.
56         Use separate variables.  Read only the file size at the end, but
57         not the checksum that we don't use.
59         * kern/file.c (grub_file_read): Use void pointer for the buffer.
60         Adjust all callers.
62         * kern/ieee1275/openfw.c: Remove libc includes.
63         * kern/ieee1275/cmain.c: Likewise.
64         * include/grub/ieee1275/ieee1275.h: Likewise.
66         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
67         compiler warnings.
69 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
71         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
72         `genparttoollist.sh'.
73         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
74         Add `*.sh' to the list find searches for and change `mdate.sh'
75         to `mdate-sh'.
77 2009-06-10  Pavel Roskin  <proski@gnu.org>
79         * include/grub/multiboot2.h: Provide compatibility defines for
80         multiboot2.h.
81         * include/multiboot2.h: Include stdint.h only if needed, using
82         angle brackets.
83         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
84         grub/multiboot2.h.
85         * loader/ieee1275/multiboot2.c: Likewise.
86         * loader/multiboot2.c: Likewise.
87         * loader/multiboot_loader.c: Likewise.
89         * configure.ac: Use -nostdlib when probing for the target.  It
90         should not be required to have libc for the target.
92         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
93         they fail without libc headers for the target.
94         * include/grub/powerpc/libgcc.h: Use weak attribute for all
95         exports.
96         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
97         preprocessor conditionals.
99         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
100         build system doesn't need to be aware of the tar.c internals.
102 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
104         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
106 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
108         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
109         disk limit to 26 for IDE, Virtio, Xen and SCSI.
111 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
113         * util/i386/pc/grub-install.in: Change the error message if UUIDs
114         aren't available if ata.mod gets used.
116 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
118         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
119         initialising controller.
120         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
122 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
124         * util/i386/pc/grub-install.in: Add a parameter --disk-module
125         to choose between ata and biosdisk module on i386-pc.
127 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
129         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
130         Subclass and Programming Interface fields in terms of the 3 byte
131         Class Code register.
132         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
134         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
135         interface is OHCI.  Add grub_dprintf for symmetry with
136         bus/usb/uhci.c.
137         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
138         interface is UHCI.  Add interf variable for programming
139         interface.  Print interface with class/subclass.
141         * bus/usb/ohci.c: Set interf with correct field.
143         * bus/usb/uhci.c: Remove unneeded doubled lines.
144         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
145         Remove whitespace inside comment.
147 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
149         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
150         as fallback an equivalent option without depth.
152 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
154         Not fail if unable to retrieve C/H/S on LBA disks
156         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
157         if unable to retrieve C/H/S on LBA disks
159 2009-06-08  Pavel Roskin  <proski@gnu.org>
161         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
162         about aliasing.
164 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
166         * Makefile.in (uninstall): Remove all $lib_DATA files.
168 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
170         Bugfix: install on partitionless device
172         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
173         is a whole disk
175 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
177         * Makefile.in (uninstall): Remove all $include_DATA files.
179 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
181         * commands/true.c: New file.  Implement the true and false commands.
182         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
183         (true_mod_SOURCES): New variable.
184         (true_mod_CFLAGS): Likewise.
185         (true_mod_LDFLAGS): Likewise.
187 2009-06-05  Colin D Bennett  <colin@gibibit.com>
189         Optimized font character lookup using binary search instead of linear
190         search.  Fonts now are required to have the character index ordered by
191         code point.
193         * font/font.c (load_font_index): Verify that fonts have ordered
194         character indices.
195         (find_glyph): Use binary search instead of linear search to find a
196         character in a font.
198 2009-06-05  Michael Scherer  <misc@mandriva.org>
200         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
201         uses case sensitive btree.
202         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
203         only for case insensitive filesystems.
205 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
207         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
208         * conf/common.rmk (search_mod_CFLAGS): likewise
210 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
212         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
213         compensate a compiler bug
215 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
217         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
218         instead of '\b'
220 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
222         Definitions for creating asm symbols with Apple's CC
224         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
225         [APPLE_CC] (VARIABLE): likewise
227 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
229         Disable lnxboot.img when compiled
230         with Apple's CC
232         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
233         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
234         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
235         [! APPLE_CC] (CODE_LENG): skip
236         [! APPLE_CC] (setup_sects): likewise
237         [! APPLE_CC]: skip filling
239 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
241         Address in trampolines based on 32-bit registers when compiled
242         with Apple's CC
244         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
245         for addresses
246         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
248 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
250         Avoid aliases when compiling with Apple's CC for PCBIOS machine
252         * kern/misc.c [APPLE_CC] (memcpy): new function
253         [APPLE_CC] (memmove): likewise
254         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
255         (memcpy): define alias conditionally on !APPLE_CC
256         (memset): likewise
257         (abort): likewise
258         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
259         APPLE_CC are defined
260         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
261         (grub_assert_fail): make prototype conditional
263 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
265         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
267         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
268         grub-macho2img
269         (CLEANFILES): add grub-macho2img
270         (grub_macho2img_SOURCES): new variable
271         * kern/i386/pc/startup.S (bss_start): new variable
272         (bss_end): likewise
273         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
274         * util/grub-macho2img.c: new file
276 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
278         Use objconv when compiling with Apple's CC
280         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
281         (efiemu64.o): likewise
282         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
283         when compiling with Apple's CC
284         (efiemu64_s.o): likewise
285         * configure.ac: check for objconv when compiling with Apple's CC
286         * genmk.rb: use objconv for modules when compiled with Apple's CC
288 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
290         Define segment as well as section when compiling with
291         Apple's CC
293         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
294         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
295         (efiemu_convert_pointer): likewise
296         (efiemu_set_virtual_address_map): likewise
297         (efiemu_convert_pointer): likewise
298         (efiemu_getcrc32): likewise
299         (init_crc32_table): likewise
300         (reflect): likewise
301         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
302         (GRUB_MOD_DEP): likewise
304 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
306         Allow a compilation without -mcmodel=large
308         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
309         when compiled without -mcmodel=large
310         (filter_memory_map): remove memory post 4 GiB when compiled
311         without -mcmodel=large
312         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
313         TARGET_CFLAGS when -mcmodel=large isn't supported
315 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
317         Remove nested functions in efiemu core
319         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
321 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
323         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
325         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
326         temporary storage
327         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
328         using Apple's CC
329         (grub_cpu_is_tsc_supported): likewise
330         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
332 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
334         Absolute addressing through constant with Apple's cc
336         * kern/i386/pc/startup.S: Define necessary constants
337         and address through it when using ABS with Apple's CC
338         * boot/i386/pc/diskboot.S: likewise
339         * boot/i386/pc/boot.S: likewise
340         * boot/i386/pc/lnxboot.S: likewise
341         * boot/i386/pc/cdboot.S: likewise
342         * mmap/i386/pc/mmap_helper.S: likewise
343         * commands/i386/pc/drivemap_int13h.S: likewise
345 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
347         Check if compiler is apple cc
349         * Makefile.in (ASFLAGS): new variable
350         (TARGET_ASFLAGS): likewise
351         (TARGET_MODULE_FORMAT): likewise
352         (TARGET_APPLE_CC): likewise
353         (OBJCONV): likewise
354         (TARGET_IMG_CFLAGS): likewise
355         (TARGET_CPPFLAGS): add includedir
356         * configure.ac: call grub_apple_cc and grub_apple_target_cc
357         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
358         Check for linker script only if compiler isn't Apple's CC
359         (TARGET_MODULE_FORMAT): set
360         (TARGET_APPLE_CC): likewise
361         (TARGET_ASFLAGS): likewise
362         (ASFLAGS): likewise
363         Check for objcopy only if compiler isn't Apple's CC
364         Check for BSS symbol only if compiler isn't Apple's CC
365         * genmk.rb: adapt nm options if we use Apple's utils
366         * aclocal.m4 (grub_apple_cc): new test
367         (grub_apple_target_cc): likewise
369 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
371         Simplify sed expressions and improve awk
373         * Makefile.in (install-local): simplify sed expression
374         * gencmdlist.sh: likewise
375         * genmoddep.awk: avoid adding module as a dependency of itself
377 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
379         Add missing start symbols
381         * boot/i386/pc/boot.S: add start
382         * boot/i386/pc/pxeboot.S: likewise
384 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
386         Fix wrong assumptions with grub-mkimage on EFI
388         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
389         (relocate_addresses): consider both r_addend and value at offset
390         (make_mods_section): zerofill modinfo and header
391         (convert_elf): write prefix here
393 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
395         Use .asciz instead of .string
397         * i386/pc/diskboot.S: use .asciz instead of .string
398         * i386/pc/boot.S: likewise
399         * include/grub/dl.h (GRUB_MOD_DEP): likewise
400         (GRUB_MOD_NAME): likewise
402 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
404         gfxpayload support
406         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
407         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
408         (grub_video_setup): remove
409         (grub_video_set_mode): new prototype
410         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
411         (vid_mode): remove
412         (linux_vesafb_res): compile only on PCBIOS
413         (grub_linux_boot): support gfxpayload
414         * loader/i386/pc/xnu.c (video_hook): new function
415         (grub_xnu_set_video): support gfxpayload
416         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
417         (DEFAULT_VIDEO_HEIGHT): likewise
418         (DEFAULT_VIDEO_FLAGS): likewise
419         (DEFAULT_VIDEO_MODE): new definition
420         (video_hook): new function
421         (grub_gfxterm_init): use grub_video_set_mode
422         * util/grub.d/30_os-prober.in: remove explicit modesetting before
423         loading xnu
424         * video/video.c (grub_video_setup): removed
425         (grub_video_set_mode): new function based on grub_gfxterm_init and
426         grub_video_setup
428 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
430         Avoid calling biosdisk in drivemap
432         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
433         (revparse_biosdisk): likewise
434         (list_mappings): derive name from id directly
435         (grub_cmd_drivemap): use tryparse_diskstring
437 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
439         Script fixes
441         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
442         (grub_lexer_param): add tokenonhold
443         (grub_script_create_cmdline): remove cmdline. All callers updated
444         (grub_script_function_create): make functionname
445         grub_script_arg. All callers updated
446         (grub_script_execute_argument_to_string): new prototype
447         * kern/parser.c (state_transitions): reorder
448         (grub_parser_cmdline_state): fix a bug and make more compact
449         * script/sh/execute.c (grub_script_execute_argument_to_string):
450         make global
451         (grub_script_execute_cmdline): use new format
452         * script/sh/function.c (grub_script_function_create): make functionname
453         grub_script_arg. All callers updated
454         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
455         (grub_script_yylex): remove
456         (grub_script_yylex2): renamed to ...
457         (grub_script_yylex): ...renamed
458         parse the expressions like a${b}c
459         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
460         (GRUB_PARSER_TOKEN_VAR): remove
461         (GRUB_PARSER_TOKEN_NAME): likewise
462         ("if"): declare as typeless
463         ("while"): likewise
464         ("function"): likewise
465         ("else"): likewise
466         ("then"): likewise
467         ("fi"): likewise
468         (text): remove
469         (argument): likewise
470         (script): accept empty scripts and make exit on error
471         (arguments): use GRUB_PARSER_TOKEN_ARG
472         (function): likewise
473         (command): move error handling to script
474         (menuentry): move grub_script_lexer_ref before
475         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
476         argument. All callers updated
478 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
480         Prevent GRUB from probing floppies during boot.
482         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
483         * commands/search.c (options): Add --no-floppy.
484         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
485         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
486         --no-floppy when searching for UUIDs.
488 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
490         Simplify the code duplication in commands/search.c.
492         * commands/search.c (search_label, search_fs_uuid): Merge into ...
493         (search_fs): ... this.  Update all users.
495 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
497         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
499 2009-05-28  Pavel Roskin  <proski@gnu.org>
501         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
502         Remove the original symlink explicitly.
504         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
505         just one slash.  That's how grub_fshelp_find_file() does it.
507 2009-05-26  Pavel Roskin  <proski@gnu.org>
509         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
510         to `str'.
512         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
513         possibly unused.
515 2009-05-25  Christian Franke  <franke@computer.org>
517         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
518         register.
519         (grub_atapi_identify): Add wait after drive select.
520         (grub_ata_identify): Do more strict status register check before
521         calling grub_atapi_identify ().  Suppress error message if status
522         register is 0x00 after command failure.  Add status register
523         check after PIO read to avoid bogus identify due to stuck DRQ.
524         Thanks to Pavel Roskin for testing.
525         (grub_device_initialize): Remove unsafe status register check.
526         Thanks to 'phcoder' for problem report and patch.
527         Prevent sign extension in debug message.
529 2009-05-23  Colin D Bennett  <colin@gibibit.com>
531         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
532         definition file, and functions defined in `normal/menu.c' have had
533         their prototypes moved to `include/grub/menu.h' for consistency.
535         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
536         from normal.h.
537         (grub_menu_get_entry): Likewise.
538         (grub_menu_get_timeout): Likewise.
539         (grub_menu_set_timeout): Likewise.
540         (grub_menu_execute_entry): Likewise.
541         (grub_menu_execute_with_fallback): Likewise.
542         (grub_menu_entry_run): Likewise.
544         * include/grub/normal.h: Re-ordered and grouped function
545         prototypes by file that the function is defined in.
546         (grub_menu_execute_callback): Removed; moved to menu.h.
547         (grub_menu_get_entry): Likewise.
548         (grub_menu_get_timeout): Likewise.
549         (grub_menu_set_timeout): Likewise.
550         (grub_menu_execute_entry): Likewise.
551         (grub_menu_execute_with_fallback): Likewise.
552         (grub_menu_entry_run): Likewise.
553         (grub_menu_addentry): Renamed from this ...
554         (grub_normal_add_menu_entry): ... to this.
556         * normal/main.c (grub_menu_addentry): Renamed from this ...
557         (grub_normal_add_menu_entry): ... to this.
559         * script/sh/execute.c (grub_script_execute_menuentry): Update
560         reference to renamed grub_menu_addentry function.
562 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
564         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
566 2009-05-22  Pavel Roskin  <proski@gnu.org>
568         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
569         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
570         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
571         compiling for the i386 targets, but not for the utilities.
573         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
574         to grub_uint8_t.
575         (grub_root_drive): Likewise.
576         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
577         remove alignment.
578         (grub_root_drive): Change size to byte.
579         (grub_start_addr): Remove.
580         (grub_end_addr): Likewise.
581         (grub_apm_bios_info): Likewise.
583 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
585         * normal/i386: Remove.
586         * normal/powerpc: Likewise.
587         * normal/sparc64: Likewise.
588         * normal/x86_64: Likewise.
590 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
592         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
593         * loader/i386/linux_trampoline.S: Fix indentation
594         * loader/i386/xnu_helper.S: Likewise
596 2009-05-18  Colin D Bennett  <colin@gibibit.com>
598         Display error messages when parsing a Lua statement fails.
599         Previously, executing a syntactically invalid statement like
600         ")foo" or "bar;" would silently fail.
602         * script/lua/grub_main.c (handle_lua_error): New function.
603         (grub_lua_parse_line): Improved reporting of Lua parser and
604         execution errors.
606 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
608         Remove -Werror which causes build to fail on some systems
610         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
611         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
612         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
614 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
616         trampoline for linux on 64-bit platform
618         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
619         loader/i386/efi/linux_trampoline.S
620         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
621         declaration
622         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
623         here
624         * loader/i386/linux_trampoline.S: moved here
625         * loader/i386/efi/linux.c (allocate_pages): reserve space for
626         trampoline
627         (jumpvector): removed
628         (grub_linux_trampoline_start): new declaration
629         (grub_linux_trampoline_end): likewise
630         (grub_linux_boot): use trampoline when on 64-bit platform
631         * loader/i386/linux.c: likewise
633 2009-05-16  Pavel Roskin  <proski@gnu.org>
635         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
636         const to avoid a warning.
637         (grub_lua_setenv): Likewise.
638         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
639         lmsg to fix a warning.
641 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
643         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
644         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
645         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
646         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
647         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
648         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
649         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
650         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
652 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
654         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
656 2009-05-16  Bean  <bean123ch@gmail.com>
658         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
659         (lua_mod_SOURCES): New variable.
660         (lua_mod_CFLAGS): Likewise.
661         (lua_mod_LDFLAGS): Likewise.
663         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
664         (setjmp_mod_SOURCES): New variable.
665         (setjmp_mod_CFLAGS): Likewise.
666         (setjmp_LDFLAGS): Likewise.
668         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
669         (setjmp_mod_SOURCES): New variable.
670         (setjmp_mod_CFLAGS): Likewise.
671         (setjmp_LDFLAGS): Likewise.
673         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
674         (setjmp_mod_SOURCES): New variable.
675         (setjmp_mod_CFLAGS): Likewise.
676         (setjmp_LDFLAGS): Likewise.
678         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
679         (setjmp_mod_SOURCES): New variable.
680         (setjmp_mod_CFLAGS): Likewise.
681         (setjmp_LDFLAGS): Likewise.
683         * normal/i386/setjmp.S: Moved from here ...
684         * lib/i386/setjmp.S: ... Moved here
685         * normal/x86_64/setjmp.S: Moved from here ...
686         * lib/x86_64/setjmp.S: ... Moved here
687         * normal/powerpc/setjmp.S: Moved from here ...
688         * lib/powerpc/setjmp.S: ... Moved here
689         * normal/sparc64/setjmp.S: Moved from here ...
690         * lib/sparc64/setjmp.S: ... Moved here
692         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
693         returns_twice in mingw.
695         * script/lua/grub_lib.c: New file.
696         * script/lua/grub_lib.h: Likewise.
697         * script/lua/grub_lua.h: Likewise.
698         * script/lua/grub_main.c: Likewise.
699         * script/lua/lapi.c: Likewise.
700         * script/lua/lapi.h: Likewise.
701         * script/lua/lauxlib.c: Likewise.
702         * script/lua/lauxlib.h: Likewise.
703         * script/lua/lbaselib.c: Likewise.
704         * script/lua/lcode.c: Likewise.
705         * script/lua/lcode.h: Likewise.
706         * script/lua/ldblib.c: Likewise.
707         * script/lua/ldebug.c: Likewise.
708         * script/lua/ldebug.h: Likewise.
709         * script/lua/ldo.c: Likewise.
710         * script/lua/ldo.h: Likewise.
711         * script/lua/ldump.c: Likewise.
712         * script/lua/lfunc.c: Likewise.
713         * script/lua/lfunc.h: Likewise.
714         * script/lua/lgc.c: Likewise.
715         * script/lua/lgc.h: Likewise.
716         * script/lua/linit.c: Likewise.
717         * script/lua/liolib.c: Likewise.
718         * script/lua/llex.c: Likewise.
719         * script/lua/llex.h: Likewise.
720         * script/lua/llimits.h: Likewise.
721         * script/lua/lmathlib.c: Likewise.
722         * script/lua/lmem.c: Likewise.
723         * script/lua/lmem.h: Likewise.
724         * script/lua/loadlib.c: Likewise.
725         * script/lua/lobject.c: Likewise.
726         * script/lua/lobject.h: Likewise.
727         * script/lua/lopcodes.c: Likewise.
728         * script/lua/lopcodes.h: Likewise.
729         * script/lua/loslib.c: Likewise.
730         * script/lua/lparser.c: Likewise.
731         * script/lua/lparser.h: Likewise.
732         * script/lua/lstate.c: Likewise.
733         * script/lua/lstate.h: Likewise.
734         * script/lua/lstring.c: Likewise.
735         * script/lua/lstring.h: Likewise.
736         * script/lua/lstrlib.c: Likewise.
737         * script/lua/ltable.c: Likewise.
738         * script/lua/ltable.h: Likewise.
739         * script/lua/ltablib.c: Likewise.
740         * script/lua/ltm.c: Likewise.
741         * script/lua/ltm.h: Likewise.
742         * script/lua/lua.h: Likewise.
743         * script/lua/luaconf.h: Likewise.
744         * script/lua/lualib.h: Likewise.
745         * script/lua/lundump.c: Likewise.
746         * script/lua/lundump.h: Likewise.
747         * script/lua/lvm.c: Likewise.
748         * script/lua/lvm.h: Likewise.
749         * script/lua/lzio.c: Likewise.
750         * script/lua/lzio.h: Likewise.
752 2009-05-16  Bean  <bean123ch@gmail.com>
754         * include/grub/kernel.h (grub_module_header_types): Add type
755         OBJ_TYPE_CONFIG.
757         * kern/main.c (grub_load_config): New function.
758         (grub_main): Call grub_load_config to read boot config.
760         * grub-mkimage (generate_image): New parameter config_path.
761         (options): New option --config.
762         (main): Parse --config option, and pass it to generate_image.
764 2009-05-14  Christian Franke  <franke@computer.org>
766         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
767         This fixes build on Cygwin.
769 2009-05-14  Pavel Roskin  <proski@gnu.org>
771         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
772         jump.  This saves two bytes, so the typical case of 2 swapped
773         drives would fit 32 bytes.
775 2009-05-13  Pavel Roskin  <proski@gnu.org>
777         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
778         grub_uint32_t to avoid a warning.
780         * loader/i386/linux.c (allocate_pages): When assigning
781         real_mode_mem, cast through grub_size_t to fix a warning.  The
782         code already makes sure that the value would fit a pointer.
783         (grub_linux_setup_video): Cast render_target->data to
784         grub_size_t to fix a warning.
786 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
788         * commands/i386/pc/drivemap.c: New file - implement drivemap
789         command.
790         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
791         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
793 2009-05-13  Pavel Roskin  <proski@gnu.org>
795         * util/i386/pc/grub-setup.c (setup): Remove unused variable
796         embedding_area_exists.
798 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
800         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
801         it easier to understand / work with.
802         Improve warning messages for cases where there's no embedding area,
803         or when it is too small (or core.img too large).
805 2009-05-13  Pavel Roskin  <proski@gnu.org>
807         * loader/i386/pc/multiboot2.c: Add necessary includes for
808         grub_multiboot2_real_boot().
810         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
811         PX record is always little-endian.  We only need the lower 2
812         bytes of the mode.
814         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
815         facilitate code reuse.
816         (grub_cpio_mount): Use "struct head", not a char buffer.  This
817         fixes a warning reported by gcc 4.4.
819         * kernel/disk.c (grub_disk_read): Use void pointer for the
820         buffer.
821         (grub_disk_write): Use const void pointer for the buffer.
822         Adjust all callers.  Remove unnecessary casts.
824 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
826         * util/i386/pc/grub-install.in: Update copyright year.
828 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
830         gptsync
832         * commands/gptsync.c: new file
833         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
834         (gptsync_mod_SOURCES): new variable
835         (gptsync_mod_CFLAGS): likewise
836         (gptsync_mod_LDFLAGS): likewise
837         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
838         new definition
839         (GRUB_PC_PARTITION_TYPE_HFS): likewise
840         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
841         * conf/i386-ieee1275.rmk: likewise
842         * conf/i386-pc.rmk: likewise
843         * conf/powerpc-ieee1275.rmk: likewise
845 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
847         Fixed grub-emu
849         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
850         (grub_dl_ref): likewise
852 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
854         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
855         split in two functions (one for msdos and one for gpt).
857 2009-05-08  Pavel Roskin  <proski@gnu.org>
859         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
860         not modified.
862         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
863         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
864         Initialize them with -1.  Add sanity check for bad1.  Eliminate
865         nerr variable.
867 2009-05-08  David S. Miller  <davem@davemloft.net>
869         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
871 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
873         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
874         existence.
876 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
878         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
879         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
881 2009-05-05  David S. Miller  <davem@davemloft.net>
883         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
885 2009-05-05  Pavel Roskin  <proski@gnu.org>
887         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
888         of grub_dl_ref() and grub_dl_unref().
889         * commands/parttool.c: Remove preprocessor conditionals around
890         grub_dl_ref() and grub_dl_unref().
891         * fs/affs.c: Likewise.
892         * fs/afs.c: Likewise.
893         * fs/cpio.c: Likewise.
894         * fs/ext2.c: Likewise.
895         * fs/fat.c: Likewise.
896         * fs/hfs.c: Likewise.
897         * fs/hfsplus.c: Likewise.
898         * fs/iso9660.c: Likewise.
899         * fs/jfs.c: Likewise.
900         * fs/minix.c: Likewise.
901         * fs/ntfs.c: Likewise.
902         * fs/reiserfs.c: Likewise.
903         * fs/sfs.c: Likewise.
904         * fs/udf.c: Likewise.
905         * fs/ufs.c: Likewise.
906         * fs/xfs.c: Likewise.
907         * include/grub/dl.h: Likewise.
908         * loader/xnu.c: Likewise.
910 2009-05-04  Pavel Roskin  <proski@gnu.org>
912         * commands/acpi.c: Remove unused variable my_mod.
913         * partmap/amiga.c: Likewise.
914         * partmap/apple.c: Likewise.
915         * partmap/gpt.c: Likewise.
916         * partmap/pc.c: Likewise.
917         * partmap/sun.c: Likewise.
918         * term/gfxterm.c: Likewise.
919         * term/i386/pc/vesafb.c: Likewise.
920         * term/i386/pc/vga.c: Likewise.
922 2009-05-04  David S. Miller  <davem@davemloft.net>
924         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
925         pointer args to grub_ieee1275_get_property().
927         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
929         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
930         devices, and do not traverse down under controller nodes.
932         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
933         (grub_ofdisk_open): Use it to un-escape "," characters.
934         * kern/disk.c (find_part_sep): New.
935         (grub_disk_open): Use it to find the first non-escaped ','
936         character in the disk name.
937         * util/ieee1275/devicemap.c (escape_of_path): New.
938         (grub_util_emit_devicemap_entry): Use it.
939         * util/sparc64/ieee1275/grub-install.in: Update script to
940         strip partition specifiers properly by not triggering on
941         '\' escaped ',' characters.
943 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
945         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
946         to 0x300.
947         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
948         resolutions.
949         (linux_vesafb_modes): Add a lot of additional modes to the list (based
950         on documentation from Wikipedia).
952 2009-05-04  Pavel Roskin  <proski@gnu.org>
954         * disk/ata.c: Spelling fixes.
955         * disk/raid.c: Likewise.
956         * disk/usbms.c: Likewise.
957         * disk/dmraid_nvidia.c: Likewise.
958         * kern/ieee1275/openfw.c: Likewise.
959         * kern/ieee1275/init.c: Likewise.
960         * kern/ieee1275/cmain.c: Likewise.
961         * boot/i386/pc/cdboot.S: Likewise.
962         * video/readers/png.c: Likewise.
963         * video/i386/pc/vbe.c: Likewise.
964         * fs/udf.c: Likewise.
965         * fs/hfs.c: Likewise.
966         * fs/reiserfs.c: Likewise.
967         * efiemu/runtime/efiemu.c: Likewise.
968         * efiemu/main.c: Likewise.
969         * efiemu/mm.c: Likewise.
970         * include/grub/elf.h: Likewise.
971         * include/grub/xnu.h: Likewise.
972         * include/grub/usbdesc.h: Likewise.
973         * include/grub/usb.h: Likewise.
974         * include/grub/script_sh.h: Likewise.
975         * include/grub/lib/LzmaEnc.h: Likewise.
976         * include/grub/efiemu/efiemu.h: Likewise.
977         * include/grub/command.h: Likewise.
978         * normal/menu.c: Likewise.
979         * normal/main.c: Likewise.
980         * normal/datetime.c: Likewise.
981         * bus/usb/uhci.c: Likewise.
982         * mmap/i386/uppermem.c: Likewise.
983         * mmap/mmap.c: Likewise.
984         * commands/acpi.c: Likewise.
985         * commands/test.c: Likewise.
986         * partmap/apple.c: Likewise.
987         * font/font.c: Likewise.
988         * loader/sparc64/ieee1275/linux.c: Likewise.
989         * loader/macho.c: Likewise.
990         * loader/i386/bsd_trampoline.S: Likewise.
991         * loader/i386/bsd.c: Likewise.
992         * loader/xnu.c: Likewise.
993         * term/i386/pc/vesafb.c: Likewise.
994         * term/usb_keyboard.c: Likewise.
995         * util/resolve.c: Likewise.
996         * util/getroot.c: Likewise.
998 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1000         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1002 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1004         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1005         build error.
1007 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1009         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1010         parameter only available on BIOS.
1012 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1014         Removed wrong semicolon in declaration
1016         * grub/misc.h (grub_dprintf): remove semicolon
1018 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1020         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1021         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1022         is done by grub_cmd_linux() now).
1023         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1024         restore video to text mode.
1025         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1026         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1027         `GRUB_LINUX_VID_MODE_NORMAL'.
1029 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1031         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1032         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1033         and `normal/script.c'.  Add `kern/rescue_reader.c',
1034         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1035         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1036         `grub_script.tab.c'.
1038         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1039         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1040         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1041         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1042         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1044         * Makefile.in: Remove duplicated 2008 in Copyright line.
1046 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1048         * util/misc.c (grub_util_warn): New function.  Emits a warning
1049         unconditionally.
1050         * include/grub/util/misc.h (grub_util_warn): New declaration.
1052         * util/i386/pc/grub-install.in: Understand --force and pass it down
1053         to grub-setup.
1055         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1056         down to setup().
1057         (setup): Improve error messages and add warnings when requested to
1058         install in odd layouts.  Refuse to install using blocklists unless
1059         --force was set.
1061 2009-05-04  martin f. krafft  <madduck@madduck.net>
1063         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1065 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1067         Updated copyright year
1069         * fs/hfsplus.c: updated copyright year
1071 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1073         HFS+ UUID
1075         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1076         in the space previously used by unused3
1077         (grub_hfsplus_uuid): new function
1078         (grub_hfsplus_fs): added uuid field
1080 2009-05-03  Pavel Roskin  <proski@gnu.org>
1082         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1083         suppress warnings.  It's no longer needed.
1084         * disk/host.c: Likewise.
1085         * disk/ata_pthru.c: Likewise.
1086         * disk/loopback.c: Likewise.
1087         * hook/datehook.c: Likewise.
1088         * parttool/pcpart.c: Likewise.
1089         * fs/i386/pc/pxe.c: Likewise.
1090         * fs/ntfscomp.c: Likewise.
1091         * efiemu/main.c: Likewise.
1092         * mmap/mmap.c: Likewise.
1093         * commands/crc.c: Likewise.
1094         * commands/hexdump.c: Likewise.
1095         * commands/hdparm.c: Likewise.
1096         * commands/acpi.c: Likewise.
1097         * commands/echo.c: Likewise.
1098         * commands/minicmd.c: Likewise.
1099         * commands/blocklist.c: Likewise.
1100         * commands/memrw.c: Likewise.
1101         * commands/loadenv.c: Likewise.
1102         * commands/usbtest.c: Likewise.
1103         * commands/lsmmap.c: Likewise.
1104         * commands/boot.c: Likewise.
1105         * commands/parttool.c: Likewise.
1106         * commands/configfile.c: Likewise.
1107         * commands/search.c: Likewise.
1108         * commands/ieee1275/suspend.c: Likewise.
1109         * commands/cat.c: Likewise.
1110         * commands/i386/pc/pxecmd.c: Likewise.
1111         * commands/i386/pc/play.c: Likewise.
1112         * commands/i386/pc/halt.c: Likewise.
1113         * commands/i386/pc/vbeinfo.c: Likewise.
1114         * commands/i386/pc/vbetest.c: Likewise.
1115         * commands/lspci.c: Likewise.
1116         * commands/date.c: Likewise.
1117         * commands/handler.c: Likewise.
1118         * commands/ls.c: Likewise.
1119         * commands/test.c: Likewise.
1120         * commands/cmp.c: Likewise.
1121         * commands/efi/loadbios.c: Likewise.
1122         * commands/efi/fixvideo.c: Likewise.
1123         * commands/halt.c: Likewise.
1124         * commands/help.c: Likewise.
1125         * commands/reboot.c: Likewise.
1126         * hello/hello.c: Likewise.
1127         * script/sh/main.c: Likewise.
1128         * loader/xnu.c: Likewise.
1129         * term/terminfo.c: Likewise.
1130         * term/i386/pc/serial.c: Likewise.
1131         * term/usb_keyboard.c: Likewise.
1133 2009-05-03  David S. Miller  <davem@davemloft.net>
1135         * normal/menu.c: Include grub/parser.h
1137 2009-05-03  Pavel Roskin  <proski@gnu.org>
1139         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1140         not char*.
1141         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1142         Suggested by Javier Martín <lordhabbit@gmail.com>
1144         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1145         efiemu??.o doesn't exist.
1146         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1147         copying.
1149 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1151         FreeBSD 64-bit support
1153         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1154         and loader/i386/bsd_trampoline.S
1155         (bsd_mod_ASFLAGS): new variable
1156         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1157         (FREEBSD_MODTYPE_KERNEL64): likewise
1158         (grub_bsd64_trampoline_start): likewise
1159         (grub_bsd64_trampoline_end): likewise
1160         (grub_bsd64_trampoline_selfjump): likewise
1161         (grub_bsd64_trampoline_gdt): likewise
1162         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1163         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1164         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1165         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1166         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1167         of "attrib" member
1168         * loader/i386/bsd_pagetable.c: new file
1169         * loader/i386/bsd_trampoline.S: likewise
1170         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1171         (ALIGN_VAR): likewise
1172         (entry_hi): new variable
1173         (kern_end_mdofs): likewise
1174         (is_64bit): likewise
1175         (grub_freebsd_add_meta): use ALIGN_VAR
1176         (grub_e820_mmap): new declaration
1177         (grub_freebsd_add_mmap): new function
1178         (grub_freebsd_add_meta_module): support 64 bit kernels
1179         (grub_freebsd_list_modules): use ALIGN_VAR
1180         (gdt_descriptor): new declaration
1181         (grub_freebsd_boot): support 64 bit kernels
1182         (grub_bsd_elf64_hook): new function
1183         (grub_bsd_load_elf): support elf64
1185 2009-05-03  Bean  <bean123ch@gmail.com>
1187         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1188         after we get the result of if statement.
1190 2009-05-03  Bean  <bean123ch@gmail.com>
1192         * Makefile.in (enable_efiemu): New variable.
1194         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1195         set.
1196         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1197         path.
1198         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1199         path, add -mno-red-zone option.
1200         (efiemu64_s.o): Likewise.
1201         (efiemu64.o): Use macro $^ for source file.
1203         * configure.ac (--enable-efiemu): New option.
1205 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1207         xnu support
1209         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1210         (pkglib_MODULES): add xnu.mod
1211         (xnu_mod_SOURCES): new variable
1212         (xnu_mod_CFLAGS): likewise
1213         (xnu_mod_LDFLAGS): likewise
1214         (xnu_mod_ASFLAGS): likewise
1215         * conf/i386-pc.rmk: likewise
1216         * conf/x86_64-efi.rmk: likewise
1217         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1218         new declaration
1219         * include/grub/i386/macho.h: new file
1220         * include/grub/i386/xnu.h: likewise
1221         * include/grub/macho.h: likewise
1222         * include/grub/machoload.h: likewise
1223         * include/grub/x86_64/macho.h: likewise
1224         * include/grub/x86_64/xnu.h: likewise
1225         * include/grub/xnu.h: likewise
1226         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1227         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1228         * loader/i386/efi/xnu.c: new file
1229         * loader/i386/pc/xnu.c: likewise
1230         * loader/i386/xnu.c: likewise
1231         * loader/i386/xnu_helper.S: likewise
1232         * loader/macho.c: likewise
1233         * loader/xnu.c: likewise
1234         * loader/xnu_resume.c: likewise
1235         * util/grub-dumpdevtree: likewise
1236         * include/grub/i386/pit.h: include grub/err.h
1237         (grub_pit_wait): export
1238         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1240 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1242         Efiemu
1244         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1245         _linux_efi, linux_efi.
1246         new files in grub-emu
1247         new targets efiemu32.o and efiemu64.o
1248         * loader/linux_normal_efiemu.c: likewise
1249         * loader/i386/efi/linux.c: added preliminary efiemu support
1250         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1251         files to copy
1252         * include/grub/autoefi.h: new file
1253         * include/grub/i386/efiemu.h: likewise
1254         * include/grub/i386/pc/efiemu.h: likewise
1255         * include/grub/efi/api.h: add LL suffix when necessary
1256         new definitions relating to tables
1257         * include/grub/efiemu/efiemu.h: new file
1258         * include/grub/efiemu/runtime.h: likewise
1259         * efiemu/prepare.c: likewise
1260         * efiemu/loadcore_common.c: likewise
1261         * efiemu/loadcore64.c: likewise
1262         * efiemu/runtime/efiemu.sh: likewise
1263         * efiemu/runtime/efiemu.S: likewise
1264         * efiemu/runtime/efiemu.c: likewise
1265         * efiemu/runtime/config.h: likewise
1266         * efiemu/prepare32.c: likewise
1267         * efiemu/main.c: likewise
1268         * efiemu/modules/pnvram.c: likewise
1269         * efiemu/modules/i386: likewise
1270         * efiemu/modules/i386/pc: likewise
1271         * efiemu/modules/acpi.c: likewise
1272         * efiemu/i386/pc/cfgtables.c: likewise
1273         * efiemu/i386/loadcore64.c: likewise
1274         * efiemu/i386/loadcore32.c: likewise
1275         * efiemu/prepare64.c: likewise
1276         * efiemu/loadcore.c: likewise
1277         * efiemu/symbols.c: likewise
1278         * efiemu/mm.c: likewise
1279         * efiemu/loadcore32.c: likewise
1281 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1283         ACPI spoofing
1285         * commands/acpi.c: new file
1286         * commands/i386/pc/acpi.c: likewise
1287         * commands/efi/acpi.c: likewise
1288         * include/grub/acpi.h: likewise
1289         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1290         (acpi_mod_SOURCES): new variable
1291         (acpi_mod_CFLAGS): likewise
1292         (acpi_mod_LDFLAGS): likewise
1293         * conf/i386-efi.rmk: likewise
1294         * conf/x86_64-efi.rmk: likewise
1296 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1298         Missing part from mmap patch
1300         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1301         (grub_mmap_unregister)
1302         (grub_mmap_free_and_unregister): use grub_mmap_register
1304 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1306         Mmap services
1308         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1309         * loader/i386/linux.c (find_mmap_size): likewise
1310         (allocate_pages): likewise
1311         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1312         (grub_fill_multiboot_mmap): likewise
1313         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1314         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1315         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1316         (OPENBSD_MMAP_RESERVED): likewise
1317         * include/grub/i386/pc/memory.h: include grub/memory.h
1318         (grub_lower_mem): removed
1319         (grub_upper_mem): likewise
1320         (GRUB_MACHINE_MEMORY_ACPI): new definition
1321         (GRUB_MACHINE_MEMORY_NVS): likewise
1322         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1323         (GRUB_MACHINE_MEMORY_HOLE): likewise
1324         (grub_machine_mmap_register): likewise
1325         (grub_machine_mmap_unregister): likewise
1326         (grub_machine_get_upper): likewise
1327         (grub_machine_get_lower): likewise
1328         (grub_machine_get_post64): likewise
1329         * include/grub/i386/efi/memory.h: new file
1330         * include/grub/x86_64/efi/memory.h: likewise
1331         * include/grub/efi/memory.h: likewise
1332         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1333         (mmap_mod_SOURCES): new variable
1334         (mmap_mod_LDFLAGS): likewise
1335         (mmap_mod_ASFLAGS): likewise
1336         * conf/i386-coreboot.rmk: likewise
1337         * conf/i386-ieee1275.rmk: likewise
1338         * conf/i386-efi.rmk: likewise
1339         * conf/x86_64-efi.rmk: likewise
1340         * include/grub/types.h (UINT_TO_PTR): new macro
1341         (PTR_TO_UINT32): likewise
1342         (PTR_TO_UINT64): likewise
1343         * include/grub/memory.h: new file
1344         * mmap/i386/pc/mmap.c: likewise
1345         * mmap/i386/pc/mmap_helper.S: likewise
1346         * mmap/i386/uppermem.c: likewise
1347         * mmap/mmap.c: likewise
1348         * mmap/efi/mmap.c: likewise
1349         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1350         grub_upper_mem
1351         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1352         (grub_upper_mem): likewise
1353         (grub_machine_init): don't use grub_upper_mem,
1354         make grub_lower_mem local
1355         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1356         grub_mmap_iterate and grub_mmap_get_upper
1357         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1359 2009-05-02  Bean  <bean123ch@gmail.com>
1361         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1362         script/sh/parser.y.
1363         (pkglib_MODULES): Add normal.mod and sh.mod.
1364         (normal_SOURCES): New variable.
1365         (normal_mod_CFLAGS): Likewise.
1366         (normal_mod_LDFLAGS): Likewise.
1367         (sh_mod_SOURCES): Likewise.
1368         (sh_mod_CFLAGS): Likewise.
1369         (sh_mod_LDFLAGS): Likewise.
1371         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1372         script/sh/lexer.c_DEPENDENCIES.
1373         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1374         kern/rescue_reader.c and kern/rescue_parser.c.
1375         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1376         (grub_emu_SOURCES): Change source files.
1377         (pkglib_MODULES): Remove normal.mod.
1378         (normal_SOURCES): Removed.
1379         (normal_mod_CFLAGS): Likewise.
1380         (normal_mod_LDFLAGS): Likewise.
1381         * conf/i386-coreboot.rmk: Likewise.
1382         * conf/i386-efi.rmk: Likewise.
1383         * conf/i386-ieee1276.rmk: Likewise.
1384         * conf/powerpc-ieee1275.rmk: Likewise.
1385         * conf/sparc64-ieee1275.rmk: Likewise.
1386         * conf/x86_64-efi.rmk: Likewise.
1388         * include/grub/command.h (grub_command_execute): New inline function.
1390         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1392         * include/grub/normal.h: Remove <grub/setjmp.h>.
1393         (grub_fs_module_list): Moved to normal/autofs.c.
1394         (grub_exit_env): Removed.
1395         (grub_command_execute): Likewise.
1396         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1397         parameter script.
1398         (read_command_list): New function declaration.
1399         (read_fs_list): Likewise.
1401         * include/parser.h: Include <grub/reader.h>.
1402         (grub_parser_split_cmdline): Change type of getline parameter.
1403         (grub_parser): New structure.
1404         (grub_parser_class): New variable.
1405         (grub_parser_execute): New function declaration.
1406         (grub_register_rescue_parser): Likewise.
1407         (grub_parser_register): New inline function.
1408         (grub_parser_unregister): Likewise.
1409         (grub_parser_get_current): Likewise.
1410         (grub_parser_set_current): Likewise.
1412         * include/grub/reader.h: New file.
1413         * kern/reader.c: Likewise.
1414         * kern/rescue_parser.c: Likewise.
1415         * kern/rescue_reader.c: Likewise.
1416         * normal/autofs.c: Likewise.
1417         * normal/dyncmd.c: Likewise.
1419         * include/grub/rescue.h: Removed.
1420         * normal/command.h: Likewise.
1422         * include/grub/script.h: Moved to ...
1423         * include/grub/script_sh.h: ... Moved here.
1424         * normal/execute.c: Moved to ...
1425         * script/sh/execute.c: ... Moved here.
1426         * normal/function.c: Moved to ...
1427         * script/sh/function.c: ... Moved here.
1428         * normal/lexer.c: Moved to ...
1429         * script/sh/lexer.c: ... Moved here.
1430         * normal/parser.y: Moved to ...
1431         * script/sh/parser.y: ... Moved here.
1432         * normal/script.c: Moved to ...
1433         * script/sh/script.c: ... Moved here.
1435         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1436         <grub/reader.h>.
1437         (grub_exit_env): Removed.
1438         (fs_module_list): Moved to normal/autofs.c.
1439         (grub_file_getline): Don't handle comment here.
1440         (free_menu): Skip removed field entry->commands.
1441         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1442         script parameter.
1443         (read_config_file): Removed nested parameter, change getline function.
1444         (grub_enter_normal_mode): Removed.
1445         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1446         (read_command_list): Likewise.
1447         (autoload_fs_module): Moved to normal/autofs.c.
1448         (read_fs_list): Likewise.
1449         (reader_nested): New variable.
1450         (grub_normal_execute): Run parser.sh to switch to sh parser.
1451         (grub_cmd_rescue): Removed.
1452         (cmd_normal): Removed.
1453         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1454         rescue command.
1455         (grub_cmdline_run): New function.
1456         (grub_normal_reader_init): Likewise.
1457         (grub_normal_read_line): Likewise.
1458         (grub_env_write_pager): Likewise.
1459         (cmdline): New variable.
1460         (grub_normal_reader): Likewise.
1461         (GRUB_MOD_INIT): Register normal reader and set as current, register
1462         pager hook, register normal command with grub_register_command_prio,
1463         so that it won't show up in command.lst.
1464         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1465         grub_fs_autoload_hook.
1467         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1468         (grub_menu_execute_entry): Replace grub_script_execute with
1469         grub_parser_execute, change parameter to grub_command_execute.
1471         * normal/menu_text.c: Remove <grub/script.h>.
1473         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1474         and <grub/parser.h>.
1475         (run): Change editor_getline to use new parser interface. Change
1476         parameter to grub_command_execute.
1478         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1479         <grub/reader.h> and <grub/parser.h>.
1480         (grub_load_normal_mode): Execute normal command.
1481         (grub_main): Call grub_register_core_commands,
1482         grub_register_rescue_parser and grub_register_rescue_reader, use
1483         grub_reader_loop to enter input loop.
1485         * kern/parser.c (grub_parser_split_cmdline): Change type of
1486         getline parameter.
1487         (grub_parser_class): New variable.
1488         (grub_parser_execute): New function.
1490         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1491         * loader/multiboot2.c: Likewise.
1492         * loader/sparc64/ieee1275/linux.c: Likewise.
1494         * util/grub-emu.c (read_command_list): New dummy function.
1496 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1498         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1499         count to 16 for CCISS and IDA.
1501 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1503         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1504         after waiting for user input.
1506         * loader/i386/linux.c: Include `<grub/normal.h>'.
1507         (grub_cmd_linux): Improve the error message about `ask' mode, by
1508         waiting for user input so it's not missed (we can do this, since
1509         user requested interaction).
1511 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1513         Added missing lst to grub-mkrescue
1515         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1516         and ${input_dir}/parttool.lst
1518 2009-04-30  David S. Miller  <davem@davemloft.net>
1520         * util/hostdisk.c (device_is_wholedisk): New function.
1521         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1522         zero only if device_is_wholedisk() returns true.
1524         * util/hostdisk.c (convert_system_partition_to_system_disk):
1525         Handle virtual disk devices named /dev/vdiskX as found on sparc
1526         and powerpc.
1528         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1529         lettered partition specifier is found, convert to numbered.
1531 2009-04-29  David S. Miller  <davem@davemloft.net>
1533         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1534         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1536         * normal/command.c: Add missing newline at end of file.
1538         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1539         warnings.
1540         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1541         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1542         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1543         ihandles have a 32-bit type but need to be stored in a "void *".
1545 2009-04-28  Pavel Roskin  <proski@gnu.org>
1547         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1548         not disk.  Adjust all dependencies.
1549         (grub_fs_uuid_close): Use grub_device_close(), not
1550         grub_disk_close().
1552         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1553         parent's partition, don't copy it by reference, as it gets freed
1554         on close.
1556 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1558         Preboot hooks support
1560         * commands/boot.c (struct grub_preboot_t): new declaration
1561         (preboots_head): new variable
1562         (preboots_tail): likewise
1563         (grub_loader_register_preboot_hook): new function
1564         (grub_loader_unregister_preboot_hook): likewise
1565         (grub_loader_set): launch preboot hooks
1566         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1567         (grub_loader_register_preboot_hook): new declaration
1568         (grub_loader_unregister_preboot_hook): likewise
1570 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1572         Warning fix
1574         * disk/scsi.c (grub_scsi_open): added missing cast when
1575         calling grub_dprintf
1577 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1579         Bug and warning fixes
1581         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1582         declaration
1583         * commands/test.c (test_parse): fixed bug with file tests and corrected
1584         declaration of find_file
1586 2009-04-26  Pavel Roskin  <proski@gnu.org>
1588         * Makefile.in: Don't install empty manual pages if help2man is
1589         missing.  Use help2man option for output, not shell redirection.
1591 2009-04-26  David S. Miller  <davem@davemloft.net>
1593         * util/grub-mkdevicemap.c (make_device_map): Add missing
1594         NESTED_FUNC_ATTR to process_device().
1596 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1598         Test command
1600         * commands/test.c: rewritten to use bash-like test
1602 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1604         Parttool autoloading and improvements
1606         * Makefile.in (pkglib_DATA): add parttool.lst
1607         (parttool.lst): new target
1608         * genmk.rb: generate parttool-*
1609         (CLEANFILES): add #{parttool}
1610         (PARTTOOLFILES): new variable
1611         * genparttoollist.sh: new file
1612         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1613         (grub_pcpart_type): likewise
1614         * commands/parttool.c (helpmsg): new variable
1615         (grub_cmd_parttool): output help if not enough arguments are supplied
1616         autoload modules
1617         (GRUB_MOD_INIT(parttool)): use helpmsg
1619 2009-04-24  David S. Miller  <davem@davemloft.net>
1621         Avoiding opening same device multiple times in device iterator.
1623         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1624         and use it to build a list of partitions in iterate_disk() and
1625         iterate_partition().
1627         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1628         on disk->data.
1630         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1631         grub_devalias_iterate() result instead of unconditional 0.
1632         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1633         Also, capture hook return value, either directly or via
1634         grub_children_iterate(), and propagate to caller.
1635         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1636         grub_children_iterate): Return value is now 'int' instead of
1637         'grub_err_t'.
1638         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1639         like a proper iterator, stopping when hooks return non-zero.
1640         (grub_devalias_iterate): Likewise.
1642 2009-04-23  David S. Miller  <davem@davemloft.net>
1644         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1646 2009-04-22  David S. Miller  <davem@davemloft.net>
1648         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1649         is larger than address_cells, use that value for address_cells too.
1651         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1652         IEEE1275_MAX_PATH_LEN): Define.
1653         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1654         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1655         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1656         'devtype'.  Explicitly NULL terminate devalias expansion.
1658         * util/sparc64/ieee1275/misc.c: New file.
1659         * util/sparc64/ieee1275/grub-setup.c: New file.
1660         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1661         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1662         * util/sparc64/ieee1275/grub-install.in: New file.
1663         * util/ieee1275/ofpath.c: New file.
1664         * util/ieee1275/devicemap.c: New file.
1665         * util/devicemap.c: New file.
1666         * util/deviceiter.c: New file.
1667         * kern/sparc64/ieee1275/init.c: New file.
1668         * include/grub/util/ofpath.h: New file.
1669         * include/grub/util/deviceiter.h: New file.
1670         * util/grub-mkdevicemap.c: Include deviceiter.h.
1671         Implement using grub_util_emit_devicemap_entry and
1672         grub_util_iterate_devices.
1673         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1674         util/devicemap.c into grub-mkdevicemap
1675         * conf/i386-efi.rmk: Likewise.
1676         * conf/i386-ieee1275.rmk: Likewise.
1677         * conf/i386-pc.rmk: Likewise.
1678         * conf/powerpc-ieee1275.rmk: Likewise.
1679         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1680         images and installation utilities.  Build kernel as image
1681         instead of as elf binary.  Use common rules as much as possible.
1683 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1685         Correct GPT definition
1687         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1688         of "attrib" member
1690 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1692         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1694 2009-04-19  David S. Miller  <davem@davemloft.net>
1696         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1697         (grub_rescue_cmd_linux): Rename to...
1698         (grub_cmd_linux): and fix prototype.
1699         (grub_rescue_cmd_initrd): Rename to...
1700         (grub_cmd_initrd): and fix prototype.
1701         (cmd_linux, cmd_initrd): New.
1702         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1703         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1705 2009-04-17  Pavel Roskin  <proski@gnu.org>
1707         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1708         format.
1709         (grub_ohci_transfer): Likewise.
1711         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1713         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1714         return without a value.  Fix inconsistent indentation.
1716         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1717         match struct grub_fs.
1719         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1720         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1721         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1722         * commands/lspci.c (grub_lspci_iter): Likewise.
1724 2009-04-16  Bean  <bean123ch@gmail.com>
1726         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1727         value.
1729 2009-04-15  Pavel Roskin  <proski@gnu.org>
1731         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1732         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1733         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1734         definitions.
1736 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1738         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1739         that no multiple data or metadata areas are supported and `Unknown
1740         metadata header'.
1742 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1744         Move loader out of the kernel
1746         * kern/loader.c: moved to ...
1747         * commands/boot.c: ... moved here
1748         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1749         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1750         * include/grub/kernel.h (grub_machine_fini): export
1751         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1752         (grub_loader_set): likewise
1753         (grub_loader_unset): likewise
1754         (grub_loader_boot): likewise
1755         * conf/common.rmk: new module boot.mod
1756         (pkglib_MODULES): add boot.mod
1757         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1758         (grub_emu_SOURCES): likewise
1759         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1760         (grub_emu_SOURCES): likewise
1761         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1762         (grub_emu_SOURCES): likewise
1763         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1764         (grub_emu_SOURCES): likewise
1765         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1766         (grub_emu_SOURCES): likewise
1767         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1768         (grub_emu_SOURCES): likewise
1769         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1770         (grub_emu_SOURCES): likewise
1772 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1774         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1776         * kern/misc.c (grub_itoa): Removed function
1777         (grub_ltoa): likewise
1778         (grub_vsprintf): use grub_lltoa
1780 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1782         Restore grub-emu
1784         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1785         * conf/i386-coreboot.rmk: likewise
1786         * conf/i386-ieee1275.rmk: likewise
1787         * conf/powerpc-ieee1275.rmk: likewise
1789 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1791         * INSTALL: Add that `./autogen.sh' needs to be run before
1792         `./configure.'.
1794 2009-04-14  Bean  <bean123ch@gmail.com>
1796         * Makefile.in (pkglib_DATA): Add handler.lst.
1797         (handler.lst): New rule.
1799         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1800         * conf/i386-coreboot.rmk: Likewise.
1801         * conf/i386-ieee1275.rmk: Likewise.
1802         * conf/i386-efi.rmk: Likewise.
1803         * conf/x86_64-efi.rmk: Likewise.
1804         * conf/powerpc-ieee1275.rmk: Likewise.
1805         * conf/sparc64-ieee1275.rmk: Likewise.
1807         * genhandlerlist.sh: New file.
1809         * genmk.rb: Add rules to generate handler.lst.
1811         * include/grub/normal.h (grub_file_getline): New function definition.
1812         (read_handler_list): Likewise.
1813         (free_handler_list): Likewise.
1815         * include/grub/term.h (grub_term_register_input): Add name parameter
1816         for auto generation of handler.lst.
1817         (grub_term_register_output): Likewise.
1819         * normal/handler.c: New file.
1821         * normal/main.c (get_line): Renamed to grub_file_getline.
1822         (read_config_file): Use the newly renamed grub_file_getline.
1823         (read_command_list): Likewise.
1824         (read_fs_list): Likewise.
1825         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1826         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1828         * term/efi/console.c (grub_console_init): Add name parameter for auto
1829         generation of handler.lst.
1830         * term/gfxterm.c: Likewise.
1831         * term/i386/pc/at_keyboard.c: Likewise.
1832         * term/i386/pc/console.c: Likewise.
1833         * term/i386/pc/serial.c: Likewise.
1834         * term/i386/pc/vesafb.c: Likewise.
1835         * term/i386/pc/vga.c: Likewise.
1836         * term/i386/pc/vga_text.c: Likewise.
1837         * term/ieee1275/ofconsole.c: Likewise.
1838         * term/usb_keyboard.c: Likewise.
1840 2009-04-14  Bean  <bean123ch@gmail.com>
1842         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1843         properly with null character.
1845 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1847         * configure: Remove.
1848         * config.h.in: Likewise.
1849         * stamp-h.in: Likewise.
1850         * DISTLIST: Likewise.
1851         * conf/common.mk: Likewise.
1852         * conf/i386-coreboot.mk: Likewise.
1853         * conf/i386-efi.mk: Likewise.
1854         * conf/i386-ieee1275.mk: Likewise.
1855         * conf/i386.mk: Likewise.
1856         * conf/i386-pc.mk: Likewise.
1857         * conf/powerpc-ieee1275.mk: Likewise.
1858         * conf/sparc64-ieee1275.mk: Likewise.
1859         * conf/x86_64-efi.mk: Likewise.
1861         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1862         develop on GRUB.
1864 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1865             David S. Miller  <davem@davemloft.net>
1867         * util/hostdisk.c (make_device_name): Fix buffer length
1868         calculations.
1870 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1872         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1873         <sys/param.h> and <sys/sysctl.h>.
1874         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1875         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1876         opening the device and reset them afterwards.
1878 2009-04-13  Pavel Roskin  <proski@gnu.org>
1880         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1881         Reported by John Stanley <jpsinthemix@verizon.net>
1883 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1885         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1886         that name for menuentries when appropriate.
1888 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1890         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1892 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1894         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1895         to Linux, simply abort telling the user it's no longer supported.
1897 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1899         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1900         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1901         `freebsd_loadenv' only when devices.hints exist.
1903 2009-04-13  Pavel Roskin  <proski@gnu.org>
1905         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1907 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1909         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1910         partition number.
1911         (grub_drive): Likewise.
1913 2009-04-13  David S. Miller  <davem@davemloft.net>
1915         * kern/sparc64/ieee1275/ieee1275.c: New file.
1916         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1917         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1918         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1919         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1920         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1921         grub_ieee1275_alloc_physmem): Declare new exported functions.
1923         * include/grub/sparc64/ieee1275/loader.h: New file.
1924         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1925         * include/grub/sparc64/kernel.h: Likewise.
1926         * loader/sparc64/ieee1275/linux.c: Likewise.
1928         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1929         (grub_fstest_SOURCES): Likewise.
1931         * util/hostdisk.c (make_device_name): Do not make any assumptions
1932         about the length of drive names.
1934         * kern/dl.c (grub_dl_load_file): Close file immediately when
1935         we are done using it.
1937 2009-04-12  David S. Miller  <davem@davemloft.net>
1939         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1940         values.  Noticed by Pavel Roskin.
1942         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1943         target compiler.
1945         * genmk.rb: Add more flexible image type specification, also
1946         pass --strip-unneeded to objcopy.
1947         * conf/i386-pc.rmk: Use *_FORMAT.
1948         * conf/i386-pc.mk: Rebuilt.
1950         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1951         (OFDISK_HASH_SZ): Define.
1952         (ofdisk_hash): New hash table.
1953         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1954         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1955         instead of device phandle which is not unique.
1957         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1958         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1959         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1960         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1961         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1962         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1963         GRUB_KERNEL_MACHINE_DATA_END): Define.
1964         (grub_kernel_image_size, grub_total_module_size): Declare.
1966 2009-04-12  Pavel Roskin  <proski@gnu.org>
1968          * configure.ac: Change the logic when we check for target tools.
1969          Do it when the target is specified and it's different from the
1970          specified value of the host.
1972 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1974         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1975         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1976         GNU/kFreeBSD. Check if a device is a character device. Use
1977         DIOCGMEDIASIZE to get the size.
1978         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1979         support for GNU/kFreeBSD.
1980         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1981         is a character device instead of a block device. Add support for
1982         FreeBSD device names.
1984         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1985         is a character device instead of a block device.
1987         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1988         is a character device instead of a block device.
1990 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1992         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1993         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1994         FreeBSD. Check if a device is a character device. Use
1995         DIOCGMEDIASIZE to get the size.
1996         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1997         support for FreeBSD.
1998         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1999         is a character device instead of a block device. Add support for
2000         FreeBSD device names.
2002         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2003         a character device instead of a block device.
2004         (grub_util_check_char_device): New function.
2006         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2007         a character device instead of a block device.
2009         * include/grub/util/getroot.h (grub_util_check_char_device): New
2010         prototype.
2012 2009-04-11  David S. Miller  <davem@davemloft.net>
2014         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2015         static libgcc.
2016         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2017         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2018         function, if present.
2019         (__bswapdi2): Likewise.
2021         * include/grub/sparc64/ieee1275/boot.h: New file.
2022         * boot/sparc64/ieee1275/boot.S: Likewise.
2023         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2025         * kern/misc.c (grub_ltoa): New function.
2026         (grub_vsprintf): Use it to format 'long' integers.
2028 2009-04-10  David S. Miller  <davem@davemloft.net>
2030         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2031         slots are of type grub_ieee1275_cell_t.
2032         (grub_nand_read): Likewise.
2033         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2034         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2035         macros are used to compare values in arg/ret block of the call.
2036         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2037         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2038         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2039         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2040         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2041         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2042         grub_ieee1275_close, grub_ieee1275_set_property,
2043         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2044         grub_ieee1275_cell_t.
2045         * kern/ieee1275/openfw.c (grub_map): Likewise.
2046         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2047         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2049         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2050         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2051         (grub_devalias_iterate): Likewise.
2053 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2055         UFS improvements
2057         * fs/ufs.c (INODE_NBLOCKS): new definition
2058         (struct grub_ufs_dirent): added fields for non-BSD dirents
2059         (grub_ufs_get_file_block): fixed double indirect handling
2060         (grub_ufs_lookup_symlink): use more robust way to determine whether
2061         symlink is inline
2062         (grub_ufs_find_file): support for non-BSD dirents
2063         (grub_ufs_dir): support for non-BSD dirents
2065 2009-04-10  Bean  <bean123ch@gnail.com>
2067         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2068         attribute, otherwise the size would be wrong for i386 platform.
2070         * include/grub/pci.h (grub_pci_read_word): New inline function.
2071         (grub_pci_read_byte): Likewise.
2072         (grub_pci_write): Likewise.
2073         (grub_pci_write_word): Likewise.
2074         (grub_pci_write_byte): Likewise.
2076         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2078         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2079         (find_framebuf): Scan pci to locate the frame buffer address.
2081         * commands/efi/fixvideo.c: New file.
2083         * commands/efi/loadbios.c: Likewise.
2085         * commands/memrw.c: Likewise.
2087         * util/grub-dumpbios.in: Likewise.
2089         * conf/common.rmk (grub-dumpbios): New utility.
2090         (pkglib_MODULES): New module memrw.mod.
2091         (memrw_mod_SOURCE): New macro.
2092         (memrw_mod_CFLAGS): Likewise.
2093         (memrw_mod_LDFLAGS): Likewise.
2095         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2096         fixvideo.mod.
2097         (loadbios_mod_SOURCE): New macro.
2098         (loadbios_mod_CFLAGS): Likewise.
2099         (loadbios_mod_LDFLAGS): Likewise.
2100         (fixvideo_mod_SOURCE): Likewise.
2101         (fixvideo_mod_CFLAGS): Likewise.
2102         (fixvideo_mod_LDFLAGS): Likewise.
2104         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2105         fixvideo.mod.
2106         (loadbios_mod_SOURCE): New macro.
2107         (loadbios_mod_CFLAGS): Likewise.
2108         (loadbios_mod_LDFLAGS): Likewise.
2109         (fixvideo_mod_SOURCE): Likewise.
2110         (fixvideo_mod_CFLAGS): Likewise.
2111         (fixvideo_mod_LDFLAGS): Likewise.
2113 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2115         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2117 2009-04-07  David S. Miller  <davem@davemloft.net>
2119         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2120         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2121         R_SPARC_WDISP30 case.
2122         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2124 2009-04-06  Pavel Roskin  <proski@gnu.org>
2126         * include/grub/misc.h (ARRAY_SIZE): New macro.
2127         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2128         New macro.
2129         * loader/i386/linux.c (allocate_pages): Use free_pages().
2130         (grub_linux_unload): Don't use free_pages().
2131         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2132         wrong index.  Treat all other modes as text modes.
2133         (grub_cmd_linux): Initialize vid_mode unconditionally to
2134         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2136         * commands/help.c (print_command_help): Use cmd->prio, not
2137         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2139 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2141         Parttool
2143         * parttool/pcpart.c: new file
2144         * commands/parttool.c: likewise
2145         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2146         (parttool_mod_SOURCES): new variable
2147         (parttool_mod_CFLAGS): likewise
2148         (parttool_mod_LDFLAGS): likewise
2149         (pcpart_mod_SOURCES): likewise
2150         (pcpart_mod_CFLAGS): likewise
2151         (pcpart_mod_LDFLAGS): likewise
2152         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2153         and parttool/pcpart.c
2154         * conf/i386-efi.rmk: likewise
2155         * conf/i386-ieee1275.rmk: likewise
2156         * conf/i386-pc.rmk: likewise
2157         * conf/powerpc-ieee1275.rmk: likewise
2158         * conf/sparc64-ieee1275.rmk: likewise
2159         * conf/x86_64-ieee1275.rmk: likewise
2161 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2163         Support for mtime and further expandability of dir command
2165         * include/grub/lib/datetime.h: moved to ...
2166         * include/grub/datetime.h: ... moved here and added
2167         declaration of grub_unixtime2datetime. All users updated
2168         * include/grub/fs.h: new syntax for dir and mtime functions in
2169         struct grub_fs
2170         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2171         and GRUB_FSHELP_FLAGS_MASK
2172         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2173         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2174         (grub_ext2_mtime): new function
2175         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2176         (grub_hfsplus_mtime): new function
2177         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2178         (GRUB_UFS_ATTR_FILE): likewise
2179         (GRUB_UFS_ATTR_LNK): likewise
2180         (struct grub_ufs_sblock): new fields mtime
2181         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2182         all users updated
2183         (grub_ufs_dir): mtime support
2184         (grub_ufs_mtime): new function
2185         * fs/affs.c (grub_affs_dir): use new dir syntax
2186         * fs/afs.c (grub_afs_dir): likewise
2187         * fs/cpio.c (grub_cpio_dir): likewise
2188         * fs/fat.c (grub_fat_find_dir): likewise
2189         * fs/hfs.c (grub_hfs_dir): likewise
2190         * fs/iso9660.c (grub_iso9660_dir): likewise
2191         * fs/jfs.c (grub_jfs_dir): likewise
2192         * fs/minix.c (grub_minix_dir): likewise
2193         * fs/ntfs.c (grub_ntfs_dir): likewise
2194         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2195         * fs/sfs.c (grub_sfs_dir): likewise
2196         * fs/xfs.c (grub_xfs_dir): likewise
2197         * util/hostfs.c (grub_hostfs_dir): likewise
2198         * lib/datetime.c: moved to ...
2199         * normal/datetime.c: ... moved here
2200         (grub_unixtime2datetime): new function
2201         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2202         * normal/completion.c (iterate_dir): use new dir syntax
2203         * normal/misc.c (grub_normal_print_device_info): tell the
2204         last modification time of a volume
2205         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2206         * conf/common.rmk: added lib/datetime.c to ls.mod
2207         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2208         (normal_mod_SOURCES): likewise
2209         (datetime_mod_SOURCES): Removed lib/datetime.c
2210         * conf/i386-efi.rmk: likewise
2211         * conf/i386-ieee1275.rmk: likewise
2212         * conf/i386-pc.rmk: likewise
2213         * conf/powerpc-ieee1275.rmk: likewise
2214         * conf/sparc64-ieee1275.rmk: likewise
2215         * conf/x86_64-efi.rmk: likewise
2217 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2219         Trim trailing spaces in FAT label and support mtools-like labels
2221         * fs/fat.c (grub_fat_iterate_dir): New function based
2222         on grub_fat_find_dir
2223         (grub_fat_find_dir): use grub_fat_iterate_dir
2224         (grub_fat_label): likewise
2226 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2228         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2229         and command.h
2230         remove extraneous kernel_elf_HEADERS
2232 2009-04-04  Bean  <bean123ch@gnail.com>
2234         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2236         * util/misc.c: Likewise.
2238 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2240         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2241         instead of grub_printf.
2243 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2245         * loader/i386/linux.c (grub_linux_setup_video): Fill
2246         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2247         values from `mode info' structure instead of hardcoded
2248         values.
2250 2009-04-01  Pavel Roskin  <proski@gnu.org>
2252         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2253         unused now.
2254         * genmk.rb: Likewise.
2255         * configure.ac: Likewise.
2257 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2259         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2260         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2262 2009-04-01  David S. Miller  <davem@davemloft.net>
2264         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2265         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2266         (grub_setjmp): Mark with 'returns_twice' attribute.
2267         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2268         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2269         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2271 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2273         Reapply fix from 2008-07-28 which was accidentally reverted; also
2274         perform the same fix to a similar check in same function.
2276         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2277         with the same number are found, just use issue a warning with
2278         grub_dprintf(), as this error has been reported to be non-fatal.
2280 2009-03-31  Pavel Roskin  <proski@gnu.org>
2282         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2283         for cross-compilation.
2285 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2287         Fix i386-ieee1275 build.
2289         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2290         Remove declaration.
2292 2009-03-30  Pavel Roskin  <proski@gnu.org>
2294         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2295         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2296         zero-terminated, rely only on the strlen value.  Fix comparison
2297         of strings differing in length.
2299 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2301         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2302         checking for abi version.  Improve error messages on BIOS to notify
2303         user about `linux16' command.
2305 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2307         Leak fixes
2309         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2310         in case of collision
2311         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2313 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2315         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2316         set `vid_mode' accordingly.
2317         (grub_linux_boot): Process `vid_mode' and set video mode.
2319 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2321         * util/grub.d/10_linux.in (linux_entry): New function.
2322         Factorize generation of Linux boot entries.
2324 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2326         Make the format of Environment Block plain text. The boot loader
2327         part is not tested well yet.
2329         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2330         (buffer): Removed.
2331         (envblk): Likewise.
2332         (usage): Remove "info" and "clear". Add "unset". Update the
2333         description of "set", as this does not delete variables any
2334         longer.
2335         (create_envblk_file): Complete rewrite.
2336         (open_envblk_file): Likewise.
2337         (cmd_info): Removed.
2338         (cmd_list): Likewise.
2339         (cmd_set): Likewise.
2340         (cmd_clear): Likewise.
2341         (list_variables): New function.
2342         (write_envblk): Likewise.
2343         (set_variables): Likewise.
2344         (unset_variables): Likewise.
2345         (main): Complete rewrite.
2347         * commands/loadenv.c (buffer): Removed.
2348         (envblk): Likewise.
2349         (open_envblk_file): New function.
2350         (read_envblk_file): Complete rewrite.
2351         (grub_cmd_load_env): Likewise.
2352         (grub_cmd_list_env): Likewise.
2353         (struct blocklist): New struct.
2354         (free_blocklists): New function.
2355         (check_blocklists): Likewise.
2356         (write_blocklists): Likewise.
2357         (grub_cmd_save_env): Complete rewrite.
2359         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2360         a plain text signature.
2361         (GRUB_ENVBLK_MAXLEN): Removed.
2362         (struct grub_envblk): Complete rewrite.
2363         (grub_envblk_find): Removed.
2364         (grub_envblk_insert): Likewise.
2365         (grub_envblk_open): New prototype.
2366         (grub_envblk_set): Likewise.
2367         (grub_envblk_delete): Put const to VALUE.
2368         (grub_envblk_iterate): Put const to NAME and VALUE.
2369         (grub_envblk_close): New prototype.
2370         (grub_envblk_buffer): New inline function.
2371         (grub_envblk_size): Likewise.
2373         * lib/envblk.c: Include grub/mm.h.
2374         (grub_env_find): Removed.
2375         (grub_envblk_open): New function.
2376         (grub_envblk_close): Likewise.
2377         (escaped_value_len): Likewise.
2378         (find_next_line): Likewise.
2379         (grub_envblk_insert): Removed.
2380         (grub_envblk_set): New function.
2381         (grub_envblk_delete): Complete rewrite.
2382         (grub_envblk_iterate): Likewise.
2384 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2386         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2387         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2388         variables.  Use 16-bit loader.
2389         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2390         loader.
2391         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2392         (grub_linux16_boot): ... this.  Update all users.
2393         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2394         (grub_linux_boot): ... this.  Update all users.
2396         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2397         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2398         commands to `linux16' and `initrd16'.
2399         (GRUB_MOD_FINI(linux)): Rename to ...
2400         (GRUB_MOD_FINI(linux16)): ... this.
2402 2009-03-24  Pavel Roskin  <proski@gnu.org>
2404         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2405         not just for compilation.
2407 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2409         Move multiboot helper out of kernel
2411         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2412         `loader/i386/multiboot_helper.S'.
2413         * conf/i386-coreboot.rmk: Likewise
2414         * conf/i386-ieee1275.rmk: Likewise
2416         * kern/i386/loader.S: Move multiboot helpers from here...
2417         * loader/i386/multiboot_helper.S: ...moved here
2418         * include/grub/i386/loader.h: Move declarations of multiboot
2419         helpers from here...
2420         * include/grub/i386/multiboot.h: ...moved here
2421         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2423 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2425         * kern/env.c (grub_env_context_open): Added an argument to specify
2426         whether a new context inherits exported variables from current
2427         one. This is useful when making a sandbox to interpret a config
2428         file.
2429         All callers updated.
2431         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2433 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2435         * kern/env.c (grub_env_context_close): Fix memory leaks.
2437 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2439         * normal/main.c (grub_normal_execute): Added an argument
2440         BATCH to specify if an interactive interface should be provided
2441         after reading a config file.
2442         All callers updated.
2443         (read_command_list): Prevent being executed twice.
2444         (read_fs_list): Likewise.
2446         * include/grub/normal.h (grub_normal_execute): Updated the
2447         prototype.
2449 2009-03-22  Pavel Roskin  <proski@gno.org>
2451         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2452         _start.
2453         * kern/i386/pc/startup.S: Likewise.
2454         * kern/i386/efi/startup.S: Likewise.
2455         * kern/i386/ieee1275/startup.S: Likewise.
2456         * kern/i386/coreboot/startup.S: Likewise.
2457         * kern/x86_64/efi/startup.S: Likewise.
2459         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2460         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2461         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2463 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2465         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2467         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2468         limit detection.
2469         Use vaddr of correct segment for entry_point.
2471 2009-03-21  Bean  <bean123ch@gmail.com>
2473         * commands/blocklist.c: Add include file <grub/command.h>, remove
2474         <grub/normal.h> and <grub/arg.h>.
2475         (grub_cmd_blocklist): Use the new command interface.
2476         (GRUB_MOD_INIT): Likewise.
2477         (GRUB_MOD_FINI): Likewise.
2478         * commands/boot.c: Likewise.
2479         * commands/cat.c: Likewise.
2480         * commands/cmp.c: Likewise.
2481         * commands/configfile.c: Likewise.
2482         * commands/crc.c: Likewise.
2483         * commands/echo.c: Likewise.
2484         * commands/halt.c: Likewise.
2485         * commands/handler.c: Likewise.
2486         * commands/hdparm.c: Likewise.
2487         * commands/help.c: Likewise.
2488         * commands/hexdump.c: Likewise.
2489         * commands/loadenv.c: Likewise.
2490         * commands/ls.c: Likewise.
2491         * commands/lsmmap.c: Likewise.
2492         * commands/lspci.c: Likewise.
2493         * commands/loadenv.c: Likewise.
2494         * commands/read.c: Likewise.
2495         * commands/reboot.c: Likewise.
2496         * commands/search.c: Likewise.
2497         * commands/sleep.c: Likewise.
2498         * commands/test.c: Likewise.
2499         * commands/usbtest.c: Likewise.
2500         * commands/videotest.c: Likewise.
2501         * commands/i386/cpuid.c: Likewise.
2502         * commands/i386/pc/halt.c: Likewise.
2503         * commands/i386/pc/play.c: Likewise.
2504         * commands/i386/pc/pxecmd.c: Likewise.
2505         * commands/i386/pc/vbeinfo.c: Likewise.
2506         * commands/i386/pc/vbetest.c: Likewise.
2507         * commands/ieee1275/suspend.c: Likewise.
2508         * disk/loopback.c: Likewise.
2509         * font/font_cmd.c: Likewise.
2510         * hello/hello.c: Likewise.
2511         * loader/efi/appleloader.c: Likewise.
2512         * loader/efi/chainloader.c: Likewise.
2513         * loader/i386/bsd.c: Likewise.
2514         * loader/i386/efi/linux.c: Likewise.
2515         * loader/i386/ieee1275/linux.c: Likewise.
2516         * loader/i386/linux.c: Likewise.
2517         * loader/i386/pc/chainloader.c: Likewise.
2518         * loader/i386/pc/linux.c: Likewise.
2519         * loader/powerpc/ieee1275/linux.c: Likewise.
2520         * loader/multiboot_loader.c: Likewise.
2521         * term/gfxterm.c: Likewise.
2522         * term/i386/pc/serial.c: Likewise.
2523         * term/terminfo.c: Likewise.
2525         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2526         * term/i386/pc/vga.c: Likewise.
2527         * video/readers/jpeg.c: Likewise.
2528         * video/readers/png.c: Likewise.
2529         * video/readers/tga.c: Likewise.
2531         * util/grub-fstest (cmd_loopback): Removed.
2532         (cmd_blocklist): Likewise.
2533         (cmd_ls): Likewise.
2534         (grub_register_command): Likewise.
2535         (grub_unregister_command): Likewise.
2536         (execute_command): Use grub_command_find to locate command and execute
2537         it.
2539         * include/grub/efi/chainloader.h: Removed.
2540         * loader/efi/chainloader_normal.c: Likewise.
2541         * loader/i386/bsd_normal.c: Likewise.
2542         * loader/i386/pc/chainloader_normal.c: Likewise.
2543         * loader/i386/pc/multiboot_normal.c: Likewise.
2544         * loader/linux_normal.c: Likewise.
2545         * loader/multiboot_loader_normal.c: Likewise.
2546         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2548         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2549         and grub_register_command_p1.
2551         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2552         kern/command.c, lib/arg.c and commands/extcmd.c.
2553         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2554         (minicmd_mod_SOURCES): New variable.
2555         (minicmd_mod_CFLAGS): Likewise.
2556         (minicmd_mod_LDFLAGS): Likewise.
2557         (extcmd_mod_SOURCES): Likewise.
2558         (extcmd_mod_CFLAGS): Likewise.
2559         (extcmd_mod_LDFLAGS): Likewise.
2560         (boot_mod_SOURCES): Removed.
2561         (boot_mod_CFLAGS): Likewise.
2562         (boot_mod_LDFLAGS): Likewise.
2564         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2565         kern/corecmd.c.
2566         (kernel_img_HEADERS): Add command.h.
2567         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2568         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2569         and lib/arg.c.
2570         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2571         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2572         remove the corresponding normal mode command.
2573         (normal_mod_SOURCES): Remove normal/arg.c.
2574         * conf/i386-coreboot.rmk: Likewise.
2575         * conf/i386-efi.rmk: Likewise.
2576         * conf/i386-ieee1275.rmk: Likewise.
2577         * conf/powerpc-ieee1275.rmk: Likewise.
2578         * conf/x86_64-efi.rmk: Likewise.
2580         * include/grub/arg.h: Move from here ...
2581         * include/grub/lib/arg.h: ... to here.
2583         * normal/arg.c: Move from here ...
2584         * lib/arg.c: ... to here.
2586         * commands/extcmd.c: New file.
2587         * commands/minicmd.c: Likewise.
2588         * include/grub/command.h: Likewise.
2589         * include/grub/extcmd.h: Likewise.
2590         * kern/command.c: Likewise.
2591         * kern/corecmd.c: Likewise.
2593         * kern/list.c (grub_list_iterate): Return int instead of void.
2594         (grub_list_insert): New function.
2595         (grub_prio_list_insert): Likewise.
2597         * kern/rescue.c (grub_rescue_command): Removed.
2598         (grub_rescue_command_list): Likewise.
2599         (grub_rescue_register_command): Likewise.
2600         (grub_rescue_unregister_command): Likewise.
2601         (grub_rescue_cmd_boot): Move to minicmd.c
2602         (grub_rescue_cmd_help): Likewise.
2603         (grub_rescue_cmd_info): Likewise.
2604         (grub_rescue_cmd_boot): Likewise.
2605         (grub_rescue_cmd_testload): Likewise.
2606         (grub_rescue_cmd_dump): Likewise.
2607         (grub_rescue_cmd_rmmod): Likewise.
2608         (grub_rescue_cmd_lsmod): Likewise.
2609         (grub_rescue_cmd_exit): Likewise.
2610         (grub_rescue_print_devices): Moved to corecmd.c.
2611         (grub_rescue_print_files): Likewise.
2612         (grub_rescue_cmd_ls): Likewise.
2613         (grub_rescue_cmd_insmod): Likewise.
2614         (grub_rescue_cmd_set): Likewise.
2615         (grub_rescue_cmd_unset): Likewise.
2616         (attempt_normal_mode): Use grub_command_find to get normal module.
2617         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2618         commands, remove grub_rescue_register_command calls.
2620         * normal/command.c (grub_register_command): Removed.
2621         (grub_unregister_command): Likewise.
2622         (grub_command_find): Likewise.
2623         (grub_iterate_commands): Likewise.
2624         (rescue_command): Likewise.
2625         (export_command): Moved to corecmd.c.
2626         (set_command): Removed.
2627         (unset_command): Likewise.
2628         (insmod_command): Likewise.
2629         (rmmod_command): Likewise.
2630         (lsmod_command): Likewise.
2631         (grub_command_init): Likewise.
2633         * normal/completion.c (iterate_command): Use cmd->prio to check for
2634         active command.
2635         (complete_arguments): Use grub_extcmd_t structure to find options.
2636         (grub_normal_do_completion): Change function grub_iterate_commands to
2637         grub_command_iterate.
2639         * normal/execute.c (grub_script_execute_cmd): No need to parse
2640         argument here.
2642         * normal/main.c (grub_dyncmd_dispatcher): New function.
2643         (read_command_list): Register unload commands as dyncmd.
2644         (grub_cmd_normal): Use new command interface, register rescue,
2645         unregister normal at entry, register normal, unregister rescue at exit.
2647         * include/grub/list.h (grub_list_test_t): New type.
2648         (grub_list_iterate): Return int instead of void.
2649         (grub_list_insert): New function.
2650         (GRUB_AS_NAMED_LIST_P): New macro.
2651         (GRUB_AS_PRIO_LIST): Likewise.
2652         (GRUB_AS_PRIO_LIST_P): Likewise.
2653         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2654         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2655         (grub_prio_list): New structure.
2656         (grub_prio_list_insert): New function.
2657         (grub_prio_list_remove): New inline function.
2659         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2660         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2661         (GRUB_COMMAND_FLAG_MENU): Likewise.
2662         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2663         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2664         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2665         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2666         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2667         (grub_command): Likewise.
2668         (grub_register_command): Likewise.
2669         (grub_command_find): Likewise.
2670         (grub_iterate_commands): Likewise.
2671         (grub_command_init): Likewise.
2672         (grub_arg_parse): Likewise.
2673         (grub_arg_show_help): Likewise.
2675         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2676         (grub_rescue_unregister_command): Likewise.
2678         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2679         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2680         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2682         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2683         grub_rescue_cmd_initrd.
2684         * include/grub/i386/loader.h: Likewise.
2685         * include/grub/x86_64/loader.h: Likewise.
2687         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2689 2009-03-21  Bean  <bean123ch@gmail.com>
2691         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2692         instead of stat in mingw environment.
2694         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2696         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2698         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2699         AC_CONFIG_LINKS.
2701 2009-03-21  Bean  <bean123ch@gmail.com>
2703         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2704         out of range error.
2706 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2708         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2709         checking inode flags for EXT4_EXTENTS_FLAG.
2711 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2713         * loader/i386/linux.c: Include `<grub/video.h>' and
2714         `<grub/i386/pc/vbe.h>'..
2715         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2716         (grub_linux32_boot): Attempt to configure video settings with
2717         grub_linux_setup_video().
2718         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2719         to avoid grub_console_fini() which would step out of graphical mode
2720         unconditionally.
2722 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2724         Fix build on powerpc.
2725         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2727 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2729         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2730         background image command.
2732 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2734         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2735         (grub_gfxterm_putchar): Extract pairs of identical calls to
2736         draw_cursor out of conditional blocks.
2738 2009-03-11  Pavel Roskin  <proski@gnu.org>
2740         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2741         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2743 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2745         * loader/i386/multiboot_elfxx.c
2746         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2748 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2750         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2751         `kern/handler.c'.
2753 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2755         * loader/i386/multiboot.c (code_size): New variable.
2756         (grub_multiboot): Define offsets by adding to `code_size' rather
2757         than subtracting from `grub_multiboot_payload_size'.  Provide
2758         4-byte alignment to MBI and others by increasing
2759         `boot_loader_name_length' appropriately.
2761         * loader/i386/multiboot_elfxx.c
2762         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2764 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2766         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2767         `fs/ext2.c'.
2769 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2771         Make loader/i386/linux.c usable on i386-pc again.
2773         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2774         memory to heap.
2775         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2776         `#error' stanza.
2778 2009-03-07  Bean  <bean123ch@gmail.com>
2780         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2781         allocation.
2783 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2785         Fix display issue on terminals with screen size other than 80x25
2786         (e.g. gfxterm with resolution higher than 640x480).
2788         * normal/main.c (grub_normal_init_page): Display title text in a
2789         position relative to the center of the terminal instead of relying
2790         on a hardcoded offset.
2792 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2794         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2795         installed.
2797         * Makefile.in (host_kernel): New variable.
2798         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2799         scripts instead of just the windows one.
2800         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2802 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2804         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2805         `kern/handler.c'.
2806         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2807         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2808         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2809         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2810         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2811         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2813 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2815         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2816         or if there's no space for the disk label and print the partition number on a
2817         invalid magic.
2819 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2821         * util/misc.c: Include <time.h>.
2822         (grub_millisleep): New function.
2824 2009-03-04  Bean  <bean123ch@gmail.com>
2826         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2827         another option -mno-red-zone.
2829         * commands/handler.c: Change module description.
2831         * kern/handler.c: Add missing space at the end of description line.
2833         * kern/list.c: Likewise.
2835 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2837         Move more components to the relocation area, and fix mbi pointer
2838         handling to use the destination rather than the origin (thanks to
2839         Vladimir Serbinenko for spotting).
2841         * loader/i386/multiboot.c (mbi_dest): New variable.
2842         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2843         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2844         relocation area.
2846 2009-03-01  Bean  <bean123ch@gmail.com>
2848         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2849         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2850         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2851         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2853         * loader/i386/efi/linux.c (acpi_guid): New variable.
2854         (acpi_guid): Likewise.
2855         (EBDA_SEG_ADDR): New constant.
2856         (LOW_MEM_ADDR): Likewise.
2857         (FAKE_EBDA_SEG): Likewise.
2858         (fake_bios_data): New function.
2859         (grub_linux_boot): Call fake_bios_data.
2861 2009-03-01  Bean  <bean123ch@gmail.com>
2863         * commands/terminal.c: Removed.
2865         * commands/handler.c: New file.
2867         * include/grub/list.h: Likewise.
2869         * include/grub/handler.h: Likewise.
2871         * kern/list.c: Likewise.
2873         * kern/handler.c: Likewise.
2875         * kern/term.h: Include header file <grub/handler.h>.
2876         (grub_term_input): Move next field to the beginning.
2877         (grub_term_output): Likewise.
2878         (grub_term_input_class): New variable.
2879         (grub_term_output_class): Likewise.
2880         (grub_term_register_input): Changed to inline function.
2881         (grub_term_register_output): Likewise.
2882         (grub_term_unregister_input): Likewise.
2883         (grub_term_unregister_output): Likewise.
2884         (grub_term_set_current_input): Likewise.
2885         (grub_term_set_current_output): Likewise.
2886         (grub_term_get_current_input): Likewise.
2887         (grub_term_get_current_output): Likewise.
2888         (grub_term_iterate_input): Removed.
2889         (grub_term_iterate_output): Likewise.
2891         * kern/term.c (grub_term_list_input): Removed.
2892         (grub_term_list_output): Likewise.
2893         (grub_term_input_class): New variable.
2894         (grub_term_output_class): Likewise.
2895         (grub_cur_term_input): Change variable as macro.
2896         (grub_cur_term_output): Likewise.
2897         (grub_term_register_input): Removed.
2898         (grub_term_register_output): Likewise.
2899         (grub_term_unregister_input): Likewise.
2900         (grub_term_unregister_output): Likewise.
2901         (grub_term_set_current_input): Likewise.
2902         (grub_term_set_current_output): Likewise.
2903         (grub_term_iterate_input): Likewise.
2904         (grub_term_iterate_output): Likewise.
2905         (grub_term_get_current_input): Likewise.
2906         (grub_term_get_current_output): Likewise.
2908         * util/grub-editenv.c: Include header file <grub/handler.h>.
2909         (grub_term_get_current_input): Removed.
2910         (grub_term_get_current_output): Likewise.
2911         (grub_term_input_class): New variable.
2912         (grub_term_output_class): Likewise.
2914         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2915         (grub_term_get_current_output): Likewise.
2916         (grub_term_input_class): New variable.
2917         (grub_term_output_class): Likewise.
2919         * util/grub-probe.c (grub_term_get_current_input): Removed.
2920         (grub_term_get_current_output): Likewise.
2921         (grub_term_input_class): New variable.
2922         (grub_term_output_class): Likewise.
2924         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2925         (grub_term_get_current_output): Likewise.
2926         (grub_term_input_class): New variable.
2927         (grub_term_output_class): Likewise.
2929         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2930         (terminal_mod_SOURCES): Likewise.
2931         (terminal_mod_CFLAGS): Likewise.
2932         (terminal_mod_LDFLAGS): Likewise.
2934         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2935         handler.c.
2936         (kernel_img_SOURCES): Add list.c and handler.c.
2937         (kernel_img_HEADERS): Add list.h and handler.h.
2939         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2940         handler.c.
2941         (kernel_mod_SOURCES): Add list.c and handler.c.
2942         (kernel_mod_HEADERS): Add list.h and handler.h.
2944         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2945         handler.c.
2946         (kernel_elf_SOURCES): Add list.c and handler.c.
2947         (kernel_elf_HEADERS): Add list.h and handler.h.
2949         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2950         handler.c.
2951         (kernel_elf_SOURCES): Add list.c and handler.c.
2952         (kernel_elf_HEADERS): Add list.h and handler.h.
2954         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2955         handler.c.
2956         (kernel_mod_SOURCES): Add list.c and handler.c.
2957         (kernel_mod_HEADERS): Add list.h and handler.h.
2959         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2960         handler.c.
2961         (kernel_elf_SOURCES): Add list.c and handler.c.
2962         (kernel_elf_HEADERS): Add list.h and handler.h.
2964 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2966         Factorize elf32 / elf64 code in Multiboot loader.  This will
2967         prevent it from getting out of sync again.
2969         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2970         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2971         grub_multiboot_load_elf64): Move from here ...
2972         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2973         grub_multiboot_load_elf): ... to here (new file).
2975 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2977         * util/grub.d/10_linux.in: Rename "single-user mode" to
2978         "recovery mode".
2980 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2982         Don't leak in SCSI code.
2983         * disk/scsi.c (grub_scsi_close): free `scsi'.
2985 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2987         * loader/i386/pc/multiboot.c: Move from here ...
2988         * loader/i386/multiboot.c: ... to here.  Update all users.
2990 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2992         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2993         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2995 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2997         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2998         b-tree.
3000 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3002         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3003         `0x' qualifier as 0 when base is specified as parameter).
3005 2009-02-24  Bean  <bean123ch@gmail.com>
3007         * configure.ac: Check for -mcmodel=large in x86_64 target.
3009         * include/grub/efi/api.h (efi_call_10): New macro.
3010         (efi_wrap_10): New function.
3012         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3013         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3014         (GRUB_PE32_REL_BASED_LOW): Likewise.
3015         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3016         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3017         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3018         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3019         (GRUB_PE32_REL_BASED_REL): Likewise.
3020         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3021         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3022         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3024         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3025         issue.
3027         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3028         (efi_wrap_10): New function.
3030         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3032         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3033         MB/MBP model (NV chipset).
3034         (devdata_devs): Add devpath_5 to the list.
3036         * load/i386/efi/linux.c (video_base): Remove variable.
3037         (RGB_MASK): New macro.
3038         (RGB_MAGIC): Likewise.
3039         (LINE_MIN): Likewise.
3040         (LINE_MAX): Likewise.
3041         (FBTEST_STEP): Likewise.
3042         (FBTEST_COUNT): Likewise.
3043         (fb_list): New variable.
3044         (grub_find_video_card): Remove function.
3045         (find_framebuf): New function.
3046         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3047         line length.
3049         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3050         problem for x86_64.
3052 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3054         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3056         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3057         coding tool name.
3059 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3061         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3062         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3063         in our relocation, instead of using it directly from heap.  Also
3064         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3066 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3068         Implement USB keyboard support (based on patch by Marco Gerards)
3070         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3071         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3072         (usb_keyboard_mod_LDFLAGS): New variables.
3074         * term/usb_keyboard.c: New file.
3076 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3078         Corrected wrong declaration
3080         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3082 2009-02-14  Christian Franke  <franke@computer.org>
3084         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3085         (grub_lspci_iter): Print class code and programming interface byte.
3087 2009-02-14  Christian Franke  <franke@computer.org>
3089         * gendistlist.sh: Ignore `.svn' directories.
3091 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3093         * fs/fat.c: Add 2009 to Copyright line.
3095 2009-02-14  Christian Franke  <franke@computer.org>
3097         * commands/hdparm.c: New file.  Provides `hdparm' command
3098         which sends ATA commands via grub_disk_ata_pass_through ().
3100         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3102         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3103         and <grub/cpu/io.h> to include/grub/ata.h.
3104         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3105         (GRUB_CDROM_SECTOR_SIZE): Remove.
3106         (GRUB_ATA_*): Move to include/grub/ata.h.
3107         (GRUB_ATAPI_*): Likewise.
3108         (enum grub_ata_commands): Likewise.
3109         (enum grub_ata_timeout_milliseconds): Likewise.
3110         (struct grub_ata_device): Likewise.
3111         (grub_ata_regset): Likewise.
3112         (grub_ata_regget): Likewise.
3113         (grub_ata_regset2): Likewise.
3114         (grub_ata_regget2): Likewise.
3115         (grub_ata_check_ready): Likewise.
3116         (grub_ata_wait_not_busy): Remove static, exported in
3117         include/grub/ata.h.
3118         (grub_ata_wait_drq): Likewise.
3119         (grub_ata_pio_read): Likewise.
3121         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3122         function for hdparm.mod.
3124         * include/grub/ata.h: New file, contains declarations from
3125         disk/ata.c.
3126         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3128         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3129         (grub_disk_ata_pass_through): New exported variable.
3131         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3133 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3135         Support multiple fallback entries, and provide an API to support
3136         executing default+fallback menu entries.  Renamed the `terminal' menu
3137         viewer to `text'.
3139         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3140         variable declaration.
3141         (grub_menu_execute_callback): New structure declaration.
3142         (grub_menu_execute_callback_t): New typedef.
3143         (grub_menu_execute_with_fallback): New function declaration.
3144         (grub_menu_get_entry): Likewise.
3145         (grub_menu_get_timeout): Likewise.
3146         (grub_menu_set_timeout): Likewise.
3148         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3150         * normal/menu.c (grub_wait_after_message): Moved to
3151         `normal/menu_text.c'.
3152         (draw_border): Likewise.
3153         (print_message): Likewise.
3154         (print_entry): Likewise.
3155         (print_entries): Likewise.
3156         (grub_menu_init_page): Likewise.
3157         (get_entry_number): Likewise.
3158         (print_timeout): Likewise.
3159         (run_menu): Likewise.
3160         (grub_menu_execute_entry): Likewise.
3161         (show_text_menu): Likewise.
3162         (get_and_remove_first_entry_number): New function.
3163         (grub_menu_execute_with_fallback): Likewise.
3164         (get_entry): Renamed to ...
3165         (grub_menu_get_entry): .. this and made it global.
3166         (get_timeout): Renamed to ...
3167         (grub_menu_get_timeout): ... this and made it global.
3168         (set_timeout): Renamed to ...
3169         (grub_menu_set_timeout): ... this and made it global.
3170         (grub_normal_terminal_menu_viewer): Renamed to ...
3171         (grub_normal_text_menu_viewer): ... this.
3173         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3174         from normal/menu.c.
3176         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3177         (normal_mod_SOURCES): Likewise.
3179         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3180         (normal_mod_SOURCES): Likewise.
3182         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3183         (normal_mod_SOURCES): Likewise.
3185         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3186         (normal_mod_SOURCES): Likewise.
3188         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3189         (normal_mod_SOURCES): Likewise.
3191         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3192         (normal_mod_SOURCES): Likewise.
3194         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3195         (normal_mod_SOURCES): Likewise.
3197 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3199         * util/grub.d/00_header.in: Update old reference to `font' command.
3201 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3203         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3205         Based on patch from Javier Martín.
3207 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3209         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3210         to avoid false positives with FAT.
3211         (grub_fstest_SOURCES): Likewise.
3212         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3213         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3214         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3215         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3216         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3217         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3219 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3221         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3222         bpb.version_specific.fat12_or_fat16.fstype and
3223         bpb.version_specific.fat32.fstype.
3225 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3227         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3229 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3231         * Makefile.in (host_os, host_cpu): New variables.
3232         (target_os): Remove.  Update all users.
3234 2009-02-08  Marco Gerards  <marco@gnu.org>
3236         * Makefile.in (enable_grub_emu_usb): New variable.
3237         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3238         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3239         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3240         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3241         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3242         `usbtest.mod' and `usbms.mod'.
3243         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3244         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3245         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3246         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3247         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3248         variables.
3250         * disk/usbms.c: New file.
3252         * include/grub/usb.h: Likewise.
3254         * include/grub/usbtrans.h: Likewise.
3256         * include/grub/usbdesc.h: Likewise.
3258         * bus/usb/usbtrans.c: Likewise.
3260         * bus/usb/ohci.c: Likewise.
3262         * bus/usb/uhci.c: Likewise.
3264         * bus/usb/usbhub.c: Likewise.
3266         * bus/usb/usb.c: Likewise.
3268         * commands/usbtest.c: Likewise.
3270         * util/usb.c: Likewise.
3272         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3274         * configure.ac: Test for libusb presence.
3276         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3278 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3280         * kern/mm.c: Add more comments.
3282 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3284         Patch from Javier Martín.
3285         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3286         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3288 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3290         * fs/cpio.c: Split tar functionality to ...
3291         * fs/tar.c: ... here (new file).  Update all users.
3293 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3295         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3296         backward-incompatible features.
3298         Based on patch from Javier Martín, with some adjustments.
3300 2009-02-07  Michael Scherer  <misc@mandriva.org>
3302         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3304 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3306         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3307         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3308         after the RAID stuff.
3310 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3312         Fixes problem when running vbetest command as reported by
3313         Vladimir Serbinenko <phcoder@gmail.com>.
3315         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3317 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3319         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3320         /dev/md/NpN style mdraid devices.
3322 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3324         * util/unifont2pff.rb: Remove.
3326 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3328         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3329         `#'.
3331 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3333         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3334         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3335         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3336         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3337         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3338         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3339         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3341 2009-02-02  Christian Franke  <franke@computer.org>
3343         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3345 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3347         * INSTALL: Note that we now require at least autoconf 2.59 and
3348         that LZO is optional.
3350 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3352         Base on patch on bug #24154 created by Tomas Tintera
3353         <trosos@seznam.cz>.
3355         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3357 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3359         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3360         <bero@arklinux.org>.
3362         * normal/parser.y (script_init): Add missing semicolon.
3364 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3366         * normal/main.c: Add include to grub/menu_viewer.h.
3367         (free_menu_entry_classes): Added.
3368         (grub_normal_menu_addentry): Added class property handling.
3369         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3370         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3372         * normal/menu_viewer.c: New file.
3374         * normal/menu.c (run_menu_entry): Renamed to ...
3375         (grub_menu_execute_entry): ... this and made it as global.
3376         (grub_menu_run): Renamed to ...
3377         (show_text_menu): ... this and made it local.
3378         (show_text_menu): Adapt to new function names.
3379         (grub_normal_terminal_menu_viewer): New global variable.
3381         * include/grub/menu.h: New file.
3383         * include/grub/menu_viewer.h: New file.
3385         * include/grub/normal.h: Added include to grub/menu.h.
3386         (grub_menu_entry): Moved to include/grub/menu.h.
3387         (grub_menu_entry_t): Likewise.
3388         (grub_menu): Likewise.
3389         (grub_menu_t): Likewise.
3390         (grub_normal_terminal_menu_viewer): Added.
3391         (grub_menu_execute_entry): Likewise.
3392         (grub_menu_run): Removed.
3394         * DISTLIST: Added include/grub/menu.h.
3395         Added include/grub/menu_viewer.h.
3396         Added normal/menu_viewer.c.
3398 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3400         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3401         arglist for menutitle arguments.
3403         * normal/main.c (grub_normal_menu_addentry): Likewise.
3405         * normal/parser.y (menuentry): Likewise.
3407         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3409         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3410         (grub_script_create_cmdmenu): Likewise.
3412         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3414         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3415         changes.
3417         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3419         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3421         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3423         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3425         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3427         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3429 2009-01-30  Christian Franke  <franke@computer.org>
3431         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3432         in option help text.
3434 2009-01-27  Pavel Roskin  <proski@gnu.org>
3436         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3438 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3440         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3442         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3444         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3445         unregister function.
3447 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3449         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3451         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3453         * util/grub-mkfont.c (usage): Fix typo.
3455         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3457 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3459         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3461         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3463         * kern/misc.c (grub_strcasecmp): New function.
3464         (grub_strcasecmp): Use grub_size_t instead of int for length.
3465         Fix return value.
3466         * include/grub/misc.h: Update function prototypes.
3468 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3470         * configure.ac: Fix cross-compilation check.
3472 2009-01-22  Christian Franke  <franke@computer.org>
3474         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3475         (precision) digit string.  Allow `.format2' without `format1' (width).
3476         Limit input chars for `%s' output to `format2' if specified.  This is
3477         compatible with standard printf ().
3479 2009-01-22  Christian Franke  <franke@computer.org>
3481         * disk/ata.c (grub_ata_wait_status): Replace by ...
3482         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3483         other status bits may be invalid while BSY is asserted.
3484         (grub_ata_check_ready): New function.
3485         (grub_ata_cmd): Removed.
3486         (grub_ata_wait_drq): New function.
3487         (grub_ata_strncpy): Remove inline.
3488         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3489         and error check now done by grub_ata_wait_drq ().
3490         (grub_ata_pio_write): Likewise.
3491         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3492         grub_ata_wait_drq () to wait for data.
3493         (grub_ata_device_initialize): Add status register check to
3494         detect missing SATA slave devices.  Add debug messages.
3495         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3496         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3497         transfer loop by grub_ata_pio_write ().
3498         (grub_ata_identify): Set DEV before check for !BSY. Use
3499         grub_ata_wait_drq () to wait for data.
3500         (grub_ata_setaddress): Set DEV before check for !BSY.
3501         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3502         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3503         command on (size % batch) == 0.  Add missing error check after write of
3504         last block.  Add debug messages.
3505         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3507 2009-01-19  Christian Franke  <franke@computer.org>
3509         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3510         (GRUB_ATAPI_IREASON_*): Likewise.
3511         (grub_ata_pio_write): Fix timeout error return.
3512         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3513         (grub_atapi_wait_drq): New function.
3514         (grub_atapi_packet): New parameter `size'.
3515         Use grub_atapi_wait_drq () and direct write instead of
3516         grub_ata_pio_write ().
3517         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3518         reads the number of bytes requested by the device for each DRQ
3519         assertion.
3520         (grub_atapi_write): Remove old implementation, return not
3521         implemented instead.
3523 2009-01-19  Christian Franke  <franke@computer.org>
3525         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3526         of 512 to calculate data size.
3527         (grub_scsi_read12): Likewise.
3528         (grub_scsi_write10): Likewise.
3529         (grub_scsi_write12): Likewise.
3530         (grub_scsi_read): Adjust size according to blocksize.
3531         Add checks for invalid blocksize and unaligned transfer.
3533 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3535         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3537         * term/gfxterm.c (write_char): Fix background rendering for wide
3538         width glyphs.
3540 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3542         * config.guess: Update to latest version from config git.
3543         * config.sub: Likewise.
3545 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3547         * Makefile.in: Change font compilation to use new grub-mkfont instead
3548         of java version.
3550         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3551         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3552         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3553         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3554         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3555         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3556         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3557         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3558         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3560 2009-01-16  Christian Franke  <franke@computer.org>
3562         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3563         (enum grub_ata_timeout_milliseconds): New enum.
3564         (grub_ata_wait_status): Add parameter milliseconds.
3565         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3566         recovery from timed-out commands.
3567         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3568         return grub_errno instead of REG_ERROR.
3569         (grub_ata_pio_write): Add parameter milliseconds.
3570         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3571         Pass milliseconds to grub_ata_wait_status () and
3572         grub_ata_pio_read ().
3573         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3574         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3575         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3576         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3577         It is not suitable for device detection, because DEV bit is ignored,
3578         the command may run too long, and not all devices set the signature
3579         properly.
3580         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3581         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3582         Fix device selection, DEV bit must be set first to address the registers
3583         of the correct device.
3584         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3585         grub_ata_pio_read/write ().
3586         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3587         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3589 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3591         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3593 2009-01-13  Bean  <bean123ch@gmail.com>
3595         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3597 2009-01-13  Bean  <bean123ch@gmail.com>
3599         * Makefile.in: (enable_grub_mkfont): New variable.
3600         (freetype_cflags): Likewise.
3601         (freetype_libs): Likewise.
3603         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3604         (grub_mkfont_SOURCES): New variable.
3605         (grub_mkfont_CFLAGS): Likewise.
3606         (grub_mkfont_LDFLAGS): Likewise.
3608         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3609         library if `--enable-grub-mkfont' is requested.
3610         (enable_grub_mkfont): New variable.
3611         (freetype_cflags): Likewise.
3612         (freetype_libs): Likewise.
3614         * util/grub-mkfont.c: New file.
3616 2009-01-12  Christian Franke  <franke@computer.org>
3618         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3619         mode check.  Fix setting of compat_use[].
3621 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3623         Update a few copyright years which we forgot to do in 2008 (only for
3624         files whose changes made in 2008 were copyright-significant)
3626         * Makefile.in: Add 2008 to Copyright line.
3627         * disk/ieee1275/ofdisk.c: Likewise.
3628         * disk/efi/efidisk.c: Likewise.
3629         * kern/dl.c: Likewise.
3630         * kern/sparc64/ieee1275/init.c: Likewise.
3631         * kern/mm.c: Likewise.
3632         * kern/efi/mm.c: Likewise.
3633         * boot/i386/pc/boot.S: Likewise.
3634         * genfslist.sh: Likewise.
3635         * fs/iso9660.c: Likewise.
3636         * fs/hfs.c: Likewise.
3637         * fs/jfs.c: Likewise.
3638         * fs/minix.c: Likewise.
3639         * fs/ufs.c: Likewise.
3640         * gensymlist.sh.in: Likewise.
3641         * genkernsyms.sh.in: Likewise.
3642         * include/grub/misc.h: Likewise.
3643         * include/grub/types.h: Likewise.
3644         * include/grub/symbol.h: Likewise.
3645         * include/grub/elf.h: Likewise.
3646         * include/grub/kernel.h: Likewise.
3647         * include/grub/disk.h: Likewise.
3648         * include/grub/dl.h: Likewise.
3649         * include/grub/i386/linux.h: Likewise.
3650         * include/grub/i386/pc/biosdisk.h: Likewise.
3651         * include/grub/efi/api.h: Likewise.
3652         * include/grub/efi/pe32.h: Likewise.
3653         * include/grub/util/misc.h: Likewise.
3654         * normal/execute.c: Likewise.
3655         * normal/arg.c: Likewise.
3656         * normal/completion.c: Likewise.
3657         * normal/lexer.c: Likewise.
3658         * normal/parser.y: Likewise.
3659         * normal/misc.c: Likewise.
3660         * commands/i386/pc/vbeinfo.c: Likewise.
3661         * commands/hexdump.c: Likewise.
3662         * commands/terminal.c: Likewise.
3663         * commands/ls.c: Likewise.
3664         * commands/help.c: Likewise.
3665         * partmap/pc.c: Likewise.
3666         * loader/efi/chainloader.c: Likewise.
3667         * loader/multiboot_loader.c: Likewise.
3668         * loader/i386/pc/multiboot2.c: Likewise.
3669         * term/efi/console.c: Likewise.
3670         * term/i386/pc/serial.c: Likewise.
3671         * util/lvm.c: Likewise.
3672         * util/console.c: Likewise.
3673         * util/i386/efi/grub-mkimage.c: Likewise.
3674         * util/raid.c: Likewise.
3676 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3678         * commands/videotest.c: Removed include to grub/machine/memory.h.
3680         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3681         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3682         (video_mod_SOURCES): Removed.
3683         (video_mod_CFLAGS): Likewise.
3684         (video_mod_LDFLAGS): Likewise.
3685         (gfxterm_mod_SOURCES): Likewise.
3686         (gfxterm_mod_CFLAGS): Likewise.
3687         (gfxterm_mod_LDFLAGS): Likewise.
3688         (videotest_mod_SOURCES): Likewise.
3689         (videotest_mod_CFLAGS): Likewise.
3690         (videotest_mod_LDFLAGS): Likewise.
3691         (bitmap_mod_SOURCES): Likewise.
3692         (bitmap_mod_CFLAGS): Likewise.
3693         (bitmap_mod_LDFLAGS): Likewise.
3694         (tga_mod_SOURCES): Likewise.
3695         (tga_mod_CFLAGS): Likewise.
3696         (tga_mod_LDFLAGS): Likewise.
3697         (jpeg_mod_SOURCES): Likewise.
3698         (jpeg_mod_CFLAGS): Likewise.
3699         (jpeg_mod_LDFLAGS): Likewise.
3700         (png_mod_SOURCES): Likewise.
3701         (png_mod_CFLAGS): Likewise.
3702         (png_mod_LDFLAGS): Likewise.
3704         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3705         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3706         (video_mod_SOURCES): Added.
3707         (video_mod_CFLAGS): Likewise.
3708         (video_mod_LDFLAGS): Likewise.
3709         (videotest_mod_SOURCES): Likewise.
3710         (videotest_mod_CFLAGS): Likewise.
3711         (videotest_mod_LDFLAGS): Likewise.
3712         (bitmap_mod_SOURCES): Likewise.
3713         (bitmap_mod_CFLAGS): Likewise.
3714         (bitmap_mod_LDFLAGS): Likewise.
3715         (tga_mod_SOURCES): Likewise.
3716         (tga_mod_CFLAGS): Likewise.
3717         (tga_mod_LDFLAGS): Likewise.
3718         (jpeg_mod_SOURCES): Likewise.
3719         (jpeg_mod_CFLAGS): Likewise.
3720         (jpeg_mod_LDFLAGS): Likewise.
3721         (png_mod_SOURCES): Likewise.
3722         (png_mod_CFLAGS): Likewise.
3723         (png_mod_LDFLAGS): Likewise.
3724         (gfxterm_mod_SOURCES): Likewise.
3725         (gfxterm_mod_CFLAGS): Likewise.
3726         (gfxterm_mod_LDFLAGS): Likewise.
3728         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3729         grub/machine/console.h.
3731 2009-01-04  Jerone Young  <jerone@gmail.com>
3733         Make on screen instructions clearer
3735         Based on patch created by Jidanni <jidanni@jidanni.org>
3737         * normal/menu.c: print clearer instructions on the screen
3739 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3741         New font engine.
3743         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3744         build system and fixed gfxterm.c to work with different sized fonts.
3746         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3748         * configure: Re-generated.
3750         * DISTLIST: Removed font/manager.c.
3751         Added font/font.c.
3752         Added font/font_cmd.c.
3754         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3755         compilation.
3757         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3759         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3761         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3763         * normal/menu.c: Likewise.
3765         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3766         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3768         * include/grub/font.h: Replaced with new file.
3770         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3771         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3772         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3773         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3774         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3775         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3776         fg_red, fg_green, fg_blue, fg_alpha.
3777         (grub_video_adapter): Removed blit_glyph.
3778         (grub_video_blit_glyph): Removed.
3780         * font/manager.c: Removed file.
3782         * font/font.c: New file.
3784         * font/font_cmd.c: Likewise.
3786         * video/video.c (grub_video_blit_glyph): Removed.
3788         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3789         (grub_video_vbe_map_rgba): Likewise.
3790         (grub_video_vbe_unmap_color_int): Likewise.
3791         (grub_video_vbe_blit_glyph): Removed.
3792         (grub_video_vbe_adapter): Removed blit_glyph.
3794         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3795         (get_pixel): Likewise.
3796         (set_pixel): Likewise.
3798         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3800         * term/gfxterm.c: Adapted to new font engine.
3802         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3804         * term/i386/pc/vga.c: Likewise.
3806         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3808         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3810         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3812         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3814         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3816         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3818         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3820         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3822         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3824         * util/grub.d/00_header.in: Changed to use new loadfont command.
3826         * util/grub-mkconfig_lib.in: Changed font extension.
3828 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3830         * util/getroot.c (grub_util_get_grub_dev): Add support for
3831         /dev/md/dNNpNN style partitionable mdraid devices.
3833 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3835         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3836         at a time limit of the PXE TFTP API correctly.
3837         (grub_pxefs_close): Likewise.
3839 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3841         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3842         grub_ata_device_initialize() calls.
3844 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3846         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3847         iteration failed.
3848         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3850 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3852         Fix build on powerpc-ieee1275.  Based on patch created by
3853         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3854         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3855         `kern/ieee1275/mmap.c'.
3856         * include/grub/powerpc/ieee1275/memory.h: New file.
3858         Provide grub-install on coreboot.
3859         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3860         (grub_install_SOURCES): New variable.
3861         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3862         usable on coreboot.
3864 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3866         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3867         to `grub_term_input_t'.
3868         (grub_term_get_current_output): Change return type to
3869         `grub_term_output_t'.
3871 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3873         Fix breakage on coreboot due to declaration mismatch.
3874         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3875         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3876         grub_vga_text_cls().
3878         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3879         comments.  Avoid copying one more byte than necessary (just in case).
3881         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3882         to 0x200000 (avoids trouble with some OFW implementations, and matches
3883         with the one in Yaboot).
3884         Reported by Manoel Abranches
3886 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3888         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3889         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3891         * util/grub-mkconfig_lib.in (grub_warn): New function.
3892         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3893         warnings, to obtain consistent formatting.
3894         * util/grub.d/00_header.in: Likewise.
3895         * util/update-grub_lib.in: Likewise.
3897         * loader/i386/linux.c (allocate_pages): Fix a warning.
3898         Move comment text to `#error' stanza.
3900         Harmonize ieee1275's grub_available_iterate() with the generic
3901         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3902         build problem on i386-ieee1275):
3903         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3904         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3905         parameter `type'.  Update all users of this function.
3906         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3907         `kern/ieee1275/mmap.c'.
3908         * kern/ieee1275/init.c
3909         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3910         with ...
3911         (grub_machine_mmap_iterate): ... this.
3912         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3913         return type to `grub_err_t'.  Update all implementations of this
3914         function prototype.
3915         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3916         Likewise.
3918         Add `lsmmap' command (lists firmware-provided memory map):
3919         * commands/lsmmap.c: New file.
3920         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3921         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3922         variables.
3923         * conf/powerpc-ieee1275.rmk: Likewise.
3924         * conf/i386-coreboot.rmk: Likewise.
3925         * conf/i386-ieee1275.rmk: Likewise.
3927 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3929         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3930         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3931         constraints to initrd allocation (based on code from
3932         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3933         for Linux to find it.
3935 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3937         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3938         order to cope with duplicate slashes.
3940 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3942         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3943         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3944         don't want to mess with lower memory, because it is used in the Linux
3945         loader.
3947         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3948         an appropriate place in lower memory, between 0x10000 and 0x90000,
3949         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3950         is in our heap (probably as a result of it being corrupted during
3951         decompression).  Add #error instance with comment to explain why this
3952         loader isn't currently usable on PC/BIOS.
3954 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3956         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3957         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3959 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3961         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3963         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3964         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3965         from here ...
3966         * include/grub/i386/pc/memory.h: ... to here.
3968 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3970         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3971         split).
3973         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3974         (grub_console_cur_color, grub_console_real_putchar)
3975         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3976         (grub_console_setcolorstate, grub_console_setcolor)
3977         (grub_console_getcolor): Move from here ...
3978         * include/grub/i386/vga_common.h: ... to here (new file).
3980         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3981         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3982         `<grub/i386/io.h>'.
3983         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3984         `<grub/i386/vga_common.h>'.
3986 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3988         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3989         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3990         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3991         variables.
3992         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3993         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3995         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3996         grub_console_init() with call to grub_vga_text_init().
3997         (grub_machine_fini): Replace call to
3998         grub_console_fini() with call to grub_vga_text_fini() and
3999         grub_at_keyboard_fini().
4001         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4002         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4003         (grub_console_setcolorstate, grub_console_setcolor)
4004         (grub_console_getcolor): New function prototypes.
4006         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4007         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4008         (grub_vga_text_setcursor): Static-ize.
4009         (grub_vga_text_term): New structure.
4010         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4012         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4013         (grub_console_cur_color, grub_console_standard_color)
4014         (grub_console_normal_color, grub_console_highlight_color)
4015         (map_char, grub_console_putchar, grub_console_getcharwidth)
4016         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4017         (grub_console_getcolor): Move from here ...
4018         * term/i386/vga_common.c: ... to here (same function names).
4020 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4022         Use newly-added Multiboot support in coreboot.
4024         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4025         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4027         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4028         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4029         (codestart): Store the MBI in `startup_multiboot_info' when we're
4030         being loaded using Multiboot.
4032         * kern/i386/coreboot/init.c (grub_machine_init): Move
4033         grub_at_keyboard_init() call to beginning of function (useful for
4034         debugging).  Call grub_machine_mmap_init() before attempting to use
4035         grub_machine_mmap_iterate().
4036         (grub_lower_mem, grub_upper_mem): Move from here ...
4037         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4038         here (new file).
4040         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4041         function prototype.
4043 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4045         Fix a regression introduced by the at_keyboard.mod split.  Because
4046         some terminals are default on some platforms and non-default on
4047         others, the first terminal being registered determines which is
4048         going to be default.
4050         * kern/term.c (grub_term_register_input): If this is the first
4051         terminal being registered, set it as the current one.
4052         (grub_term_register_output): Likewise.
4054         * term/efi/console.c (grub_console_init): Do not call
4055         grub_term_set_current_output() or grub_term_set_current_input().
4056         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4057         * term/i386/pc/console.c (grub_console_init): Likewise.
4058         (grub_console_fini): Do not call grub_term_set_current_input()
4059         (but leave grub_term_set_current_output() to restore text mode).
4061 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4063         * util/grub.d/00_header.in: Add backward compatibility check for
4064         versions of terminal.mod that don't understand `terminal_input' or
4065         `terminal_output'.
4067 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4069         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4070         `terminal_input' / `terminal_output', not `terminal'.
4072 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4074         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4075         (DISTCLEANFILES): Add `build_env.mk'.
4077 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4079         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4080         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4081         members.  Update all users.
4082         * util/console.c (grub_ncurses_term): Split in ...
4083         (grub_ncurses_term_input): ... this, and ...
4084         (grub_ncurses_term_output): ... this.  Update all users.
4085         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4087 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4089         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4090         (PKGDATA): Add $(pkgdata_SRCDIR).
4091         (pkglib_BUILDDIR): New variable.
4092         (pkgdata_SRCDIR): New variable.
4093         (build_env.mk): New target.
4094         (include_DATA): New variable.
4095         (install-local): Install $(include_DATA) files in $(includedir).
4097 2008-11-07  Pavel Roskin  <proski@gnu.org>
4099         * gendistlist.sh: Use C locale for sorting to ensure consistent
4100         output on all systems.
4102         * util/grub.d/00_header.in: Remove incorrect space before
4103         "serial".
4105 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4107         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4108         per specification.
4109         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4110         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4111         (based on find_multi_boot1_header).
4112         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4113         using find_multi_boot2_header(), and abort if neither Multiboot or
4114         Multiboot headers were found.
4116 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4118         Modularize at_keyboard.mod:
4120         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4121         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4122         (at_keyboard_mod_LDFLAGS): New variables.
4124         Actual terminal split:
4126         * include/grub/term.h (struct grub_term): Split in ...
4127         (struct grub_term_input): ... this, and ...
4128         (struct grub_term_output): ... this.  Update all users.
4129         (grub_term_set_current): Split in ...
4130         (grub_term_set_current_input): ... this, and ...
4131         (grub_term_set_current_output): ... this.
4132         (grub_term_get_current): Split in ...
4133         (grub_term_get_current_input): ... this, and ...
4134         (grub_term_get_current_output): ... this.
4135         (grub_term_register): Split in ...
4136         (grub_term_register_input): ... this, and ...
4137         (grub_term_register_output): ... this.
4138         (grub_term_unregister): Split in ...
4139         (grub_term_unregister_input): ... this, and ...
4140         (grub_term_unregister_output): ... this.
4141         (grub_term_iterate): Split in ...
4142         (grub_term_iterate_input): ... this, and ...
4143         (grub_term_iterate_output): ... this.
4145         * kern/term.c (grub_term_list): Split in ...
4146         (grub_term_list_input): ... this, and ...
4147         (grub_term_list_output): ... this.  Update all users.
4148         (grub_cur_term): Split in ...
4149         (grub_cur_term_input): ... this, and ...
4150         (grub_cur_term_output): ... this.  Update all users.
4151         (grub_term_set_current): Split in ...
4152         (grub_term_set_current_input): ... this, and ...
4153         (grub_term_set_current_output): ... this.
4154         (grub_term_get_current): Split in ...
4155         (grub_term_get_current_input): ... this, and ...
4156         (grub_term_get_current_output): ... this.
4157         (grub_term_register): Split in ...
4158         (grub_term_register_input): ... this, and ...
4159         (grub_term_register_output): ... this.
4160         (grub_term_unregister): Split in ...
4161         (grub_term_unregister_input): ... this, and ...
4162         (grub_term_unregister_output): ... this.
4163         (grub_term_iterate): Split in ...
4164         (grub_term_iterate_input): ... this, and ...
4165         (grub_term_iterate_output): ... this.
4167         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4168         a check for input and one for output (and only attempt to get keys
4169         from user when input works).
4171         * util/grub-probe.c (grub_term_get_current): Split in ...
4172         (grub_term_get_current_input): ... this, and ...
4173         (grub_term_get_current_output): ... this.
4174         * util/grub-fstest.c: Likewise.
4175         * util/i386/pc/grub-setup.c: Likewise.
4176         * util/grub-editenv.c: Likewise.
4178         Portability adjustments:
4180         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4181         `term/i386/pc/at_keyboard.c'.
4182         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4183         grub_keyboard_controller_init() (now handled by terminal .init).
4184         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4185         grub_at_keyboard_init().
4186         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4187         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4188         at_keyboard.mod via input terminal interface).
4189         * include/grub/i386/coreboot/console.h: Convert into a stub for
4190         `<grub/i386/pc/console.h>'.
4192         Migrate full terminals to new API:
4194         * term/efi/console.c (grub_console_term): Split into ...
4195         (grub_console_term_input): ... this, and ...
4196         (grub_console_term_output): ... this.  Update all users.
4197         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4198         (grub_ofconsole_init): Split into ...
4199         (grub_ofconsole_init_input): ... this, and ...
4200         (grub_ofconsole_init_output): ... this.
4201         (grub_ofconsole_term): Split into ...
4202         (grub_ofconsole_term_input): ... this, and ...
4203         (grub_ofconsole_term_output): ... this.  Update all users.
4204         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4205         (grub_serial_term_input): ... this, and ...
4206         (grub_serial_term_output): ... this.  Update all users.
4207         * term/i386/pc/console.c (grub_console_term): Split into ...
4208         (grub_console_term_input): ... this, and ...
4209         (grub_console_term_output): ... this.  Update all users.
4210         (grub_console_term_input): Only enable it on PC/BIOS platform.
4211         (grub_console_init): Remove grub_keyboard_controller_init() call.
4213         Migrate input terminals to new API:
4215         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4216         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4217         i386-specific anyway).
4218         (grub_console_checkkey): Rename to ...
4219         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4220         users.
4221         (grub_keyboard_controller_orig): New variable.
4222         (grub_console_getkey): Rename to ...
4223         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4224         users.
4225         (grub_keyboard_controller_init): Static-ize.  Save original
4226         controller value so that it can be restored ...
4227         (grub_keyboard_controller_fini): ... here (new function).
4228         (grub_at_keyboard_term): New structure.
4229         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4230         functions.
4232         Migrate output terminals to new API:
4234         * term/i386/pc/vga.c (grub_vga_term): Change type to
4235         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4236         members.  Update all users.
4237         * term/gfxterm.c (grub_video_term): Change type to
4238         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4239         members.  Update all users.
4240         * include/grub/i386/pc/console.h (grub_console_checkkey)
4241         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4242         etc).
4244         Migrate `terminal' command and userland tools to new API:
4246         * commands/terminal.c (grub_cmd_terminal): Split into ...
4247         (grub_cmd_terminal_input): ... this, and ...
4248         (grub_cmd_terminal_output): ... this.
4249         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4250         `terminal_input' and `terminal_output'.
4251         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4252         `terminal_input' / `terminal_output' API.
4253         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4254         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4255         provided ${GRUB_TERMINAL}, convert it).
4257 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4259         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4260         for FreeBSD.
4261         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4263 2008-11-03  Bean  <bean123ch@gmail.com>
4265         * kern/elf.c (grub_elf32_load): Revert to previous code.
4266         (grub_elf64_load): Likewise.
4268         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4270 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4272         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4273         (TARGET_CPPFLAGS): Likewise.
4274         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4276 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4278         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4280 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4282         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4283         addition of objects until the code is not going to be able to fail.
4285 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4287         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4288         (add a missing NULL check, and correct them by moving the pointer
4289         operations after the actual check).
4291 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4293         * util/i386/pc/grub-install.in: Handle empty string as output from
4294         make_system_path_relative_to_its_root().
4296 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4298         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4299         circular metadata worst case scenario. If the metadata is circular
4300         then copy the wrap in place.
4301         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4302         project lib/format_text/layout.h
4303         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4305 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4307         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4309 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4311         * util/update-grub_lib.in: Mention filename in warning message.
4313 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4315         * NEWS: Update for rename of update-grub to grub-mkconfig.
4317 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4319         * util/update-grub_lib.in: Copy to ...
4320         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4321         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4322         * util/update-grub.in: Rename to ...
4323         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4324         option. Add `--output' option to allow users to specify the generated
4325         configuration file.  Default to stdout.
4326         (update_grub_dir): Rename to ...
4327         (grub_mkconfig_dir): ... this.
4328         (grub_cfg): Default to an empty string.
4329         * conf/common.rmk (update-grub): Rename to ...
4330         (grub-mkconfig): ... this.
4331         (update-grub_lib): Copy to ...
4332         (grub-mkconfig_lib): ... this.
4333         (update-grub_SCRIPTS): Copy to ...
4334         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4335         (update-grub_DATA): Rename to ...
4336         (grub-mkconfig_DATA): ... this.
4338 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4340         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4341         to `modified'.  Add the real `created' field.
4342         (grub_iso9660_uuid): Use `modified' rather than `created' for
4343         constructing the UUID.
4345 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4347         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4348         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4350 2008-09-28  Bean  <bean123ch@gmail.com>
4352         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4353         Thanks to Christian Franke for finding this bug.
4355 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4357         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4358         instances of grub_util_get_disk_name() (see previous commit).
4360 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4362         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4363         `util/i386/get_disk_name.c'.
4364         * conf/i386-efi.rmk: Likewise.
4365         * conf/x86_64-efi.rmk: Likewise.
4366         * conf/i386-coreboot.rmk: Likewise.
4367         * conf/i386-ieee1275.rmk: Likewise.
4368         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4369         `util/ieee1275/get_disk_name.c'.
4370         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4371         * util/ieee1275/get_disk_name.c: Remove file.
4372         * util/i386/get_disk_name.c: Remove file.
4373         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4374         "hd%d" for device.map entries, rather than using
4375         grub_util_get_disk_name().
4377 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4379         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4380         warning.
4381         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4383 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4385         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4386         Changed to 0x5100.
4387         (GRUB_TERM_PPAGE): Changed to 0x4900.
4389 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4391         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4392         macros (they were i386-pc specific).
4393         * include/grub/sparc64/ieee1275/console.h: Likewise.
4394         * include/grub/efi/console.h: Likewise.
4396 2008-09-22  Bean  <bean123ch@gmail.com>
4398         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4399         resident and in attribute list.
4401         * include/grub/ntfs.h (BMP_LEN): Removed.
4403 2008-09-22  Bean  <bean123ch@gmail.com>
4405         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4406         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4408         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4409         error occurs, as grub_disk_open will call grub_disk_close, which will
4410         call p->close (scsi).
4412 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4414         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4415         (AC_PREREQ): Bumped to 2.59.
4416         (AC_TRY_COMPILE): Replace obsolete macro with ...
4417         (AC_COMPILE_IFELSE): ... this.
4418         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4419         (AC_LINK_IFELSE): ... this.
4421 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4423         * autogen.sh: Add a call to `gendistlist.sh'.
4425 2008-09-19  Christian Franke  <franke@computer.org>
4427         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4428         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4429         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4430         Export __enable_execute_stack() to modules.
4431         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4432         New function.
4434 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4436         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4437         Sort the list.
4439 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4441         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4442         #include <grub/util/hostdisk.h>.
4444 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4446         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4447         segments when their filesz is zero (grub_file_read() interprets
4448         zero-size as "read until EOF", which results in memory corruption).
4449         Use `lowest_segment' rather than 0 for calculating the current
4450         segment load address.
4452 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4454         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4455         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4456         clobbered useful information.
4458 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4460         * include/grub/util/biosdisk.h: Move to ...
4461         * include/grub/util/hostdisk.h: ... here.  Update all users.
4462         * util/biosdisk.c: Move to ...
4463         * util/hostdisk.c: ... here.  Update all users.
4465 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4467         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4468         variables.
4469         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4470         and length can be stored directly in the `mbi->mmap_addr' and
4471         `mbi->mmap_length' struct fields.
4473 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4475         * conf/i386.rmk: New file.  Provides declaration for building
4476         `cpuid.mod'.
4477         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4478         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4479         variables.
4480         Include `conf/i386.mk'.
4481         * conf/i386-efi.rmk: Likewise.
4482         * conf/x86_64-efi.rmk: Likewise.
4483         * conf/i386-coreboot.rmk: Likewise.
4484         * conf/i386-ieee1275.rmk: Likewise.
4486 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4488         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4489         Adds optimization support for BGR based modes.
4491         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4492         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4493         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4494         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4495         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4496         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4497         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4498         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4499         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4500         (grub_video_i386_vbeblit_index_index): Likewise.
4501         (grub_video_i386_vbeblit_replace_directN): Added.
4502         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4503         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4504         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4505         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4506         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4507         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4508         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4509         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4510         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4511         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4512         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4513         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4514         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4516         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4517         (grub_video_i386_vbefill_R8G8B8): Likewise.
4518         (grub_video_i386_vbefill_index): Likewise.
4519         (grub_video_i386_vbefill_direct32): Added.
4520         (grub_video_i386_vbefill_direct24): Likewise.
4521         (grub_video_i386_vbefill_direct16): Likewise.
4522         (grub_video_i386_vbefill_direct8): Likewise.
4524         * include/grub/video.h (grub_video_blit_format): Removed
4525         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4526         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4527         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4528         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4529         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4531         * video/video.c (grub_video_get_blit_format): Updated to use new
4532         blit formats.  Added handling for 16 bit color modes.
4534         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4535         fillers.
4536         (common_blitter): Updated to use new blitters.
4538         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4539         Removed.
4540         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4541         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4542         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4543         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4544         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4545         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4546         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4547         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4548         (grub_video_i386_vbeblit_index_index): Likewise.
4549         (grub_video_i386_vbeblit_replace_directN): Added.
4550         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4551         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4552         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4553         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4554         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4555         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4556         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4557         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4558         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4559         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4560         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4561         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4562         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4564         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4565         (grub_video_i386_vbefill_R8G8B8): Likewise.
4566         (grub_video_i386_vbefill_index): Likewise.
4567         (grub_video_i386_vbefill_direct32): Added.
4568         (grub_video_i386_vbefill_direct24): Likewise.
4569         (grub_video_i386_vbefill_direct16): Likewise.
4570         (grub_video_i386_vbefill_direct8): Likewise.
4572         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4573         types.
4575         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4576         types.
4578         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4579         blitter types.
4581         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4582         types.
4584 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4586         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4587         RAID level 1.
4589 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4591         * fs/iso9660.c (grub_iso9660_date): New structure.
4592         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4593         (grub_iso9660_uuid): New function.
4595 2008-09-05  Bean  <bean123ch@gmail.com>
4597         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4599         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4600         insensitive bit for names in Win32 and Win32 & DOS namespace.
4602         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4604         * include/grub/types.h (LONG_MAX): Likewise.
4606 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4608         * util/getroot.c: Include <config.h>.
4609         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4610         add support for /dev/md/N devices and handle LVM double dash escaping.
4612 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4614         * config.guess: Update to latest version from config git.
4615         * config.sub: Likewise.
4617 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4619         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4620         `disk->total_sectors'.
4622 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4624         * include/grub/normal.h: Fixed incorrect comment for
4625         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4627 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4629         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4630         values with defines.
4632         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4633         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4634         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4635         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4636         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4637         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4638         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4639         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4640         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4641         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4642         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4643         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4644         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4645         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4646         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4647         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4648         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4649         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4650         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4652 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4654         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4655         declaration.
4656         (grub_multiboot): Fix a few warnings.
4658 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4660         * loader/i386/pc/multiboot.c: Update comment not to say that
4661         boot_device support is unimplemented.
4663 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4665         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4666         or memory map support are unimplemented.
4668 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4670         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4672 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4674         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4675         total video memory in 'vbeinfo' output; show color format details for
4676         each video mode.
4678 2008-08-30  Pavel Roskin  <proski@gnu.org>
4680         * util/genmoddep.c: Remove for real this time.
4681         * DISTLIST: Remove util/genmoddep.c.
4683 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4685         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4686         as required by Multiboot spec (it was already 4-byte aligned, but
4687         only by chance).
4689 2008-08-29  Pavel Roskin  <proski@gnu.org>
4691         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4692         * kern/powerpc/ieee1275/startup.S: ... this.
4693         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4694         * DISTLIST: Likewise.
4696         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4697         grub/cpu/kernel.h.  Add start label for consistency with other
4698         platforms.  Add grub_prefix immediately after start.  Add jump
4699         to the code after grub_prefix.
4700         * include/grub/powerpc/kernel.h: Provide valid values for
4701         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4703 2008-08-29  Bean  <bean123ch@gmail.com>
4705         * configure.ac: Change host_os to cygwin for mingw.
4706         (asprintf): New check for function.
4708         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4709         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4711         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4712         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4713         sync, sleep and grub_util_get_disk_size for mingw.
4715         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4716         to get size in mingw.
4717         (open_device): Use flag O_BINARY if it's defined.
4718         (find_root_device): Add dummy code for mingw.
4720         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4721         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4722         (get_scsi_disk_name): Return 0 for mingw.
4724         * util/hostfs.c: #include <grub/util/misc.h>.
4725         (grub_hostfs_open): Use "rb" flag to open file, use
4726         grub_util_get_disk_size to get disk size for mingw.
4728         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4729         (asprintf): New function if HAVE_ASPRINTF is not set.
4730         (sync): New function for mingw.
4731         (sleep): Likewise.
4732         (grub_util_get_disk_size): Likewise.
4734 2008-08-28  Pavel Roskin  <proski@gnu.org>
4736         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4737         kern/time.c.
4739 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4741         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4743 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4745         Change find_grub_drive() syntax so it doesn't prevent it from
4746         detecting NULL names as errors.
4748         * util/biosdisk.c (find_grub_drive): Move free slot search code
4749         from here ...
4750         (find_free_slot): ... to here.
4751         (read_device_map): Use find_free_slot() to search for free slots.
4753 2008-08-27  Marco Gerards  <marco@gnu.org>
4755         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4756         (scsi_mod_SOURCES): New variable.
4757         (scsi_mod_CFLAGS): Likewise
4758         (scsi_mod_LDFLAGS): Likewise.
4760         * disk/scsi.c: New file.
4762         * include/grub/scsi.h: Likewise.
4764         * include/grub/scsicmd.h: Likewise.
4766         * disk/ata.c: Include <grub/scsi.h>.
4767         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4768         instead.
4769         (grub_ata_iterate): Skip ATAPI devices.
4770         (grub_ata_open): Only handle ATAPI devices.
4771         (struct grub_atapi_read): Removed.
4772         (grub_atapi_readsector): Likewise.
4773         (grub_ata_read): No longer handle ATAPI devices.
4774         (grub_ata_write): Likewise.
4775         (grub_atapi_iterate): New function.
4776         (grub_atapi_read): Likewise.
4777         (grub_atapi_write): Likewise.
4778         (grub_atapi_open): Likewise.
4779         (grub_atapi_close): Likewise.
4780         (grub_atapi_dev): New variable.
4781         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4782         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4784         * include/grub/disk.h (enum grub_disk_dev_id): Add
4785         `GRUB_DISK_DEVICE_SCSI_ID'.
4787 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4789         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4790         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4791         descriptive.
4793 2008-08-23  Bean  <bean123ch@gmail.com>
4795         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4796         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4797         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4798         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4799         dm_nv.mod.
4800         (raid5rec_mod_SOURCES): New macro.
4801         (raid5rec_mod_CFLAGS): Likewise.
4802         (raid5rec_mod_LDFLAGS): Likewise.
4803         (raid6rec_mod_SOURCES): Likewise.
4804         (raid6rec_mod_CFLAGS): Likewise.
4805         (raid6rec_mod_LDFLAGS): Likewise.
4806         (mdraid_mod_SOURCES): Likewise.
4807         (mdraid_mod_CFLAGS): Likewise.
4808         (mdraid_mod_LDFLAGS): Likewise.
4809         (dm_nv_mod_SOURCES): Likewise.
4810         (dm_nv_mod_CFLAGS): Likewise.
4811         (dm_nv_mod_LDFLAGS): Likewise.
4813         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4814         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4815         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4817         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4818         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4820         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4822         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4824         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4826         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4828         * disk/raid5_recover.c: New file.
4830         * disk/raid6_recover.c: Likewise.
4832         * disk/mdraid_linux.c: Likewise.
4834         * disk/dmraid_nvidia.c: Likewise.
4836         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4837         ULONG_MAX.
4839         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4840         calculate the size of raid device.
4841         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4842         different layout of raid5.
4843         (grub_raid_scan_device): Remove code specific to mdraid.
4844         (grub_raid_list): New variable.
4845         (free_array): New function.
4846         (grub_raid_register): Likewise.
4847         (grub_raid_unregister): Likewise.
4848         (grub_raid_rescan): Likewise.
4849         (GRUB_MOD_INIT): Don't iterate device here.
4850         (GRUB_MOD_FINI): Use free_array to release resource.
4852         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4853         (grub_raid5_recover_func_t): New function variable type.
4854         (grub_raid6_recover_func_t): Likewise.
4855         (grub_raid5_recover_func): New variable.
4856         (grub_raid6_recover_func): Likewise.
4857         (grub_raid_register): New function.
4858         (grub_raid_unregister): Likewise.
4859         (grub_raid_rescan): Likewise.
4860         (grub_raid_block_xor): Likewise.
4862         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4863         (CMD_CRC): New macro.
4864         (part): Removed.
4865         (read_file): Handle device as well as file.
4866         (cmd_crc): New function.
4867         (fstest): Handle multiple disks.
4868         (options): Remove part, raw and long, add root and diskcount.
4869         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4870         (main): Find the first non option entry and ignore subsequent options,
4871         add handling for the new options, support multiple disks.
4873         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4875 2008-08-23  Bean  <bean123ch@gmail.com>
4877         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4879         * genfslist.sh: Ignore kernel.mod.
4881         * genpartmaplist.sh: Likewise.
4883 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4885         * util/getroot.c (find_root_device): Skip anything that starts with
4886         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4888 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4890         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4891         * util/grub.d/00_header.in: Allow the administrator to change default
4892         gfxmode via ${GRUB_GFXMODE}.
4894 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4896         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4898 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4900         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4901         loader.
4902         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4903         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4905 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4907         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4908         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4910 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4912         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4913         (struct grub_virtual_screen): Remove `cursor_color'.
4914         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4915         initialization.
4916         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4918 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4920         Unify (identical) linux_normal.c files.
4921         * loader/i386/efi/linux_normal.c: Move from here ...
4922         * loader/linux_normal.c: ... to here.  Update all users.
4923         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4924         * loader/i386/ieee1275/linux_normal.c: Likewise.
4926 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4928         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4929         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4930         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4931         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4932         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4933         New macros.
4934         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4935         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4936         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4937         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4938         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4939         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4940         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4941         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4942         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4943         portably using grub_getxy().
4944         Replace `-EFI' with `-bzImage' in boot message.
4946 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4948         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4950 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4952         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4954         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4955         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4956         (grub_machine_mmap_iterate): New function declaration.
4957         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4958         structure.
4959         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4960         macros.
4962         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4963         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4964         Move e820 parsing from here ...
4965         * kern/i386/pc/mmap.c: New file.
4966         (grub_machine_mmap_iterate): ... to here.
4968         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4969         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4970         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4971         (grub_available_iterate): Redeclare to return `void', and redeclare
4972         its hook to use grub_uint64_t as addr and size parameters, and rename
4973         to ...
4974         (grub_machine_mmap_iterate): ... this.  Update all users.
4976         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4977         to make it more readable.  Rename to ...
4978         (grub_machine_mmap_iterate): ... this.
4980         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4981         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4982         (grub_multiboot): Allocate an extra region after the payload, and fill
4983         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4984         with the extra space.
4985         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4986         with the extra space.
4988 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4990         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4992 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4994         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4995         mdate-sh to the list `find' searches for.
4996         * DISTLIST: Regenerated.
4998 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5000         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5001         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5002         genmoddep.awk, gensymlist.sh.in.
5003         (DISTDIRS): Add bus, docs, hook, lib.
5004         * DISTLIST: Regenerated.
5005         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5007 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5009         * disk/raid.c (grub_raid_init): Handle/report errors set by
5010         grub_device_iterate().
5011         * disk/lvm.c (grub_lvm_init): Likewise.
5013 2008-08-15  Bean  <bean123ch@gmail.com>
5015         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5016         and datehook.mod.
5017         (datetime_mod_SOURCES): New macro.
5018         (datetime_mod_CFLAGS): Likewise.
5019         (datetime_mod_LDFLAGS): Likewise.
5020         (date_mod_SOURCES): Likewise.
5021         (date_mod_CFLAGS): Likewise.
5022         (date_mod_LDFLAGS): Likewise.
5023         (datehook_mod_SOURCES): Likewise.
5024         (datehook_mod_CFLAGS): Likewise.
5025         (datehook_mod_LDFLAGS): Likewise.
5027         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5028         and datehook.mod.
5029         (datetime_mod_SOURCES): New macro.
5030         (datetime_mod_CFLAGS): Likewise.
5031         (datetime_mod_LDFLAGS): Likewise.
5032         (date_mod_SOURCES): Likewise.
5033         (date_mod_CFLAGS): Likewise.
5034         (date_mod_LDFLAGS): Likewise.
5035         (datehook_mod_SOURCES): Likewise.
5036         (datehook_mod_CFLAGS): Likewise.
5037         (datehook_mod_LDFLAGS): Likewise.
5039         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5040         and datehook.mod.
5041         (datetime_mod_SOURCES): New macro.
5042         (datetime_mod_CFLAGS): Likewise.
5043         (datetime_mod_LDFLAGS): Likewise.
5044         (date_mod_SOURCES): Likewise.
5045         (date_mod_CFLAGS): Likewise.
5046         (date_mod_LDFLAGS): Likewise.
5047         (datehook_mod_SOURCES): Likewise.
5048         (datehook_mod_CFLAGS): Likewise.
5049         (datehook_mod_LDFLAGS): Likewise.
5051         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5052         and datehook.mod.
5053         (datetime_mod_SOURCES): New macro.
5054         (datetime_mod_CFLAGS): Likewise.
5055         (datetime_mod_LDFLAGS): Likewise.
5056         (date_mod_SOURCES): Likewise.
5057         (date_mod_CFLAGS): Likewise.
5058         (date_mod_LDFLAGS): Likewise.
5059         (datehook_mod_SOURCES): Likewise.
5060         (datehook_mod_CFLAGS): Likewise.
5061         (datehook_mod_LDFLAGS): Likewise.
5063         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5064         and datehook.mod.
5065         (datetime_mod_SOURCES): New macro.
5066         (datetime_mod_CFLAGS): Likewise.
5067         (datetime_mod_LDFLAGS): Likewise.
5068         (date_mod_SOURCES): Likewise.
5069         (date_mod_CFLAGS): Likewise.
5070         (date_mod_LDFLAGS): Likewise.
5071         (datehook_mod_SOURCES): Likewise.
5072         (datehook_mod_CFLAGS): Likewise.
5073         (datehook_mod_LDFLAGS): Likewise.
5075         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5077         * commands/date.c: New file.
5079         * hook/datehook.c: Likewise.
5081         * include/grub/lib/datetime.h: Likewise.
5083         * include/grub/i386/cmos.h: Likewise.
5085         * lib/datetime.c: Likewise.
5087         * lib/i386/datetime.c: Likewise.
5089         * lib/efi/datetime.c: Likewise.
5091 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5093         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5094         (grub_mkelfimage_SOURCES): New variable.
5095         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5097         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5098         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5099         * conf/powerpc-ieee1275.rmk: Likewise.
5100         * conf/i386-ieee1275.rmk: Likewise.
5102         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5103         * kern/i386/coreboot/init.c: Likewise.
5105         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5106         with `<grub/cpu/kernel.h>'.
5107         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5108         to ...
5109         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5110         * kern/i386/coreboot/startup.S: Likewise.
5112         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5113         (GRUB_MOD_GAP): Remove.
5114         * include/grub/powerpc/kernel.h: New file.
5115         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5116         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5117         * include/grub/i386/kernel.h: New file.
5118         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5119         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5120         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5122         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5123         `grub-mkelfimage'.
5124         Use --directory when invoking grub_mkimage.
5126         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5127         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5128         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5129         and GRUB_KERNEL_CPU_PREFIX.
5131 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5133         * include/grub/err.h (grub_err_printf): New function prototype.
5134         * util/misc.c (grub_err_printf): New function.
5135         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5136         grub_printf.
5137         * kern/err.c (grub_print_error): Use grub_err_printf.
5139 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5141         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5143 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5145         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5146         boot entry.
5148 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5150         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5151         of the relocation code from here ...
5152         (grub_multiboot): ... to here.
5153         (forward_relocator, backward_relocator): Move from here ...
5154         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5155         (grub_multiboot_backward_relocator): ... to here.
5156         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5157         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5158         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5159         (grub_multiboot_forward_relocator_end)
5160         (grub_multiboot_backward_relocator)
5161         (grub_multiboot_backward_relocator_end): New variables.
5163 2008-08-12  Bean  <bean123ch@gmail.com>
5165         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5167 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5169         * kern/i386/linuxbios/startup.S: Move from here ...
5170         * kern/i386/coreboot/startup.S: ... to here.
5172         * kern/i386/linuxbios/init.c: Move from here ...
5173         * kern/i386/coreboot/init.c: ... to here.
5175         * kern/i386/linuxbios/table.c: Move from here ...
5176         * kern/i386/coreboot/mmap.c: ... to here.
5178         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5180 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5182         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5183         errors.  Leave it to the upper layer to handle them.
5185 2008-08-09  Christian Franke  <franke@computer.org>
5187         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5188         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5189         Install `grub.d/10_windows' only on Cygwin.
5190         * configure.ac: Add subst of `target_os'.
5191         Check `target_os' also before setting TARGET_OBJ2ELF.
5192         Add `--enable-grub-pe2elf'.
5194 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5196         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5197         (grub_last_time): Change type to grub_uint64_t.
5198         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5199         (grub_disk_close): Likewise.
5201         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5202         (run_menu): Migrate code from to using grub_get_time_ms().
5204         * util/misc.c (grub_get_time_ms): New function.
5206 2008-08-08  Marco Gerards  <marco@gnu.org>
5208         * disk/ata.c (grub_ata_regget): Change return type to
5209         `grub_uint8_t'.
5210         (grub_ata_regget2): Likewise.
5211         (grub_ata_wait_status): New function.
5212         (grub_ata_wait_busy): Removed function, updated all users to use
5213         `grub_ata_wait_status'.
5214         (grub_ata_wait_drq): Likewise.
5215         (grub_ata_cmd): New function.
5216         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5217         error handling.
5218         (grub_ata_pio_write): Add error handling.
5219         (grub_atapi_identify): Likewise.
5220         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5221         handling.
5222         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5223         handling.  Actually use the detected registers.  Reorder the
5224         detection logic such that it is easier to read.
5225         (grub_ata_pciinit): Do not assign the same ID to each controller.
5226         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5227         handling.
5228         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5230         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5232 2008-08-08  Marco Gerards  <marco@gnu.org>
5234         * NEWS: Update.
5236 2008-08-07  Bean  <bean123ch@gmail.com>
5238         * include/grub/x86_64/pci.h: New file.
5240 2008-08-07  Christian Franke  <franke@computer.org>
5242         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5243         (TIMER2_GATE): Likewise.
5244         (grub_pit_wait): Add enable/disable of the timer2 gate
5245         bit of port 0x61.  This fixes a possible infinite loop.
5247 2008-08-07  Bean  <bean123ch@gmail.com>
5249         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5250         kern/i386/tsc.c and kern/i386/pit.c.
5252         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5253         x86_64 platform.
5255         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5256         <grub/i386/tsc.h>.
5258         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5260 2008-08-07  Bean  <bean123ch@gmail.com>
5262         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5264         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5266         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5267         multiple inclusion. Add #include <grub/types.h>.
5269 2008-08-06  Christian Franke  <franke@computer.org>
5271         * conf/common.rmk: Build and install `10_windows'.
5272         * util/grub.d/10_windows.in: New script.
5274 2008-08-06  Pavel Roskin  <proski@gnu.org>
5276         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5278 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5280         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5281         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5283 2008-08-06  Bean  <bean123ch@gmail.com>
5285         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5286         (grub_pxefs_fs_int): Remove dummy definition.
5287         (grub_pxefs_open): Use data->block_size to store the current block
5288         size setting.
5289         (grub_pxefs_read): Use block size stored in data->block_size. As the
5290         value of grub_pxe_blksize can be changed after the file is opened.
5292 2008-08-06  Bean  <bean123ch@gmail.com>
5294         * fs/i386/pc/pxe.c (curr_file): new variable.
5295         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5296         require the dummy internal file system anymore.
5297         (grub_pxefs_read): Removed.
5298         (grub_pxefs_close): Likewise.
5299         (grub_pxefs_fs_int): Likewise.
5300         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5301         connection when we switch file.
5302         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5304 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5306         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5307         `halt.mod'.
5308         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5309         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5311         * kern/i386/halt.c: New file.
5312         * kern/i386/reboot.c: Likewise.
5313         * include/grub/i386/reboot.h: Likewise.
5314         * include/grub/i386/halt.h: Likewise.
5316         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5317         Include `<grub/cpu/halt.h>'.
5318         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5319         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5321         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5322         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5323         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5324         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5325         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5326         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5327         from here ...
5328         * include/grub/i386/at_keyboard.h: ... to here.
5330 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5332         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5333         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5334         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5335         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5336         `kern/generic/millisleep.c'.
5338         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5339         instead of grub_get_rtc().
5340         (grub_tsc_init): Initialize `tsc_boot_time'.
5342         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5343         (grub_machine_init): Use grub_tsc_init() rather than
5344         installing an RTC-based handler via grub_install_get_time_ms().
5346         * kern/i386/pit.c: New file.
5347         * include/grub/i386/pit.h: Likewise.
5349 2008-08-05  Bean  <bean123ch@gmail.com>
5351         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5353         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5354         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5355         (pxe_mod_SOURCES): New macro.
5356         (pxe_mod_CFLAGS): Likewise.
5357         (pxe_mod_LDFLAGS): Likewise.
5358         (pxecmd_mod_SOURCES): Likewise.
5359         (pxecmd_mod_CFLAGS): Likewise.
5360         (pxecmd_mod_LDFLAGS): Likewise.
5362         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5363         (grub_pxe_call): Likewise.
5365         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5367         * commands/i386/pc/pxecmd.c: New file.
5369         * fs/i386/pc/pxe.c: Likewise.
5371         * include/grub/i386/pc/pxe.h: Likewise.
5373 2008-08-05  Bean  <bean123ch@gmail.com>
5375         * util/console.c (grub_console_cur_color): New variable.
5376         (grub_console_standard_color): Likewise.
5377         (grub_console_normal_color): Likewise.
5378         (grub_console_highlight_color): Likewise.
5379         (color_map): Likewise.
5380         (use_color): Likewise.
5381         (NUM_COLORS): New macro.
5382         (grub_ncurses_setcolorstate): Handle color properly.
5383         (grub_ncurses_setcolor): Don't change color here, just remember the
5384         settings, color will be set in grub_ncurses_setcolorstate.
5385         (grub_ncurses_getcolor): New function.
5386         (grub_ncurses_init): Initialize color pairs.
5387         (grub_ncurses_term): New member grub_ncurses_getcolor.
5389 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5391         High resolution timer support.  Implemented for x86 CPUs using TSC.
5392         Extracted generic grub_millisleep() so it's linked in only as needed.
5393         This requires a Pentium compatible CPU; if the RDTSC instruction is
5394         not supported, then it falls back on the generic grub_get_time_ms()
5395         implementation that uses the machine's RTC.
5397         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5398         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5399         `kern/generic/millisleep.c'.
5401         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5402         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5404         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5405         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5407         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5409         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5410         `kern/generic/millisleep.c'.
5412         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5414         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5416         * kern/generic/rtc_get_time_ms.c: New file.
5418         * kern/generic/millisleep.c: New file.
5420         * kern/misc.c: Don't include
5421         <kern/time.h> anymore.
5422         (grub_millisleep_generic): Removed.
5424         * commands/sleep.c (grub_interruptible_millisleep): Uses
5425         grub_get_time_ms() instead of grub_get_rtc().
5427         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5428         function.
5429         (grub_cpu_is_cpuid_supported): New inline function.
5430         (grub_cpu_is_tsc_supported): New inline function.
5431         (grub_tsc_init): New function prototype.
5432         (grub_tsc_get_time_ms): New function prototype.
5434         * kern/i386/tsc.c (grub_get_time_ms): New file.
5436         * include/grub/time.h: Include <grub/types.h.
5437         (grub_millisleep_generic): Removed.
5438         (grub_get_time_ms): New prototype.
5439         (grub_install_get_time_ms): New prototype.
5440         (grub_rtc_get_time_ms): New prototype.
5442         * kern/time.c (grub_get_time_ms): New function.
5443         (grub_install_get_time_ms): New function.
5445         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5446         <grub/time.h> anymore.
5447         (grub_millisleep): Removed.
5448         (grub_machine_init): Call grub_tsc_init.
5450         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5451         get_time_ms() implementation.
5453         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5454         (ieee1275_get_time_ms): New function.
5455         (grub_machine_init): Install get_time_ms() implementation.
5457         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5458         (grub_machine_init): Call grub_tsc_init().
5459         (grub_millisleep): Removed.
5461         * kern/ieee1275/init.c (grub_millisleep): Removed.
5462         (grub_machine_init): Install ieee1275_get_time_ms()
5463         implementation.
5464         (ieee1275_get_time_ms): New function.
5465         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5466         real work.
5468 2008-08-05  Marco Gerards  <marco@gnu.org>
5470         * disk/ata.c: Include <grub/pci.h>.
5471         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5472         (grub_ata_initialize): Rewritten.
5473         (grub_ata_device_initialize): New function.
5475 2008-08-04  Pavel Roskin  <proski@gnu.org>
5477         * kern/main.c: Include grub/mm.h.
5479 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5481         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5482         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5483         corruption problem).
5485 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5487         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5488         warnings introduced in my last commit.
5490 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5492         Make PCI available on all i386 architectures.
5494         * include/grub/i386/pc/pci.h: Move from here ...
5495         * include/grub/i386/pci.h: ... to here.
5497         * include/grub/i386/pc/pci.h: Remove.
5498         * include/grub/i386/efi/pci.h: Remove.
5499         * include/grub/x86_64/efi/pci.h: Remove.
5501         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5502         `<grub/cpu/pci.h>'.
5504         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5505         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5506         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5508         * conf/i386-ieee1275.rmk: Likewise.
5510 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5512         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5513         (grub_console_setcursor): Make it possible to set cursor off.
5515 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5517         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5518         of modules instead of assuming which platform provides what.
5519         * util/update-grub.in: Likewise.
5521 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5523         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5524         instead of `grub_install_dos_part' to determine whether a drive needs
5525         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5526         because it can be overridden when loading GRUB via Multiboot).
5528 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5530         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5532 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5534         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5535         of informational grub_dprintf() calls.
5537 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5539         * disk/memdisk.c (memdisk_size): Don't initialize.
5540         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5542         * include/grub/i386/pc/kernel.h
5543         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5544         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5545         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5546         (grub_arch_memdisk_size): Remove.
5548         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5549         field (was only used to transfer a constant).  Add `type' field to
5550         support multiple module types.
5551         (grub_module_iterate): New function.
5553         * kern/device.c (grub_device_open): Do not hide error messages
5554         when grub_disk_open() fails.  Use grub_print_error() instead.
5556         * kern/i386/pc/init.c (grub_arch_modules_addr)
5557         (grub_arch_memdisk_size): Remove functions.
5558         (grub_arch_modules_addr): Return the module address in high memory
5559         (now that it isn't copied anymore).
5561         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5562         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5563         decompression routine (grub_total_module_size already includes that
5564         now).  Don't copy modules back to low memory.
5566         * kern/main.c: Include `<grub/mm.h>'.
5567         (grub_load_modules): Split out (and use) ...
5568         (grub_module_iterate): ... this function, which iterates through
5569         module objects and runs a hook.
5570         Comment out grub_mm_init_region() call, as it would cause non-ELF
5571         modules to be overwritten.
5573         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5574         the memdisk image in its own region, make it part of the module list.
5575         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5576         (main): Parse --memdisk|-m option, and pass user-provided path as
5577         parameter to generate_image().
5578         (add_segments): Pass `memdisk_path' down to load_modules().
5579         (load_modules): Embed memdisk image in module section when requested.
5580         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5581         `header.type' instead of `header.offset'.
5583         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5584         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5585         (memdisk_mod_LDFLAGS): New variables.
5586         * conf/i386-coreboot.rmk: Likewise.
5587         * conf/i386-ieee1275.rmk: Likewise.
5589 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5591         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5592         (backward_relocator): New variables.  Used to allocate and relocate
5593         the payload, respectively.
5594         (grub_multiboot_load_elf32): Load into heap instead of requested
5595         address, install the appropriate relocator code in each bound of
5596         the payload, and set the entry point such that
5597         grub_multiboot_real_boot() will jump to one of them.
5599         * kern/i386/loader.S (grub_multiboot_payload_size)
5600         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5601         (grub_multiboot_payload_entry_offset): New variables.
5602         (grub_multiboot_real_boot): Set cpu context to what the relocator
5603         expects, and jump to the relocator instead of the payload.
5605         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5606         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5607         (grub_multiboot_payload_entry_offset): Export.
5609 2008-08-01  Bean  <bean123ch@gmail.com>
5611         * normal/menu_entry.c (editor_getline): Don't return the original
5612         string as result, as it will be released by lexer once it has done
5613         using it.
5615 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5617         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5618         within menuentries, not before them.
5619         util/grub.d/10_hurd.in: Likewise.
5621 2008-08-01  Bean  <bean123ch@gmail.com>
5623         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5624         (bufio_mod_SOURCES): New macro.
5625         (bufio_mod_CFLAGS): Likewise.
5626         (bufio_mod_LDFLAGS): Likewise.
5628         * include/grub/bufio.h: New file.
5630         * io/bufio.c: Likewise.
5632         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5633         (grub_video_reader_png): Use grub_buffile_open to open file.
5635         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5636         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5638         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5639         (grub_video_reader_tga): Use grub_buffile_open to open file.
5641         * font/manager.c: Include <grub/bufio.h>.
5642         (add_font): Use grub_buffile_open to open file.
5644 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5646         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5647         ELF segments, use a macro for arbitrarily accessing any of them instead
5648         of preparing a pointer that allows access to one at a time.
5649         (grub_multiboot_load_elf64): Likewise.
5651 2008-07-31  Bean  <bean123ch@gmail.com>
5653         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5654         GRUB_KERNEL_MACHINE_DATA_END.
5656 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5658         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5659         Increase from 0x50 to 0x60.
5660         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5661         use UUIDs to identify the root drive for them.  If that's not
5662         possible, abort.
5663         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5664         check, for cross-disk installs.
5666 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5668         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5669         is non-empty, use it to set the `prefix' environment variable instead
5670         of the usual approach.
5671         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5672         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5673         environment variable instead of dummy make_install_device().
5675         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5676         (start): Insert a data section, with `grub_prefix' variable.
5677         * kern/i386/linuxbios/startup.S: Likewise.
5679         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5680         New variable reference.
5681         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5682         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5683         to `start').
5684         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5685         section within startup.S (relative to `start').
5686         * include/grub/i386/coreboot/kernel.h: Likewise.
5688         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5689         Overwrite grub_prefix with its contents, at the beginning of the
5690         first segment.
5691         (main): Understand -p|--prefix.
5693 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5695         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5697 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5699         * term/i386/pc/vga_text.c (grub_console_cls): Use
5700         grub_console_gotoxy() to go back to beginning of the screen.
5701         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5703 2008-07-29  Christian Franke  <franke@computer.org>
5705         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5706         Add conversion of emulated mount points on Cygwin.
5708 2008-07-29  Christian Franke  <franke@computer.org>
5710         * util/update-grub.in: Add a check for admin
5711         group on Cygwin.
5712         Remove old `grub.cfg.new' before creation.
5713         Add `-f' to `mv' to handle the different filesystem
5714         semantics of Windows.
5716 2008-07-29  Bean  <bean123ch@gmail.com>
5718         * normal/main.c (get_line): Fix buffer overflow bug.
5720 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5722         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5723         (struct grub_apple_header): New struct.  Describes the layout of
5724         the partmap header.
5725         (apple_partition_map_iterate): Check the header magic as well as the
5726         partition magic (which was already being checked).
5728 2008-07-28  Pavel Roskin  <proski@gnu.org>
5730         * genmk.rb: Add a warning to the beginning of the output that
5731         it's a generated file and should not be edited.
5733 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5735         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5736         with the same number are found, just use issue a warning with
5737         grub_dprintf(), as this error has been reported to be non-fatal.
5739 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5741         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5742         information.
5744 2008-07-27  Bean  <bean123ch@gmail.com>
5746         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5747         (grub_fat_find_dir): Ignore case when comparing filename.
5749 2008-07-27  Bean  <bean123ch@gmail.com>
5751         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5752         smallino, as it's more descriptive, and i8count can be confused with
5753         the other field count.
5754         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5755         inode type.
5757 2008-07-27  Bean  <bean123ch@gmail.com>
5759         * commands/crc.c: New file.
5761         * lib/crc.c: Likewise.
5763         * include/grub/lib/crc.h: Likewise.
5765         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5767         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5768         (hexdump): Move this function to ...
5770         * lib/hexdump.c: ... here.
5772         * include/grub/hexdump.h: Renamed to ...
5774         * include/grub/lib/hexdump.h: ... this.
5776         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5778         * util/grub-editenv.c: Likewise.
5780         * include/envblk.h: Renamed to ...
5782         * include/lib/envblk.h: ... this.
5784         * util/envblk.c: Renamed to ...
5786         * lib/envblk.c: ... this.
5788         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5789         lib/hexdump.c.
5790         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5791         (pkglib_MODULES): Add crc.mod.
5792         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5793         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5794         (crc_mod_SOURCES): New macro.
5795         (crc_mod_CFLAGS): Likewise.
5796         (crc_mod_LDFLAGS): Likewise.
5798         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5800         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5802         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5804         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5806         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5808 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5810         * commands/help.c: Include <grub/term.h>.
5811         (TERM_WIDTH): Removed.  Updated all users.
5813 2008-07-27  Pavel Roskin  <proski@gnu.org>
5815         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5816         spurious warnings about a comment within a comment.
5818 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5820         * util/getroot.c (find_root_device): Skip devices that match
5821         /dev/dm-[0-9].  This lets the real device be found for any type of
5822         abstraction (LVM, EVMS, RAID..).
5823         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5824         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5825         device is found first, find_root_device() will now skip it.
5827 2008-07-24  Pavel Roskin  <proski@gnu.org>
5829         * include/grub/types.h: Use __builtin_bswap32() and
5830         __builtin_bswap64() with gcc 4.3 and newer.
5832 2008-07-24  Christian Franke  <franke@computer.org>
5834         * util/i386/pc/grub-install.in: If `--debug' is specified,
5835         pass `--verbose' to grub-setup.
5836         Abort script if make_system_path_relative_to_its_root() fails.
5838 2008-07-24  Bean  <bean123ch@gmail.com>
5840         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5841         variable `target_platform' should be `platform'.
5843 2008-07-24  Bean  <bean123ch@gmail.com>
5845         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5846         (grub_png_init_fixed_block): New function.
5847         (grub_png_decode_image_data): Handle fixed huffman code compression.
5849 2008-07-24  Bean  <bean123ch@gmail.com>
5851         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5852         (grub_pe2elf_SOURCES): New macro.
5853         (CLEANFILES): Add grub-pe2elf.
5855         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5856         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5857         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5858         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5859         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5860         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5861         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5862         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5863         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5864         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5865         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5866         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5867         (GRUB_PE32_DT_FUNCTION): Likewise.
5868         (GRUB_PE32_REL_I386_DIR32): Likewise.
5869         (GRUB_PE32_REL_I386_REL32): Likewise.
5870         (grub_pe32_symbol): New structure.
5871         (grub_pe32_reloc): Likewise.
5873         * util/grub-pe2elf.c: New file.
5875         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5876         start symbol in non pc platform.
5878         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5880         The following patches are from Christian Franke.
5882         * include/grub/dl.h: Remove .previous, gas supports this only
5883         for ELF format.
5885         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5886         Remove .type, gas supports this only for ELF format.
5888         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5889         nullbytes in symbol table. This fixes an infinite loop if table is
5890         zero filled.
5892         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5893         TARGET_IMG_LDFLAGS and EXEEXT.
5895         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5896         TARGET_IMG_LDFLAGS_AC.
5897         (grub_CHECK_STACK_ARG_PROBE): New function.
5899         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5901         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5903         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5904         to set TARGET_IMG_LD* accordingly.
5905         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5906         Add call to grub_CHECK_STACK_ARG_PROBE.
5907         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5909         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5911         * genmk.rb: Add EXEEXT to CLEANFILES.
5913 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5915         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5916         define the codes for arrows and lines used for the menu).
5917         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5918         as well.
5920         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5921         fonts, because the latter are too slow.
5923 2008-07-21  Bean  <bean123ch@gmail.com>
5925         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5926         a20. Run keyboard test last, as it will cause macbook to halt.
5928 2008-07-18  Pavel Roskin  <proski@gnu.org>
5930         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5931         load foreign architecture modules correctly anyway.  Keep
5932         support for loading host architecture modules, whether we
5933         compile them or not.
5935 2008-07-17  Pavel Roskin  <proski@gnu.org>
5937         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5938         change target_cpu.  The compiler default can mismatch target_cpu
5939         in any case.
5941         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5942         * kern/efi/efi.c: Likewise.
5944         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5945         target compiler is functional.
5946         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5947         are set up.
5949         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5950         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5951         adjustments from the rest, only do them if target is not
5952         explicitly given.  Merge other adjustments with the final sanity
5953         check.  Remove an extraneous check for supported CPU.  Be
5954         specific which CPU and which platform is not supported.
5956         * configure.ac: Default to pc platform for x86_64.
5958 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5960         Partial LinuxBIOS -> Coreboot rename.
5962         * conf/i386-linuxbios.rmk: Renamed to ...
5963         * conf/i386-coreboot.rmk: ... this.
5964         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5965         * configure.ac: Accept "coreboot" as input platform (but maintain
5966         compatibility with "linuxbios").
5967         * include/grub/i386/linuxbios: Renamed to ...
5968         * include/grub/i386/coreboot: ... this.
5970 2008-07-17  Bean  <bean123ch@gmail.com>
5972         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5973         (appleldr_mod_SOURCE): New variable.
5974         (appleldr_mod_CFLAGS): Likewise.
5975         (appleldr_mod_LDFLAGS): Likewise.
5976         (pci_mod_SOURCES): Likewise.
5977         (pci_mod_CFLAGS): Likewise.
5978         (pci_mod_LDFLAGS): Likewise.
5979         (lspci_mod_SOURCES): Likewise.
5980         (lspci_mod_CFLAGS): Likewise.
5981         (lspci_mod_LDFLAGS): Likewise.
5983         * conf/x86_64-efi.rmk: New file.
5985         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5986         macro.
5987         (grub_efidisk_write): Likewise.
5989         * include/efi/api.h (efi_call_0): New macro.
5990         (efi_call_1): Likewise.
5991         (efi_call_2): Likewise.
5992         (efi_call_3): Likewise.
5993         (efi_call_4): Likewise.
5994         (efi_call_5): Likewise.
5995         (efi_call_6): Likewise.
5997         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5998         grub_rescue_cmd_chainloader.
6000         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6001         (grub_pe32_optional_header): Change some fields based on i386 or
6002         x86_64 platform.
6003         (GRUB_PE32_PE32_MAGIC): Likewise.
6005         * include/grub/efi/uga_draw.h: New file.
6007         * include/grub/elf.h (STN_ABS): New constant.
6008         (R_X86_64_NONE): Relocation constant for x86_64.
6009         (R_X86_64_64): Likewise.
6010         (R_X86_64_PC32): Likewise.
6011         (R_X86_64_GOT32): Likewise.
6012         (R_X86_64_PLT32): Likewise.
6013         (R_X86_64_COPY): Likewise.
6014         (R_X86_64_GLOB_DAT): Likewise.
6015         (R_X86_64_JUMP_SLOT): Likewise.
6016         (R_X86_64_RELATIVE): Likewise.
6017         (R_X86_64_GOTPCREL): Likewise.
6018         (R_X86_64_32): Likewise.
6019         (R_X86_64_32S): Likewise.
6020         (R_X86_64_16): Likewise.
6021         (R_X86_64_PC16): Likewise.
6022         (R_X86_64_8): Likewise.
6023         (R_X86_64_PC8): Likewise.
6025         * include/grub/i386/efi/pci.h: New file.
6027         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6028         Change it value based on platform.
6029         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6030         (GRUB_E820_RAM): Likewise.
6031         (GRUB_E820_RESERVED): Likewise.
6032         (GRUB_E820_ACPI): Likewise.
6033         (GRUB_E820_NVS): Likewise.
6034         (GRUB_E820_EXEC_CODE): Likewise.
6035         (GRUB_E820_MAX_ENTRY): Likewise.
6036         (grub_e820_mmap): New structure.
6037         (linux_kernel_header): Change the efi field according to different
6038         kernel version, also field from linux_kernel_header.
6040         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6042         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6043         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6044         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6045         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6046         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6047         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6048         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6049         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6050         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6051         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6053         * include/grub/x86_64/efi/kernel.h: New file.
6055         * include/grub/x86_64/efi/loader.h: Likewise.
6057         * include/grub/x86_64/efi/machine.h: Likewise.
6059         * include/grub/x86_64/efi/pci.h: Likewise.
6061         * include/grub/x86_64/efi/time.h: Likewise.
6063         * include/grub/x86_64/linux.h: Likewise.
6065         * include/grub/x86_64/setjmp.h: Likewise.
6067         * include/grub/x86_64/time.h: Likewise.
6069         * include/grub/x86_64/types.h: Likewise.
6071         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6072          GRUB_TARGET_SIZEOF_VOID_P.
6074         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6075         (grub_efi_locate_handle): Likewise.
6076         (grub_efi_open_protocol): Likewise.
6077         (grub_efi_set_text_mode): Likewise.
6078         (grub_efi_stall): Likewise.
6079         (grub_exit): Likewise.
6080         (grub_reboot): Likewise.
6081         (grub_halt): Likewise.
6082         (grub_efi_exit_boot_services): Likewise.
6083         (grub_get_rtc): Likewise.
6085         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6086         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6087         (grub_efi_allocate_pages): Wrap efi calls.
6088         (grub_efi_free_pages): Wrap efi calls.
6089         (grub_efi_get_memory_map): Wrap efi calls.
6091         * kern/x86_64/dl.c: New file.
6093         * kern/x86_64/efi/callwrap.S: Likewise.
6095         * kern/x86_64/efi/startup.S: Likewise.
6097         * loader/efi/appleloader.c: Likewise.
6099         * loader/efi/chainloader.c (cmdline): New variable.
6100         (grub_chainloader_unload): Wrap efi calls.
6101         (grub_chainloader_boot): Likewise.
6102         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6103         command line.
6105         * loader/efi/chainloader_normal.c (chainloader_command):
6106         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6107         command line.
6109         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6110         method.
6111         (grub_e820_add_region): New function.
6112         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6113         booting.
6114         (grub_find_video_card): New function.
6115         (grub_linux_setup_video): New function.
6116         (grub_rescue_cmd_linux): Probe for video information.
6118         * normal/x86_64/setjmp.S: New file.
6120         * term/efi/console.c (map_char): New function.
6121         (grub_console_putchar): Map unicode char.
6122         (grub_console_checkkey): Wrap efi calls.
6123         (grub_console_getkey): Likewise.
6124         (grub_console_getwh): Likewise.
6125         (grub_console_gotoxy): Likewise.
6126         (grub_console_cls): Likewise.
6127         (grub_console_setcolorstate): Likewise.
6128         (grub_console_setcursor): Likewise.
6130         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6132 2008-07-16  Pavel Roskin  <proski@gnu.org>
6134         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6135         format strings.
6137         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6138         pointer, not an integer.  This fixes a warning and prevents
6139         precision loss on 64-bit systems.
6140         (relocate_addresses): Remove unneeded cast.
6142 2008-07-15  Pavel Roskin  <proski@gnu.org>
6144         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6146         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6148         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6149         Fix comparison between signed and unsigned.
6151         * include/grub/i386/ieee1275/console.h: Declare
6152         grub_console_init() and grub_console_fini().
6154         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6155         It's empty and unused.
6157         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6158         beginning to avoid warnings with some compilers.
6160         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6161         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6163 2008-07-14  Pavel Roskin  <proski@gnu.org>
6165         * kern/env.c (grub_register_variable_hook): Don't copy empty
6166         string, it leaks memory.  Pass "" to grub_env_set(), it should
6167         handle constant strings.
6169         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6170         * commands/cmp.c (grub_cmd_cmp): Likewise.
6171         * kern/dl.c (grub_dl_flush_cache): Likewise.
6172         (grub_dl_load_core): Likewise.
6173         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6174         (grub_elf64_load_phdrs): Likewise.
6176 2008-07-13  Pavel Roskin  <proski@gnu.org>
6178         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6179         between signed and unsigned.
6180         (LzmaEnc_Finish): Fix warning about an unused parameter.
6182 2008-07-13  Bean  <bean123ch@gmail.com>
6184         * Makefile.in (enable_lzo): New rule.
6186         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6188         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6190         * boot/i386/pc/lnxboot.S: #include <config.h>.
6192         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6193         its value according to the compression algorithm used, lzo or lzma.
6195         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6196         compression algorithm according to configure macro.
6198         * kern/i386/pc/startup.S (codestart): Likewise.
6200         * kern/i386/pc/lzma_decode.S: New file.
6202         * include/grub/lib/LzFind.h: Likewise.
6204         * include/grub/lib/LzHash.h: Likewise.
6206         * include/grub/lib/LzmaDec.h: Likewise.
6208         * include/grub/lib/LzmaEnc.h: Likewise.
6210         * include/grub/lib/LzmaTypes.h: Likewise.
6212         * lib/LzFind.c: Likewise.
6214         * lib/LzmaDec.c: Likewise.
6216         * lib/LzmaEnc.c: Likewise.
6218 2008-07-13  Bean  <bean123ch@gmail.com>
6220         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6221         (grub_ext4_extent_header): New structure.
6222         (grub_ext4_extent): Likewise.
6223         (grub_ext4_extent_idx): Likewise.
6224         (grub_ext4_find_leaf): New function.
6225         (grub_ext2_read_block): Handle extents.
6227 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6229         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6231 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6233         * util/grub.d/40_custom.in: New file. Example on how to add custom
6234         entries to /etc/grub.d.
6235         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6236         40_custom (implicitly, by merging all the grub.d rules).
6238 2008-07-11  Pavel Roskin  <proski@gnu.org>
6240         * commands/read.c (grub_getline): Fix invalid memory access.
6241         Don't add newline to the variable value.
6243         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6244         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6245         (serial_hw_get_port): Check validity of the port number.
6246         (grub_cmd_serial): Check return value of serial_hw_get_port().
6248 2008-07-07  Pavel Roskin  <proski@gnu.org>
6250         * boot/i386/pc/diskboot.S (notification_string): Replace
6251         "Loading kernel" with just "loading".  This is shorter, less
6252         confusing and saves a few bytes for possible future changes.
6254 2008-07-05  Pavel Roskin  <proski@gnu.org>
6256         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6257         size for ATAPI devices, they are undefined.  Output sector
6258         number in decimal form.
6260         * disk/ata.c: Use named constants for status bits.
6262 2008-07-04  Pavel Roskin  <proski@gnu.org>
6264         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6265         grub_addr_t before casting it to the void pointer to fix a
6266         warning.  Non-addressable regions are discarded earlier.
6267         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6268         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6269         (check_signature): Don't shadow table_header.
6270         (grub_linuxbios_table_iterate): Cast numeric constants to
6271         grub_linuxbios_table_header_t.
6272         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6273         grub_stop().
6275         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6276         prevent warnings.
6278         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6279         pointer, which can cause warnings.  Support 64-bit addresses.
6281         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6282         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6284 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6286         This fixes a performance issue when pc & gpt partmap iterators
6287         didn't abort iteration even after our hook found what it was
6288         looking for (often causing expensive probes of non-existent drives).
6290         Some callers relied on previous buggy behaviour, since they would
6291         raise an error when their own hooks caused early abortion of its
6292         iteration.
6294         * kern/device.c (grub_device_open): Improve error message.
6295         * disk/lvm.c (grub_lvm_open): Likewise.
6296         * disk/raid.c (grub_raid_open): Likewise.
6298         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6299         when hook requests it, independently of grub_errno.
6300         (pc_partition_map_probe): Do not fail when find_func() caused
6301         early abortion of pc_partition_map_iterate().
6303         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6304         when hook requests it, independently of grub_errno.
6305         (gpt_partition_map_probe): Do not fail when find_func() caused
6306         early abortion of gpt_partition_map_iterate().
6308         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6309         when hook requests it, independently of grub_errno.  Do not fail when
6310         part_map_iterate_hook() caused early abortion of p->iterate().
6312         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6313         when grub_partition_iterate() returned with non-zero.
6315 2008-07-03  Pavel Roskin  <proski@gnu.org>
6317         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6318         like we do in grub_ata_pio_read().
6319         (grub_ata_readwrite): Always write individual sectors.  Fix the
6320         sector count for the remainder.
6321         (grub_ata_write): Enable writing to ATA devices.  Correctly
6322         report error for ATAPI devices.
6324 2008-07-02  Pavel Roskin  <proski@gnu.org>
6326         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6327         warning.
6329         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6330         for every read sector, we already increment it for the whole
6331         batch.  This fixes reading more than 256 sectors at once.
6333         * util/grub-editenv.c (cmd_info): Cast argument to long
6334         explicitly.  ptrdiff_t reduces to int on i386.
6336         * util/grub-editenv.c (main): Be specific which parameter is
6337         missing.
6339         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6340         (memdisk): Make memdisk_orig_addr a pointer.
6342         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6343         for file offsets, use grub_off_t instead.  Fix printf format
6344         warnings.
6346         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6347         there.  Real unexpected warnings should not drown in the noise
6348         about known problems.
6350         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6351         grub_disk_addr_t for memory addresses.
6353         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6354         explicitly to fix a warning.
6356         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6358         * Makefile.in (MODULE_LDFLAGS): New variable.
6359         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6360         the linker accepts --build-id=none.
6361         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6362         MODULE_LDFLAGS.
6363         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6365         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6366         those in Linux XFS code.  Provide a way to access 64-bit parent
6367         inode.
6368         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6369         the end of struct grub_xfs_dir_header.
6371 2008-07-02  Bean  <bean123ch@gmail.com>
6373         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6374         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6375         and GRUB_IEEE1275_FLAG_NO_ANSI.
6377         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6378         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6379         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6381         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6382         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6384         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6385         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6387         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6388         esc sequence on non ANSI terminal.
6389         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6391         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6392         beginning of file.
6394 2008-07-02  Bean  <bean123ch@gmail.com>
6396         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6397         (grub_editenv_SOURCES): New variable.
6398         (pkglib_MODULES): Add loadenv.mod.
6399         (loadenv_mod_SOURCES): New variable.
6400         (loadenv_mod_CFLAGS): Likewise.
6401         (loadenv_mod_LDFLAGS): Likewise.
6403         * include/grub/envblk.h: New file.
6405         * util/envblk.c: New file.
6407         * util/grub-editenv.c: New file.
6409         * commands/loadenv.c: New file.
6411 2008-07-01  Pavel Roskin  <proski@gnu.org>
6413         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6414         not unsigned char.  This fixes warnings and is consistent with
6415         other tags.
6417         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6419         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6421         * term/tparm.c (analyze): Always set *popcount.
6423         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6424         cast to fix a warning.
6426         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6427         cast to suppress a warning.
6429         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6430         grub_fshelp_read_file() expects.
6432         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6433         write uuid as a 32-bit value in CPU byte order, so declare and
6434         use it as such.
6436         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6437         long if the format specifier expects it.
6438         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6439         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6440         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6441         long to fix a warning.
6442         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6443         grub_dprintf() arguments to fix warnings.
6445 2008-06-30  Pavel Roskin  <proski@gnu.org>
6447         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6448         install_bsd_part immediately before core.img is embedded or
6449         modified on disk.  This fixes core.img verification if core.img
6450         cannot be embedded.
6452         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6453         core_path to calculate the blocklist.
6454         Patch from Javier Martín <lordhabbit@gmail.com>
6456 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6458         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6459         block to disk block.
6460         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6461         Patch from Niels Böhm <bitbucket@arcor.de>
6463 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6465         * util/update-grub_lib.in (font_path): Search for fonts in
6466         /boot/grub first, which is more likely to be readable (we aren't
6467         deciding where fonts live, just looking for them).
6469 2008-06-26  Pavel Roskin  <proski@gnu.org>
6471         * util/biosdisk.c (read_device_map): Don't leave dead map
6472         entries for devices failing stat() check.
6474         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6475         core_path_dev for the core.img path on the target device.
6477 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6479         * disk/fs_uuid.c: New file.
6480         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6481         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6482         (fs_uuid_mod_LDFLAGS): New variables.
6483         * include/grub/disk.h (grub_disk_dev_id): Add
6484         `GRUB_DISK_DEVICE_UUID_ID'.
6485         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6486         implement iterate().
6488 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6490         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6491         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6492         Linux image includes no initrd.
6494 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6496         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6497         call to resolve the core image location that effectively appended the
6498         name twice.
6500 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6502         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6503         call from here ...
6505         * util/grub.d/10_hurd.in: ... to here ...
6506         * util/grub.d/10_linux.in: ... and here.
6508 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6510         * kern/main.c (grub_main): Export `prefix' variable immediately
6511         after it has been set by grub_machine_set_prefix().
6513 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6515         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6516         search result when not saving to variable, not the other way around.
6517         When saving to variable, abort iteration as soon as a match is found.
6519 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6521         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6522         check for partition that provides /boot/grub.  Its logic is flawed,
6523         as it prevents prepare_grub_to_access_device() from being called
6524         multiple times.
6526 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6528         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6529         "insmod" command directly when abstraction modules are needed,
6530         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6531         since it had already been processed).
6533 2008-06-19  Pavel Roskin  <proski@gnu.org>
6535         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6536         changed.  This is needed in case GRUB_LIBDIR changes.
6537         * conf/i386-ieee1275.rmk: Likewise.
6538         * conf/i386-linuxbios.rmk: Likewise.
6539         * conf/i386-pc.rmk: Likewise.
6540         * conf/powerpc-ieee1275.rmk: Likewise.
6542 2008-06-18  Pavel Roskin  <proski@gnu.org>
6544         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6545         kernel_elf_symlist.c to symlist.c for consistency with other
6546         architectures.  Update all users.
6547         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6549 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6551         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6552         it in prefix.
6554         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6555         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6556         a RAID device, run setup() for all members independently on whether
6557         LVM abstraction is being used.
6558         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6559         If grub-mkimage has set `*install_dos_part == -2', don't override this
6560         value.
6561         Perform *install_dos_part adjustments independently on whether
6562         we're embedding or not.
6563         Clarify error message when image is too big for embedding.
6564         Remove duplicate *install_dos_part stanza.
6566 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6568         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6569         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6570         variables.
6571         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6572         values in grub_ofconsole_normal_color and
6573         grub_ofconsole_highlight_color (they're not directly related to
6574         background and foreground).
6575         (grub_ofconsole_setcolorstate): Extract background and foreground
6576         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6578 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6580         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6581         /boot/grub for the check in last commit, not /boot (they could be
6582         different partitions).
6584 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6586         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6587         asked to setup access for the same partition that provides /boot,
6588         don't bother using UUIDs since our root already has the value we
6589         want.
6591 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6593         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6594         I2O devices.
6595         Patch from Sven Mueller <sven@debian.org>.
6597 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6599         * util/update-grub.in: Check for $EUID instead of $UID.
6600         Reported by Vincent Zweije.
6602 2008-06-16  Bean  <bean123ch@gmail.com>
6604         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6605         (grub_ext2_read_block): Likewise.
6606         (grub_ext2_read_inode): Likewise.
6607         (grub_ext2_mount): Likewise.
6608         (grub_ext2_close): Likewise.
6609         (grub_ext3_get_journal): Removed.
6611         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6612         (grub_reiserfs_read_symlink): Likewise.
6613         (grub_reiserfs_mount): Likewise.
6614         (grub_reiserfs_open): Likewise.
6615         (grub_reiserfs_read): Likewise.
6616         (grub_reiserfs_close): Likewise.
6617         (grub_reiserfs_get_journal): Removed.
6619         * fs/fshelp.c (grub_fshelp_read): Removed.
6620         (grub_fshelp_map_block): Likewise.
6622         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6623         (grub_fshelp_journal): Likewise.
6624         (grub_fshelp_read): Likewise.
6625         (grub_fshelp_map_block): Likewise.
6627 2008-06-16  Pavel Roskin  <proski@gnu.org>
6629         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6630         floating point anymore.
6631         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6633 2008-06-15  Pavel Roskin  <proski@gnu.org>
6635         * commands/ls.c (grub_ls_list_files): Use integer calculations
6636         for human readable format, avoid floating point use.
6637         * kern/misc.c (grub_ftoa): Remove.
6638         (grub_vsprintf): Remove floating point support.
6640 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6642         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6643         devices.
6644         Reported by Max Vozeler.
6646 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6648         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6649         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6650         skipped later.
6651         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6652         the beginning of the prefix.
6654         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6655         It is assumed that if we have a memdisk, grub-mkimage has set
6656         grub_prefix to include the "(memdisk)" drive in it.
6658 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6660         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6661         Initialize keyboard controller after registering the terminal, so that
6662         grub_printf() can be called from grub_keyboard_controller_init().
6664 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6666         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6667         extent-btree which is written as big endian on disk.
6668         Reported by Alain Greppin  <al@chilibi.org>.
6670 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6672         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6673         * util/i386/pc/grub-install.in (modules): Likewise.
6675 2008-06-13  Pavel Roskin  <proski@gnu.org>
6677         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6679 2008-06-13  Bean  <bean123ch@gmail.com>
6681         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6683         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6685         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6686         to indicate sparse block.
6688 2008-06-12  Pavel Roskin  <proski@gnu.org>
6690         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6691         number, grub_fshelp_read() does it for us.
6693         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6694         linear disk read with journal translation.
6695         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6696         * include/grub/fshelp.h: Declare grub_fshelp_read().
6698 2008-06-09  Pavel Roskin  <proski@gnu.org>
6700         * fs/minix.c (grub_minix_mount): Handle error reading
6701         superblock.
6703 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6705         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6706         don't append the RAID prefix afterwards.
6707         Reported by Clint Adams.
6709 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6711         Based on description from Pavel:
6712         * kern/disk.c (grub_disk_check_range): Rename to ...
6713         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6714         tasks performed by this function.
6716 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6718         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6719         `num_serial' (for consistency with other variables).
6720         (struct grub_ntfs_data): Add `uuid' member.
6721         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6722         (grub_ntfs_uuid): New function.
6723         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6725 2008-06-07  Pavel Roskin  <proski@gnu.org>
6727         * util/biosdisk.c (open_device): Revert last change to the
6728         function, it broke installation.  The sector needs to be
6729         different dependent on which device is opened.
6731 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6733         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6734         rest of GRUB, and breakage doesn't happen if its value were modified.
6736         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6737         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6738         a constant (same value).
6739         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6740         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6742 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6744         * util/biosdisk.c (open_device): Do not modify sector offset when
6745         accessing a partition.  kern/disk.c already handles this for us.
6747 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6749         * util/grub-emu.c (grub_machine_init): Move code in this function from
6750         here ...
6751         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6752         segfault in case grub_printf() is called).
6754         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6755         grub_probe.  Update all users not to explicitly add it again.
6756         (grub_device): New variable; contains corresponding device for grubdir.
6757         (fs_module, partmap_module, devabstraction_module): Pass
6758         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6759         every time.
6761 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6763         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6764         is found, print it (same layout as with labels).
6766 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6768         * util/biosdisk.c (get_drive): Rename to ...
6769         (find_grub_drive): ... this.  Update all users.
6771         (get_os_disk): Rename to ...
6772         (convert_system_partition_to_system_disk): ... this.  Update all users.
6774         (find_drive): Rename to ...
6775         (find_system_device): ... this.  Update all users.
6777 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6779         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6780         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6781         (make_device_map): Likewise.
6783 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6785         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6786         before dereferencing it.
6788         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6789         union with fat12/fat16-specific ones.  Add some new fields, including
6790         `num_serial' for both versions.
6791         (struct grub_fat_data): Add `uuid' member.
6792         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6793         names.  Initialize `data->uuid' using `num_serial'.
6794         (grub_fat_uuid): New function.
6795         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6797         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6798         (grub_reiserfs_uuid): New function.
6799         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6800         member.
6802         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6803         (grub_xfs_uuid): New function.
6804         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6806 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6808         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6809         code that is backward compatible with pre-uuid search command.
6811 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6813         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6814         floppies after everything else, to ensure floppy drive isn't accessed
6815         unnecessarily (patch from Bean).
6817 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6819         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6820         not print device names when we were asked to set a variable.
6822 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6824         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6825         using "cursor-on" and "cursor-off" commands (understood at least by
6826         the Open Firmware flavour on OLPC).
6828 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6830         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6831         on and off sequences.
6833 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6835         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6836         * util/update-grub.in: Likewise.
6838 2008-05-30  Pavel Roskin  <proski@gnu.org>
6840         * util/biosdisk.c (linux_find_partition): Simplify logic and
6841         make the code more universal.  Keep special processing for
6842         devfs, but use a simple rule for all other devices.  If the
6843         device ends with a number, append 'p' and the partition number.
6844         Otherwise, append only the partition number.
6846 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6848         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6849         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6850         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6851         the `root' parameter to Linux.
6853 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6855         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6856         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6857         --fs_uuid with --fs-uuid.
6858         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6859         all filesystems support them).
6861 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6863         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6864         grub_printf() flags, since we're printing in units of 2 bytes.
6866 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6868         * util/grub.d/00_header.in: Remove obsolete comment referencing
6869         convert_system_path_to_grub_path().
6870         * util/update-grub.in: Likewise.
6871         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6872         (convert_system_path_to_grub_path): Add a warning message explaining
6873         that this function is deprecated.  Rely on is_path_readable_by_grub()
6874         for the readability checks.
6875         (font_path): Use is_path_readable_by_grub() for the readability
6876         check rather than convert_system_path_to_grub_path().
6878 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6880         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6881         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6882         converting it first.
6883         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6884         grub.cfg for access to font file, and afterwards call it again to set
6885         the root device.
6887 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6889         * commands/search.c (options): Add --fs_uuid option.
6890         (search_fs_uuid): New function.
6891         (grub_cmd_search): Fix --set argument passing.
6892         Use search_fs_uuid() when requested via --fs_uuid.
6893         (grub_search_init): Update help message.
6894         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6895         and redeclare it as an array of 16-bit words.
6896         (grub_ext2_uuid): New function.
6897         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6898         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6899         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6900         (GRUB_DEVICE_BOOT_UUID): New variables.
6901         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6902         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6903         whenever possible.
6904         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6905         just assume `root' variable has the right value.
6906         * util/grub.d/10_linux.in: Likewise.
6907         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6908         via PRINT_FS_UUID.
6909         (main): Recognise `-t fs_uuid' argument.
6911 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6913         * util/biosdisk.c (map): Redefine structure to hold information
6914         about GRUB drive name.
6915         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6916         drive names.
6917         (call_hook): Remove.
6918         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6919         member.  Assume drive has partitions.
6920         (grub_util_biosdisk_open): Access device names via `.device' struct
6921         member.
6922         (open_device): Likewise.
6923         (find_drive): Likewise.
6924         (read_device_map): Adjust map[] usage to match the new struct
6925         definition.  Don't check for duplicates (still possible, but not cheap
6926         anymore).
6927         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6928         (make_device_name): Remove assumption of BIOS-like drive names.
6930 2008-05-30  Pavel Roskin  <proski@gnu.org>
6932         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6933         compiling execute.c doesn't need grub_script.tab.h anymore.
6934         (normal/command.c_DEPENDENCIES): Likewise.
6935         (normal/function.c_DEPENDENCIES): Likewise.
6936         * conf/i386-ieee1275.rmk: Likewise.
6937         * conf/i386-linuxbios.rmk: Likewise.
6938         * conf/i386-pc.rmk: Likewise.
6939         * conf/powerpc-ieee1275.rmk: Likewise.
6940         * conf/sparc64-ieee1275.rmk: Likewise.
6942 2008-05-29  Pavel Roskin  <proski@gnu.org>
6944         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6945         when scanning metadata for volume group name.
6947         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6948         a generated file, which may only be included from the files with
6949         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6950         use union YYSTYPE, as the later allows forward declaration.
6951         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6953 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6955         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6956         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6957         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6958         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6959         scan codes.
6961 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6963         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6964         control key combinations.
6966 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6968         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6969         * util/ieee1275/grub-install.in: ... to here.
6970         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6971         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6972         (grub_install_SOURCES): Likewise.
6974 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6976         * fs/affs.c: Update copyright year.
6977         * fs/ext2.c: Likewise.
6978         * fs/fshelp.c: Likewise.
6979         * fs/hfsplus.c: Likewise.
6980         * fs/ntfs.c: Likewise.
6981         * fs/xfs.c: Likewise.
6982         * include/grub/fshelp.h: Likewise.
6983         * util/grub-mkdevicemap.c: Likewise.
6985 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6987         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6988         might need to be fatfs to support some firmware implementations
6989         (e.g. OFW or EFI).
6991 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6993         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6994         devices.
6995         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6996         (make_device_map): Likewise.
6998 2008-05-20  Bean  <bean123ch@gmail.com>
7000         * fs/fshelp.c (grub_fshelp_map_block): New function.
7001         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7002         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7004         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7005         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7006         (grub_fshelp_journal): New structure.
7007         (grub_fshelp_map_block): New function prototype.
7008         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7009         (grub_fshelp_map_block): Likewise.
7011         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7012         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7013         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7014         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7015         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7016         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7017         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7018         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7019         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7020         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7021         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7022         (grub_ext2_sblock): New members for journal support.
7023         (grub_ext3_journal_header): New structure.
7024         (grub_ext3_journal_revoke_header): Likewise.
7025         (grub_ext3_journal_block_tag): Likewise.
7026         (grub_ext3_journal_sblock): Likewise.
7027         (grub_fshelp_node): New members logfile and journal.
7028         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7029         grub_fshelp_map_block to get real block number.
7030         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7031         number.
7032         (grub_ext2_read_inode): Likewise.
7033         (grub_ext3_get_journal): New function.
7034         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7035         (grub_ext2_close): Release memory used by journal.
7037         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7038         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7039         (grub_reiserfs_transaction_header): Renamed to
7040         grub_reiserfs_description_block, replace field data with real_blocks.
7041         (grub_reiserfs_commit_block): New structure.
7042         (grub_reiserfs_data): New member journal.
7043         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7044         number.
7045         (grub_reiserfs_read_symlink): Likewise.
7046         (grub_reiserfs_iterate_dir): Likewise.
7047         (grub_reiserfs_open): Likewise.
7048         (grub_reiserfs_read): Likewise.
7049         (grub_reiserfs_get_journal): New function.
7050         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7051         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7052         using grub_reiserfs_get_journal.
7053         (grub_reiserfs_close): Release memory used by journal.
7055         * fs/affs.c (grub_affs_read_block): Change block type to
7056         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7058         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7060         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7062         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7064         * fs/udf.c (grub_udf_read_block): Change block type to
7065         grub_disk_addr_t. Use type cast to avoid warning.
7067         * fs/xfs.c (grub_xfs_read_block): Likewise.
7069 2008-05-16  Christian Franke  <franke@computer.org>
7071         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7072         to ensure that break with ESC will always work.
7073         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7074         Remove ESC from keyboard queue.
7076 2008-05-16  Christian Franke  <franke@computer.org>
7078         * util/biosdisk.c: [__CYGWIN__] Add includes.
7079         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7080         (get_os_disk): Move variable declarations to OS specific
7081         parts to avoid warning.
7082         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7083         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7084         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7085         Cygwin.
7086         * util/getroot.c: [__CYGWIN__] Add includes.
7087         (strip_extra_slashes): Fix "/" case.
7088         [__CYGWIN__] (get_win32_path): New function.
7089         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7090         [__CYGWIN__] (find_root_device): Disable.
7091         [__CYGWIN__] (get_bootsec_serial): New function.
7092         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7093         [__linux__] (grub_guess_root_device): Add early returns to simplify
7094         structure.
7095         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7096         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7097         check for Linux only.
7099 2008-05-15  Bean  <bean123ch@gmail.com>
7101         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7102         keyboard hang problem in apple's intel mac.
7104 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7106         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7107         devices.
7108         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7109         (make_device_map): Likewise.
7110         Reported by Aurelien Jarno <aurel32@debian.org>
7112 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7114         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7115         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7116         (make_device_map): Output entries for xvd type disks.
7118 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7120         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7121         devices.
7122         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7123         (make_device_map): Likewise.
7124         Reported by Roland Dreier <rdreier@cisco.com>
7126 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7128         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7129         grub_strstr() call.  Correct a few mistakes in failure path handling.
7131 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7133         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7134         Do not print a trailing slash (therefore, the root directory is an
7135         empty string).
7136         (convert_system_path_to_grub_path): Do not remove trailing slash
7137         from make_system_path_relative_to_its_root() output.
7139         * util/i386/pc/grub-install.in: Add trailing slash to output from
7140         make_system_path_relative_to_its_root().
7142 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7144         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7145         ensures that output lines aren't intermangled with those sent to
7146         stderr (via grub_util_info()).
7147         * util/grub-probe.c (grub_refresh): Likewise.
7148         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7150 2008-05-05  Christian Franke  <franke@computer.org>
7152         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7153         Add Cygwin device names.
7154         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7155         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7156         (check_device): Return error instead of success on empty name.
7157         (make_device_map): Move label inside linux specific code to
7158         prevent compiler warning.
7160 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7162         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7163         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7164         first boot option.
7165         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7167 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7169         * docs/grub.cfg: New file (example GRUB configuration).
7171 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7173         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7174         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7175         and `disk/ieee1275/nand.c'.
7177 2008-04-25  Bean  <bean123ch@gmail.com>
7179         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7180         i386-linuxbios.
7182         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7183         change the buffer size to 4096 for cdrom device.
7185         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7186         and nand.mod.
7187         (_linux_mod_SOURCES): New variable.
7188         (_linux_mod_CFLAGS): Likewise.
7189         (_linux_mod_LDFLAGS): Likewise.
7190         (linux_mod_SOURCES): Likewise.
7191         (linux_mod_CFLAGS): Likewise.
7192         (linux_mod_LDFLAGS): Likewise.
7193         (nand_mod_SOURCES): Likewise.
7194         (nand_mod_CFLAGS): Likewise.
7195         (nand_mod_LDFLAGS): Likewise.
7197         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7198         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7199         type property. (nand device in olpc don't have this property)
7201         * include/grub/disk.h (grub_disk_dev_id): New macro
7202         GRUB_DISK_DEVICE_NAND_ID.
7204         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7205         function prototype.
7206         (grub_rescue_cmd_initrd): Likewise.
7208         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7209         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7210         ofw_cif_handler and ofw_idt, adjust padding number.
7212         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7213         GRUB_MACHINE_IEEE1275 is defined.
7215         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7216         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7218         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7219         on nested function heap_init.
7220         (grub_upper_mem): New variable for i386-ieee1275.
7221         (grub_get_extended_memory): New function for i386-ieee1275.
7222         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7224         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7225         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7226         property.
7228         * loader/i386/ieee1275/linux.c: New file.
7230         * loader/i386/ieee1275/linux_normal.c: New file.
7232         * disk/ieee1275/nand.c: New file.
7234 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7236         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7237         value.
7238         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7240 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7242         Restructures early code path on ieee1275 to unify grub_main() as
7243         the first C function that is executed in every platform.
7245         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7246         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7247         cmain().
7248         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7249         * kern/ieee1275/cmain.c (cmain): Rename to ...
7250         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7251         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7252         at the beginning.
7254 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7256         * util/update-grub.in: Fix syntax error when setting
7257         `GRUB_PRELOAD_MODULES'.
7258         Reported by Stephane Chazelas <stephane@artesyncp.com>
7260 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7262         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7263         section into account, newer toolchains generate unique build ids
7264         * configure.ac: remove the test for --build-id=none acceptance,
7265         we want build ids to be preserved
7266         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7267         far from other sections don't cause the raw binary images grow
7268         size
7270 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7272         * disk/lvm.c: Update copyright year.
7273         * kern/misc.c: Likewise.
7275 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7277         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7278         there is no memory left for physical volume name.
7280 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7282         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7283         volume name mapping to support bigger than 9 character names properly.
7285 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7287         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7288         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7290 2008-04-13  Christian Franke  <franke@computer.org>
7292         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7293         to create a floppy emulation boot CD when non emulation mode
7294         does not work.
7295         Enable Joliet CD filesystem extension.
7297 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7299         * kern/misc.c (grub_strncat): Fix off-by-one error.
7300         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7302         * kern/env.c (grub_env_context_close): Clear current context, not
7303         previous one.
7304         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7306         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7308 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7310         Improve robustness when handling LVM.
7312         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7313         (and leave `*p' unmodified).
7314         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7315         through it.
7316         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7317         iterating through it.
7318         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7319         through it.
7320         (grub_lvm_scan_device): Check the return value (and fail gracefully
7321         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7322         Don't assume `vg->pvs != NULL' when iterating through it.
7324 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7326         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7327         * genmk.rb (partmap): New variable.
7328         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7329         (#{partmap}): New target rule.
7330         * genpartmaplist.sh: New file.
7331         * Makefile.in (pkglib_DATA): Add partmap.lst.
7332         (partmap.lst): New target rule.
7333         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7334         modules (including all partition maps), instead of preloading them.
7336 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7338         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7339         `linux-boot-prober' (if installed) to detect other operating
7340         systems which are installed on the computer and add them to
7341         the boot menu.
7342         * conf/common.rmk: Build and install 30_os-prober.
7344 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7346         * kern/powerpc/ieee1275/init.c: Move from here ...
7347         * kern/ieee1275/init.c: ... to here.  Update all users.
7349         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7350         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7352         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7353         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7355         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7356         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7358 2008-04-10  Pavel Roskin  <proski@gnu.org>
7360         * configure.ac: Always use "_cv_" in cache variables for
7361         compatibility with Autoconf 2.62.
7363 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7365         Revert grub/machine/init.h addition by Pavel (since it breaks on
7366         i386-ieee1275 and others):
7367         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7368         * util/powerpc/ieee1275/misc.c: Likewise.
7370 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7372         * util/grub-probe.c (probe): Improve error message.
7374 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7376         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7377         (this prevents the presence of a bogus entry from ruining the whole
7378         thing).
7380 2008-04-06  Pavel Roskin  <proski@gnu.org>
7382         * util/biosdisk.c: Include grub/util/biosdisk.h.
7383         * util/grub-fstest.c (execute_command): Make static.
7384         * util/grub-mkdevicemap.c (check_device): Likewise.
7385         * util/i386/pc/misc.c: Include grub/machine/init.h.
7386         * util/powerpc/ieee1275/misc.c: Likewise.
7387         * util/lvm.c: Include grub/util/lvm.h.
7388         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7389         grub/cache.h.
7390         * util/raid.c: Include grub/util/raid.h.
7391         (grub_util_getdiskname): Make static.
7393         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7394         grub_hostfs_fini(), as they are called from grub_init_all() and
7395         grub_fini_all() respectively.  This fixes an infinite loop in
7396         grub-fstest due to double registration of hostfs.
7397         Reported by Christian Franke <Christian.Franke@t-online.de>
7399 2008-04-05  Pavel Roskin  <proski@gnu.org>
7401         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7402         all 8 functions.  Otherwise, probe function 0 only.
7404 2008-04-04  Pavel Roskin  <proski@gnu.org>
7406         * commands/lspci.c (grub_lspci_iter): Print the bus number
7407         correctly.
7409         * commands/lspci.c (grub_pci_classes): Fix typos.
7410         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7411         before device ID, as it's normally done.
7413         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7414         Fix signedness warnings.
7415         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7416         Likewise.
7417         * util/ieee1275/get_disk_name.c: Include config.h so that
7418         _GNU_SOURCE is defined and getline() is declared.  Mark an
7419         unused argument as such.  Fix a signedness warning.
7421 2008-04-02  Pavel Roskin  <proski@gnu.org>
7423         * genkernsyms.sh.in: Use more robust assignments for CC and
7424         srcdir.  Quote srcdir.
7425         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7426         the symbol table is not empty.
7428         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7429         * fs/cpio.c (grub_cpio_read): Likewise.
7431 2008-04-01  Pavel Roskin  <proski@gnu.org>
7433         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7434         * disk/host.c (grub_host_open): Likewise.
7435         * disk/loopback.c (grub_loopback_open): Likewise.
7436         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7437         disk->id as in disk/host.c, not a multi-character constant.
7439         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7440         later is obsolete, potentially dangerous and sets a bad example.
7441         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7442         * util/misc.c (grub_util_get_image_size): Likewise.
7444         * disk/loopback.c (options): Improve help for "--partitions".
7446         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7447         options to align them with the short options, e.g. "echo -e".
7449 2008-03-31  Bean  <bean123ch@gmail.com>
7451         * video/reader/png.c (grub_png_data): New member is_16bit and
7452         image_data.
7453         (grub_png_decode_image_header): Detect 16 bit png image.
7454         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7455         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7456         (grub_video_reader_png): Release memory occupied by image_data.
7458         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7459         4096 bytes.
7460         (grub_nfs_mount): Skip the test for sector per cluster.
7462         * include/grub/ntfs.h (MAX_SPC): Removed.
7464 2008-03-31  Bean  <bean123ch@gmail.com>
7466         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7467         (grub_probe_SOURCES): Add fs/afs.c.
7468         (grub_fstest_SOURCES): Likewise.
7469         (afs_mod_SOURCES): New variable.
7470         (afs_mod_CFLAGS): Likewise.
7471         (afs_mod_LDFLAGS): Likewise.
7473         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7474         (grub_emu_SOURCES): Likewise.
7476         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7478         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7480         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7482         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7484         * fs/afs.c: New file.
7486 2008-03-30  Pavel Roskin  <proski@gnu.org>
7488         * disk/host.c: Include grub/misc.h to fix a warning.
7489         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7490         warnings about implicit declarations.
7492         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7493         variable.
7494         * include/grub/i386/loader.h: Change declaration of
7495         grub_linux_boot() to match what grub_loader_set() expects.
7496         * util/getroot.c (grub_guess_root_device): Return const char* to
7497         fix a warning.
7498         * util/grub-probe.c (probe): Fix a warning about uninitialized
7499         abstraction_name variable.
7500         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7501         second argument as unused to fix a warning.
7503         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7504         missing grub_error() call.
7506         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7507         2.60 and newer uses it to define datadir.
7509         * commands/sleep.c: Fix warning about implicit declaration.
7510         * disk/memdisk.c: Likewise.
7511         * loader/aout.c: Likewise.
7512         * loader/i386/bsd_normal.c: Likewise.
7513         * util/grub-probe.c: Likewise.
7515         * commands/i386/cpuid.c (has_longmode): Make static.
7516         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7517         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7519         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7520         GDT.  This is more robust, as %ds can change.
7521         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7522         calling real_to_prot().
7523         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7525 2008-03-28  Pavel Roskin  <proski@gnu.org>
7527         * kern/i386/pc/startup.S: Assert that uncompressed functions
7528         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7529         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7530         code, as they push parts of the code (error handlers) beyond
7531         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7532         code as correctness and size.
7534 2008-03-28  Pavel Roskin  <proski@gnu.org>
7536         * kern/i386/pc/startup.S
7537         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7538         data block address to the real mode, keep offset minimal.  This
7539         works around a bug in AWARD BIOS on old Athlon systems, which
7540         makes CD detection hang.
7542 2008-03-26  Pavel Roskin  <proski@gnu.org>
7544         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7545         const.
7546         * include/grub/normal.h: Add grub_parse_color_name_pair()
7547         declaration.
7549 2008-03-24  Bean  <bean123ch@gmail.com>
7551         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7552         (cd_count): Removed.
7553         (cd_drive): New variable.
7554         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7555         (grub_biosdisk_call_hook): Likewise.
7556         (grub_biosdisk_iterate): Change cdrom detection method.
7557         (grub_biosdisk_open): Replace cd_start with cd_drive.
7558         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7559         detect cdrom device.
7561         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7562         Removed.
7563         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7564         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7565         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7566         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7567         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7568         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7569         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7570         (grub_biosdisk_cdrp): New structure.
7571         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7573         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7575         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7576         device.
7578         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7579         New function.
7581 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7583         Remove 2 TiB limit in ata.mod.
7584         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7585         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7586         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7587         grub_uint64_t instead of grub_uint32_t.
7589 2008-03-05  Bean  <bean123ch@gmail.com>
7591         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7592         (grub_multiboot): Set boot device.
7594         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7596 2008-03-02  Bean  <bean123ch@gmail.com>
7598         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7599         symlink_buffer.
7601 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7603         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7604         texinfo.tex.
7606         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7607         modified.
7609         * docs/fdl.texi: New file.
7611         * docs/mdate-sh: New file. Copied from gnulib.
7612         * docs/texinfo.tex: Likewise.
7614         * config.guess: Updated from gnulib.
7615         * install-sh: Likewise.
7617 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7619         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7620         (aout_mod_SOURCES): New variable.
7621         (aout_mod_CFLAGS): Likewise.
7622         (aout_mod_LDFLAGS): Likewise.
7624         * conf/i386-ieee1275.rmk: Likewise.
7626 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7628         * util/update-grub.in: Reorganise terminal validity check.  Accept
7629         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7630         Based on suggestion by Franklin PIAT.
7632 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7634         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7635         function.
7636         * util/getroot.c (grub_util_check_block_device): New function that
7637         returns the given argument if it is a block device and returns NULL else.
7638         * util/grub-probe.c (argument_is_device): New variable.
7639         (probe): Promote device_name from a variable to an argument. Receive
7640         device_name from grub_util_check_block_device() if path is NULL and from
7641         grub_guess_root_device() else. Do not free() device_name anymore.
7642         (options): Introduce new parameter '-d, --device'.
7643         (main): Add description of the new parameter to the help screen.
7644         Rename path variable to argument. Set argument_is_device if the '-d'
7645         option is given. Pass argument to probe() depending on
7646         argument_is_device.
7648 2008-02-24  Bean  <bean123ch@gmail.com>
7650         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7651         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7652         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7653         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7654         (GRUB_ISO9660_VOLDESC_END): Likewise.
7655         (grub_iso9660_primary_voldesc): New member escape.
7656         (grub_iso9660_data): New member joliet.
7657         (grub_iso9660_convert_string): New function.
7658         (grub_iso9660_mount): Detect joliet extension.
7659         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7660         (grub_iso9660_iso9660_label): Likewise.
7662         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7663         (grub_setup_SOURCES): Add fs/udf.c.
7664         (grub_fstest_SOURCES): Likewise.
7665         (udf_mod_SOURCES): New variable.
7666         (udf_mod_CFLAGS): Likewise.
7667         (udf_mod_LDFLAGS): Likewise.
7669         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7670         (grub_emu_SOURCES): Likewise.
7672         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7674         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7676         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7678         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7680         * fs/udf.c: New file.
7682 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7684         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7685         (normal/lexer.c_DEPENDENCIES): New variables.
7686         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7687         (normal/lexer.c_DEPENDENCIES): Likewise.
7688         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7689         (normal/lexer.c_DEPENDENCIES): Likewise.
7690         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7691         (normal/lexer.c_DEPENDENCIES): Likewise.
7692         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7693         (normal/lexer.c_DEPENDENCIES): Likewise.
7694         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7695         (normal/lexer.c_DEPENDENCIES): Likewise.
7697 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7699         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7700         since they were intended to be in hex.  This didn't break previously
7701         because of a bug in gpt_partition_map_iterate() (see below).
7703         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7704         when checking the validity of GPT header.
7705         Remove `partno', since it always provides the same information as `i'.
7707 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7709         * include/grub/efi/time.h: Fix a wrong comment.
7711 2008-02-19  Pavel Roskin  <proski@gnu.org>
7713         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7714         message.
7716 2008-02-19  Bean  <bean123ch@gmail.com>
7718         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7719         (aout_mod_SOURCES): New variable.
7720         (aout_mod_CFLAGS): Likewise.
7721         (aout_mod_LDFLAGS): Likewise.
7722         (_bsd_mod_SOURCES): New variable.
7723         (_bsd_mod_CFLAGS): Likewise.
7724         (_bsd_mod_LDFLAGS): Likewise.
7725         (bsd_mod_SOURCES): New variable.
7726         (bsd_mod_CFLAGS): Likewise.
7727         (bsd_mod_LDFLAGS): Likewise.
7729         * include/grub/aout.h: New file.
7731         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7733         * include/grub/i386/bsd.h: New file.
7735         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7736         to make it public.
7738         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7739         function is called, so that it's possible to change it inside the hook.
7740         (grub_elf64_load): Likewise.
7741         (grub_elf_file): Don't close the file if elf header is not found.
7742         (grub_elf_close): Close the file if grub_elf_file fails (The new
7743         grub_elf_file won't close it).
7744         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7745         (grub_elf64_size): Likewise.
7747         * kern/i386/loader.S (grub_unix_real_boot): New function.
7749         * loader/aout.c: New file.
7751         * loader/i386/bsd.c: New file.
7753         * loader/i386/bsd_normal.c: New file.
7755         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7757         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7758         can test other formats.
7760 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7762         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7763         (grub_gpt_partition_type_empty): Redefine with macro from
7764         `<grub/gpt_partition.h>'.
7765         (gpt_partition_map_iterate): Adjust partition type comparison.
7767         Export `entry' as partmap-specific `part.data' struct.
7768         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7770         * include/grub/gpt_partition.h (grub_gpt_header)
7771         (grub_gpt_partentry): ... to here (new file).
7773         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7775         (grub_gpt_partition_type_bios_boot): New const variable, defined
7776         with macro from `<grub/gpt_partition.h>'.
7778         (setup): Replace `first_start' with `embed_region', which keeps
7779         track of the embed region (and is partmap-agnostic).
7781         Replace find_first_partition_start() with find_usable_region(),
7782         which finds a usable region for embedding using partmap-specific
7783         knowledge (supports PC/MSDOS and GPT).
7785         Fix all assumptions that the embed region start at sector 1, using
7786         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7787         rather than `first_start' to calculate available size.
7789         In grub_util_info() message, replace "into after the MBR" with an
7790         indication of the specific sector our embed region starts at.
7792 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7794         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7795         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7796         `commands/reboot.c'.
7797         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7798         (halt_mod_SOURCES): Likewise.
7799         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7800         (halt_mod_SOURCES): Likewise.
7802 2008-02-17  Christian Franke  <franke@computer.org>
7804         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7806 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7808         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7809         set `first_start' to 0 for non-PC/MSDOS partition maps.
7811 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7813         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7814         do not assume partition map is PC/MSDOS before performing checks that
7815         are specific to that layout.
7817 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7819         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7820         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7821         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7823 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7825         * configure.ac: Only a cosmetic change on the handling of
7826         -fno-stack-protector.
7828 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7830         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7831         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7832         reboot.c.
7833         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7834         (halt_mod_SOURCES): New variable.
7835         (halt_mod_CFLAGS): Likewise.
7836         (halt_mod_LDFLAGS): Likewise.
7837         (reboot_mod_SOURCES): Likewise.
7838         (reboot_mod_CFLAGS): Likewise.
7839         (reboot_mod_LDFLAGS): Likewise.
7841         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7842         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7843         reboot.c.
7844         (halt_mod_SOURCES): Likewise.
7845         (reboot_mod_SOURCES): Likewise.
7847         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7848         commands/i386/pc/reboot.c by commands/reboot.c.
7849         (reboot_mod_SOURCES): Likewise.
7851         * commands/i386/pc/reboot.c: merge this file ...
7853         * commands/ieee1275/reboot.c: ... and this file ...
7855         * commands/reboot.c: ... to this file.
7856         Add some precompiler directive to include the correct header for
7857         each machine.
7859         * commands/ieee1275/halt.c: move this file ...
7861         * commands/halt.c: ... to here.
7862         Add some precompiler directive to include the correct header for
7863         each machine.
7865         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7866         (grub_halt): Likewise.
7868         * kern/efi/efi.c (grub_reboot): New function.
7869         (grub_halt): Likewise.
7871 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7873         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7874         /dev (like it is done for /dev/mapper).  This doesn't provide support
7875         for EVMS, but at least it is now easy to identify the problem when it
7876         arises.
7878 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7880         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7881         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7882         comparing it with -1, not 0.
7884 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7886         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7887         `disk/lvm.c'.
7888         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7889         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7891         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7892         `disk/lvm.c' to the end of the list.
7893         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7894         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7896 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7898         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7899         grub_print_error() instead.  This will let user know why we're entering
7900         rescue mode.
7901         Based on suggestions from Sam Morris.
7903 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7905         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7906         on remaining N args, instead of "--" arg N times.
7908 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7910         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7911         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7912         pattern for unknown glyphs.
7914 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7916         * configure.ac: Probe for `help2man'.
7917         * Makefile.in (builddir): New variable.
7918         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7919         or otherwise add a few flags/options to it.
7920         (install-local): For every executable utility or script that is
7921         installed, invoke $(HELP2MAN) to install a manpage based on --help
7922         output.
7924         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7925         that it doesn't prevent --help from working in build tree.
7927         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7928         with `bug-grub@gnu.org'.
7929         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7930         * util/update-grub.in (usage): New function.
7931         Implement proper argument check, with support for --help and --version
7932         (as well as existing -y).
7934 2008-02-09  Christian Franke  <franke@computer.org>
7936         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7937         avoid overwriting previous output.
7938         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7940 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7942         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7943         drawing the menu.
7945 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7947         * commands/sleep.c: New file.
7948         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7949         (sleep_mod_SOURCES): New variable.
7950         (sleep_mod_CFLAGS): Likewise.
7951         (sleep_mod_LDFLAGS): Likewise.
7953 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7955         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7956         situations in which we can deduce the RAID size and the superblock
7957         doesn't match it.
7959 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7961         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7962         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7963         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7965         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7966         and return a grub_diskmemberlist_t composed of physical array members.
7967         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7969         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7970         prototype.
7971         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7972         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7973         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7975         * util/grub-probe.c (probe): Move partmap probing code from here ...
7976         (probe_partmap): ... to here.
7977         (probe): Use probe_partmap() once for the disk we're probing, and
7978         additionally, when such disk contains a memberlist() struct member,
7979         once for each disk that is contained in the structure returned by
7980         memberlist().
7982 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7984         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7985         environment variable to 'all' in order to obtain debug output from
7986         non-util/ code.
7987         * util/i386/pc/grub-setup.c (main): Likewise.
7989 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7991         * disk/raid.c (grub_raid_scan_device): Check for
7992         `array->device[sb.this_disk.number]' rather than for
7993         `array->device[sb.this_disk.number]->name', since the latter is not
7994         guaranteed to be accessible.
7996 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7998         * disk/raid.c: Update copyright.
7999         * fs/cpio.c: Likewise.
8000         * include/grub/raid.h: Likewise.
8001         * loader/i386/pc/multiboot.c: Likewise.
8002         * util/hostfs.c: Likewise.
8004 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8006         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8007         to a grub_disk_t array.
8008         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8009         `device[x]'.
8010         (grub_raid_scan_device): Replace `device[x].name' accesses with
8011         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8013 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8015         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8016         grub_dprintf() calls.
8017         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8018         error message.
8020 2008-02-07  Christian Franke  <franke@computer.org>
8022         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8023         instead of fseek and ftell to support large files.
8024         (grub_hostfs_read): Likewise.
8026 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8028         Patch from Jeroen Dekkers.
8029         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8030         failure, since successfully reading all array members might not be
8031         required.
8033 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8035         * util/grub-probe.c (probe): Simplify partmap probing (with the
8036         assumption that the first word up to the underscore equals to
8037         the module name).
8039 2008-02-06  Christian Franke  <franke@computer.org>
8041         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8042         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8043         last block of a cpio or tar stream.
8044         Check for "TRAILER!!!" instead of any empty data
8045         block to detect last block of a cpio stream.
8046         (grub_cpio_dir): Fix constness of variable np.
8047         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8048         cpio or tar trailer is detected.  This fixes a crash
8049         on open of a non existing file.
8051 2008-02-05  Bean  <bean123ch@gmail.com>
8053         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8054         address of entry.
8055         (grub_multiboot_load_elf64): Likewise.
8056         (grub_multiboot): Initialize mbi structure.
8058         * util/grub-fstest.c: Don't include unused header file script.h.
8060         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8061         of file.
8062         (grub_fstest_SOURCES): Likewise.
8064 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8066         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8067         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8068         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8069         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8071         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8072         (translation_table): Replace hardcoded values with macros
8073         provided by `<grub/term.h>'.
8075         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8076         (keyboard_map): Correct/add a few values, with macros provided
8077         by `<grub/term.h>'.
8078         (keyboard_map_shift): Zero values that don't differ from their
8079         `keyboard_map' equivalents.
8080         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8081         Discard the second scan code that is always sent by Caps lock.
8082         Only use `keyboard_map_shift' when it provides a non-zero value,
8083         otherwise fallback to `keyboard_map'.
8085 2008-02-04  Bean  <bean123ch@gmail.com>
8087         * Makefile.in (enable_grub_fstest): New variable.
8089         * conf/common.rmk (grub_fstest_init.lst): New rule.
8090         (grub_fstest_init.h): Likewise.
8091         (grub_fstest_init.c): Likewise.
8092         (util/grub-fstest.c_DEPENDENCIES): New variable.
8093         (grub_fstest_SOURCES): Likewise.
8095         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8097         * util/grub-fstest.c: New file.
8099 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8101         Make grub-setup handle a separate root device.
8103         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8104         so that the root device can be compared with the destination
8105         device.
8106         When embedding the core image, if the root and destination devices
8107         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8108         0xFF.
8109         When not embedding, set ROOT_DRIVE to 0xFF.
8111 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8113         Add support for having a grub directory in a different drive. This
8114         is still only the data handling part.
8116         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8117         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8118         (grub_root_drive): New variable.
8120         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8121         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8122         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8123         as it was.
8125         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8127         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8128         macro.
8129         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8131         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8132         is bogus, because PXE booting does not specify any drive
8133         correctly.
8135         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8136         am not sure if this is really correct.
8138         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8139         is always identical to the boot drive when booting from a CD.
8141         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8142         longer.
8143         (root_drive): New variable.
8144         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8145         (setup_sectors): Push %dx right after popping it, because %dh will
8146         be modified later.
8147         (copy_buffer): Restore %dx.
8149 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8151         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8152         use `cdboot.img' for cdrom images.
8154 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8156         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8157         only setup gfxterm when `font' command has succeeded.
8159 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8161         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8162         (grub_rescue_cmd_multiboot_loader)
8163         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8165 2008-02-03  Pavel Roskin  <proski@gnu.org>
8167         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8168         %edx and %esi from stack only after grub_gate_a20() is called.
8169         grub_gate_a20() clobbers %edx.
8171 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8173         * configure.ac (AC_INIT): Bumped to 1.96.
8175         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8176         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8177         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8178         video/readers/png.c.
8180 2008-02-03  Bean  <bean123ch@gmail.com>
8182         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8183         (cdboot_img_SOURCES): New variable.
8184         (cdboot_img_ASFLAGS): New variable.
8185         (cdboot_img_LDFLAGS): New variable.
8187         * boot/i386/pc/cdboot.S: New file.
8189         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8190         (cd_count): Likewise.
8191         (grub_biosdisk_get_drive): Add support for cd device.
8192         (grub_biosdisk_call_hook): Likewise.
8193         (grub_biosdisk_iterate): Likewise.
8194         (grub_biosdisk_open): Likewise.
8195         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8196         (grub_biosdisk_rw): Support reading from cd device.
8197         (GRUB_MOD_INIT): Iterate cd devices.
8199         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8200         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8201         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8203         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8205 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8207         * commands/read.c: New file.
8208         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8209         (read_mod_SOURCES): New variable.
8210         (read_mod_CFLAGS): Likewise.
8211         (read_mod_LDFLAGS): Likewise.
8213 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8215         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8216         determining whether menu has to be displayed.
8218 2008-02-02  Marco Gerards  <marco@gnu.org>
8220         * bus/pci.c: New file.
8222         * include/grub/pci.h: Likewise.
8224         * include/grub/i386/pc/pci.h: Likewise.
8226         * commands/lspci.c: Likewise.
8228         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8229         `lspci.mod'.
8230         (pci_mod_SOURCES): New variable.
8231         (pci_mod_CFLAGS): Likewise.
8232         (pci_mod_LDFLAGS): Likewise.
8233         (lspci_mod_SOURCES): Likewise.
8234         (lspci_mod_CFLAGS): Likewise.
8235         (lspci_mod_LDFLAGS): Likewise.
8237 2008-02-02  Bean  <bean123ch@gmail.com>
8239         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8240         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8242         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8243         (grub_xfs_btree_node): New structure.
8244         (grub_xfs_btree_root): New structure.
8245         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8246         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8247         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8248         (GRUB_XFS_EXTENT_SIZE): Likewise.
8249         (grub_xfs_read_block): Support btree format type.
8250         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8251         Use directory block as basic unit.
8253         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8255         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8256         __attribute__ ((__regparm__ (1))).
8258 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8260         Correct a mistake in previous commit.
8262         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8263         top.
8264         (normal/command.c_DEPENDENCIES): New variable.
8266 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8268         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8269         top.
8270         (normal/command.c_DEPENDENCIES): New variable.
8271         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8272         * conf/i386-ieee1275.rmk: Likewise.
8273         * conf/i386-linuxbios.rmk: Likewise.
8274         * conf/i386-pc.rmk: Likewise.
8275         * conf/sparc64-ieee1275.rmk: Likewise.
8276         * conf/powerpc-ieee1275.rmk: Likewise.
8277         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8279         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8281 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8283         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8284         call at beginning of function.
8286 2008-01-31  Pavel Roskin  <proski@gnu.org>
8288         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8289         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8290         (grub_mkrescue_SOURCES): Likewise.
8291         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8293 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8295         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8296         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8297         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8298         (grub_probe_SOURCES): ... to here.
8300         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8301         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8302         * conf/i386-ieee1275.rmk: Likewise.
8303         * conf/i386-linuxbios.rmk: Likewise.
8304         * conf/powerpc-ieee1275.rmk: Likewise.
8306 2008-01-30  Tristan Gingold  <gingold@free.fr>
8308         * kern/rescue.c: Silently accept empty lines.
8310 2008-01-29  Bean  <bean123ch@gmail.com>
8312         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8313         (real_code_2): Code cleanup and change comment style.
8314         (move_memory): Avoid using 32-bit address mode.
8316 2008-01-29  Bean  <bean123ch@gmail.com>
8318         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8319         (png_mod_SOURCES): New variable.
8320         (png_mod_CFLAGS): Likewise.
8321         (png_mod_LDFLAGS): Likewise.
8323         * video/readers/png.c: New file.
8325 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8327         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8328         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8329         `ifndef GRUB_MOD_GAP' hack.
8330         * util/elf/grub-mkimage.c (add_segments): Likewise.
8332 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8334         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8335         `GRUB_MOD_GAP' for platforms in which it's not defined.
8336         * util/elf/grub-mkimage.c (add_segments): Likewise.
8338 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8340         Get grub-emu to build again (including parallel builds).
8342         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8343         Split into ...
8344         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8345         (normal/execute.c_DEPENDENCIES): ... this, ...
8346         (grub-emu_DEPENDENCIES): ... and this.
8348         * conf/i386-efi.rmk: Likewise.
8349         * conf/i386-linuxbios.rmk: Likewise.
8350         * conf/i386-ieee1275.rmk: Likewise.
8351         * conf/powerpc-ieee1275.rmk: Likewise.
8352         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8354 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8356         * NEWS: Add a few items.
8358 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8360         Fix parallel builds with grub-emu.  Based on earlier commit for
8361         grub-probe and grub-setup.
8363         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8364         (util/grub-emu.c_DEPENDENCIES): ... this.
8365         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8366         (util/grub-emu.c_DEPENDENCIES): ... this.
8367         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8368         (util/grub-emu.c_DEPENDENCIES): ... this.
8369         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8370         (util/grub-emu.c_DEPENDENCIES): ... this.
8371         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8372         (util/grub-emu.c_DEPENDENCIES): ... this.
8374 2008-01-27  Pavel Roskin  <proski@gnu.org>
8376         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8377         to create a gap between _end and the modules added to the image
8378         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8379         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8380         * util/elf/grub-mkimage.c (add_segments): Likewise.
8382 2008-01-26  Pavel Roskin  <proski@gnu.org>
8384         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8385         just return an error.
8387 2008-01-26  Bean  <bean123ch@gmail.com>
8389         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8390         (grub_reiserfs_get_item): Save offset of the next item.
8391         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8393 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8395         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8396         make all filesystem sources appear together (possibly fixing omissions
8397         while at it).
8398         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8399         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8400         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8401         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8403         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8404         add `kern/file.c'.
8405         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8406         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8407         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8408         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8410         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8411         (probe): Add a sanity check to make sure of our ability to read
8412         requested files when probing for filesystem type.
8414         * genmk.rb: Update copyright year (2007).
8416         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8417         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8418         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8419         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8420         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8421         : Remove function prototypes.
8423 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8425         Revert my previous commits (based on wrong assumption of how grub_errno
8426         works).
8428         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8429         * kern/file.c (grub_file_open): Likewise.
8431 2008-01-24  Pavel Roskin  <proski@gnu.org>
8433         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8434         that hang if GRUB tries to setup colors.
8435         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8436         colors for firmwares that don't support it.
8437         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8438         Recognize Open Hack'Ware, set flags to work around its
8439         limitations.
8441 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8443         * kern/file.c (grub_file_open): Do not account previous failures of
8444         unrelated functions when grub_errno is checked for.
8445         Reported by Oleg Strikov.
8447 2008-01-24  Bean  <bean123ch@gmail.com>
8449         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8450         (grub_ufs_sblock): New member volume name.
8451         (grub_ufs_find_file): Fix string copy bug.
8452         (grub_ufs_label): Implement this function properly.
8454         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8455         (grub_hfs_iterate_records): Use the correct file number for extents
8456         and catalog file. Fix problem in next index calculation.
8457         (grub_hfs_find_node): Replace recursive function call with loop.
8458         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8460 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8462         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8463         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8464         (grub_multiboot2_real_boot): New function prototype.
8466         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8467         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8469         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8470         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8472 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8474         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8475         #ifdef'ed out grub_printf().
8477 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8479         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8480         grub_dprintf calls, since they make "debug=all" mode unusable.
8481         (grub_console_checkkey): Likewise.
8483 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8485         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8486         `term/i386/pc/at_keyboard.c'.
8487         (pkglib_MODULES): Add `serial.mod'.
8488         (serial_mod_SOURCES): New variable.
8489         (serial_mod_CFLAGS): Likewise.
8490         (serial_mod_LDFLAGS): Likewise.
8492         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8493         `<grub/powerpc/ieee1275/console.h>'.
8494         (grub_keyboard_controller_init): New function prototype.
8495         (grub_console_checkkey): Likewise.
8496         (grub_console_getkey): Likewise.
8498         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8499         keyboard on i386.
8501         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8502         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8504 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8506         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8507         present, "(memdisk)/boot/grub" becomes the default prefix.
8509         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8510         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8511         allows users to overlay additional files into the image.
8513 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8515         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8516         and `machine/memory.h'.
8517         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8518         (_multiboot_mod_SOURCES): New variable.
8519         (_multiboot_mod_CFLAGS): Likewise.
8520         (_multiboot_mod_LDFLAGS): Likewise.
8521         (multiboot_mod_SOURCES): Likewise.
8522         (multiboot_mod_CFLAGS): Likewise.
8523         (multiboot_mod_LDFLAGS): Likewise.
8525         * include/grub/i386/ieee1275/loader.h: New file.
8527         * include/grub/i386/ieee1275/machine.h: Likewise.
8529         * include/grub/i386/ieee1275/memory.h: Likewise.
8531         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8532         variable declaration.
8533         (grub_os_area_size): Likewise.
8535         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8536         (grub_lower_mem, grub_upper_mem): New variables.
8537         (grub_stop_floppy): New function (just to make
8538         grub_multiboot2_real_boot() happy).
8540         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8541         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8542         (grub_stop): New function.
8543         Include `"../realmode.S"' and `"../loader.S"'.
8545         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8546         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8548         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8549         rely on grub_multiboot2_real_boot() for final boot.
8551 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8553         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8554         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8555         device that doesn't look like an SD card.
8556         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8557         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8558         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8559         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8560         found.
8562 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8564         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8565         avoid claiming over our own code.
8567 2008-01-22  Bean  <bean123ch@gmail.com>
8569         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8570         (jpeg_mod_SOURCES): New variable.
8571         (jpeg_mod_CFLAGS): Likewise.
8572         (jpeg_mod_LDFLAGS): Likewise.
8574         * video/readers/jpeg.c : New file.
8576 2008-01-22  Bean  <bean123ch@gmail.com>
8578         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8579         there are no more items.
8581 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8583         * kern/mm.c (grub_mm_init_region): Improve debug message.
8585 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8587         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8588         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8589         address.
8590         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8591         a C macro.
8592         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8593         Indicates start of upper memory.
8594         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8595         (generate_image): Abort when image size is big enough to corrupt
8596         upper memory.
8598         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8599         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8600         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8601         instead of hardcoding 0xA0000.
8602         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8603         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8604         instead of hardcoding 0xA0000.
8606 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8608         * disk/memdisk.c (memdisk_size): New variable.
8609         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8610         `memdisk_size'.
8611         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8612         image to dynamic memory.
8613         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8614         `memdisk_size'.  Free memdisk block.
8616 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8618         Fix detection of very small filesystems (like tar).
8620         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8621         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8622         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8623         a problem with this disk).
8625 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8627         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8628         on grub_biosdisk_rw_standard() error.
8630 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8632         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8633         recent changes.
8634         * kern/elf.c: Likewise.
8635         * kern/ieee1275/ieee1275.c: Likewise.
8636         * kern/powerpc/ieee1275/openfw.c: Likewise.
8637         * term/ieee1275/ofconsole.c: Likewise.
8639 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8641         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8643         * include/grub/kernel.h (grub_arch_memdisk_addr)
8644         (grub_arch_memdisk_size): Moved from here ...
8646         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8647         (grub_arch_memdisk_size): ... to here.
8649 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8651         Mostly based on bugfix from Bean.
8653         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8654         attribute with hook() parameter.
8655         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8656         declaration.
8657         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8658         attribute with hook() parameter.
8659         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8660         declaration.
8662 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8664         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8665         (pkglib_MODULES): Add `memdisk.mod'.
8666         (memdisk_mod_SOURCES): New variable.
8667         (memdisk_mod_CFLAGS): Likewise.
8668         (memdisk_mod_LDFLAGS): Likewise.
8670         * disk/memdisk.c: New file.
8672         * include/grub/disk.h (grub_disk_dev_id): Add
8673         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8675         * include/grub/i386/pc/kernel.h
8676         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8677         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8678         (grub_kernel_image_size): New variable declaration.
8679         (grub_total_module_size): Likewise.
8680         (grub_memdisk_image_size): Likewise.
8682         * include/grub/i386/pc/memory.h
8683         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8685         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8686         (grub_arch_memdisk_addr): New variable declaration.
8687         (grub_arch_memdisk_size): Likewise.
8689         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8690         (grub_arch_memdisk_size): Likewise.
8692         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8693         (codestart): Replace hardcoded `0x100000' with
8694         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8696         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8697         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8698         not NULL, append the contents of the file it refers to, at the end of
8699         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8700         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8701         (options): Add "memdisk"|'m' option.
8702         (main): Parse --memdisk|-m option, and pass user-provided path as
8703         parameter to generate_image().
8705 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8707         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8708         grub_dprintf() calls from here ...
8709         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8711 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8713         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8715         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8716         declaration.
8717         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8718         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8719         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8720         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8721         property).
8722         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8723         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8725 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8727         Get rid of confusing function (superseded by
8728         `grub_ieee1275_get_integer_property')
8729         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8730         prototype.
8731         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8732         function.
8733         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8734         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8735         in native endianness from grub_ieee1275_get_integer_property().
8737 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8739         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8740         command after "shut-down", since implementations differ on which
8741         the command for halt is.
8743 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8745         * include/grub/i386/linuxbios/console.h: Add header protection.
8746         (grub_keyboard_controller_init): New function prototype.
8747         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8748         (KEYBOARD_COMMAND_READ): Likewise.
8749         (KEYBOARD_COMMAND_WRITE): Likewise.
8750         (KEYBOARD_SCANCODE_SET1): Likewise.
8751         (grub_keyboard_controller_write): New function.
8752         (grub_keyboard_controller_read): Likewise.
8753         (grub_keyboard_controller_init): Likewise.
8755         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8756         (grub_console_init): On coreboot/LinuxBIOS, call
8757         grub_keyboard_controller_init().
8759 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8761         PowerPC changes provided by Pavel Roskin.
8763         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8764         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8765         don't rely on cmain() doing it.
8766         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8767         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8769 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8771         * include/grub/i386/linuxbios/memory.h
8772         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8773         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8774         receive `table_header' as argument.  Instead, probe for it in the
8775         known memory ranges where it can be present.
8776         (grub_available_iterate): Do not pass a fixed `table_header' address
8777         to grub_linuxbios_table_iterate().
8779 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8781         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8782         * conf/i386-ieee1275.rmk: New file.
8783         * include/grub/i386/ieee1275/console.h: Likewise.
8784         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8785         * include/grub/i386/ieee1275/kernel.h: Likewise.
8786         * include/grub/i386/ieee1275/time.h: Likewise.
8787         * kern/i386/ieee1275/init.c: Likewise.
8788         * kern/i386/ieee1275/startup.S: Likewise.
8790 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8792         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8793         when pointers are 32-bit (but still do set it to one when they are
8794         64-bit).
8796 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8798         * include/grub/ieee1275/ieee1275.h
8799         (grub_ieee1275_get_integer_property): New function prototype.
8801         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8802         (grub_ieee1275_get_integer_property): New function.  Wraps around
8803         grub_ieee1275_get_property() to handle endianness.
8805         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8806         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8807         where appropriate.
8808         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8809         (grub_map): Likewise.
8810         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8812 2008-01-15  Bean  <bean123ch@gmail.com>
8814         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8815         (grub_script_execute_cmdline): Reset grub_errno.
8817         * normal/main.c (read_config_file): Reset grub_errno.
8819         * normal/parse.y (script_init): New.
8820         (script): Move function and menuentry here.
8821         (delimiter): New.
8822         (command): Add delimiter at the end of command.
8823         (commands): Adjust to match the new command.
8824         (commandblock): Remove grub_script_lexer_record_start.
8825         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8826         (if): Use the new commands.
8828         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8830 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8832         * normal/menu.c (run_menu): Move timeout message from here ...
8833         (print_timeout): ... to here.
8834         (run_menu): Use print_timeout() once during initial draw to print
8835         the whole message, and again in every clock tick to update only
8836         the number of seconds.
8838 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8840         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8841         actual size of `available' from grub_ieee1275_get_property(), and
8842         restrict parsing to that bound.
8844 2008-01-15  Christian Franke  <franke@computer.org>
8846         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8847         (argp_program_version): Remove variable.
8848         (argp_program_bug_address): Likewise.
8849         (options): Convert from struct argp_option to struct option.
8850         (struct arguments): Remove.
8851         (parse_opt): Remove.
8852         (usage): New function.
8853         (main): Replace struct args members by simple variables.
8854         Replace argp_parse() by getopt_long().
8855         Add switch to evaluate options.
8856         Add missing "(...)" around root_dev in prefix string.
8858 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8860         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8861         for grub_ieee1275_exit(), in order to improve portability.
8863 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8865         * util/grub.d/10_linux.in (prefix): Define.
8866         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8868 2008-01-13  Pavel Roskin  <proski@gnu.org>
8870         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8871         grub_errno if no errors have been detected.
8873 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8875         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8876         (grub_util_get_dev_abstraction): New function prototype.
8878         * util/getroot.c: Include `<grub/util/getroot.h>'
8879         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8880         (grub_util_get_dev_abstraction): ... here (new function).
8882         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8883         `PRINT_ABSTRACTION'.
8884         (probe): Probe for abstraction type when requested.
8885         (main): Understand `--target=abstraction'.
8887         * util/i386/efi/grub-install.in: Add abstraction module to core
8888         image when it is found to be necessary.
8889         * util/i386/pc/grub-install.in: Likewise.
8890         * util/powerpc/ieee1275/grub-install.in: Likewise.
8892         * util/update-grub_lib.in (font_path): Return system path without
8893         converting to GRUB path.
8894         * util/update-grub.in: Convert system path returned by font_path()
8895         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8896         abstraction module is needed for loading fonts (if any).  Export
8897         that as `GRUB_PRELOAD_MODULES'.
8898         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8899         insmod commands).
8901 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8903         Remove some unused code from reiserfs.
8905         * fs/reiserfs.c (struct grub_reiserfs_key)
8906         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8907         (struct grub_reiserfs_node_body): Removed.
8908         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8909         Likewise.
8910         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8911         Likewise.
8912         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8913         Likewise.
8914         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8915         Likewise.
8916         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8917         Likewise.
8918         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8919         Likewise.
8920         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8921         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8922         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8924 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8926         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8927         Determines if a file is garbage left by packaging systems, etc.
8928         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8929         for processing /etc/grub.d scripts.
8930         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8931         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8932         as a condition for processing Linux images.
8934 2008-01-10  Pavel Roskin  <proski@gnu.org>
8936         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8937         to compile reiserfs.c on PowerPC.
8939 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8941         * kern/device.c (grub_device_iterate): Do not abort device iteration
8942         when one of the devices cannot be opened.
8943         * kern/disk.c (grub_disk_open): Do not account previous failures of
8944         unrelated functions when grub_errno is checked for.
8946 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8948         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8949         `! grub_linux_is_bzimage', change order of address comparison to make
8950         it more intuitive, and improve "too big zImage" error message.
8952 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8954         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8955         `$(update-grub_DATA)'.
8956         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8957         targets.
8959 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8961         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8962         which instruction is modified by grub-setup during installation
8963         (since it wasn't obvious by only looking at this file).
8965 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8967         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8968         listing actual TODO items.
8970 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8972         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8973         correctly.
8974         (grub_reiserfs_get_key_offset): Likewise.
8975         (grub_reiserfs_set_key_offset): Likewise.
8976         (grub_reiserfs_set_key_type): Likewise.
8977         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8979         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8980         better to remove the bitfield version completely.
8982 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8984         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8985         allocated from the heap, due to the fshelp implementation.
8986         (grub_reiserfs_dir): Free NODE, due to the same reason.
8988 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8990         Mostly from Vincent Pelletier:
8992         * fs/reiserfs.c: New file.
8994         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8995         (reiserfs_mod_SOURCES): New variable.
8996         (reiserfs_mod_CFLAGS): Likewise.
8997         (reiserfs_mod_LDFLAGS): Likewise.
8999         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9000         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9001         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9002         normal/color.c.
9004 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9006         * normal/color.c: Remove `<grub/env.h>'.
9008 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9010         * include/grub/normal.h: Include <grub/env.h>.
9012 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9014         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9015         usage example with `(hd0,1)'.
9016         Reported by Samuel Thibault.
9018 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9020         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9021         (grub_linux_boot_zimage): Rename to ...
9022         (grub_linux_boot): ... this.
9023         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9024         (grub_linux_boot_zimage): Conditionalize zImage copy.
9026         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9027         (grub_linux_boot_bzimage): Remove prototype.
9028         (grub_linux_boot_zimage): Rename to ...
9029         (grub_linux_boot): ... this.
9031         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9032         (grub_linux_boot): Remove function.
9034 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9036         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9037         (grub_env_write_color_highlight): Likewise.
9038         (grub_wait_after_message): Likewise.
9040         * normal/color.c: New file.
9042         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9043         (normal_mod_DEPENDENCIES): Likewise.
9045         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9046         (normal_mod_DEPENDENCIES): Likewise.
9048         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9049         (normal_mod_DEPENDENCIES): Likewise.
9051         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9052         (normal_mod_DEPENDENCIES): Likewise.
9054         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9055         for waiting after a message is printed.
9056         * normal/main.c (read_config_file): Likewise.
9057         (grub_normal_init): Register grub_env_write_color_normal() and
9058         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9059         `color_highlight' variables as global.
9061         * normal/menu.c (grub_wait_after_message): New function.
9062         (grub_color_menu_normal): New variable.  Replaces ...
9063         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9064         (grub_color_menu_highlight): New variable.  Replaces ...
9065         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9066         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9067         `GRUB_TERM_COLOR_STANDARD'.
9068         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9069         `normal_code' and `highlight_code' to `old_color_normal' and
9070         `old_color_highlight', respectively.
9071         (grub_menu_init_page): Update colors when drawing the menu, based on
9072         `menu_color_normal' and `menu_color_highlight' variables.
9073         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9074         a message is printed.
9076 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9078         * kern/env.c (grub_env_context_open): Propagate hooks for global
9079         variables to new context.
9081         * kern/main.c (grub_set_root_dev): Export `root' variable.
9083 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9085         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9086         discs unconditionally, since udev and others have options to provide
9087         them.
9089 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9091         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9093 2008-01-04  Christian Franke  <franke@computer.org>
9095         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9096         of eisa_mmap.
9098 2008-01-03  Pavel Roskin  <proski@gnu.org>
9100         * kern/i386/linuxbios/init.c: Put "void" to all function
9101         declarations with no arguments.
9102         * kern/powerpc/ieee1275/init.c: Likewise.
9103         * term/i386/pc/at_keyboard.c: Likewise.
9104         * term/i386/pc/vga_text.c: Likewise.
9105         * util/grub-mkdevicemap.c: Likewise.
9107 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9109         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9110         message when loaded image is out of bounds.
9111         (grub_multiboot_load_elf64): Likewise.
9113 2008-01-02  Pavel Roskin  <proski@gnu.org>
9115         * util/grub.d/10_linux.in: Try version without ".old" when
9116         looking for initrd.  It's better to use initrd from the newer
9117         kernel of the same version than no initrd at all.
9119 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9121         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9123 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9125         * include/grub/video.h: Added grub_video_unmap_color and
9126         grub_video_get_active_render_target.
9127         (grub_video_adapter): Added unmap_color and get_active_render_target.
9129         * video/video.c: Added grub_video_unmap_color and
9130         grub_video_get_active_render_target.
9131         (grub_video_get_info): Changed method to accept NULL pointer as an
9132         argument to allow detection of active video adapter.
9134         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9135         grub_video_vbe_unmap_color_int.
9136         Added grub_video_vbe_unmap_color and
9137         grub_video_vbe_get_active_render_target.
9138         (grub_video_vbe_adapter): Added unmap_color and
9139         get_active_render_target.
9141         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9142         with grub_video_vbe_unmap_color_int.
9144         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9145         (DEFAULT_NORMAL_COLOR): Likewise.
9146         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9147         (DEFAULT_FG_COLOR): Removed.
9148         (DEFAULT_BG_COLOR): Likewise.
9149         (DEFAULT_CURSOR_COLOR): Changed value.
9150         (grub_virtual_screen): Added standard_color_setting,
9151         normal_color_setting, highlight_color_setting and term_color.
9152         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9153         (bitmap_width): Added.
9154         (bitmap_height): Likewise.
9155         (bitmap): Likewise.
9156         (set_term_color): Likewise.
9157         (grub_virtual_screen_setup): Changed to use new terminal coloring
9158         settings.
9159         (grub_gfxterm_init): Added init for bitmap.
9160         (grub_gfxterm_fini): Added destroy for bitmap.
9161         (redraw_screen_rect): Updated to use background bitmap and new
9162         terminal coloring.
9163         (scroll_up): Added optimization for case when there is no bitmap.
9164         (grub_gfxterm_cls): Fixed to use correct background color.
9165         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9166         coloring.
9167         (grub_virtual_screen_setcolor): Likewise.
9168         (grub_virtual_screen_getcolor): Added.
9169         (grub_gfxterm_background_image_cmd): Likewise.
9170         (grub_video_term): Added setcolor and getcolor.
9171         (MOD_INIT): Added registration of background_image command.
9172         (MOD_TERM): Added unregistration for background_image command.
9174 2007-12-30  Pavel Roskin  <proski@gnu.org>
9176         * loader/multiboot_loader.c: Fix multiboot command
9177         unregistration.  Fix all typos in the word "multiboot".
9179 2007-12-29  Pavel Roskin  <proski@gnu.org>
9181         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9182         support for initrd names used in Fedora.
9184 2007-12-26  Bean  <bean123ch@gmail.com>
9186         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9187         (cpio_mod_SOURCES): New variable.
9188         (cpio_mod_CFLAGS): Likewise.
9189         (cpio_mod_LDFLAGS): Likewise.
9191         * fs/cpio.c: New file.
9193         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9195         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9197         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9199         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9201 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9203         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9204         (grub_getcolor): New function.
9206         * kern/term.c (grub_getcolor): New function.
9207         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9208         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9209         (print_entry): Set normal and highlight colors to
9210         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9211         respectively, before printing and restore them to old
9212         values afterwards.
9213         (grub_menu_init_page): Likewise.  Fill an additional colored space
9214         that would otherwise be left blank.
9216         * term/efi/console.c (grub_console_getcolor): New function.
9217         (struct grub_console_term.getcolor): New variable.
9218         * term/i386/pc/console.c (grub_console_getcolor): New function.
9219         (struct grub_console_term.getcolor): New variable.
9220         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9221         (struct grub_console_term.getcolor): New variable.
9223         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9224         (struct grub_console_term.setcolor): Remove variable.
9225         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9226         (struct grub_console_term.setcolor): Remove variable.
9227         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9228         (struct grub_console_term.setcolor): Remove variable.
9229         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9230         (struct grub_console_term.setcolor): Remove variable.
9232 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9234         * configure.ac: Search for possible unifont.hex locations, and
9235         define UNIFONT_HEX if found.
9237         * Makefile.in (UNIFONT_HEX): Define variable.
9238         (DATA): Rename to ...
9239         (PKGLIB): ... this.  Update all users.
9240         (PKGDATA): New variable.
9241         (pkgdata_IMAGES): Rename to ...
9242         (pkglib_IMAGES): ... this. Update all users.
9243         (pkgdata_MODULES): Rename to ...
9244         (pkglib_MODULES): ... this. Update all users.
9245         (pkgdata_PROGRAMS): Rename to ...
9246         (pkglib_PROGRAMS): ... this. Update all users.
9247         (pkgdata_DATA): Rename to ...
9248         (pkglib_DATA): ... this. Update all users.
9249         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9250         (unicode.pff, ascii.pff): New rules.
9251         (all-local): Add `$(PKGDATA)' dependency.
9252         (install-local): Process `$(PKGDATA)'.
9254         * util/update-grub_lib.in (font_path): Search for *.pff files in
9255         a few more locations, including `${pkgdata}'.
9257 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9259         Patch from Bean  <bean123ch@gmail.com>:
9260         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9261         `size'.
9263 2007-12-21  Bean  <bean123ch@gmail.com>
9265         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9266         (ntfscomp_mod_SOURCES): New variable.
9267         (ntfscomp_mod_CFLAGS): Likewise.
9268         (ntfscomp_mod_LDFLAGS): Likewise.
9270         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9271         (grub_probe_SOURCES): Likewise.
9272         (grub_emu_SOURCES): Likewise.
9274         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9275         (grub_emu_SOURCES): Likewise.
9277         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9278         (grub_emu_SOURCES): Likewise.
9280         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9281         (grub_emu_SOURCES): Likewise.
9283         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9284         (read_run_list): Renamed to grub_ntfs_read_run_list.
9285         (decomp_nextvcn): Moved to ntfscomp.c.
9286         (decomp_getch): Likewise.
9287         (decomp_get16): Likewise.
9288         (decomp_block): Likewise.
9289         (read_block): Likewise.
9290         (read_data): Partially moved to ntfscomp.c.
9291         (fixup): Change unsigned to grub_uint16_t.
9292         (read_mft): Change unsigned long to grub_uint32_t.
9293         (read_attr): Likewise.
9294         (read_data): Likewise.
9295         (read_run_data): Likewise.
9296         (read_run_list): Likewise.
9297         (read_mft): Likewise.
9299         * fs/ntfscomp.c: New file.
9301         * include/grub/ntfs.h: New file.
9303 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9305         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9306         IDE disk check, since Linux is known to support 20 IDE disks.
9307         Reported by Colin Watson.
9309 2007-12-15  Bean  <bean123ch@gmail.com>
9311         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9312         (lnxboot_img_SOURCES): New variable.
9313         (lnxboot_img_ASFLAGS): Likewise.
9314         (lnxboot_img_LDFLAGS): Likewise.
9316         * boot/i386/pc/lnxboot.S: New file.
9318 2007-11-24  Pavel Roskin  <proski@gnu.org>
9320         * configure.ac: Test if '--build-id=none' is supported by the
9321         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9322         objcopy to generate incorrect binary files (binutils
9323         2.17.50.0.18-1 as shipped by Fedora 8).
9324         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9325         linking, so that build ID doesn't break the test.
9327 2007-11-24  Pavel Roskin  <proski@gnu.org>
9329         * include/grub/i386/time.h: use "void" in the argument list
9330         of grub_cpu_idle().
9331         * include/grub/powerpc/time.h: Likewise.
9332         * include/grub/sparc64/time.h: Likewise.
9334 2007-11-18  Christian Franke  <franke@computer.org>
9336         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9337         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9338         This fixes the problem that function keys did not work in grub-emu.
9340 2007-11-18  Christian Franke  <franke@computer.org>
9342         * disk/host.c (grub_host_open): Remove attribute unused from
9343         name parameter. Add check for "host". This fixes the problem
9344         that grub-emu does not find partitions.
9346 2007-11-18  Christian Franke  <franke@computer.org>
9348         * util/hostfs.c (is_dir): New function.
9349         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9350         (grub_hostfs_read): Add missing fseek().
9351         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9352         of grub-emu on "ls (host)".
9354 2007-11-18  Christian Franke  <franke@computer.org>
9356         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9357         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9358         to 64 bit boundary by default.
9360 2007-11-18  Bean  <bean123ch@gmail.com>
9362         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9363         (hexdump_mod_SOURCES): New variable.
9364         (hexdump_mod_CFLAGS): Likewise.
9365         (hexdump_mod_LDFLAGS): Likewise.
9367         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9369         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9371         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9373         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9375         * include/grub/hexdump.h: New file.
9377         * commands/hexdump.c: New file.
9379 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9381         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9382         in grub_outb() calls.
9383         (beep_on): Likewise.
9385 2007-11-10  Christian Franke  <franke@computer.org>
9387         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9388         (grub_menu_run): Likewise.
9390 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9392         * include/grub/i386/efi/machine.h: New file.
9393         * include/grub/i386/linuxbios/machine.h: Likewise.
9394         * include/grub/i386/pc/machine.h: Likewise.
9395         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9396         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9398         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9399         (serial_hw_io_addr): New variable.
9400         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9401         instead of `(unsigned short *) 0x400'.
9403 2007-11-10  Bean  <bean123ch@gmail.com>
9405         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9407 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9409         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9410         (vga_mod_SOURCES): Added.
9411         (vga_mod_CFLAGS): Likewise.
9412         (vga_mod_LDFLAGS): Likewise.
9414         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9415         grub_outb() calls.
9416         (set_map_mask): Likewise.
9417         (set_read_map): Likewise.
9418         (set_read_address): Likewise.
9419         (vga_font): Removed variable.
9420         (get_vga_glyph): Removed function.
9421         (invalidate_char): Likewise.
9422         (write_char): Changed to use grub_font_get_glyph() for font
9423         information.
9424         (grub_vga_putchar): Likewise.
9425         (grub_vga_getcharwidth): Likewise.
9427 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9429         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9430         flags.
9431         (pxeboot_img_LDFLAGS): Likewise.
9432         (diskboot_img_LDFLAGS): Likewise.
9433         (kernel_img_LDFLAGS): Likewise.
9435 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9437         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9438         in grub_outb() calls.
9439         (serial_hw_init): Likewise.
9441 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9443         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9444         spaces.  Skip non-regular files.
9446 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9448         * kern/disk.c (grub_disk_firmware_fini)
9449         (grub_disk_firmware_is_tainted): New variables.
9451         * include/grub/disk.h (grub_disk_firmware_fini)
9452         (grub_disk_firmware_is_tainted): Likewise.
9454         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9455         (grub_disk_biosdisk_fini): ... to here.
9456         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9457         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9458         is set.  Register grub_disk_biosdisk_fini() in
9459         `grub_disk_firmware_fini'.
9461         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9462         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9463         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9464         to finish existing firmware disk interface.
9466         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9467         (ata_mod_SOURCES): New variable.
9468         (ata_mod_CFLAGS): Likewise.
9469         (ata_mod_LDFLAGS): Likewise.
9471 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9473         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9474         (grub_ata_wait): Reimplement using grub_millisleep().
9476         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9477         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9479 2007-11-03  Marco Gerards  <marco@gnu.org>
9481         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9482         (CRTC_ADDR_PORT): New macro.
9483         (CRTC_DATA_PORT): Likewise.
9484         (CRTC_CURSOR): Likewise.
9485         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9486         (CRTC_CURSOR_ADDR_LOW): Likewise.
9487         (update_cursor): New function.
9488         (grub_console_real_putchar): Call `update_cursor'.
9489         (grub_console_gotoxy): Likewise.
9490         (grub_console_cls): Set the default color when clearing the
9491         screen.
9492         (grub_console_setcursor): Implemented.
9494 2007-11-03  Marco Gerards  <marco@gnu.org>
9496         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9497         become activate.
9498         (grub_ata_pio_write): Likewise.
9500         (grub_atapi_identify): Wait after issuing an ATA command.
9501         (grub_atapi_packet): Likewise.
9502         (grub_ata_identify): Likewise.
9503         (grub_ata_readwrite): Likewise.
9505 2007-11-03  Marco Gerards  <marco@gnu.org>
9507         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9508         (grub_ata_pio_write): Likewise.
9509         (grub_ata_readwrite): Use `grub_error', instead of
9510         returning `grub_errno'.
9512 2007-11-03  Marco Gerards  <marco@gnu.org>
9514         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9515         grub_ata_pio_write once for every single sector, instead of for
9516         multiple sectors.
9518 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9520         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9522         * conf/i386-linuxbios.rmk: New file.
9524         * kern/i386/pc/hardware.c: Likewise.
9525         * term/i386/pc/at_keyboard.c: Likewise.
9526         * term/i386/pc/vga_text.c: Likewise.
9528         * include/grub/i386/linuxbios/boot.h: Likewise.
9529         * include/grub/i386/linuxbios/console.h: Likewise.
9530         * include/grub/i386/linuxbios/init.h: Likewise.
9531         * include/grub/i386/linuxbios/kernel.h: Likewise.
9532         * include/grub/i386/linuxbios/loader.h: Likewise.
9533         * include/grub/i386/linuxbios/memory.h: Likewise.
9534         * include/grub/i386/linuxbios/serial.h: Likewise.
9535         * include/grub/i386/linuxbios/time.h: Likewise.
9537         * kern/i386/linuxbios/init.c: Likewise.
9538         * kern/i386/linuxbios/startup.S: Likewise.
9539         * kern/i386/linuxbios/table.c: Likewise.
9541 2007-10-31  Marco Gerards  <marco@gnu.org>
9543         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9544         (ata_mod_SOURCES): New variable.
9545         (ata_mod_CFLAGS): Likewise.
9546         (ata_mod_LDFLAGS): Likewise.
9548         * disk/ata.c: New file.
9550         * include/grub/disk.h (grub_disk_dev_id): Add
9551         `GRUB_DISK_DEV_ATA_ID'.
9553 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9555         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9556         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9558         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9559         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9561         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9562         `<grub/types.h>'.
9564         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9566 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9568         * include/grub/types.h (ULONG_MAX): Define macro.
9570 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9572         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9573         `"../realmode.S"'.
9574         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9576 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9578         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9579         (pkgdata_MODULES): Add `biosdisk.mod'.
9580         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9581         variables.
9583         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9584         (grub_biosdisk_init): Replace with ...
9585         (GRUB_MOD_INIT(biosdisk)): ... this.
9586         (grub_biosdisk_fini): Replace with ...
9587         (GRUB_MOD_FINI(biosdisk)): ... this.
9589         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9590         (grub_machine_init): Remove call to grub_biosdisk_init().
9591         (grub_machine_fini): Remove call to grub_machine_fini().
9593         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9595 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9597         * include/grub/time.h: New file.
9598         * include/grub/i386/time.h: Likewise.
9599         * include/grub/powerpc/time.h: Likewise.
9600         * include/grub/sparc64/time.h: Likewise.
9602         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9603         instances to ...
9604         (KERNEL_MACHINE_TIME_HEADER): ... this.
9605         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9606         instances to ...
9607         (KERNEL_MACHINE_TIME_HEADER): ... this.
9608         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9609         instances to ...
9610         (KERNEL_MACHINE_TIME_HEADER): ... this.
9612         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9613         (grub_millisleep): New function.
9614         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9615         (grub_millisleep): New function.
9616         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9617         Remove `grub/machine/time.h' include.
9618         (grub_millisleep): New function.
9619         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9620         Remove `grub/machine/time.h' include.
9621         (grub_millisleep): New function.
9623         * include/grub/misc.h (grub_div_roundup): New function.
9625         * kern/misc.c: Include `<grub/time.h>'.
9626         (grub_millisleep_generic): New function.
9628         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9629         Add `time.h'.
9630         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9631         Add `time.h'.
9632         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9633         `machine/time.h'.  Add `time.h'.
9634         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9636 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9638         * include/grub/misc.h (grub_max): New function.
9640 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9642         * util/misc.c (grub_util_info): Call fflush() before returning.
9644 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9646         * genmk.rb (Image): Copy `extra_flags' from here ...
9647         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9649         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9650         to `argc' and `args' arguments.
9652 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9654         * kern/i386/loader.S: New file.
9656         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9657         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9658         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9659         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9660         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9661         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9662         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9663         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9664         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9665         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9666         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9667         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9668         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9669         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9671         * kern/i386/realmode.S: New file.
9673         * kern/i386/pc/startup.S (protstack): Moved from here ...
9674         * kern/i386/realmode.S (protstack)... to here.
9675         * kern/i386/pc/startup.S (gdt): Moved from here ...
9676         * kern/i386/realmode.S (gdt)... to here.
9677         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9678         * kern/i386/realmode.S (prot_to_real)... to here.
9680         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9681         `kern/i386/realmode.S'.
9683 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9685         * include/grub/i386/loader.h: New file.
9687         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9688         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9689         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9690         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9691         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9692         * include/grub/i386/loader.h (grub_linux_prot_size)
9693         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9694         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9695         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9696         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9698         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9700 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9702         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9703         filesystem when dev->disk is unset.
9704         Do probe for filesystem even when dev->disk->has_partitions is set.
9705         In case a filesystem is found, always report it.
9706         In case it isn't, if dev->disk->has_partitions is set, report that
9707         a partition table was found instead of reporting that no filesystem
9708         could be identified.
9710 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9712         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9713         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9715         * include/grub/types.h (grub_host_to_target16): New macro.
9716         (grub_host_to_target32): Likewise.
9717         (grub_host_to_target64): Likewise.
9718         (grub_target_to_host16): Likewise.
9719         (grub_target_to_host32): Likewise.
9720         (grub_target_to_host64): Likewise.
9722         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9723         Renamed from to ...
9724         (GRUB_MOD_ALIGN): ...this.  Update all users.
9726         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9727         grub_host_to_target32.
9728         Replace grub_be_to_cpu32 with grub_target_to_host32.
9729         (load_modules): Likewise.
9730         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9731         Replace grub_be_to_cpu32 with grub_target_to_host32.
9732         Replace grub_cpu_to_be16 with grub_host_to_target16.
9733         Replace grub_cpu_to_be32 grub_host_to_target32.
9735 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9737         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9738         * util/elf/grub-mkimage.c: ... here.
9740         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9741         `util/powerpc/ieee1275/grub-mkimage.c'.
9743 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9745         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9746         and make it easier to figure out.
9747         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9748         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9749         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9750         leave us with less than HEAP_MIN_SIZE total heap.
9751         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9753 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9755         * include/grub/i386/io.h: New file.
9756         * commands/i386/pc/play.c (inb): Removed.
9757         (outb): Removed.
9758         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9759         with grub_outb().
9760         * term/i386/pc/serial.c  (inb): Removed.
9761         (outb): Removed.
9762         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9763         with grub_outb().
9764         * term/i386/pc/vga.c  (inb): Removed.
9765         (outb): Removed.
9766         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9767         with grub_outb().
9769 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9771         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9772         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9773         Reported by Marcin Kurek.
9775 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9777         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9778         SmartFirmware version updates (as released by Sven Luther), and avoid
9779         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9780         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9781         known broken.
9783 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9785         From Hitoshi Ozeki:
9786         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9787         when merging two regions.
9789 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9791         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9792         * normal/completion.c (grub_normal_do_completion): Likewise.
9793         Reported by Hitoshi Ozeki.
9795 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9797         Do not use devices at boot in chainloading.
9799         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9800         (boot_part_addr): Likewise.
9801         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9802         with BOOT_DRIVE and BOOT_PART_ADDR.
9803         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9804         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9806 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9808         Patch from Simon Peter <dn.tlp@gmx.net>:
9809         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9810         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9811         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9812         util/i386/pc/grub-setup.c_DEPENDENCIES.
9813         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9814         util/grub-probe.c_DEPENDENCIES.
9815         * conf/powerpc-ieee1275.rmk: Likewise.
9817 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9819         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9820         to tell grub-mkdevicemap how to name devices.
9821         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9822         feature).
9824         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9825         util/i386/get_disk_name.c.
9826         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9827         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9828         util/ieee1275/get_disk_name.c.
9830         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9832         * DISTLIST: Add util/i386/get_disk_name.c and
9833         util/ieee1275/get_disk_name.c.
9835         * util/grub-mkdevicemap.c: Replace device naming logic with
9836         grub_util_get_disk_name() calls.
9838 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9840         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9841         (so that it works for both plural and singular quantities).
9843 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9845         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9846         so that [xz] isn't taken into account when determining order.
9848 2007-08-02  Marco Gerards  <marco@gnu.org>
9850         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9851         `include/multiboot2.h', `include/grub/elfload.h',
9852         `include/multiboot.h', `include/grub/multiboot.h',
9853         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9854         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9855         `kern/elf.c', `loader/multiboot_loader.c',
9856         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9857         `loader/i386/pc/multiboot2.c',
9858         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9859         `util/i386/pc/grub-mkrescue.in'.  Remove
9860         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9861         `include/grub/i386/pc/util/biosdisk.h' and
9862         `include/grub/powerpc/ieee1275/multiboot.h'.
9864 2007-08-02  Bean  <bean123ch@gmail.com>
9866         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9867         (ntfs_mod_SOURCES): New variable.
9868         (ntfs_mod_CFLAGS): Likewise.
9869         (ntfs_mod_LDFLAGS): Likewise.
9871         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9872         (grub_probe_SOURCES): Likewise.
9873         (grub_emu_SOURCES): Likewise.
9875         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9876         (grub_emu_SOURCES): Likewise.
9878         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9879         (grub_emu_SOURCES): Likewise.
9881         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9883         * fs/ntfs.c: New file.
9885 2007-08-02  Bean  <bean123ch@gmail.com>
9887         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9889         * file.h (grub_file): Likewise.
9891         * fshelp.h (grub_fshelp_read_file): Likewise.
9893         * util/i386/pc/grub-setup.c (setup): Likewise.
9894         (save_first_sector): Likewise.
9895         (save_blocklists): Likewise.
9897         * fs/affs.c (grub_affs_read_file): Likewise.
9899         * fs/ext2.c (grub_ext2_read_file): Likewise.
9901         * fs/fat.c (grub_fat_read_data): Likewise.
9903         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9905         * fs/hfs.c (grub_hfs_read_file): Likewise.
9907         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9909         * fs/jfs.c (grub_jfs_read_file): Likewise.
9911         * fs/minix.c (grub_minix_read_file): Likewise.
9913         * fs/sfs.c (grub_sfs_read_file): Likewise.
9915         * fs/ufs.c (grub_ufs_read_file): Likewise.
9917         * fs/xfs.c (grub_xfs_read_file): Likewise.
9919         * command/blocklist.c (read_blocklist): Likewise.
9920         (print_blocklist): Likewise.
9922 2007-08-02  Marco Gerards  <marco@gnu.org>
9924         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9925         `util/hostfs.c'.
9927         * disk/host.c: New file.
9929         * util/hostfs.c: Likewise.
9931         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9932         return `GRUB_ERR_BAD_FS'.
9933         * fs/sfs.c (grub_sfs_mount): Likewise.
9934         * fs/xfs.c (grub_xfs_mount): Likewise.
9936         * include/grub/disk.h (enum grub_disk_dev_id): Add
9937         `GRUB_DISK_DEVICE_HOST_ID'.
9939         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9941 2007-07-24  Jerone Young  <jerone@gmail.com>
9943         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9944         modules for compilation.
9945         * conf/powerpc-ieee1275.rmk: Likewise.
9947         * include/multiboot.h: Move multiboot definitions to one file. Rename
9948         many definitions to not get grub specific.
9949         * include/multiboot2.h: Create header with multiboot 2 definitions.
9950         * include/grub/multiboot.h: Header for grub specific function
9951         prototypes and definitions.
9952         * include/grub/multiboot2.h: Likewise.
9953         * include/grub/multiboot_loader.h: Likewise.
9954         * include/grub/i386/pc/multiboot.h: Removed.
9955         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9957         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9958         and 2 to allow for one multiboot and module commands.
9959         * loader/multiboot2.c: Add multiboot2 functionality.
9960         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9961         and definition names.
9962         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9963         2 functions.
9964         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9965         ieee1275 specific multiboot2 code.
9967         * kern/i386/pc/startup.S: Change headers and definition names for
9968         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9970 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9972         * geninitheader.sh: Process file specified in first parameter rather
9973         than hardcoding grub_modules_init.lst.
9974         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9975         than hardcoding grub_modules_init.h.
9977         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9978         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9979         grub_probe_init.[ch] and grub_setup_init.[ch].
9981         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9982         grub_modules_init.h with grub_emu_init.h.
9983         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9984         grub_probe_init.[ch] files.
9985         * conf/i386-efi.rmk: Likewise.
9986         * conf/i386-pc.rmk: Likewise.
9987         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9988         grub_setup_init.[ch] files.
9990         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9991         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9992         to initialize modules rather than a list of hardcoded functions.
9993         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9994         grub_init_all() to initialize modules rather than a list of hardcoded
9995         functions.
9997 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9999         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10000         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10002 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10004         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10005         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10006         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10007         flag when running on SmartFirmware.
10008         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10009         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10010         was set.
10012         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10013         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10014         rather than decreasing it.
10016         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10017         there's not enough space to do it, fail in the same way as when it
10018         can't be done because there are no partitions.
10020         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10021         when nvsetenv failed.
10023 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10025         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10026         because this rule is automatically generated.
10027         (grub-mkrescue): Removed for the same reason as above.
10029 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10031         Migrate to GNU General Public License Version 3.
10033         * COPYING: Replaced with the plain text version of GPLv3.
10035         * config.guess: Updated from gnulib.
10036         * config.sub: Likewise.
10038         * geninit.sh: Output a GPLv3 copyright notice.
10039         * geninitheader.sh: Likewise.
10040         * genmodsrc.sh: Likewise.
10041         * gensymlist.sh.in: Likewise.
10043         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10044         * boot/i386/pc/diskboot.S: Likewise.
10045         * boot/i386/pc/pxeboot.S: Likewise.
10046         * commands/blocklist.c: Likewise.
10047         * commands/boot.c: Likewise.
10048         * commands/cat.c: Likewise.
10049         * commands/cmp.c: Likewise.
10050         * commands/configfile.c: Likewise.
10051         * commands/echo.c: Likewise.
10052         * commands/help.c: Likewise.
10053         * commands/ls.c: Likewise.
10054         * commands/search.c: Likewise.
10055         * commands/terminal.c: Likewise.
10056         * commands/test.c: Likewise.
10057         * commands/videotest.c: Likewise.
10058         * commands/i386/cpuid.c: Likewise.
10059         * commands/i386/pc/halt.c: Likewise.
10060         * commands/i386/pc/play.c: Likewise.
10061         * commands/i386/pc/reboot.c: Likewise.
10062         * commands/i386/pc/vbeinfo.c: Likewise.
10063         * commands/i386/pc/vbetest.c: Likewise.
10064         * commands/ieee1275/halt.c: Likewise.
10065         * commands/ieee1275/reboot.c: Likewise.
10066         * commands/ieee1275/suspend.c: Likewise.
10067         * disk/loopback.c: Likewise.
10068         * disk/lvm.c: Likewise.
10069         * disk/raid.c: Likewise.
10070         * disk/efi/efidisk.c: Likewise.
10071         * disk/i386/pc/biosdisk.c: Likewise.
10072         * disk/ieee1275/ofdisk.c: Likewise.
10073         * font/manager.c: Likewise.
10074         * fs/affs.c: Likewise.
10075         * fs/ext2.c: Likewise.
10076         * fs/fat.c: Likewise.
10077         * fs/fshelp.c: Likewise.
10078         * fs/hfs.c: Likewise.
10079         * fs/hfsplus.c: Likewise.
10080         * fs/iso9660.c: Likewise.
10081         * fs/jfs.c: Likewise.
10082         * fs/minix.c: Likewise.
10083         * fs/sfs.c: Likewise.
10084         * fs/ufs.c: Likewise.
10085         * fs/xfs.c: Likewise.
10086         * hello/hello.c: Likewise.
10087         * include/grub/acorn_filecore.h: Likewise.
10088         * include/grub/arg.h: Likewise.
10089         * include/grub/bitmap.h: Likewise.
10090         * include/grub/boot.h: Likewise.
10091         * include/grub/cache.h: Likewise.
10092         * include/grub/device.h: Likewise.
10093         * include/grub/disk.h: Likewise.
10094         * include/grub/dl.h: Likewise.
10095         * include/grub/elfload.h: Likewise.
10096         * include/grub/env.h: Likewise.
10097         * include/grub/err.h: Likewise.
10098         * include/grub/file.h: Likewise.
10099         * include/grub/font.h: Likewise.
10100         * include/grub/fs.h: Likewise.
10101         * include/grub/fshelp.h: Likewise.
10102         * include/grub/gzio.h: Likewise.
10103         * include/grub/hfs.h: Likewise.
10104         * include/grub/kernel.h: Likewise.
10105         * include/grub/loader.h: Likewise.
10106         * include/grub/lvm.h: Likewise.
10107         * include/grub/misc.h: Likewise.
10108         * include/grub/mm.h: Likewise.
10109         * include/grub/net.h: Likewise.
10110         * include/grub/normal.h: Likewise.
10111         * include/grub/parser.h: Likewise.
10112         * include/grub/partition.h: Likewise.
10113         * include/grub/pc_partition.h: Likewise.
10114         * include/grub/raid.h: Likewise.
10115         * include/grub/rescue.h: Likewise.
10116         * include/grub/script.h: Likewise.
10117         * include/grub/setjmp.h: Likewise.
10118         * include/grub/symbol.h: Likewise.
10119         * include/grub/term.h: Likewise.
10120         * include/grub/terminfo.h: Likewise.
10121         * include/grub/tparm.h: Likewise.
10122         * include/grub/types.h: Likewise.
10123         * include/grub/video.h: Likewise.
10124         * include/grub/efi/api.h: Likewise.
10125         * include/grub/efi/chainloader.h: Likewise.
10126         * include/grub/efi/console.h: Likewise.
10127         * include/grub/efi/console_control.h: Likewise.
10128         * include/grub/efi/disk.h: Likewise.
10129         * include/grub/efi/efi.h: Likewise.
10130         * include/grub/efi/pe32.h: Likewise.
10131         * include/grub/efi/time.h: Likewise.
10132         * include/grub/i386/linux.h: Likewise.
10133         * include/grub/i386/setjmp.h: Likewise.
10134         * include/grub/i386/types.h: Likewise.
10135         * include/grub/i386/efi/kernel.h: Likewise.
10136         * include/grub/i386/efi/loader.h: Likewise.
10137         * include/grub/i386/efi/time.h: Likewise.
10138         * include/grub/i386/pc/biosdisk.h: Likewise.
10139         * include/grub/i386/pc/boot.h: Likewise.
10140         * include/grub/i386/pc/chainloader.h: Likewise.
10141         * include/grub/i386/pc/console.h: Likewise.
10142         * include/grub/i386/pc/init.h: Likewise.
10143         * include/grub/i386/pc/kernel.h: Likewise.
10144         * include/grub/i386/pc/loader.h: Likewise.
10145         * include/grub/i386/pc/memory.h: Likewise.
10146         * include/grub/i386/pc/multiboot.h: Likewise.
10147         * include/grub/i386/pc/serial.h: Likewise.
10148         * include/grub/i386/pc/time.h: Likewise.
10149         * include/grub/i386/pc/vbe.h: Likewise.
10150         * include/grub/i386/pc/vbeblit.h: Likewise.
10151         * include/grub/i386/pc/vbefill.h: Likewise.
10152         * include/grub/i386/pc/vbeutil.h: Likewise.
10153         * include/grub/i386/pc/vga.h: Likewise.
10154         * include/grub/ieee1275/ieee1275.h: Likewise.
10155         * include/grub/ieee1275/ofdisk.h: Likewise.
10156         * include/grub/powerpc/libgcc.h: Likewise.
10157         * include/grub/powerpc/setjmp.h: Likewise.
10158         * include/grub/powerpc/types.h: Likewise.
10159         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10160         * include/grub/powerpc/ieee1275/console.h: Likewise.
10161         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10162         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10163         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10164         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10165         * include/grub/powerpc/ieee1275/time.h: Likewise.
10166         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10167         * include/grub/sparc64/libgcc.h: Likewise.
10168         * include/grub/sparc64/setjmp.h: Likewise.
10169         * include/grub/sparc64/types.h: Likewise.
10170         * include/grub/sparc64/ieee1275/console.h: Likewise.
10171         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10172         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10173         * include/grub/sparc64/ieee1275/time.h: Likewise.
10174         * include/grub/util/biosdisk.h: Likewise.
10175         * include/grub/util/getroot.h: Likewise.
10176         * include/grub/util/lvm.h: Likewise.
10177         * include/grub/util/misc.h: Likewise.
10178         * include/grub/util/raid.h: Likewise.
10179         * include/grub/util/resolve.h: Likewise.
10180         * io/gzio.c: Likewise.
10181         * kern/device.c: Likewise.
10182         * kern/disk.c: Likewise.
10183         * kern/dl.c: Likewise.
10184         * kern/elf.c: Likewise.
10185         * kern/env.c: Likewise.
10186         * kern/err.c: Likewise.
10187         * kern/file.c: Likewise.
10188         * kern/fs.c: Likewise.
10189         * kern/loader.c: Likewise.
10190         * kern/main.c: Likewise.
10191         * kern/misc.c: Likewise.
10192         * kern/mm.c: Likewise.
10193         * kern/parser.c: Likewise.
10194         * kern/partition.c: Likewise.
10195         * kern/rescue.c: Likewise.
10196         * kern/term.c: Likewise.
10197         * kern/efi/efi.c: Likewise.
10198         * kern/efi/init.c: Likewise.
10199         * kern/efi/mm.c: Likewise.
10200         * kern/i386/dl.c: Likewise.
10201         * kern/i386/efi/init.c: Likewise.
10202         * kern/i386/efi/startup.S: Likewise.
10203         * kern/i386/pc/init.c: Likewise.
10204         * kern/i386/pc/lzo1x.S: Likewise.
10205         * kern/i386/pc/startup.S: Likewise.
10206         * kern/ieee1275/ieee1275.c: Likewise.
10207         * kern/powerpc/cache.S: Likewise.
10208         * kern/powerpc/dl.c: Likewise.
10209         * kern/powerpc/ieee1275/cmain.c: Likewise.
10210         * kern/powerpc/ieee1275/crt0.S: Likewise.
10211         * kern/powerpc/ieee1275/init.c: Likewise.
10212         * kern/powerpc/ieee1275/openfw.c: Likewise.
10213         * kern/sparc64/cache.S: Likewise.
10214         * kern/sparc64/dl.c: Likewise.
10215         * kern/sparc64/ieee1275/init.c: Likewise.
10216         * kern/sparc64/ieee1275/openfw.c: Likewise.
10217         * loader/efi/chainloader.c: Likewise.
10218         * loader/efi/chainloader_normal.c: Likewise.
10219         * loader/i386/efi/linux.c: Likewise.
10220         * loader/i386/efi/linux_normal.c: Likewise.
10221         * loader/i386/pc/chainloader.c: Likewise.
10222         * loader/i386/pc/chainloader_normal.c: Likewise.
10223         * loader/i386/pc/linux.c: Likewise.
10224         * loader/i386/pc/linux_normal.c: Likewise.
10225         * loader/i386/pc/multiboot.c: Likewise.
10226         * loader/i386/pc/multiboot_normal.c: Likewise.
10227         * loader/powerpc/ieee1275/linux.c: Likewise.
10228         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10229         * normal/arg.c: Likewise.
10230         * normal/cmdline.c: Likewise.
10231         * normal/command.c: Likewise.
10232         * normal/completion.c: Likewise.
10233         * normal/execute.c: Likewise.
10234         * normal/function.c: Likewise.
10235         * normal/lexer.c: Likewise.
10236         * normal/main.c: Likewise.
10237         * normal/menu.c: Likewise.
10238         * normal/menu_entry.c: Likewise.
10239         * normal/misc.c: Likewise.
10240         * normal/parser.y: Likewise.
10241         * normal/script.c: Likewise.
10242         * normal/i386/setjmp.S: Likewise.
10243         * normal/powerpc/setjmp.S: Likewise.
10244         * normal/sparc64/setjmp.S: Likewise.
10245         * partmap/acorn.c: Likewise.
10246         * partmap/amiga.c: Likewise.
10247         * partmap/apple.c: Likewise.
10248         * partmap/gpt.c: Likewise.
10249         * partmap/pc.c: Likewise.
10250         * partmap/sun.c: Likewise.
10251         * term/gfxterm.c: Likewise.
10252         * term/terminfo.c: Likewise.
10253         * term/efi/console.c: Likewise.
10254         * term/i386/pc/console.c: Likewise.
10255         * term/i386/pc/serial.c: Likewise.
10256         * term/i386/pc/vesafb.c: Likewise.
10257         * term/i386/pc/vga.c: Likewise.
10258         * term/ieee1275/ofconsole.c: Likewise.
10259         * util/biosdisk.c: Likewise.
10260         * util/console.c: Likewise.
10261         * util/genmoddep.c: Likewise.
10262         * util/getroot.c: Likewise.
10263         * util/grub-emu.c: Likewise.
10264         * util/grub-mkdevicemap.c: Likewise.
10265         * util/grub-probe.c: Likewise.
10266         * util/lvm.c: Likewise.
10267         * util/misc.c: Likewise.
10268         * util/raid.c: Likewise.
10269         * util/resolve.c: Likewise.
10270         * util/update-grub.in: Likewise.
10271         * util/update-grub_lib.in: Likewise.
10272         * util/grub.d/00_header.in: Likewise.
10273         * util/grub.d/10_hurd.in: Likewise.
10274         * util/grub.d/10_linux.in: Likewise.
10275         * util/i386/efi/grub-install.in: Likewise.
10276         * util/i386/efi/grub-mkimage.c: Likewise.
10277         * util/i386/pc/grub-install.in: Likewise.
10278         * util/i386/pc/grub-mkimage.c: Likewise.
10279         * util/i386/pc/grub-mkrescue.in: Likewise.
10280         * util/i386/pc/grub-setup.c: Likewise.
10281         * util/i386/pc/misc.c: Likewise.
10282         * util/powerpc/ieee1275/grub-install.in: Likewise.
10283         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10284         * util/powerpc/ieee1275/misc.c: Likewise.
10285         * video/bitmap.c: Likewise.
10286         * video/video.c: Likewise.
10287         * video/i386/pc/vbe.c: Likewise.
10288         * video/i386/pc/vbeblit.c: Likewise.
10289         * video/i386/pc/vbefill.c: Likewise.
10290         * video/i386/pc/vbeutil.c: Likewise.
10291         * video/readers/tga.c: Likewise.
10293 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10295         * conf/i386-efi.rmk: Replace obsolete reference to
10296         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10297         with util/getroot.c.
10298         * conf/powerpc-ieee1275.rmk: Likewise.
10299         * conf/sparc64-ieee1275.rmk: Likewise.
10301         * util/grub-emu.c (main): Fix unchecked pointer handling.
10303 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10305         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10306         invocation to fail, in order to support partition-less media.
10308         * util/i386/pc/grub-install.in: Likewise.
10310         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10311         which fs or partmap modules are needed (akin to its sister scripts).
10313         Also use grub-probe to get rid of unportable /proc/mounts check.
10315         Print the same informational message that the other scripts do, before
10316         exiting.
10318 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10320         * util/update-grub_lib.in (font_path): New function.  Determine whether
10321         a font file can be found and, if so, echo the GRUB path to it.
10323         * util/update-grub.in: Handle multiple terminals depending on user
10324         input, platform availability and font file presence.  Propagate
10325         variables of our findings to /etc/grub.d/ children.
10327         * util/grub.d/00_header.in: Handle multiple terminals, based on
10328         environment setup by update-grub.
10330 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10332         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10334 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10336         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10337         indicate end of data section in kernel image.
10338         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10339         GRUB_KERNEL_MACHINE_DATA_END.
10341         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10342         space for it.
10343         * kern/i386/efi/startup.S: Likewise.
10345         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10346         during image generation.  Implement --prefix option to override this
10347         patch.
10348         * util/i386/efi/grub-mkimage.c: Likewise.
10350         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10351         code to make path relative to its root into a separate function.
10353         * util/i386/pc/grub-install.in: Use newly provided
10354         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10355         pass the result to grub-install --prefix.
10357 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10359         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10360         DEFAULT_DEVICE_MAP.
10361         * util/grub-emu.c: Use above definitions from misc.h instead of
10362         defining them.
10363         * util/grub-mkdevicemap.c: Likewise.
10364         * util/i386/pc/grub-setup.c: Likewise.
10365         * util/grub-probe.c: Likewise.
10366         (probe): Abort with grub_util_error() when either
10367         grub_guess_root_device or grub_util_get_grub_dev fails.
10369 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10371         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10372         "pager" assignment.
10373         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10374         "pcdata".
10375         * util/grub-probe.c (probe): Likewise for "drive_name".
10377 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10379         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10380         not just the cdrom one.
10382 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10384         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10385         Add --pkglibdir=DIR option to override pkglibdir.
10386         Mention --image-type=TYPE in help output.
10387         Fix --grub-mkimage (it was a no-op).
10388         Abort gracefully when no parameter is given.
10390 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10392         * util/i386/pc/grub-mkrescue.in: New file.
10393         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10394         * Makefile.in: Handle bin_SCRIPTS.
10396 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10398         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10399         list of video modes.
10401 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10403         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10404         file doesn't exist, or if it is in a filesystem grub can't read.
10406         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10407         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10408         header comment to fit in 80 columns when the variables are resolved.
10410         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10411         could be identified by update-grub.  Remove redundant check for
10412         unifont.pff existence (since convert_system_path_to_grub_path now
10413         handles that).
10415 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10417         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10419         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10421         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10423 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10425         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10427         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10428         grub_apple_partition_map_fini.
10430         * util/biosdisk.c
10431         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10432         to access >2 TiB disks).
10434         Print disk->total_sectors with %llu instead of %lu, since this
10435         variable is always 64-bit (prevents wrong disk size from being displayed
10436         on either >2 TiB disk or big-endian CPU).
10438         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10439         into a generic case that supports all (sane) partition maps.
10441         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10442         breaks big-endian.
10444         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10445         and grub_apple_partition_map_fini() after that.
10447 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10449         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10451         * util/grub.d/00_header.in: Only enable gfxterm when
10452         convert_system_path_to_grub_path() succeeds.
10454 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10456         * util/update-grub_lib.in: New file.
10457         * DISTLIST: Add update-grub_lib.in.
10458         * conf/common.rmk: Generate update-grub_lib and install it in
10459         $(lib_DATA).
10460         * Makefile.in: Add install routine for $(lib_DATA).
10462         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10463         function provided by update-grub_lib to support arbitrary paths of
10464         unifont.pff.
10465         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10466         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10468 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10470         * commands/i386/cpuid.c: New module.
10471         * DISTLIST: Add it.
10472         * conf/i386-efi.rmk: Enable cpuid.mod.
10473         * conf/i386-pc.rmk: Likewise.
10475 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10477         * kern/disk.c (grub_disk_read): Check return value of
10478         grub_realloc().
10480 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10482         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10483         arrays.
10484         * disk/raid.c (grub_raid_open): Likewise.
10486 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10488         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10489         stack instead of on the heap.
10491         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10492         before doing a read on it.
10494         * configure.ac: Only use -fno-stack-protector for the target
10495         environment.
10497 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10499         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10500         __attribute_ ((unused)) to mode_type argument.
10502         * util/getroot.c (grub_guess_root_device): Fix #endif.
10504         * kern/misc.c (memcmp): Fix prototype.
10506         * include/grub/partition.h [GRUB_UTIL]
10507         (grub_gpt_partition_map_init): Add prototype.
10508         (grub_gpt_partition_map_fini): Likewise.
10510         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10511         at the right place.
10513         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10514         (grub_fat_read_data): Likewise.
10515         (grub_fat_find_dir): Likewise.
10517         * font/manager.c (find_glyph): Make table a const.
10518         (grub_font_get_glyph): Remove bitmap from if statement.
10520 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10522         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10523         code, first search for device in /dev/mapper, then in /dev.
10524         (grub_util_get_grub_dev): New function.
10525         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10526         prototype.
10527         * util/grub-probe.c (probe): Remove check for RAID, call
10528         grub_util_get_grub_dev() instead of
10529         grub_util_biosdisk_get_grub_dev().
10530         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10531         grub_util_biosdisk_get_grub_dev().
10532         * util/i386/pc/grub-setup.c (main): Likewise.
10534 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10536         * DISTLIST: Update for the latest changes.
10537         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10538         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10539         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10540         grub/util/biosdisk.h.
10541         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10542         grub/util/biosdisk.h.
10544 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10546         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10548 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10550         * util/i386/efi/grub-install.in: New.
10551         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10552         newly added grub-install.
10553         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10554         include.
10555         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10556         grub/util/biosdisk.h.
10557         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10558         grub/util/biosdisk.h.
10560 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10562         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10563         * include/grub/util/biosdisk.h: ... here.
10564         * util/i386/pc/biosdisk.c: Moved to ...
10565         * util/biosdisk.c: ... here.
10566         * util/i386/pc/getroot.c: Moved to ...
10567         * util/getroot.c: ... here.
10568         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10569         * util/grub-mkdevicemap.c: ... here.
10570         * util/i386/pc/grub-probe.c: Moved to ...
10571         * util/grub-probe.c: ... here.
10573 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10575         * util/update-grub.in: Remove duplicated line in grub.cfg header
10576         message.
10578 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10580         * util/update-grub.in: Fix a few assumptions about the devices holding
10581         /, /boot and /boot/grub being the same.
10582         * util/grub.d/00_header.in: Likewise.
10583         * util/grub.d/10_hurd.in: Likewise.
10584         * util/grub.d/10_linux.in: Likewise.
10586         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10587         patterns.  Use that to define the `.old' suffix as older than `'.
10589         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10591         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10592         the grub.cfg header message.
10594 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10596         * util/update-grub.in: Create device.map if it doesn't already exist,
10597         before attempting to run grub-probe.
10598         Check for grub-probe and grub-mkdevicemap with the same code
10599         grub-install is using.
10600         Remove test mode.
10602 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10604         * Makefile.in: Add the datarootdir autoconf variable.
10606 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10608         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10609         fail gracefully if dev->disk->partition == NULL.
10611 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10613         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10614         determine partition map module.
10615         * util/i386/pc/grub-install.in: Use this feature to decide which
10616         partition module to load, instead of hardcoding pc and gpt.
10618 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10620         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10621         source directory differs from build directory.
10623 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10625         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10626         initialisation.
10628 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10630         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10632 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10634         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10635         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10637 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10639         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10640         (grub_probe_SOURCES): Likewise.
10641         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10642         GPT and initialize dos_part and bsd_part accordingly.
10643         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10644         install_bsd_part.
10645         (main): Activate gpt module for use during partition identification,
10646         and deactivate it afterwards.
10647         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10648         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10649         partition identification, and deactivate it afterwards.
10651 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10653         * term/i386/pc/console.c (grub_console_fini): Call
10654         grub_term_set_current() before grub_term_unregister().
10656 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10658         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10659         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10660         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10661         and update-grub_DATA.
10662         * conf/common.rmk: Build and install update-grub components.
10663         * conf/common.mk: Regenerate.
10664         * util/update-grub.in: New.  Core of update-grub.
10665         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10666         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10667         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10668         * util/grub.d/README: New.  Document grub.d directory layout.
10670 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10672         * util/grub-emu.c: Move initialization functions
10673         grub_util_biosdisk_init() and grub_init_all() before
10674         grub_util_biosdisk_get_grub_dev(), which relies on them.
10676 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10678         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10679         it is used later.
10681 2007-04-18  Jerone Young  <jerone@gmail.com>
10683         * kernel/elf.c: Add missing parenthesis for conditional statement
10684         stanza.
10686 2007-04-10  Jerone Young  <jerone@gmail.com>
10688         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10689         continue on and look for device node with real device name.
10691 2007-04-10  Jerone Young  <jerone@gmail.com>
10693         * configure.ac: Add argument for autoconf to use transformation
10694         ability.
10695         * Makefile.in: Add autoconf package transformation code.
10696         * util/i386/pc/grub-install.in: Likewise.
10697         * util/powerpc/ieee1275/grub-install.in: Likewise.
10699 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10701         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10702         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10703         (EXT2_REVISION): Likewise.
10704         (EXT2_INODE_SIZE): Likewise.
10705         (struct grub_ext2_block_group): Added a missing member
10706         "used_dirs".
10707         (grub_ext2_read_inode): Divide by the inode size in a superblock
10708         instead of 128 to obtain INODES_PER_BLOCK.
10709         Use the macro EXT2_INODE_SIZE instead of directly using
10710         SBLOCK->INODE_SIZE.
10712 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10714         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10715         superblock instead of the structure size to compute an
10716         offset. This fixes the problem that GRUB could not read a
10717         filesystem when inode size is different from 128-byte.
10719 2007-03-05  Marco Gerards  <marco@gnu.org>
10721         * normal/main.c (read_config_file): When "menu" is not set, create
10722         an initial context.
10724 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10726         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10727         (HEAP_LIMIT): New macro.
10728         (grub_claim_heap): Claim memory up to `heaplimit'.
10730 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10732         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10733         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10734         (_start): Likewise.
10735         (grub_arch_modules_addr): Return address after `_end'.
10736         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10737         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10738         (add_segments): Calculate `_end' from phdr size and location.
10739         (ALIGN_UP): Moved to ...
10740         * include/grub/misc.h: here.
10741         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10742         New macro.
10743         (GRUB_IEEE1275_MODULE_BASE): Removed.
10745 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10747         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10748         loop boundary.
10750 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10752         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10753         All users updated.
10754         (grub_elf64_load_hook_t): Likewise.
10755         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10756         debug output.
10758 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10760         * kern/mm.c: Update copyright.
10761         (grub_mm_debug): Correct syntax error.
10762         (grub_mm_dump_free): New function.
10763         (grub_debug_free): Call `grub_free'.
10764         * include/grub/mm.h: Update copyright.
10765         (grub_mm_dump_free): Add declaration.
10767 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10769         * include/grub/ieee1275/ieee1275.h: Update copyright.
10770         * kern/powerpc/ieee1275/init.c: Likewise.
10771         * kern/powerpc/ieee1275/openfw.c: Likewise.
10773         * loader/powerpc/ieee1275/linux.c: Likewise.
10774         * include/grub/elfload.h: Likewise.
10775         * kern/elf.c: Likewise.
10776         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10777         callers.
10778         (grub_elf64_load): Likewise.
10779         (grub_elf32_load_segment): Move to a nested function.
10780         (grub_elf64_load_segment): Likewise.
10782 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10784         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10785         prototype.
10786         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10787         (grub_heap_len): Likewise.
10788         (HEAP_SIZE): New macro.
10789         (grub_claim_heap): New function.
10790         (grub_machine_init): Don't claim heap directly.  Call
10791         `grub_claim_heap'.
10792         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10793         (grub_available_iterate): New function.
10795 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10797         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10798         * configure.ac: Use it for testing the HOST and TARGET compilers.
10800 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10802         * Makefile.in (enable_grub_emu): New variable.
10803         * configure.ac (--enable-grub-emu): New option.
10804         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10805         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10806         * conf/i386-pc.rmk: Likewise.
10807         * conf/powerpc-ieee1275.rmk: Likewise.
10808         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10810 2006-12-12  Marco Gerards  <marco@gnu.org>
10812         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10814         * kern/env.c (grub_env_unset): Don't free the member `value' when
10815         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10816         pointer.
10818         * normal/main.c (current_menu): Removed.
10819         (free_menu): Unset the `menu' environment variable.
10820         (grub_normal_menu_addentry): Make use of the environment variable
10821         `menu', instead of using the global `current_menu'.  Allocate
10822         memory for the sourcecode of this entry.
10823         (read_config_file): New argument `nested', changed all callers.
10824         Only in the case of a new context, initialize a new menu.  Set the
10825         `menu' environment variable.
10826         (grub_normal_execute): Don't set and unset the environment
10827         variable `menu' here anymore.  Only free the menu when leaving the
10828         context.
10830         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10831         leak.
10833 2006-12-11  Marco Gerards  <marco@gnu.org>
10835         * normal/menu_entry.c (run): Fix off by one bug so the last line
10836         is executed.  Move the loader check to outside the loop.
10838 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10840         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10842 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10844         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10845         the number of sectors.  Reported by Andrey Shuvikov
10846         <mr_hyro@yahoo.com>.
10848 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10850         * kern/disk.c (grub_disk_read): When there is a read error, always
10851         try to read only the necessary data.
10853         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10854         disk/raid.c.
10855         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10856         prototype.
10857         [GRUB_UTIL] (grub_raid_fini): Likewise.
10858         [GRUB_UTIL] (grub_lvm_init): Likewise.
10859         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10860         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10861         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10862         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10863         and grub_raid_fini().
10865 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10867         * include/grub/types.h (__unused): Rename to UNUSED.
10868         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10869         (grub_elf64_size): Likewise.
10871 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10873         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10874         grub_error_push and grub_error_pop in the error-handling path.
10875         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10876         length.
10878 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10880         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10881         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10882         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10883         (kernel_elf_SOURCES): Likewise.
10884         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10885         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10886         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10887         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10888         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10889         (elf_mod_SOURCES): New variable.
10890         (elf_mod_CFLAGS): Likewise.
10891         (elf_mod_LDFLAGS): Likewise.
10892         * include/grub/types.h (__unused): New macro.
10893         * include/grub/elfload.h: New file.
10894         * kern/elf.c: Likewise.
10895         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10896         (ELF32_LOADMASK): New macro.
10897         (ELF64_LOADMASK): Likewise.
10898         (vmlinux): Removed.
10899         (grub_linux_load32): New function.
10900         (grub_linux_load64): Likewise.
10901         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10902         Use grub_elf_t instead of grub_file_t.
10904 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10906         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10907         `catch_result' to struct set_color_args.
10909 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10911         * normal/menu.c: Include grub/script.h.
10912         * normal/menu_entry.c: Likewise.
10913         * include/grub/normal.h: Do not include grub/script.h.
10915 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10917         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10919 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10921         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10922         disk.
10923         (grub_disk_close): Print debug messages when closing a disk.
10924         (grub_disk_read): Print debug messages when disk read fails.
10925         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10926         filesystem type.
10927         * kern/partition.c: Include misc.h.
10928         (grub_partition_iterate): Print debug messages when detecting
10929         partition type.
10931 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10933         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10934         is negative.
10935         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10937 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10939         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10940         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10942 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10944         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10945         instead of sizeof(lv). Patch by Michael Guntsche.
10947 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10949         * disk/lvm.c: Rename VGS to VG_LIST.
10950         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10951         (grub_lvm_open): Likewise.
10952         Thanks to Michael Guntsche for finding this bug.
10954 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10956         * configure.ac (AC_INIT): Bumped to 1.95.
10958 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10960         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10961         with "/dev/.static/dev/md".
10963 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10965         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10966         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10967         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10968         DRIVE_NAME are always freed.
10970         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10971         DOS_PART, as a DOS partition is counted from one instead of zero
10972         now. Reported by Robert Millan.
10974 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10976         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10977         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10978         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10979         string returned by grub_guess_root_device.
10980         * util/i386/pc/grub-setup.c: Likewise.
10981         * util/i386/pc/grub-probefs.c: Likewise.
10983         * util/i386/pc/grub-probefs.c: Rename to ...
10984         * util/i386/pc/grub-probe.c: ... this.
10985         * DISTLIST: Remove grub-probefs, add grub-probe.
10986         * conf/i386-efi.rmk: Likewise.
10987         * conf/i386-pc.rmk: Likewise.
10988         * util/i386/pc/grub-install.in: Likewise.
10990         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10991         choose which information we want to print.
10993 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10995         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10996         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10997         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10998         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10999         video/readers/tga.c and video/i386/pc/vbeutil.c.
11001 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11003         Added support for RAID and LVM.
11005         * disk/lvm.c: New file.
11006         * disk/raid.c: Likewise.
11007         * include/grub/lvm.h: Likewise.
11008         * include/grub/raid.h: Likewise.
11009         * include/grub/util/lvm.h: Likewise.
11010         * include/grub/util/raid.h: Likewise.
11011         * util/lvm.c: Likewise.
11012         * util/raid.c: Likewise.
11014         * include/grub/disk.h (grub_disk_dev_id): Add
11015         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11016         (grub_disk_get_size): New prototype.
11017         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11018         returns a partition.
11019         (grub_disk_get_size): New function.
11021         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11022         verbatim if grub_install_dos_part is -2.
11024         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11025         and LVM devices.
11027         * util/i386/pc/grub-setup.c (setup): New argument
11028         MUST_EMBED. Force embedding of GRUB when the argument is
11029         true. Close FILE before returning.
11030         (main): Add support for RAID and LVM.
11032         * conf/common.rmk: Add RAID and LVM modules.
11033         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11034         util/lvm.c.
11035         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11037         * kern/misc.c (grub_strstr): New function.
11038         * include/grub/misc.h (grub_strstr): New prototype.
11040 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11042         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11044 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11046         * kern/misc.c (grub_strtoull): Guess the base only if not
11047         specified.
11049 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11051         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11052         PowerMac support.
11054 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11056         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11058         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11059         Remove `flags' argument.  All callers changed.
11060         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11061         (IEEE1275_IHANDLE_INVALID): New variable.
11062         (IEEE1275_CELL_INVALID): New variable.
11063         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11064         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11065         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11066         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11067         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11068         codes from Open Firmware.  All callers updated.
11069         (grub_ieee1275_next_property): Directly return Open Firmware return
11070         code.
11071         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11072         Standardize error checking from `grub_ieee1275_get_property'.
11073         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11074         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11076 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11078         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11079         `instance_to_package_args' to `instance_to_path_args'.
11081         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11082         `grub_ieee1275_chosen'.
11084         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11085         `grub_ieee1275_interpret'.
11087 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11089         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11091 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11093         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11094         (__cmpdi): Likewise.
11096         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11097         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11098         `grub_ssize_t'.
11100         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11102         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11103         to type `grub_ssize_t'.
11104         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11106 2006-09-22  Marco Gerards  <marco@gnu.org>
11108         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11109         newlines.
11111 2006-09-22  Marco Gerards  <marco@gnu.org>
11113         * commands/echo.c: New file.
11115         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11117         * conf/common.rmk (echo_mod_SOURCES): New variable.
11118         (echo_mod_CFLAGS): Likewise.
11119         (echo_mod_LDFLAGS): Likewise.
11121 2006-09-22  Marco Gerards  <marco@gnu.org>
11123         * normal/main.c (get_line): Malloc memory instead of using
11124         preallocated memory.  Removed the arguments `cmdline' and
11125         `max_len'.  Updated all callers.
11127 2006-09-22  Marco Gerards  <marco@gnu.org>
11129         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11130         (normal_mod_DEPENDENCIES): Likewise.
11132         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11133         (normal_mod_DEPENDENCIES): Likewise.
11135         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11137 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11139         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11140         programs.
11141         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11142         (normal_mod_DEPENDENCIES): Likewise.
11143         * conf/i386-pc.mk: Regenerate.
11144         * conf/i386-efi.mk: Likewise
11145         * conf/common.mk: Likewise.
11146         * conf/powerpc-ieee1275.mk: Likewise.
11147         * conf/sparc64-ieee1275.mk: Likewise.
11149 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11151         Sync with i386 version.
11152         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11153         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11155 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11157         Import from GRUB Legacy (lib/device.c):
11158         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11159         (init_device_map) [__linux__]: Add support for I2O devices.
11161 2006-09-14  Marco Gerards  <marco@gnu.org>
11163         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11164         `-melf_i386'.
11166 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11168         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11169         /boot/grub/*.lst.
11171         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11173         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11174         before adding it to device.map.
11176 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11178         * genmk.rb: Let GCC generate dependencies the first time it
11179         compiles a file; using the -MD option.
11180         * conf/common.mk: Regenerate.
11181         * conf/i386-pc.mk: Likewise.
11182         * conf/i386-efi.mk: Likewise.
11183         * conf/powerpc-ieee1275.mk: Likewise.
11184         * conf/sparc64-ieee1275.mk: Likewise.
11186 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11188         Move the prototypes of grub_setjmp and grub_longjmp to
11189         cpu/setjmp.h, so that each architecture may specify different
11190         attributes.
11192         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11193         (grub_longjmp): Likewise.
11194         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11195         (grub_longjmp): Likewise.
11196         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11197         (grub_longjmp): Likewise.
11199         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11200         [!GRUB_UTIL] (grub_longjmp): Removed.
11202 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11204         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11205         "color!" method does not return any value.
11207 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11209         * include/grub/bitmap.h: New file.
11211         * include/grub/i386/pc/vbeutil.h: Likewise.
11213         * video/bitmap.c: Likewise.
11215         * video/readers/tga.c: Likewise.
11217         * video/i386/pc/vbeutil.c: Likewise.
11219         * commands/videotest.c: Code cleanup and updated to reflect to new
11220         video API.
11222         * term/gfxterm.c: Likewise.
11224         * video/video.c: Likewise.
11226         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11227         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11228         (bitmap_mod_SOURCES): New entry.
11229         (bitmap_mod_CFLAGS): Likewise.
11230         (bitmap_mod_LDFLAGS): Likewise.
11231         (tga_mod_SOURCES): Likewise.
11232         (tga_mod_CFLAGS): Likewise.
11233         (tga_mod_LDFLAGS): Likewise.
11235         * include/grub/video.h (grub_video_blit_operators): New enum type.
11236         (grub_video_render_target): Changed as forward declaration and moved
11237         actual definition to be video driver specific.
11238         (grub_video_adapter.blit_bitmap): Added blitting operator.
11239         (grub_video_adapter.blit_render_target): Likewise.
11240         (grub_video_blit_bitmap): Likewise.
11241         (grub_video_blit_render_target): Likewise.
11243         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11244         driver specific render target definition.
11245         (grub_video_vbe_map_rgba): Added driver internal helper.
11246         (grub_video_vbe_unmap_color): Updated to use
11247         grub_video_i386_vbeblit_info.
11248         (grub_video_vbe_get_video_ptr): Likewise.
11250         * include/grub/i386/pc/vbeblit.h
11251         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11252         grub_video_i386_vbeblit_info.
11253         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11254         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11255         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11256         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11257         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11258         (grub_video_i386_vbeblit_index_index): Likewise.
11259         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11260         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11261         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11262         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11263         operator.
11264         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11265         operator.
11267         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11268         include/grub/i386/pc/vbeblit.h.
11270         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11271         Updated to use grub_video_i386_vbeblit_info.
11272         (grub_video_i386_vbefill_R8G8B8): Likewise.
11273         (grub_video_i386_vbefill_index): Likewise.
11274         (grub_video_i386_vbefill): Added generic filler.
11276         * video/i386/pc/vbefill.c: Updated to reflect changes on
11277         include/grub/i386/pc/vbefill.h.
11279         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11280         grub_video_i386_vbeblit_info.
11281         (grub_video_vbe_unmap_color): Likewise.
11282         (grub_video_vbe_blit_glyph): Likewise.
11283         (grub_video_vbe_scroll): Likewise.
11284         (grub_video_vbe_draw_pixel): Removed function.
11285         (grub_video_vbe_get_pixel): Likewise.
11286         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11287         updated code to use it.
11288         (common_blitter): Added common blitter for render target and bitmap.
11289         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11290         (grub_video_vbe_blit_render_target): Likewise.
11292 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11294         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11295         is in text mode if there is no console control protocol instance
11296         available.
11298 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11300         * include/grub/video.h: Code cleanup.
11302         * include/grub/i386/pc/vbe.h: Likewise.
11304         * video/i386/pc/vbe.c: Likewise.
11306         * video/i386/pc/vbeblit.c: Likewise.
11308         * video/i386/pc/vbefill.c: Likewise.
11310         * video/video.c: Likewise.  Also added more comments.
11312 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11314         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11315         (struct grub_biosdisk_dap): Likewise.
11317         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11318         linkage settings for all functions.
11320 2006-07-12  Marco Gerards  <marco@gnu.org>
11322         * configure.ac (--enable-mm-debug): Fix typo.
11324         * genkernsyms.sh.in: Use proper quoting for `CC'.
11326 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11328         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11329         (normal_mod_ASFLAGS): Remove "-m32".
11331 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11333         * util/misc.c: Include config.h.
11334         [!HAVE_MEMALIGN]: Do not include malloc.h.
11335         (grub_memalign): Use posix_memalign, if present. Then, use
11336         memalign, if present. Otherwise, emit an error.
11338         * util/grub-emu.c: Do not include malloc.h.
11340         * include/grub/util/misc.h: Include unistd.h. This is required for
11341         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11342         D. Eades III <hde@foobar-qux.org>.
11344         * configure.ac (AC_GNU_SOURCE): Added.
11345         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11346         type.
11348 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11350         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11351         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11353 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11355         * include/grub/types.h (grub_host_addr_t): Rename to
11356         grub_target_addr_t.
11357         (grub_host_off_t): Rename to grub_target_off_t.
11358         (grub_host_size_t): Rename to grub_target_size_t.
11359         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11360         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11362         * include/grub/kernel.h (struct grub_module_header): Change type
11363         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11364         (grub_module_info): Likewise.
11366 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11368         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11369         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11370         Velazquez <jesus.velazquez@gmail.com>.
11372 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11374         Count partitions from 1 instead of 0 in the string representation
11375         of partitions. Still use 0-based internally.
11377         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11378         (sun_partition_map_iterate): Use grub_partition_t instead of
11379         struct grub_partition *. Cast DESC->START_CYLINDER to
11380         grub_uint64_t after converting the endian.
11381         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11382         (sun_partition_map_get_name): Add 1 to P->INDEX.
11384         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11385         PCDATA->DOS_PART.
11386         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11388         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11389         zero instead of one.
11390         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11391         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11393         * partmap/apple.c (apple_partition_map_iterate): Change the type
11394         of POS to unsigned.
11395         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11396         (apple_partition_map_get_name): Add 1 into P->INDEX.
11398         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11399         of POS to unsigned.
11400         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11401         calculate the offset of a partition.
11402         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11403         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11405         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11406         SECTOR to grub_disk_addr_t.
11407         (acorn_partition_map_iterate): Likewise.
11408         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11409         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11410         top.
11411         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11413         * kern/i386/pc/init.c (make_install_device): Add 1 into
11414         GRUB_INSTALL_DOS_PART.
11416         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11417         conditional.
11419 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11421         Clean up the code to support 64-bit addressing in disks and
11422         files. This change is not enough for filesystems yet.
11424         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11425         type of "start" to grub_uint64_t.
11426         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11427         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11428         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11429         convert addresses.
11431         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11432         to grub_disk_addr_t.
11434         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11435         string.
11437         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11439         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11440         to char *.
11442         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11444         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11446         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11448         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11449         to grub_off_t, to detect an error from grub_file_seek.
11450         (grub_multiboot_load_elf32): Likewise.
11452         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11453         maximum unsigned long value when an overflow is detected.
11454         (grub_strtoull): New function.
11455         (grub_divmod64): Likewise.
11456         (grub_lltoa): use grub_divmod64.
11458         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11459         grub_disk_addr_t.
11460         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11461         the pointer to next character. Use grub_strtoull instead of
11462         grub_strtoul.
11463         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11464         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11465         respectively.
11467         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11468         return value is signed.
11469         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11470         test if OFFSET is less than zero, as OFFSET is unsigned now.
11472         * kern/disk.c (struct grub_disk_cache): Change the type of
11473         "sector" to grub_disk_addr_t.
11474         (grub_disk_cache_get_index): Change the type of SECTOR to
11475         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11476         unsigned after shifting.
11477         (grub_disk_cache_invalidate): Change the type of SECTOR to
11478         grub_disk_addr_t.
11479         (grub_disk_cache_unlock): Likewise.
11480         (grub_disk_cache_store): Likewise.
11481         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11482         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11483         grub_disk_addr_t and grub_uint64_t, respectively.
11484         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11485         body, as the value of OFFSET is tweaked by
11486         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11487         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11488         respectively.
11489         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11490         body, as the value of OFFSET is tweaked by
11491         grub_disk_check_range. Change the types of LEN and N to
11492         grub_size_t.
11494         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11495         and "saved_offset" to grub_off_t.
11496         (test_header): Cast BUF to char *.
11497         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11498         to char *.
11499         (grub_gzio_read): Change the types of OFFSET and SIZE to
11500         grub_off_t and grub_size_t, respectively.
11502         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11503         Removed.
11504         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11505         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11506         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11507         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11508         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11510         * include/grub/types.h (grub_off_t): Unconditionally set to
11511         grub_uint64_t.
11512         (grub_disk_addr_t): Changed to grub_uint64_t.
11514         * include/grub/partition.h (struct grub_partition): Change the
11515         types of "start", "len" and "offset" to grub_disk_addr_t,
11516         grub_uint64_t and grub_disk_addr_t, respectively.
11517         (grub_partition_get_start): Return grub_disk_addr_t.
11518         (grub_partition_get_len): Return grub_uint64_t.
11520         * include/grub/misc.h (grub_strtoull): New prototype.
11521         (grub_divmod64): Likewise.
11523         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11524         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11525         grub_off_t, respectively.
11526         All callers and references changed.
11528         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11529         grub_size_t in "read".
11530         All callers and references changed.
11532         * include/grub/file.h (struct grub_file): Change the types of
11533         "offset" and "size" to grub_off_t and grub_off_t,
11534         respectively. Change the type of SECTOR to grub_disk_addr_t in
11535         "read_hook".
11536         (grub_file_read): Change the type of LEN to grub_size_t.
11537         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11538         grub_off_t.
11539         (grub_file_size): Return grub_off_t.
11540         (grub_file_tell): Likewise.
11541         All callers and references changed.
11543         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11544         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11545         "write".
11546         (struct grub_disk): Change the type of "total_sectors" to
11547         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11548         "read_hook".
11549         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11550         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11551         (grub_disk_write): Likewise.
11552         All callers and references changed.
11554         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11555         char * for grub_strncmp to silence gcc.
11556         (grub_iso9660_mount): Likewise.
11557         (grub_iso9660_mount): Likewise.
11558         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11559         return statement.
11560         (grub_iso9660_iterate_dir): Likewise.
11561         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11563         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11564         LEN to grub_disk_addr_t and grub_size_t, respectively.
11566         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11568         * fs/jfs.c (grub_jfs_read_file): Likewise.
11570         * fs/minix.c (grub_jfs_read_file): Likewise.
11572         * fs/sfs.c (grub_jfs_read_file): Likewise.
11574         * fs/ufs.c (grub_jfs_read_file): Likewise.
11576         * fs/xfs.c (grub_jfs_read_file): Likewise.
11578         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11579         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11580         respectively.
11582         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11583         BLKNR to -1 instead of returning GRUB_ERRNO.
11584         (grub_ext2_read_file): Change the types of SECTOR and
11585         LEN to grub_disk_addr_t and grub_size_t, respectively.
11587         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11588         LEN to grub_disk_addr_t and grub_size_t, respectively.
11590         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11591         grub_file_read.
11593         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11594         string. Do not cast SECTOR explicitly.
11596         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11597         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11598         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11599         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11600         over 2TB and LBA mode is not supported, raise an error.
11601         (get_safe_sectors): New function.
11602         (grub_biosdisk_read): Use get_safe_sectors.
11603         (grub_biosdisk_write): Likewise.
11605         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11606         (grub_efidisk_write): Likewise.
11608         * disk/loopback.c (delete_loopback): Cosmetic changes.
11609         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11610         correctly.
11611         (grub_loopback_open): Likewise.
11612         (grub_loopback_read): Likewise. Also, change the type of POS to
11613         grub_off_t, and fix the usage of grub_memset.
11615         * commands/i386/pc/play.c: Include grub/machine/time.h.
11617         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11618         print FILE->SIZE.
11620         * commands/configfile.c: Include grub/env.h.
11622         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11623         GRUB_ERRNO directly instead. Change the type of POS to
11624         grub_off_t. Follow the coding standard.
11626         * commands/blocklist.c: Include grub/partition.h.
11627         (grub_cmd_blocklist): Return an error if the underlying device is
11628         not a disk. Take the starting sector of a partition into account,
11629         if a partition is used.
11631         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11632         a length field.
11633         (lba_mode): Support 64-bit addresses.
11634         (chs_mode): Likewise.
11635         (copy_buffer): Adapted to the new offsets of a length field and a
11636         segment field.
11637         (blocklist_default_start): Allocate 64-bit space.
11639         * boot/i386/pc/boot.S (force_lba): Removed.
11640         (boot_drive): Moved to under KERNEL_SECTOR.
11641         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11642         space.
11643         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11644         is useless.
11645         (lba_mode): Refactored to support a 64-bit address. More size
11646         optimization.
11647         (setup_sectors): Likewise.
11649 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11651         * DISTLIST: Added include/grub/i386/linux.h. Removed
11652         include/grub/i386/pc/linux.h
11654         * configure.ac (AC_INIT): Bumped to 1.94.
11656         * config.guess: Updated from gnulib.
11657         * config.sub: Likewise.
11658         * install-sh: Likewise.
11659         * mkinstalldirs: Likewise.
11661 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11663         * conf/common.rmk (grub_modules_init.lst): Depended on
11664         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11665         MODSRCFILES.
11667         * genmk.rb (PModule::rule): Reverted the previous change.
11669 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11671         * conf/common.rmk (grub_modules_init.lst): Depends on
11672         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11673         that the target does not exist before producing.
11674         (grub_modules_init.h): Remove the target before generating.
11675         (grub_emu_init.c): Likewise.
11677         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11679 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11681         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11682         for the target-specific tests. Make sure that we also have the
11683         up-to-date target variables for those tests.
11685 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11687         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11688         (PModule::rule): Likewise.
11690 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11692         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11693         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11694         target-specific flags should be prefixed.
11695         (PModule::rule): Likewise.
11697 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11699         * configure.ac (CMP): Check if cmp is available explicitly.
11701 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11703         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11704         (target_cpu): New variable.
11705         (pkglibdir): Use target_cpu instead of host_cpu.
11707         * util/i386/pc/grub-install.in (host_cpu): Removed.
11708         (target_cpu): New variable.
11709         (pkglibdir): Use target_cpu instead of host_cpu.
11711         * util/genmoddep.c: Removed.
11713         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11714         instead of GRUB_HOST_SIZEOF_VOID_P.
11715         * kern/dl.c: Likewise.
11717         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11718         ...
11719         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11720         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11721         (GRUB_TARGET_SIZEOF_LONG): ... this.
11722         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11723         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11724         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11725         to ...
11726         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11727         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11728         (GRUB_TARGET_SIZEOF_LONG): ... this.
11729         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11730         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11731         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11732         to ...
11733         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11734         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11735         (GRUB_TARGET_SIZEOF_LONG): ... this.
11736         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11737         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11739         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11740         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11741         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11742         instead of GRUB_HOST_SIZEOF_LONG.
11743         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11744         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11745         GRUB_CPU_WORDS_BIGENDIAN.
11746         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11747         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11748         grub_host_ssize_t.
11750         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11751         (genmoddep_SOURCES): Likewise.
11752         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11753         (genmoddep_SOURCES): Likewise.
11754         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11755         (genmoddep_SOURCES): Likewise.
11756         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11757         Likewise.
11758         (genmoddep_SOURCES): Likewise.
11760         * genmoddep.awk: New file.
11762         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11763         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11764         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11765         (PModule::rule): Likewise.
11766         (Program::rule): Likewise.
11767         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11768         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11769         respectively.
11771         * configure.ac: Rewritten intensively to use host and target
11772         instead of build and host, respectively.
11774         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11775         (host_cpu): Removed.
11776         (target_cpu): New variable.
11777         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11778         (BUILD_CC): Removed.
11779         (BUILD_CFLAGS): Likewise.
11780         (BUILD_CPPFLAGS): Likewise.
11781         (TARGET_CC): New variable.
11782         (TARGET_CFLAGS): Likewise.
11783         (TARGET_CPPFLAGS): Likewise.
11784         (TARGET_LDFLAGS): Likewise.
11785         (AWK): Likewise.
11786         (include): Use target_cpu instead of host_cpu.
11787         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11789         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11791 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11793         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11794         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11795         field 'false' to 'exec_on_false'.
11796         (grub_script_create_cmdif): Renamed argument names to reflect above
11797         changes.
11799         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11801         * normal/script.c (grub_script_create_cmdif): Likewise.
11803 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11805         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11806         top.
11807         (grub_hfsplus_btree_recptr): Likewise.
11808         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11809         FILEBLOCK both to pass a block number and store next block
11810         number.
11811         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11812         overflow file correctly. Specify errors appropriately, because
11813         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11814         grub_hfsplus_btree_recptr to get the pointer to a found key.
11815         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11816         is found.
11818         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11819         linux.mod.
11820         (_linux_mod_SOURCES): New variable.
11821         (_linux_mod_CFLAGS): Likewise.
11822         (_linux_mod_LDFLAGS): Likewise.
11823         (linux_mod_SOURCES): Likewise.
11824         (linux_mod_CFLAGS): Likewise.
11825         (linux_mod_LDFLAGS): Likewise.
11827         * DISTLIST: Added loader/i386/efi/linux.c,
11828         loader/i386/efi/linux_normal.c and
11829         include/grub/i386/efi/loader.h.
11831         * loader/i386/efi/linux.c: New file.
11832         * loader/i386/efi/linux_normal.c: Likewise.
11833         * include/grub/i386/efi/loader.h: Likewise.
11835 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11837         * commands/blocklist.c: New file.
11839         * DISTLIST: Added commands/blocklist.c.
11841         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11842         color for the background, and a darker color for the foreground.
11843         (grub_console_checkkey): Return READ_KEY.
11844         (grub_console_cls): Set the background to
11845         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11847         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11849         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11850         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11852         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11853         prototype.
11855         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11856         BG. The spec is wrong again.
11858         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11859         prototype.
11860         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11862         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11863         commands/blocklist.c.
11864         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11866         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11867         (blocklist_mod_SOURCES): New variable.
11868         (blocklist_mod_CFLAGS): Likewise.
11869         (blocklist_mod_LDFLAGS): Likewise.
11871 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11873         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11874         duplication.
11875         (lba_mode): Use %eax more intensively to reduce the code size.
11877 2006-05-20  Marco Gerards  <marco@gnu.org>
11879         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11881         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11882         for `menuentry'.
11883         (script): Accept leading newlines.
11884         (newlines): New rule to describe 0 or more newlines.
11885         (commands): Accept `command' with trailing newline.  Fixed the
11886         order in which arguments were passed to `grub_script_add_cmd'.
11887         Accept commands separated by newlines.
11888         (function): Changed to accept newlines.
11889         (menuentry) Rewritten.
11891         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11892         front of the list, instead of to the end.
11894 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11896         * util/i386/pc/grub-install.in (bindir): New variable.
11897         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11898         Shaver <lbgwjl@gmail.com>.
11900 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11902         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11903         grub/machine/linux.h
11904         * loader/i386/pc/linux.c: Likewise.
11906         * include/grub/i386/pc/linux.h: Moved to ...
11907         * include/grub/i386/linux.h: ... here.
11909         * include/grub/i386/linux.h (struct linux_kernel_params): New
11910         struct.
11912 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11914         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11915         checking.
11916         (grub_video_vbe_blit_glyph): Likewise.
11917         (grub_video_vbe_blit_bitmap): Likewise.
11918         (grub_video_vbe_blit_render_target): Likewise.
11920 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11922         * configure.ac (--with-platform): Properly quote the square
11923         brackets.
11925 2006-05-08  Marco Gerards  <marco@gnu.org>
11927         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11928         this...
11929         (kernel_elf_HEADERS): ...to this.  Updated all users.
11930         (grubof_symlist.c): Renamed from this...
11931         (kernel_elf_symlist.c): ...to this.  Updated all users.
11932         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11933         (grubof_SOURCES): Renamed from this...
11934         (kernel_elf_SOURCES): ...to this.
11935         (grubof_HEADERS): Renamed from this...
11936         (kernel_elf_HEADERS): ...to this.
11937         (grubof_CFLAGS): Renamed from this...
11938         (kernel_elf_CFLAGS): ...to this.
11939         (grubof_ASFLAGS): Renamed from this...
11940         (kernel_elf_ASFLAGS): ...to this.
11941         (grubof_LDFLAGS): Renamed from this...
11942         (kernel_elf_LDFLAGS): ...to this.
11944         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11945         this...
11946         (kernel_elf_HEADERS): ...to this.  Updated all users.
11947         (grubof_symlist.c): Renamed from this...
11948         (kernel_elf_symlist.c): ...to this.  Updated all users.
11949         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11950         (grubof_SOURCES): Renamed from this...
11951         (kernel_elf_SOURCES): ...to this.
11952         (grubof_HEADERS): Renamed from this...
11953         (kernel_elf_HEADERS): ...to this.
11954         (grubof_CFLAGS): Renamed from this...
11955         (kernel_elf_CFLAGS): ...to this.
11956         (grubof_ASFLAGS): Renamed from this...
11957         (kernel_elf_ASFLAGS): ...to this.
11958         (grubof_LDFLAGS): Renamed from this...
11959         (kernel_elf_LDFLAGS): ...to this.
11961         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11962         `kernel.elf' instead of `grubof'.
11964 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11966         Add --with-platform to configure. Use pkglibdir instead of
11967         pkgdatadir. This is reported by Roger Leigh.
11969         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11970         (host_vendor): Likewise.
11971         (host_os): Likewise.
11972         (pkgdatadir): Likewise.
11973         (platform): New variable.
11974         (pkglibdir): Likewise.
11975         Use PKGLIBDIR instead of PKGDATADIR.
11977         * util/i386/pc/grub-install.in (datadir): Removed.
11978         (host_vendor): Likewise.
11979         (host_os): Likewise.
11980         (pkgdatadir): Likewise.
11981         (platform): New variable.
11982         (pkglibdir): Likewise.
11983         Use PKGLIBDIR instead of PKGDATADIR.
11985         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11986         instead of GRUB_DATADIR.
11987         (main): Likewise.
11988         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11989         (main): Likewise.
11990         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11991         (main): Likewise.
11993         * configure.ac (--with-platform): New option.
11994         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11996         * Makefile.in: Include a makefile based on PLATFORM instead of
11997         HOST_VENDOR.
11998         (pkgdatadir): Not appended by the machine type.
11999         (pkglibdir): Appended by the machine type.
12000         (host_vendor): Removed.
12001         (platform): New variable.
12002         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12003         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12004         (uninstall): Likewise.
12006 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12008         Use the environment context in the menu. Remove the commands
12009         "default" and "timeout", and use variables instead.
12011         * normal/menu.c: Include grub/env.h.
12012         (print_entry): Cast TITLE to silence gcc.
12013         (get_timeout): New function.
12014         (set_timeout): Likewise.
12015         (get_entry_number): Likewise.
12016         (run_menu): Use a default entry, a fallback entry and a timeout
12017         in the environment variables "default", "fallback" and
12018         "timeout". Also, tweak the default entry if it is not within the
12019         current menu entries.
12020         (grub_menu_run): Use a fallback entry in the environment variable
12021         "fallback".
12023         * normal/main.c (read_config_file): Do not initialize
12024         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12025         NEWMENU->TIMEOUT.
12026         (grub_normal_execute): Use a data slot to store the menu.
12028         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12029         fallback_entry and timeout.
12030         (struct grub_menu_list): Removed.
12031         (grub_menu_list_t): Likewise.
12032         (struct grub_context): Likewise.
12033         (grub_context_t): Likewise.
12034         (grub_context_get): Likewise.
12035         (grub_context_get_current_menu): Likewise.
12036         (grub_context_push_menu): Likewise.
12037         (grub_context_pop_menu): Likewise.
12038         (grub_default_init): Likewise.
12039         (grub_default_fini): Likewise.
12040         (grub_timeout_init): Likewise.
12041         (grub_timeout_fini): Likewise.
12043         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12044         and timeout.mod.
12045         (normal_mod_SOURCES): Removed normal/context.c.
12047         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12048         commands/default.c, commands/timeout.c and normal/context.c.
12049         (normal_mod_SOURCES): Removed normal/context.c.
12051         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12052         commands/timeout.c and normal/context.c.
12053         (normal_mod_SOURCES): Removed normal/context.c.
12055         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12056         commands/default.c, commands/timeout.c and normal/context.c.
12057         (normal_mod_SOURCES): Removed normal/context.c.
12059         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12060         timeout.mod.
12061         (default_mod_SOURCES): Removed.
12062         (default_mod_CFLAGS): Likewise.
12063         (default_mod_LDFLAGS): Likewise.
12064         (timeout_mod_SOURCES): Removed.
12065         (timeout_mod_CFLAGS): Likewise.
12066         (timeout_mod_LDFLAGS): Likewise.
12068         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12069         normal/context.c.
12071         * commands/default.c: Removed.
12072         * commands/timeout.c: Likewise.
12073         * normal/context.c: Likewise.
12075 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12077         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12079 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12081         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12082         "next" to "prev" for readability.
12083         (struct grub_env_sorted_var): New struct.
12084         (grub_env_context): Renamed to ...
12085         (initial_context): ... this.
12086         (grub_env_var_context): Renamed to ...
12087         (current_context): ... this.
12088         (grub_env_find): Look only at CURRENT_CONTEXT.
12089         (grub_env_context_open): Rewritten to copy exported variables from
12090         previous context.
12091         (grub_env_context_close): Rewritten according to the new
12092         scheme. Also, add an assertion to prevent the initial context from
12093         removed.
12094         (grub_env_insert): Removed the code for the sorted list.
12095         (grub_env_remove): Likewise.
12096         (grub_env_export): Simply mark the variable with
12097         GRUB_ENV_VAR_GLOBAL.
12098         (grub_env_set): A cosmetic change for naming consistency.
12099         (grub_env_get): Likewise.
12100         (grub_env_unset): Likewise.
12101         (grub_env_iterate): Rewritten to sort variables within this
12102         function.
12103         (grub_register_variable_hook): Fixed for naming consistency. Call
12104         grub_env_find again, only if NAME is not found at the first time.
12105         (mangle_data_slot_name): New function.
12106         (grub_env_set_data_slot): Likewise.
12107         (grub_env_get_data_slot): Likewise.
12108         (grub_env_unset_data_slot): Likewise.
12110         * include/grub/env.h (grub_env_var_type): New enum.
12111         (GRUB_ENV_VAR_LOCAL): New constant.
12112         (GRUB_ENV_VAR_GLOBAL): Likewise.
12113         (GRUB_ENV_VAR_DATA): Likewise.
12114         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12115         "type".
12116         (grub_env_set): Replace VAR with NAME for consistency.
12117         (grub_register_variable_hook): Likewise.
12118         (grub_env_export): Specify the name of the argument.
12119         (grub_env_set_data_slot): New prototype.
12120         (grub_env_get_data_slot): Likewise.
12121         (grub_env_unset_data_slot): Likewise.
12123 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12125         Extend the loader so that GRUB can accept a loader which comes
12126         back to GRUB when a loaded image exits. Also, this change adds
12127         support for a chainloader on EFI.
12129         * term/efi/console.c: Include grub/misc.h.
12130         (grub_console_checkkey): Display a scan code on the top for
12131         debugging. This will be removed once the EFI port gets stable.
12132         Correct the scan code mapping.
12134         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12135         allocate memory from larger regions, in order to reduce the number
12136         of allocated regions. Otherwise, the MacOSX loader panics.
12137         (filter_memory_map): Avoid less than 1MB for compatibility with
12138         other loaders.
12139         (add_memory_regions): Allocate from the tail of a region, if
12140         possible, to avoid allocating a region near to 1MB, for the MacOSX
12141         loader.
12143         * kern/efi/init.c (grub_efi_set_prefix): Specify
12144         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12146         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12147         argument IMAGE_HANDLE and specify it to get a loaded image.
12148         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12149         grub_efi_get_loaded_image.
12150         (grub_efi_get_filename): Divide the length by the size of
12151         grub_efi_char16_t.
12152         (grub_efi_get_device_path): New function.
12153         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12154         the length by the size of grub_efi_char16_t for a file path device
12155         path node.
12157         * kern/loader.c (grub_loader_noreturn): New variable.
12158         (grub_loader_set): Accept a new argument NORETURN. Set
12159         GRUB_LOADER_NORETURN to NORETURN.
12160         All callers changed.
12161         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12162         grub_machine_fini.
12164         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12165         prototype.
12166         (grub_efi_get_loaded_image): Take an argument to specify an image
12167         handle.
12169         * include/grub/loader.h (grub_loader_set): Added one more argument
12170         NORETURN.
12172         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12173         instead of grub_efi_open_protocol.
12174         (grub_efidisk_get_device_name): Likewise.
12175         (grub_efidisk_close): Print a newline.
12176         (grub_efidisk_get_device_handle): Fixed to use
12177         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12178         GRUB_EFI_DEVICE_PATH_TYPE.
12180         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12181         * kern/efi/efi.c (device_path_guid): ... here.
12183         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12184         chain.mod.
12185         (kernel_mod_HEADERS): Added efi/disk.h.
12186         (_chain_mod_SOURCES): New variable.
12187         (_chain_mod_CFLAGS): Likewise.
12188         (_chain_mod_LDFLAGS): Likewise.
12189         (chain_mod_SOURCES): Likewise.
12190         (chain_mod_CFLAGS): Likewise.
12191         (chain_mod_LDFLAGS): Likewise.
12193         * DISTLIST: Added include/grub/efi/chainloader.h,
12194         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12196         * include/grub/efi/chainloader.h: New file.
12197         * loader/efi/chainloader.c: Likewise.
12198         * loader/efi/chainloader_normal.c: Likewise.
12200 2006-04-30  Marco Gerards  <marco@gnu.org>
12202         * commands/configfile.c (grub_cmd_source): New function.
12203         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12204         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12206 2006-04-30  Marco Gerards  <marco@gnu.org>
12208         * normal/execute.c (grub_script_execute_cmd): Change the return
12209         type to `grub_err_t'.  Correctly return the error.
12210         (grub_script_execute_cmdline): In case a command line is not a
12211         command or a function, try to interpret it as an assignment.
12213 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12215         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12216         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12217         skip a node whose name is obviously invalid as UTF-16,
12218         i.e. contains a NUL character. Stop the iteration when the last
12219         directory entry is found. Instead of using the return value of
12220         grub_hfsplus_btree_iterate_node, store the value in RET and use
12221         it, because the iterator can be stopped by the last directory
12222         entry.
12224 2006-04-30  Marco Gerards  <marco@gnu.org>
12226         * include/grub/env.h (grub_env_export): New prototype.  Reported
12227         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12229 2006-04-30  Marco Gerards  <marco@gnu.org>
12231         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12232         size of the extents in a catalog file record.
12234 2006-04-29  Marco Gerards  <marco@gnu.org>
12236         * commands/configfile.c (grub_cmd_configfile): Execute the
12237         configfile within its own context.
12239         * include/grub/env.h (grub_env_context_open): New prototype.
12240         (grub_env_context_close): Likewise.
12242         * kern/env.c (grub_env): Removed.
12243         (grub_env_sorted): Likewise.
12244         (grub_env_context): New variable.
12245         (grub_env_var_context): Likewise.
12246         (grub_env_find): Search both the active context and the global
12247         context.
12248         (grub_env_context_open): New function.
12249         (grub_env_context_close): Likewise.
12250         (grub_env_insert): Likewise.
12251         (grub_env_remove): Likewise.
12252         (grub_env_export): Likewise.
12253         (grub_env_set): Changed to use helper functions to avoid code
12254         duplication.
12255         (grub_env_iterate): Rewritten so both the current context and the
12256         global context are being used.
12258         * normal/command.c (export_command): New function.
12259         (grub_command_init): Register the `export' function.
12261 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12263         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12264         explicitly to suppress gcc's warnings.
12265         * fs/fat.c (grub_fat_find_dir): Likewise.
12266         (grub_fat_label): Likewise.
12267         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12268         (grub_xfs_mount): Likewise.
12269         (grub_xfs_label): Likewise.
12270         * fs/affs.c (grub_affs_mount): Likewise.
12271         (grub_affs_label): Likewise.
12272         (grub_affs_iterate_dir): Likewise.
12273         * fs/sfs.c (grub_sfs_mount): Likewise.
12274         (grub_sfs_iterate_dir): Likewise.
12275         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12276         * fs/hfs.c (grub_hfs_mount): Likewise.
12277         (grub_hfs_cmp_catkeys): Likewise.
12278         (grub_hfs_find_dir): Likewise.
12279         (grub_hfs_dir): Likewise.
12280         (grub_hfs_label): Likewise.
12281         * fs/jfs.c (grub_jfs_mount): Likewise.
12282         (grub_jfs_opendir): Likewise.
12283         (grub_jfs_getent): Likewise.
12284         (grub_jfs_lookup_symlink): Likewise.
12285         (grub_jfs_label): Likewise.
12286         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12287         (grub_hfsplus_iterate_dir): Likewise.
12288         (grub_hfsplus_btree_iterate_node): Made static.
12290         * util/grub-emu.c (prefix): New variable.
12291         (grub_machine_set_prefix): New function.
12292         (main): Do not set the environment variable "prefix" here. Only
12293         set PREFIX, which is used later by grub_machine_set_prefix.
12295         * include/grub/video.h: Do not include grub/symbol.h.
12296         (grub_video_register): Not exported. This symbol is not defined in
12297         the kernel.
12298         (grub_video_unregister): Likewise.
12299         (grub_video_iterate): Likewise.
12300         (grub_video_setup): Likewise.
12301         (grub_video_restore): Likewise.
12302         (grub_video_get_info): Likewise.
12303         (grub_video_get_blit_format): Likewise.
12304         (grub_video_set_palette): Likewise.
12305         (grub_video_get_palette): Likewise.
12306         (grub_video_set_viewport): Likewise.
12307         (grub_video_get_viewport): Likewise.
12308         (grub_video_map_color): Likewise.
12309         (grub_video_map_rgb): Likewise.
12310         (grub_video_map_rgba): Likewise.
12311         (grub_video_fill_rect): Likewise.
12312         (grub_video_blit_glyph): Likewise.
12313         (grub_video_blit_bitmap): Likewise.
12314         (grub_video_blit_render_target): Likewise.
12315         (grub_video_scroll): Likewise.
12316         (grub_video_swap_buffers): Likewise.
12317         (grub_video_create_render_target): Likewise.
12318         (grub_video_delete_render_target): Likewise.
12319         (grub_video_set_active_render_target): Likewise.
12321         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12322         Undefined.
12323         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12325         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12326         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12327         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12328         instead of $(srcdir)/genkernsyms.sh.
12330         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12331         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12332         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12333         instead of $(srcdir)/genkernsyms.sh.
12335         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12336         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12337         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12338         instead of $(srcdir)/genkernsyms.sh.
12340         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12341         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12342         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12343         instead of $(srcdir)/genkernsyms.sh.
12345         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12346         genkernsyms.sh.
12348         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12349         genkernsyms.sh.
12350         (gensymlist.sh): New target.
12351         (genkernsyms.sh): Likewise.
12353         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12354         genkernsyms.sh.in and gensymlist.sh.in.
12356         * genkernsyms.sh: Removed.
12357         * gensymlist.sh: Likewise.
12359         * genkernsyms.sh.in: New file.
12360         * gensymlist.sh.in: Likewise.
12362 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12364         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12365         clobber "prefix", since we may have already set it manually.
12367 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12369         * kern/misc.c (abort): New alias for grub_abort.
12371 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12373         A new machine-specific function "grub_machine_set_prefix" is
12374         defined. This is called after loading modules, so that a prefix
12375         initialization can use modules. Also, this change adds an
12376         intensive debugging feature for the memory manager via the
12377         configure option "--enable-mm-debug".
12379         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12380         PART.LEN.
12382         * kern/sparc64/ieee1275/init.c (abort): Removed.
12383         (grub_stop): Likewise.
12384         (grub_exit): New function.
12385         (grub_set_prefix): Renamed to ...
12386         (grub_machine_set_prefix): ... this.
12387         (grub_machine_init): Do not call grub_set_prefix.
12389         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12390         (grub_machine_set_prefix): ... this.
12391         (grub_machine_init): Do not call grub_set_prefix.
12393         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12394         (grub_machine_init): Do not set the prefix here.
12396         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12398         * kern/efi/init.c: Include grub/mm.h.
12399         (grub_efi_set_prefix): New function.
12401         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12402         (grub_efi_get_filename): New function.
12403         (grub_print_device_path): Renamed to ...
12404         (grub_efi_print_device_path): ... this.
12406         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12407         [MM_DEBUG] (grub_realloc): Likewise.
12408         [MM_DEBUG] (grub_free): Likewise.
12409         [MM_DEBUG] (grub_memalign): Likewise.
12410         [MM_DEBUG] (grub_mm_debug): New variable.
12411         [MM_DEBUG] (grub_debug_malloc): New function.
12412         [MM_DEBUG] (grub_debug_free): New function.
12413         [MM_DEBUG] (grub_debug_realloc): New function.
12414         [MM_DEBUG] (grub_debug_memalign): New function.
12416         * kern/misc.c (grub_abort): Print a newline to distinguish
12417         the message.
12419         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12420         grub_set_root_dev after loading modules. This is necessary when
12421         setting a prefix depends on modules.
12423         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12424         (grub_efi_print_device_path): ... this.
12425         (grub_efi_get_filename): New prototype.
12426         (grub_efi_set_prefix): Likewise.
12428         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12429         and grub/disk.h.
12430         (grub_efidisk_get_device_handle): New prototype.
12431         (grub_efidisk_get_device_name): Likewise.
12433         * include/grub/mm.h: Include config.h.
12434         (MM_DEBUG): Removed.
12435         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12436         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12437         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12438         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12439         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12440         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12441         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12442         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12443         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12445         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12447         * disk/efi/efidisk.c: Include grub/partition.h.
12448         (iterate_child_devices): New function.
12449         (add_device): First, compare only last device path nodes, so that
12450         devices are sorted by the types.
12451         (grub_efidisk_get_device_handle): New function.
12452         (grub_efidisk_get_device_name): Likewise.
12454         * configure.ac (--enable-mm-debug): New option to enable the
12455         memory manager debugging feature. This makes the binary much
12456         bigger, so is disabled by default.
12458 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12460         Use grub_abort instead of grub_stop, and grub_exit must be
12461         define in each architecture now. Also, this change adds support
12462         for EFI disks.
12464         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12465         (grub_getkey): New function.
12466         (grub_term_get_current): Likewise.
12468         * util/i386/pc/grub-setup.c: Include grub/term.h.
12469         (grub_getkey): New function.
12470         (grub_term_get_current): Likewise.
12472         * util/misc.c (grub_stop): Renamed to ...
12473         (grub_exit): ... this.
12475         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12476         (grub_exit): ... this.
12477         (grub_machine_init): Use grub_abort instead of abort.
12478         (grub_stop): Removed.
12480         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12481         abort.
12483         * kern/i386/pc/startup.S (grub_exit): New function.
12484         (cold_reboot): New label.
12486         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12487         (grub_efi_init): Call grub_efidisk_init.
12488         (grub_efi_fini): Call grub_efidisk_fini.
12490         * kern/efi/efi.c: Include grub/mm.h.
12491         (grub_efi_console_control_guid): Renamed to ...
12492         (console_control_guid): ... this.
12493         (grub_efi_loaded_image_guid): Renamed to ...
12494         (loaded_image_guid): ... this.
12495         (grub_efi_locate_handle): New function.
12496         (grub_efi_open_protocol): Likewise.
12497         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12498         GRUB_EFI_CONSOLE_CONTROL_GUID.
12499         (grub_efi_exit): Removed.
12500         (grub_stop): Likewise.
12501         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12502         (grub_exit): New function.
12503         (grub_print_device_path): Likewise.
12505         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12506         (grub_enter_rescue_mode): Register "exit".
12508         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12509         (grub_abort): New function.
12511         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12513         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12515         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12517         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12518         (grub_print_device_path): New prototype.
12519         (grub_efi_locate_handle): Likewise.
12520         (grub_efi_open_protocol): Likewise.
12522         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12523         * disk/efi/efidisk.c: Likewise.
12525         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12527         * include/grub/efi/console_control.h
12528         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12530         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12531         last 8 bytes as an array.
12532         (GRUB_EFI_DISK_IO_GUID): New macro.
12533         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12534         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12535         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12536         grub_uint8_t.
12537         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12538         (struct grub_efi_device_path): Rename the member "sub_type" to
12539         "subtype".
12540         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12541         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12542         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12543         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12544         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12545         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12546         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12547         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12548         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12549         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12550         (struct grub_efi_pci_device_path): New structure.
12551         (grub_efi_pci_device_path_t): New type.
12552         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12553         (struct grub_efi_pccard_device_path): New structure.
12554         (grub_efi_pccard_device_path_t): New type.
12555         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12556         (struct grub_efi_memory_mapped_device_path): New structure.
12557         (grub_efi_memory_mapped_device_path_t): New type.
12558         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12559         (struct grub_efi_vendor_device_path): New structure.
12560         (grub_efi_vendor_device_path_t): New type.
12561         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12562         (struct grub_efi_controller_device_path): New structure.
12563         (grub_efi_controller_device_path_t): New type.
12564         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12565         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12566         (struct grub_efi_acpi_device_path): New structure.
12567         (grub_efi_acpi_device_path_t): New type.
12568         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12569         (struct grub_efi_expanded_acpi_device_path): New structure.
12570         (grub_efi_expanded_acpi_device_path_t): New type.
12571         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12572         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12573         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12574         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12575         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12576         (struct grub_efi_atapi_device_path): New structure.
12577         (grub_efi_atapi_device_path_t): New type.
12578         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12579         (struct grub_efi_fibre_channel_device_path): New structure.
12580         (grub_efi_fibre_channel_device_path_t): New type.
12581         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12582         (struct grub_efi_1394_device_path): New structure.
12583         (grub_efi_1394_device_path_t): New type.
12584         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12585         (struct grub_efi_usb_device_path): New structure.
12586         (grub_efi_usb_device_path_t): New type.
12587         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12588         (struct grub_efi_usb_class_device_path): New structure.
12589         (grub_efi_usb_class_device_path_t): New type.
12590         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12591         (struct grub_efi_i2o_device_path): New structure.
12592         (grub_efi_i2o_device_path_t): New type.
12593         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12594         (struct grub_efi_mac_address_device_path): New structure.
12595         (grub_efi_mac_address_device_path_t): New type.
12596         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12597         (struct grub_efi_ipv4_device_path): New structure.
12598         (grub_efi_ipv4_device_path_t): New type.
12599         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12600         (struct grub_efi_ipv6_device_path): New structure.
12601         (grub_efi_ipv6_device_path_t): New type.
12602         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12603         (struct grub_efi_infiniband_device_path): New structure.
12604         (grub_efi_infiniband_device_path_t): New type.
12605         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12606         (struct grub_efi_uart_device_path): New structure.
12607         (grub_efi_uart_device_path_t): New type.
12608         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12609         (struct grub_efi_vendor_messaging_device_path): New structure.
12610         (grub_efi_vendor_messaging_device_path_t): New type.
12611         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12612         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12613         (struct grub_efi_hard_drive_device_path): New structure.
12614         (grub_efi_hard_drive_device_path_t): New type.
12615         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12616         (struct grub_efi_cdrom_device_path): New structure.
12617         (grub_efi_cdrom_device_path_t): New type.
12618         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12619         (struct grub_efi_vendor_media_device_path): New structure.
12620         (grub_efi_vendor_media_device_path_t): New type.
12621         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12622         (struct grub_efi_file_path_device_path): New structure.
12623         (grub_efi_file_path_device_path_t): New type.
12624         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12625         (struct grub_efi_protocol_device_path): New structure.
12626         (grub_efi_protocol_device_path_t): New type.
12627         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12628         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12629         (struct grub_efi_bios_device_path): New structure.
12630         (grub_efi_bios_device_path_t): New type.
12631         (struct grub_efi_disk_io): New structure.
12632         (grub_efi_disk_io_t): New type.
12633         (struct grub_efi_block_io_media): New structure.
12634         (grub_efi_block_io_media_t): New type.
12635         (struct grub_efi_block_io): New structure.
12636         (grub_efi_block_io_t): New type.
12638         * include/grub/misc.h (grub_stop): Removed.
12639         (grub_exit): New prototype.
12640         (grub_abort): Likewise.
12642         * include/grub/disk.h (enum grub_disk_dev_id): Added
12643         GRUB_DISK_DEVICE_EFIDISK_ID.
12645         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12646         disk/efi/efidisk.c.
12647         (kernel_syms.lst): Remove the target if an error occurs.
12649 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12651         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12652         as it was simply too buggy.
12654 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12656         * kern/misc.c (grub_lltoa): New function.
12657         (grub_vsprintf): Added support for the long long suffix,
12658         i.e. "ll".
12660 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12662         * Makefile.in (LDFLAGS): Add variable.
12663         (LD): Remove variable.
12664         * configure.ac: Add -m32 to LDFLAGS.
12665         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12666         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12667         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12668         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12669         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12670         variables.
12671         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12672         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12673         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12675 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12677         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12678         length for unknown glyph.
12680 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12682         Add support for pre-loaded modules into the EFI port.
12684         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12685         completely. Accept one more argument DIR. The caller has changed.
12687         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12689         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12690         (grub_efi_loaded_image_guid): New variable.
12691         (grub_efi_get_loaded_image): New function.
12692         (grub_arch_modules_addr): Likewise.
12694         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12695         prototype.
12697         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12698         (struct grub_efi_loaded_image): New structure.
12699         (grub_efi_loaded_image_t): New type.
12701 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12703         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12704         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12705         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12707 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12709         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12711 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12713         * DISTLIST: Added include/grub/efi/console.h,
12714         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12715         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12717         * include/grub/efi/console.h: New file.
12718         * include/grub/efi/time.h: Likewise.
12719         * include/grub/i386/efi/kernel.h: Likewise.
12720         * kern/efi/init.c: Likewise.
12721         * kern/efi/mm.c: Likewise.
12722         * term/efi/console.c: Likewise.
12724         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12725         (grub_stop): Removed.
12726         (grub_get_rtc): Likewise.
12727         (grub_machine_init): Simply call grub_efi_init.
12728         (grub_machine_fini): Call grub_efi_fini.
12730         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12731         (grub_efi_output_string): Removed.
12732         (grub_efi_stall): New function.
12733         (grub_stop): Likewise.
12734         (grub_get_rtc): Likewise.
12736         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12737         (grub_efi_stall): New prototype.
12738         (grub_efi_allocate_pages): Likewise.
12739         (grub_efi_free_pages): Likewise.
12740         (grub_efi_get_memory_map): Likewise.
12741         (grub_efi_mm_init): Likewise.
12742         (grub_efi_mm_fini): Likewise.
12743         (grub_efi_init): Likewise.
12744         (grub_efi_fini): Likewise.
12746         * include/grub/i386/efi/time.h: Do not include
12747         grub/symbol.h. Include grub/efi/time.h.
12748         (GRUB_TICKS_PER_SECOND): Removed.
12749         (grub_get_rtc): Likewise.
12751         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12752         Added padding. The EFI spec is buggy.
12753         (GRUB_EFI_BLACK): New macro.
12754         (GRUB_EFI_BLUE): Likewise.
12755         (GRUB_EFI_GREEN): Likewise.
12756         (GRUB_EFI_CYAN): Likewise.
12757         (GRUB_EFI_RED): Likewise.
12758         (GRUB_EFI_MAGENTA): Likewise.
12759         (GRUB_EFI_BROWN): Likewise.
12760         (GRUB_EFI_LIGHTGRAY): Likewise.
12761         (GRUB_EFI_BRIGHT): Likewise.
12762         (GRUB_EFI_DARKGRAY): Likewise.
12763         (GRUB_EFI_LIGHTBLUE): Likewise.
12764         (GRUB_EFI_LIGHTGREEN): Likewise.
12765         (GRUB_EFI_LIGHTCYAN): Likewise.
12766         (GRUB_EFI_LIGHTRED): Likewise.
12767         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12768         (GRUB_EFI_YELLOW): Likewise.
12769         (GRUB_EFI_WHITE): Likewise.
12770         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12771         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12772         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12773         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12774         (GRUB_EFI_BACKGROUND_RED): Likewise.
12775         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12776         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12777         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12778         (GRUB_EFI_TEXT_ATTR): Likewise.
12780         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12781         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12782         (kernel_mod_HEADERS): Added efi/time.h.
12784 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12786         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12787         include/grub/efi/api.h, include/grub/efi/console_control.h,
12788         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12789         include/grub/i386/efi/time.h, kern/efi/efi.c,
12790         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12791         and util/i386/efi/grub-mkimage.c.
12793         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12795         * genmk.rb (PModule#rule): Do not export symbols if
12796         #{prefix}_EXPORTS is set to "no".
12798         * conf/i386-efi.mk: New file.
12799         * conf/i386-efi.rmk: Likewise.
12800         * include/grub/efi/api.h: Likewise.
12801         * include/grub/efi/console_control.h: Likewise.
12802         * include/grub/efi/efi.h: Likewise.
12803         * include/grub/efi/pe32.h: Likewise.
12804         * include/grub/i386/efi/time.h: Likewise.
12805         * kern/efi/efi.c: Likewise.
12806         * kern/i386/efi/init.c: Likewise.
12807         * kern/i386/efi/startup.S: Likewise.
12808         * util/i386/efi/grub-mkimage.c: Likewise.
12810 2006-04-17  Marco Gerards  <marco@gnu.org>
12812         * include/grub/script.h: Include <grub/parser.h> and
12813         "grub_script.tab.h".
12814         (struct grub_lexer_param): New struct.
12815         (struct grub_parser_param): Likewise.
12816         (grub_script_create_arglist): Pass the state in an argument.
12817         (grub_script_add_arglist): Likewise.
12818         (grub_script_create_cmdline): Likewise.
12819         (grub_script_create_cmdblock): Likewise.
12820         (grub_script_create_cmdif): Likewise.
12821         (grub_script_create_cmdmenu): Likewise.
12822         (grub_script_add_cmd): Likewise.
12823         (grub_script_arg_add): Likewise.
12824         (grub_script_lexer_ref): Likewise.
12825         (grub_script_lexer_deref): Likewise.
12826         (grub_script_lexer_record_start): Likewise.
12827         (grub_script_lexer_record_stop): Likewise.
12828         (grub_script_mem_record): Likewise.
12829         (grub_script_mem_record_stop): Likewise.
12830         (grub_script_malloc): Likewise.
12831         (grub_script_yylex): Likewise.
12832         (grub_script_yyparse): Likewise.
12833         (grub_script_yyerror): Likewise.
12834         (grub_script_yylex): Likewise.
12835         (grub_script_lexer_init): Return the state.
12837         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12838         (grub_script_lexer_done): Likewise.
12839         (grub_script_lexer_getline): Likewise.
12840         (grub_script_lexer_refs): Likewise.
12841         (script): Likewise.
12842         (newscript): Likewise.
12843         (record): Likewise.
12844         (recording): Likewise.
12845         (recordpos): Likewise.
12846         (recordlen): Likewise.
12847         (grub_script_lexer_init): Return the state instead of setting
12848         global variables.
12849         (grub_script_lexer_ref): Use the newly added argument for state
12850         instead of globals.
12851         (grub_script_lexer_deref): Likewise.
12852         (grub_script_lexer_record_start): Likewise.
12853         (grub_script_lexer_record_stop): Likewise.
12854         (recordchar): Likewise.
12855         (nextchar): Likewise.
12856         (grub_script_yylex2): Likewise.
12857         (grub_script_yylex): Likewise.
12858         (grub_script_yyerror): Likewise.
12860         * normal/parser.y (func_mem): Removed variable.
12861         (menu_entry): Likewise.
12862         (err): Likewise.
12863         (%lex-param): New parser option.
12864         (%parse-param): Likewise.
12865         (script): Always return the AST.
12866         (argument): Pass the state around.
12867         (arguments): Likewise.
12868         (grubcmd): Likewise.
12869         (commands): Likewise.
12870         (function): Likewise.
12871         (menuentry): Likewise.
12872         (if_statement): Likewise.
12873         (if): Likewise.
12875         * normal/script.c (grub_script_memused): Removed variable.
12876         (grub_script_parsed): Likewise.
12877         (grub_script_malloc): Added a state argument.  Use that instead of
12878         global variables.
12879         (grub_script_mem_record): Likewise.
12880         (grub_script_mem_record_stop): Likewise.
12881         (grub_script_arg_add): Likewise.
12882         (grub_script_add_arglist): Likewise.
12883         (grub_script_create_cmdline): Likewise.
12884         (grub_script_create_cmdif): Likewise.
12885         (grub_script_create_cmdmenu): Likewise.
12886         (grub_script_add_cmd): Likewise.
12887         (grub_script_parse): Setup the state before calling the parser.
12889 2006-04-16  Marco Gerards  <marco@gnu.org>
12891         * normal/command.c (grub_command_init): Remove the title command.
12893         * normal/lexer.c (grub_script_yylex): Renamed from this...
12894         (grub_script_yylex2): ... to this.
12895         (grub_script_yylex): New function.  Temporary
12896         introduced to filter some tokens.
12897         (grub_script_yyerror): Print a newline.
12899         * normal/main.c (read_config_file): Output information about the
12900         lines that contain errors.  Wait for a key after all lines have
12901         been processed.  Don't return an empty menu.
12903         * normal/parser.y (func_mem): Don't initialize.
12904         (menu_entry): Likewise.
12905         (err): New variable.
12906         (script): Don't return anything when an error was encountered.
12907         (ws, returns): Removed rules.
12908         (argument): Disabled concatenated variable support.
12909         (arguments): Remove explicit separators.
12910         (grubcmd): Likewise.
12911         (function): Likewise.
12912         (menuentry): Likewise.
12913         (if): Likewise.
12914         (commands): Likewise.  Add error handling.
12916         * normal/script.c (grub_script_create_cmdline): If
12917         `grub_script_parsed' is 0, assume the parser encountered an error.
12919 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12921         * configure.ac: Add support for EFI. Fix the typo
12922         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12924 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12926         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12927         foreign multibyte characters should be shown correctly.
12929 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12931         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12932         calculation.
12933         (read_config_file): Made it to close file before returning.
12935 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12937         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12938         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12939         video/i386/pc/vbefill.c.
12941         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12942         video/i386/pc/vbefill.c.
12944         * include/grub/video.h (grub_video_blit_format): New enum.
12945         (grub_video_mode_info): Added new member blit_format.
12946         (grub_video_get_blit_format): New function prototype.
12948         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12949         function prototype.
12950         (grub_video_vbe_map_rgb): Likewise.
12951         (grub_video_vbe_unmap_color): Likewise.
12953         * include/grub/i386/pc/vbeblit.h: New file.
12955         * include/grub/i386/pc/vbefill.h: New file.
12957         * video/video.c (grub_video_get_blit_format): New function.
12958         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12959         (grub_video_vbe_map_rgb): Likewise.
12960         (grub_video_vbe_unmap_color): Likewise.
12962         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12963         optimized fills.
12964         (grub_video_vbe_blit_render_target): Changed to use more optimized
12965         blits.
12966         (grub_video_vbe_setup): Added detection for optimized settings.
12967         (grub_video_vbe_create_render_target): Likewise.
12969         * video/i386/pc/vbeblit.c: New file.
12971         * video/i386/pc/vbefill.c: New file.
12973 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12975         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12976         here...
12978         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12979         parsing to support both hex and dec ranges.  If filename was missing
12980         show usage information.
12982 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12984         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12985         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12987         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12988         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12989         (video_mod_SOURCES): Added.
12990         (video_mod_CFLAGS): Likewise.
12991         (video_mod_LDFLAGS): Likewise.
12992         (gfxterm_mod_SOURCES): Likewise.
12993         (gfxterm_mod_CFLAGS): Likewise.
12994         (gfxterm_mod_LDFLAGS): Likewise.
12995         (videotest_mod_SOURCES): Likewise.
12996         (videotest_mod_CFLAGS): Likewise.
12997         (videotest_mod_LDFLAGS): Likewise.
12998         (vesafb_mod_SOURCES): Removed.
12999         (vesafb_mod_CFLAGS): Likewise.
13000         (vesafb_mod_LDFLAGS): Likewise.
13001         (vga_mod_SOURCES): Likewise.
13002         (vga_mod_CFLAGS): Likewise.
13003         (vga_mod_LDFLAGS): Likewise.
13005         * commands/videotest.c: New file.
13007         * font/manager.c (fill_with_default_glyph): Modified to use
13008         grub_font_glyph.
13009         (grub_font_get_glyph): Likewise.
13010         (fontmanager): Renamed from this...
13011         (font_manager): ... to this.
13013         * include/grub/font.h (grub_font_glyph): Added new structure.
13014         (grub_font_get_glyph): Modified to use grub_font_glyph.
13016         * include/grub/misc.h (grub_abs): Added as inline function.
13018         * include/grub/video.h: New file.
13020         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13021         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13022         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13023         (grub_vbe_get_controller_info): Renamed from this...
13024         (grub_vbe_bios_get_controller_info): ... to this.
13025         (grub_vbe_get_mode_info): Renamed from this...
13026         (grub_vbe_bios_get_mode_info): ... to this.
13027         (grub_vbe_set_mode): Renamed from this...
13028         (grub_vbe_bios_set_mode): ... to this.
13029         (grub_vbe_get_mode): Renamed from this...
13030         (grub_vbe_bios_get_mode): ... to this.
13031         (grub_vbe_set_memory_window): Renamed from this...
13032         (grub_vbe_bios_set_memory_window): ... to this.
13033         (grub_vbe_get_memory_window): Renamed from this...
13034         (grub_vbe_bios_get_memory_window): ... to this.
13035         (grub_vbe_set_scanline_length): Renamed from this...
13036         (grub_vbe_set_scanline_length): ... to this.
13037         (grub_vbe_get_scanline_length): Renamed from this...
13038         (grub_vbe_bios_get_scanline_length): ... to this.
13039         (grub_vbe_set_display_start): Renamed from this...
13040         (grub_vbe_bios_set_display_start): ... to this.
13041         (grub_vbe_get_display_start): Renamed from this...
13042         (grub_vbe_bios_get_display_start): ... to this.
13043         (grub_vbe_set_palette_data): Renamed from this...
13044         (grub_vbe_bios_set_palette_data): ... to this.
13045         (grub_vbe_set_pixel_rgb): Removed.
13046         (grub_vbe_set_pixel_index): Likewise.
13048         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13049         from this...
13050         (grub_vbe_bios_get_controller_info): ... to this.
13051         (grub_vbe_get_mode_info): Renamed from this...
13052         (grub_vbe_bios_get_mode_info): ... to this.
13053         (grub_vbe_set_mode): Renamed from this...
13054         (grub_vbe_bios_set_mode): ... to this.
13055         (grub_vbe_get_mode): Renamed from this...
13056         (grub_vbe_bios_get_mode): ... to this.
13057         (grub_vbe_set_memory_window): Renamed from this...
13058         (grub_vbe_bios_set_memory_window): ... to this.
13059         (grub_vbe_get_memory_window): Renamed from this...
13060         (grub_vbe_bios_get_memory_window): ... to this.
13061         (grub_vbe_set_scanline_length): Renamed from this...
13062         (grub_vbe_set_scanline_length): ... to this.
13063         (grub_vbe_get_scanline_length): Renamed from this...
13064         (grub_vbe_bios_get_scanline_length): ... to this.
13065         (grub_vbe_set_display_start): Renamed from this...
13066         (grub_vbe_bios_set_display_start): ... to this.
13067         (grub_vbe_get_display_start): Renamed from this...
13068         (grub_vbe_bios_get_display_start): ... to this.
13069         (grub_vbe_set_palette_data): Renamed from this...
13070         (grub_vbe_bios_set_palette_data): ... to this.
13071         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13072         getting corrupted after calling it.  Added more pushes and pops.
13073         (grub_vbe_bios_set_mode): Likewise.
13074         (grub_vbe_bios_get_mode): Likewise.
13075         (grub_vbe_bios_get_memory_window): Likewise.
13076         (grub_vbe_bios_set_scanline_length): Likewise.
13077         (grub_vbe_bios_get_scanline_length): Likewise.
13078         (grub_vbe_bios_get_display_start): Likewise.
13079         (grub_vbe_bios_set_palette_data): Likewise.
13081         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13082         (cl_insert): Likewise.
13083         (cl_delete): Likewise.
13085         * term/gfxterm.c: New file.
13087         * term/i386/pc/vesafb.c: Removed file.
13089         * video/video.c: New file.
13091         * video/i386/pc/vbe.c (real2pm): Added new function.
13092         (grub_video_vbe_draw_pixel): Likewise.
13093         (grub_video_vbe_get_video_ptr): Likewise.
13094         (grub_video_vbe_get_pixel): Likewise
13095         (grub_video_vbe_init): Likewise.
13096         (grub_video_vbe_fini): Likewise.
13097         (grub_video_vbe_setup): Likewise.
13098         (grub_video_vbe_get_info): Likewise.
13099         (grub_video_vbe_set_palette): Likewise.
13100         (grub_video_vbe_get_palette): Likewise.
13101         (grub_video_vbe_set_viewport): Likewise.
13102         (grub_video_vbe_get_viewport): Likewise.
13103         (grub_video_vbe_map_color): Likewise.
13104         (grub_video_vbe_map_rgb): Likewise.
13105         (grub_video_vbe_map_rgba): Likewise.
13106         (grub_video_vbe_unmap_color): Likewise.
13107         (grub_video_vbe_fill_rect): Likewise.
13108         (grub_video_vbe_blit_glyph): Likewise.
13109         (grub_video_vbe_blit_bitmap): Likewise.
13110         (grub_video_vbe_blit_render_target): Likewise.
13111         (grub_video_vbe_scroll): Likewise.
13112         (grub_video_vbe_swap_buffers): Likewise.
13113         (grub_video_vbe_create_render_target): Likewise.
13114         (grub_video_vbe_delete_render_target): Likewise.
13115         (grub_video_vbe_set_active_render_target): Likewise.
13116         (grub_vbe_set_pixel_rgb): Remove function.
13117         (grub_vbe_set_pixel_index): Likewise.
13118         (index_color_mode): Remove static variable.
13119         (active_mode): Likewise.
13120         (framebuffer): Likewise.
13121         (bytes_per_scan_line): Likewise.
13122         (grub_video_vbe_adapter): Added new static variable.
13123         (framebuffer): Likewise.
13124         (render_target): Likewise.
13125         (initial_mode): Likewise.
13126         (mode_in_use): Likewise.
13127         (mode_list): Likewise.
13129 2006-03-10  Marco Gerards  <marco@gnu.org>
13131         * configure.ac (AC_INIT): Bumped to 1.93.
13133         * DISTLIST: Added `include/grub/hfs.h'.
13135 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13137         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13138         18H, which might help the BIOS falling back to next boot media.
13140 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13142         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13143         Poe Chen <poe.poechen@gmail.com>.
13145 2006-01-17  Marco Gerards  <marco@gnu.org>
13147         * include/grub/normal.h: Include <grub/script.h>.
13148         (grub_command_list): Removed struct.
13149         (grub_command_list_t): Removed type.
13150         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13151         members `commands' and `sourcecode'.
13152         * include/grub/script.h: Add inclusion guards.
13153         (grub_script_cmd_menuentry): New struct.
13154         (grub_script_execute_menuentry): New prototype.
13155         (grub_script_lexer_record_start): Likewise.
13156         (grub_script_lexer_record_stop): Likewise.
13157         * normal/execute.c (grub_script_execute_menuentry): New function.
13158         * normal/lexer.c (record, recording, recordpos, recordlen): New
13159         variables.
13160         (grub_script_lexer_record_start): New function.
13161         (grub_script_lexer_record_stop): Likewise.
13162         (recordchar): Likewise.
13163         (nextchar): Likewise.
13164         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13165         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13166         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13167         (current_menu): New variable.
13168         (free_menu): Mainly rewritten.
13169         (grub_normal_menu_addentry): New function.
13170         (read_config_file): Rewritten.
13171         * normal/menu.c (run_menu_entry): Mainly rewritten.
13172         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13173         the menu entry.
13174         (run): Mainly rewritten.
13175         * normal/parser.y (menu_entry): New variable.
13176         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13177         (menuentry): New rule.
13178         (command): Add `menuentry'.
13179         (if_statement): Allow additional returns before `fi'.
13180         * normal/script.c (grub_script_create_cmdmenu): New function.
13182 2006-01-03  Marco Gerards  <marco@gnu.org>
13184         * INSTALL: GNU Bison is required.
13185         * configure.ac: Rewritten the test to detect Bison.
13186         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13187         <xun.sun.cn@gmail.com>.
13189 2006-01-03  Marco Gerards  <marco@gnu.org>
13191         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13192         the HFS+ filesystem to filesystem blocks.
13193         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13194         GCC warning is silenced.
13196 2006-01-03  Marco Gerards  <marco@gnu.org>
13198         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13199         read from disk from big endian to host byte order.
13201 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13203         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13204         documentation.
13205         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13206         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13207         embedded HFS+ filesystem.
13208         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13209         (grub_hfs_sblock): Move from here...
13210         * include/grub/hfs.h: To here...  New file.
13211         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13212         documentation.
13213         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13214         New macros.
13215         (grub_hfsplus_volheader): Change type of member `magic' to
13216         `grub_uint16_t'.
13217         (grub_hfsplus_data): Add new member `embedded_offset'.
13218         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13219         returned block.
13220         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13221         Calculate the offset.
13223 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13225         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13226         Removed.
13227         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13229 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13231         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13232         ENV->NAME is NULL after allocating ENV->VALUE.
13234 2005-12-25  Marco Gerards  <marco@gnu.org>
13236         * kern/env.c (grub_env_set): Rewritten the error handling code.
13238 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13240         * geninit.sh: Made more robust, and more portable.
13242 2005-12-25  Marco Gerards  <marco@gnu.org>
13244         Add support for Apple HFS+ filesystems.
13246         * fs/hfsplus.c: New file.
13248         * DISTLIST: Added `fs/hfsplus.c'.
13250         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13251         (hfsplus_mod_SOURCES): New variable.
13252         (hfsplus_mod_CFLAGS): Likewise.
13253         (hfsplus_mod_LDFLAGS): Likewise.
13254         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13255         (grub_setup_SOURCES): Likewise.
13256         (grub_mkdevicemap_SOURCES): Likewise.
13257         (grub_emu_SOURCES): Likewise.
13258         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13260         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13262         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13264 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13266         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13267         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13268         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13269         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13270         normal/lexer.c, normal/parser.y, normal/script.c, and
13271         partmap/gpt.c.
13272         Removed kern/sparc64/cache.c.
13274         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13275         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13276         grub_emu_init.c.
13278         * configure.ac (AC_INIT): Bumped to 1.92.
13280 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13282         * kern/err.c (grub_error_push): Added new function to support error
13283         stacks.
13284         (grub_error_pop): Likewise.
13285         (grub_error_stack_items): New local variable to support error stacks.
13286         (grub_error_stack_pos): Likewise.
13287         (grub_error_stack_assert): Likewise.
13288         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13289         stack depth.
13290         (grub_print_error): Added support to print errors from error stack.
13292         * include/grub/err.h (grub_error_push): Added function prototype.
13293         (grub_error_pop): Likewise.
13295 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13297         * configure.ac: Accept `powerpc64' as host_cpu.
13298         (amd64): Rename to `biarch32'.
13300         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13301         non-cacheline-aligned addresses.
13303         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13304         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13305         if `size' is non-zero.
13307 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13309         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13310         and `cd' to make sure the filename is not prefixed with a
13311         directory name.
13312         (pkgdata_MODULES): Add `gpt.mod'.
13313         (gpt_mod_SOURCES): New variable.
13314         (gpt_mod_CFLAGS): Likewise.
13315         (gpt_mod_LDFLAGS): Likewise.
13317         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13319         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13320         New macro.
13322         * partmap/gpt.c: New file.
13324         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13325         GPT partition map is detected.
13327 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13329         * commands/i386/pc/play.c: New file.
13330         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13331         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13332         macros.
13334 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13336         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13337         ((unused))' to silence gcc warning.
13339 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13341         * configure.ac: Correct `AC_PROG_YACC' test.
13343 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13345         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13346         check before installing files.
13348 2005-11-22  Mike Small  <smallm@panix.com>
13350         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13351         number regex so multidigit numbers are recognized correctly.
13353 2005-11-22  Mike Small  <smallm@panix.com>
13355         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13356         debugging message before attempting to claim memory.
13357         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13358         multiple addresses in case of failure.
13360 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13362         * term/tparm.c (get_space): Remove empty `if' statement.
13364         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13366         * kern/parser.c (check_varstate): Rename `state' to 's'.
13368 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13370         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13371         variable definitions to the beginning of each function.  Sort stack
13372         variables by size.
13373         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13374         `buf' argument to `char *'.
13376 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13378         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13379         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13380         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13381         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13382         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13383         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13384         configfile.mod, search.mod, gzio.mod and test.mod.
13385         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13386         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13387         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13388         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13389         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13390         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13391         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13392         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13393         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13394         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13395         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13396         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13397         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13398         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13399         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13400         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13401         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13402         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13403         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13404         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13405         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13406         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13407         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13409         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13410         `grep --include'.
13411         (pkgdata_MODULES): Add test.mod.
13413 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13415         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13416         appending to variables with "+=".
13417         (PModule): Use full pathname to generate *.lst filenames.
13419         * Makefile.in: Fixed list rules moved from genmk.rb.
13420         (.DELETE_ON_ERROR): New special target.
13421         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13423         * conf/i386-pc.rmk: Include conf/common.mk.
13424         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13425         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13426         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13427         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13428         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13429         configfile.mod, search.mod, gzio.mod and test.mod.
13430         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13431         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13432         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13433         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13434         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13435         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13436         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13437         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13438         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13439         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13440         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13441         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13442         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13443         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13444         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13445         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13446         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13447         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13448         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13449         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13450         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13451         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13452         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13453         here...
13454         * conf/common.rmk: ... to here.  New file.
13456         * conf/common.mk: New file.
13458 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13460         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13461         (grub_script.tab.c): ... here.
13463         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13464         (grub_script.tab.c): ... here.
13466         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13467         (grub_script.tab.c): ... here.
13469         * normal/command.c (grub_command_find): Fixed a memory leak of
13470         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13472 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13474         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13475         "@" which marks the start of a comment on ARM.
13476         (VARIABLE): Likewise.
13478 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13480         Add support for Linux/ADFS partition tables.
13482         * partmap/acorn.c: New file.
13484         * include/grub/acorn_filecore.h: Likewise.
13486         * DISTLIST: Added `partmap/acorn.c' and
13487         `include/grub/acorn_filecore.h'.
13489         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13490         `partmap/acorn.c'.
13491         (pkgdata_MODULES): Add `acorn.mod'.
13492         (acorn_mod_SOURCES): New variable.
13493         (acorn_mod_CFLAGS): Likewise.
13495         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13496         `partmap/acorn.c'.
13497         (pkgdata_MODULES): Add `acorn.mod'.
13498         (acorn_mod_SOURCES): New variable.
13499         (acorn_mod_CFLAGS): Likewise.
13501         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13502         (pkgdata_MODULES): Add `acorn.mod'.
13503         (acorn_mod_SOURCES): New variable.
13504         (acorn_mod_CFLAGS): Likewise.
13505         (acorn_mod_LDFLAGS): Likewise.
13507         * include/types.h (grub_disk_addr_t): New typedef.
13509 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13511         * geninit.sh: New file.
13513         * geninitheader.sh: Likewise.
13515         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13516         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13517         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13518         * commands/configfile.c (grub_configfile_init)
13519         (grub_configfile_fini): Likewise.
13520         * commands/default.c (grub_default_init, grub_default_fini):
13521         Likewise.
13522         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13523         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13524         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13525         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13526         Likewise.
13527         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13528         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13529         Likewise.
13530         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13531         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13532         Likewise.
13533         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13534         Likewise.
13535         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13536         Likewise.
13537         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13538         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13539         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13540         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13541         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13542         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13543         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13544         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13545         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13546         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13547         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13548         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13549         * partmap/amiga.c (grub_amiga_partition_map_init)
13550         (grub_amiga_partition_map_fini): Likewise.
13551         * partmap/apple.c (grub_apple_partition_map_init)
13552         (grub_apple_partition_map_fini): Likewise.
13553         * partmap/pc.c (grub_pc_partition_map_init)
13554         (grub_pc_partition_map_fini): Likewise.
13555         * partmap/sun.c (grub_sun_partition_map_init,
13556         grub_sun_partition_map_fini): Likewise.
13557         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13558         Likewise.
13560         * util/grub-emu.c: Include <grub_modules_init.h>.
13561         (main): Don't initialize and de-initialize any modules directly,
13562         use `grub_init_all' and `grub_fini_all' instead.
13564         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13565         `grub_vesafb_mod_init'.
13566         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13567         all users.
13568         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13569         `grub_vga_mod_init'.  Updated all users.
13570         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13572         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13573         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13574         rules.
13576         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13577         Generate a function to initialize the module in utilities.
13578         Updated all callers.
13579         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13580         initialize the module in utilities.  Updated all callers.
13582 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13584         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13585         escape sequence and a literal ^L to clear the screen.
13587         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13588         when returning from Open Firmware.
13590 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13592         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13593         (grub_ofconsole_height): Likewise.
13594         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13595         manually insert a '\n'.
13596         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13597         `grub_ofconsole_height'.  Return early if these are already set.
13599 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13601         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13602         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13603         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13604         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13605         and `normal/script.c'.
13606         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13607         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13608         (test_mod_SOURCES): New variable.
13609         (test_mod_CFLAGS): Likewise.
13610         (test_mod_LDFLAGS): Likewise.
13611         (pkgdata_MODULES): Add `test.mod'.
13612         (grub_script.tab.c): New rule.
13613         (grub_script.tab.h): Likewise.
13615 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13617         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13618         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13619         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13620         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13621         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13622         (test_mod_SOURCES): New variable.
13623         (test_mod_CFLAGS): Likewise.
13624         (pkgdata_MODULES): Add `test.mod'.
13625         (grub_script.tab.c): New rule.
13626         (grub_script.tab.h): Likewise.
13628 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13630         Add initial scripting support.
13632         * commands/test.c: New file.
13633         * include/grub/script.h: Likewise.
13634         * normal/execute.c: Likewise.
13635         * normal/function.c: Likewise.
13636         * normal/lexer.c: Likewise.
13637         * normal/parser.y: Likewise.
13638         * normal/script.c: Likewise.
13640         * configure.ac: Add `AC_PROG_YACC' test.
13642         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13643         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13644         `normal/function.c' and `normal/script.c'.
13645         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13646         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13647         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13648         variables.
13649         (pkgdata_MODULES): Add `test.mod'.
13650         (grub_script.tab.c): New rule.
13651         (grub_script.tab.h): Likewise.
13653         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13655         * include/grub/normal.h (grub_test_init): New prototype.
13656         (grub_test_fini): Likewise.
13658         * normal/command.c: Include <grub/script.h>.
13659         (grub_command_execute): Rewritten.
13661         * util/grub-emu.c (main): Call `grub_test_init' and
13662         `grub_test_fini'.
13664 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13666         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13667         to 0.
13668         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13669         there are no pending characters.
13671 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13673         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13674         `grub_strndup' to drop device arguments. Replace unnecessary
13675         `grub_strndup' with `grub_strdup'.
13677 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13679         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13680         `debug' environment variable has been set.
13682 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13684         * Makefile.in (install-local): Use $(DATA).
13685         (uninstall): Likewise.
13686         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13687         (sbin_UTILITIES): ... to here.
13688         (sbin_SCRIPTS): New variable.
13689         (grub_install_SOURCES): New variable.
13690         * util/powerpc/ieee1275/grub-install.in: New file.
13691         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13692         variable.
13693         (add_segments): Call `grub_util_get_path'.
13695 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13697         From Timothy Baldwin:
13698         * commands/ls.c (grub_ls_list_files): Close FILE with
13699         grub_file_close.
13700         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13702 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13704         * include/grub/parser.h: New file.
13706         * kern/parser.c: Likewise.
13708         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13709         (grub_setup_SOURCES): Likewise.
13710         (grub_probefs_SOURCES): Likewise.
13711         (grub_emu_SOURCES): Likewise.
13712         (kernel_img_HEADERS): Add `parser.h'.
13714         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13715         (grub_emu_SOURCES): Add `kern/parser.c'.
13716         (grubof_SOURCES): Likewise.
13718         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13719         (grubof_SOURCES): Add `kern/parser.c'.
13721         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13723         * kern/misc.c (grub_split_cmdline): Removed function.
13725         * kern/rescue.c: Include <grub/parser.h>.
13726         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13727         of `grub_split_cmdline'.
13729         * normal/command.c: Include <grub/parser.h>.
13730         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13731         of `grub_split_cmdline'.
13733         * normal/completion.c: Include <grub/parser.h>.
13734         (cmdline_state): New variable.
13735         (iterate_dir): End the filename with a quote depending on the
13736         command line state.
13737         (get_state): new function.
13738         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13739         split the arguments and determine the current argument.  When the
13740         argument string is not quoted, escape all spaces.
13742 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13744         * normal/sparc64/setjmp.S: New file.
13746 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13748         * include/grub/sparc64/libgcc.h: New file.
13749         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13750         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13751         normal/sparc64/setjmp.c.
13753 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13755         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13756         * kern/sparc64/cache.S: New file.
13757         * kern/sparc64/cache.c: Removed.
13758         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13759         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13760         -mtune=ultrasparc.
13761         (COMMON_LDFLAGS): Add -melf64_sparc.
13762         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13763         (grubof_SOURCES): Use cache.S instead of cache.c.
13764         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13765         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13766         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13767         commented though.
13768         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13769         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13770         (linux_mod_CFLAGS): Commented out.
13771         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13772         out because module isn't built.
13773         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13774         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13775         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13776         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13777         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13778         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13779         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13780         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13781         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13782         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13783         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13784         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13785         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13786         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13788 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13790         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13791         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13792         longer, because HFS should not be used on PC.
13794 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13796         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13797         consistently within the loop.
13799 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13801         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13802         directory can not be read.
13804 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13806         * configure.ac (AC_INIT): Increase the version number to 1.91.
13808         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13809         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13810         term/i386/pc/serial.c.
13812 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13814         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13815         file size must be permitted.
13817         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13818         between %ah and %al.
13820 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13822         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13823         grub_uint64_t.
13824         Call the hook with a NUL-terminated filename.
13825         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13826         grub_cpu_to_be32.
13828         * kern/term.c (cursor_state): New variable.
13829         (grub_term_set_current): Reset the cursor state on a new
13830         terminal.
13831         (grub_setcursor): Rewritten to use CURSOR_STATE.
13832         (grub_getcursor): New function.
13834         * include/grub/term.h (grub_getcursor): New prototype.
13836         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13837         integers on ARM. Reported by Timothy Baldwin
13838         <T.E.Baldwin99@members.leeds.ac.uk>.
13840 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13842         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13843         allocated.
13844         (grub_sfs_dir): Likewise.
13846 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13848         Add support for the SFS filesystem.
13850         * fs/sfs.c: New file.
13852         * DISTLIST: Added `fs/sfs.c'.
13854         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13855         (grub_probefs_SOURCES): Likewise.
13856         (grub_emu_SOURCES): Likewise.
13857         (pkgdata_MODULES): Add `sfs.mod'.
13858         (sfs_mod_SOURCES): New variable.
13859         (sfs_mod_CFLAGS): Likewise.
13860         (sfs_mod_LDFLAGS): Likewise.
13862         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13863         (pkgdata_MODULES): Add `sfs.mod'.
13864         (sfs_mod_SOURCES): New variable.
13865         (sfs_mod_CFLAGS): Likewise.
13867         * util/grub-emu.c (main): Call `grub_sfs_init' and
13868         `grub_sfs_fini'.
13870         * include/grub/fs.h (grub_sfs_init): New prototype.
13871         (grub_sfs_fini): Likewise.
13873 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13875         Add support for the AFFS filesystem.
13877         * fs/affs.c: New file.
13879         * DISTLIST: Added `fs/affs.c'.
13881         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13882         (grub_probefs_SOURCES): Likewise.
13883         (grub_emu_SOURCES): Likewise.
13884         (pkgdata_MODULES): Add `affs.mod'.
13885         (affs_mod_SOURCES): New variable.
13886         (affs_mod_CFLAGS): Likewise.
13887         (affs_mod_LDFLAGS): Likewise.
13889         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13890         (pkgdata_MODULES): Add `affs.mod'.
13891         (affs_mod_SOURCES): New variable.
13892         (affs_mod_CFLAGS): Likewise.
13894         * util/grub-emu.c (main): Call `grub_affs_init' and
13895         `grub_affs_fini'.
13897         * include/grub/fs.h (grub_affs_init): New prototype.
13898         (grub_affs_fini): Likewise.
13900 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13902         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13904 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13906         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13907         `-m32' to CFLAGS.
13909         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13910         linking.
13912         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13913         (COMMON_LDFLAGS): New variable.
13914         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13915         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13916         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13917         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13918         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13919         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13920         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13921         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13922         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13923         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13924         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13925         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13926         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13927         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13928         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13929         variables.
13930         (normal_mod_ASFLAGS): Add `-m32'.
13932         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13933         (grub_host_size_t, grub_host_ssize_t): New types.
13934         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13935         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13936         `GRUB_HOST_SIZEOF_VOID_P'.
13938         * include/grub/kernel.h (struct grub_module_header): Type of
13939         member offset changed to `grub_host_off_t'.  Type of member size
13940         changed to `grub_host_size_t'.
13941         (struct grub_module_info): Type of member offset changed to
13942         `grub_host_off_t'.  Type of member size changed to
13943         `grub_host_size_t'.
13945 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13947         Make GRUB's kernel compliant to Multiboot Specification.
13949         * kern/i386/pc/startup.S (multiboot_header): New label.
13950         (multiboot_entry): Likewise.
13951         (multiboot_trampoline): Likewise.
13953         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13954         Increased to 0x4A0.
13956         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13957         put parentheses after a question mark.
13958         [!GRUB_UTIL] (my_mod): New variable.
13960         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13962 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13964         Adds support for the XFS filesystem.  Btrees are not supported
13965         yet.
13967         * fs/xfs.c: New file.
13969         * DISTLIST: Added `fs/xfs.c'.
13971         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13972         (grub_probefs_SOURCES): Likewise.
13973         (grub_emu_SOURCES): Likewise.
13974         (pkgdata_MODULES): Add `xfs.mod'.
13975         (xfs_mod_SOURCES): New variable.
13976         (xfs_mod_CFLAGS): Likewise.
13978         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13979         (pkgdata_MODULES): Add `xfs.mod'.
13980         (xfs_mod_SOURCES): New variable.
13981         (xfs_mod_CFLAGS): Likewise.
13983         * util/grub-emu.c (main): Call `grub_xfs_init' and
13984         `grub_xfs_fini'.
13986         * include/grub/fs.h (grub_xfs_init): New prototype.
13987         (grub_xfs_fini): Likewise.
13990 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13992         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13993         color modes, allow greater than 16 colors to be configured as
13994         a default palette.
13996 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13998         * normal/completion.c (complete_arguments): Add the qualifier
13999         const into OPTIONS.
14001         From Omniflux <omniflux+lists@omniflux.com>:
14002         * include/grub/terminfo.h: New file.
14003         * include/grub/tparm.h: Likewise.
14004         * include/grub/i386/pc/serial.h: Likewise.
14005         * term/terminfo.c: Likewise.
14006         * term/tparm.c: Likewise.
14007         * term/i386/pc/serial.c: Likewise.
14008         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14009         serial.mod.
14010         (terminfo_mod_SOURCES): New variable.
14011         (terminfo_mod_CFLAGS): Likewise.
14012         (serial_mod_SOURCES): Likewise.
14013         (serial_mod_CFLAGS): Likewise.
14015 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14017         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14018         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14019         and kern/powerpc/ieee1275/cmain.c, respectively.
14021         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14022         * kern/powerpc/ieee1275/crt0.S: ... here.
14024         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14025         * kern/powerpc/ieee1275/cmain.c: ... here.
14027         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14028         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14029         instead of boot/powerpc/ieee1275/crt0.S and
14030         boot/powerpc/ieee1275/cmain.c, respectively.
14032         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14033         sectors. It was not used anyway.
14035 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14037         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14038         `unused parameter' warning.
14040 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14042         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14043         function.
14044         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14045         getcharwidth.
14047 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14049         * include/grub/normal.h (enum grub_completion_type): Added
14050         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14052         * normal/cmdline.c (print_completion): Handle
14053         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14054         * normal/menu_entry.c (store_completion): Likewise.
14056         * normal/completion.c (complete_arguments): New function.
14057         (grub_normal_do_completion): Call `complete_arguments' when the
14058         current words start with a dash.
14060 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14062         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14063         `gzio.mod' instead of `io.mod').
14065 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14067         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14068         (DISTDIRS): Added io and video.
14069         Rewrite the search routine to make an output consistently.
14071         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14072         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14073         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14074         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14075         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14076         util/powerpc/ieee1275/misc.c.
14078         * include/grub/gzio.h: New file.
14079         * io/gzio.c: Likewise.
14081         * kern/file.c (grub_file_close): Call grub_device_close only if
14082         FILE->DEVICE is not NULL.
14084         * include/grub/mm.h [!NULL] (NULL): New macro.
14086         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14088         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14089         (pkgdata_MODULES): Added gzio.mod.
14090         (gzio_mod_SOURCES): New variable.
14091         (gzio_mod_CFLAGS): Likewise.
14093         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14094         (pkgdata_MODULES): Added gzio.mod.
14095         (gzio_mod_SOURCES): New variable.
14096         (gzio_mod_CFLAGS): Likewise.
14098         * commands/cat.c: Include grub/gzio.h.
14099         (grub_cmd_cat): Use grub_gzfile_open instead of
14100         grub_file_open.
14102         * commands/cmp.c: Include grub/gzio.h.
14103         (grub_cmd_cmp): Use grub_gzfile_open instead of
14104         grub_file_open.
14106         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14107         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14108         grub_file_open.
14109         (grub_rescue_cmd_module): Likewise.
14111 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14113         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14114         kern/sparc64/ieee1275/init.c because it contains _start.
14115         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14117 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14119         * configure.ac: Add support for sparc64 host with ieee1275
14120         firmware.
14121         * configure: Generated from configure.ac.
14122         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14123         instead of int.
14124         (grub_ofdisk_read): Likewise.
14125         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14126         pointers as (void *) to remove a warning.
14127         (grub_ofdisk_close): Likewise.
14128         (grub_ofdisk_read): Likewise.
14129         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14130         returns, so make it return void to remove a warning.
14131         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14132         Corresponding prototype change.
14133         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14134         values, and cast the pointers as (void *) to remove a warning.
14135         (grub_mm_dump): Likewise.
14136         * conf/sparc64-ieee1275.mk: New file.
14137         * conf/sparc64-ieee1275.rmk: Likewise.
14138         * include/grub/sparc64/setjmp.h: Likewise.
14139         * include/grub/sparc64/types.h: Likewise.
14140         * include/grub/sparc64/ieee1275/console.h: Likewise.
14141         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14142         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14143         * include/grub/sparc64/ieee1275/time.h: Likewise.
14144         * kern/sparc64/cache.c: Likewise.
14145         * kern/sparc64/dl.c: Likewise.
14146         * kern/sparc64/ieee1275/init.c: Likewise.
14147         * kern/sparc64/ieee1275/openfw.c: Likewise.
14149 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14151         * util/console.c (grub_ncurses_putchar): If C is greater than
14152         0x7f, set C to a question mark.
14153         (grub_ncurses_getcharwidth): New function.
14154         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14155         getcharwidth.
14157         * normal/menu.c (print_entry): Made aware of Unicode. First,
14158         convert TITLE to UCS-4, and predict the cursor position by
14159         grub_getcharwidth.
14161         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14162         const to SRC.
14163         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14165 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14167         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14168         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14169         grub_strcat.
14171         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14172         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14173         grub_strcpy and grub_strlen. Take it into account that a space
14174         character is inserted as a delimiter.
14176 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14178         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14179         invalid magic in the error.
14181         * commands/search.c: New file.
14183         * util/grub-emu.c (main): Call grub_search_init and
14184         grub_search_fini.
14186         * kern/rescue.c (grub_rescue_print_disks): Removed.
14187         (grub_rescue_print_devices): New function.
14188         (grub_rescue_cmd_ls): Use grub_device_iterate with
14189         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14190         grub_rescue_print_disks.
14192         * kern/partition.c (grub_partition_iterate): Return the result of
14193         PARTMAP->ITERATE instead of GRUB_ERRNO.
14195         * kern/device.c: Include grub/partition.h.
14196         (grub_device_iterate): New function.
14198         * include/grub/partition.h (grub_partition_iterate): Return int
14199         instead of grub_err_t.
14201         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14202         prototype.
14203         [GRUB_UTIL] (grub_search_fini): Likewise.
14205         * include/grub/device.h (grub_device_iterate): New prototype.
14207         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14208         commands/search.c.
14209         (pkgdata_MODULES): Added search.mod.
14210         (search_mod_SOURCES): New variable.
14211         (search_mod_CFLAGS): Likewise.
14213         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14214         (pkgdata_MODULES): Added search.mod.
14215         (search_mod_SOURCES): New variable.
14216         (search_mod_CFLAGS): Likewise.
14218         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14219         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14220         All callers changed.
14222         * DISTLIST: Added commands/search.c.
14224 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14226         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14227         conversion.
14228         (grub_getcharwidth): New function.
14230         * kern/misc.c (grub_utf8_to_ucs4): New function.
14232         * include/grub/term.h (struct grub_term): Added a new member
14233         "getcharwidth".
14234         (grub_getcharwidth): New prototype.
14236         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14238         * term/i386/pc/console.c (map_char): New function. Segregated from
14239         grub_console_putchar.
14240         (grub_console_putchar): Use map_char.
14241         (grub_console_getcharwidth): New function.
14242         (grub_console_term): Specified grub_console_getcharwidth as
14243         getcharwidth.
14245         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14246         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14248         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14249         GRUB_ERRNO.
14250         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14251         on grub_strtoul completely.
14252         (write_char): Declare local variables in the beginning of the
14253         function.
14254         (grub_vesafb_getcharwidth): New function.
14255         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14256         getcharwidth.
14258 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14260         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14261         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14262         commands/i386/pc/vbetest.c.
14264         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14265         call grub_vbe_get_controller_info again, because the returned
14266         information is volatile.
14267         (grub_vbe_set_video_mode): Mostly rewritten.
14268         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14269         grub_vbe_status_t correctly.
14270         (grub_vbe_get_video_mode_info): Likewise.
14271         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14272         several if statements.
14274         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14275         * commands/i386/pc/vbeinfo.c: ... this.
14277         * commands/i386/pc/vbe_test.c: Renamed to ...
14278         * commands/i386/pc/vbetest.c: ... this.
14280         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14281         ...
14282         (grub_cmd_vbeinfo): ... this. Save video modes before
14283         iterating. Skip a video mode, if it is not available, not enough
14284         information is given or it is monochrome. Show the memory
14285         model. Leave the interpretation of MODEVAR to grub_strtoul
14286         completely.
14287         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14288         (GRUB_MOD_FINI): Likewise.
14290         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14291         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14292         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14293         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14294         grub_strtoul completely.
14295         (real2pm): Removed.
14296         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14297         (GRUB_MOD_FINI): Likewise.
14299         * normal/misc.c: Include grub/mm.h.
14301         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14302         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14303         (vbe_list_modes_mod_SOURCES): Removed.
14304         (vbe_list_modes_mod_CFLAGS): Likewise.
14305         (vbe_test_mod_SOURCES): Likewise.
14306         (vbe_test_mod_CFLAGS): Likewise.
14307         (vbeinfo_mod_SOURCES): New variable.
14308         (vbeinfo_mod_CFLAGS): Likewise.
14309         (vbetest_mod_SOURCES): Likewise.
14310         (vbetest_mod_CFLAGS): Likewise.
14312 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14314         * normal/misc.c: New file.
14316         * DISTLIST: Added normal/misc.c.
14318         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14319         DISK to HOOK. Call HOOK with DISK.
14320         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14321         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14322         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14324         * normal/menu_entry.c (struct screen): Added a new member
14325         "completion_shown".
14326         (completion_buffer): New global variable.
14327         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14328         (store_completion): New function.
14329         (complete): Likewise.
14330         (clear_completions): Likewise.
14331         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14332         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14333         a tab, call complete.
14335         * normal/completion.c (disk_dev): Removed.
14336         (print_simple_completion): Likewise.
14337         (print_partition_completion): Likewise.
14338         (print_func): New global variable.
14339         (add_completion): Do not take the arguments WHAT or PRINT any
14340         longer. Added a new argument TYPE. Instead of printing directly,
14341         call PRINT_FUNC if not NULL.
14342         All callers changed.
14343         (complete_device): Use a local variable DEV instead of
14344         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14345         (grub_normal_do_completion): Take a new argument HOOK. Do not
14346         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14347         empty string, return NULL instead.
14348         All callers changed.
14350         * normal/cmdline.c (print_completion): New function.
14352         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14353         to HOOK.
14354         All callers changed.
14356         * kern/disk.c (grub_print_partinfo): Removed.
14358         * include/grub/partition.h (struct grub_partition_map): Add a new
14359         argument DISK into HOOK of ITERATE.
14360         (grub_partition_iterate): Add a new argument DISK to HOOK.
14362         * include/grub/normal.h (enum grub_completion_type): New enum.
14363         (grub_completion_type_t): New type.
14364         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14365         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14366         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14367         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14368         (grub_normal_do_completion): Added a new argument HOOK.
14369         (grub_normal_print_device_info): New prototype.
14371         * include/grub/disk.h (grub_print_partinfo): Removed.
14373         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14374         (normal_mod_SOURCES): Likewise.
14375         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14376         (normal_mod_SOURCES): Likewise.
14378         * commands/ls.c (grub_ls_list_disks): Use
14379         grub_normal_print_device_info instead of grub_print_partinfo. Free
14380         PNAME.
14381         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14382         duplicating the code.
14384 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14386         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14387         follow GCS more precisely.
14388         * commands/i386/pc/vbe_test.c: Likewise.
14389         * include/grub/i386/pc/vbe.h: Likewise.
14390         * term/i386/pc/vesafb.c: Likewise.
14391         * video/i386/pc/vbe.c: Likewise.
14393 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14395         * DISTLIST: Added term/i386/pc/vesafb.c
14396         DISTLIST: Added video/i386/pc/vbe.c
14397         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14398         DISTLIST: Added commands/i386/pc/vbe_test.c.
14399         * commands/i386/pc/vbe_list_modes.c: New file.
14400         * commands/i386/pc/vbe_test.c: Likewise.
14401         * term/i386/pc/vesafb.c: Likewise.
14402         * video/i386/pc/vbe.c: Likewise.
14403         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14404         (grub_vbe_probe) Added prototype.
14405         (grub_vbe_set_video_mode) Likewise.
14406         (grub_vbe_get_video_mode) Likewise.
14407         (grub_vbe_get_video_mode_info) Likewise.
14408         (grub_vbe_set_pixel_rgb) Likewise.
14409         (grub_vbe_set_pixel_index) Likewise.
14410         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14411         (pkgdata_MODULES): Added vesafb.mod.
14412         (pkgdata_MODULES): Added vbe_list_modes.mod.
14413         (pkgdata_MODULES): Added vbe_test.mod.
14414         (vbe_mod_SOURCES): Added.
14415         (vbe_mod_CFLAGS): Likewise.
14416         (vesafb_mod_SOURCES): Likewise.
14417         (vesafb_mod_CFLAGS): Likewise.
14418         (vbe_list_modes_mod_SOURCES): Likewise.
14419         (vbe_list_modes_mod_CFLAGS): Likewise.
14420         (vbe_test_mod_SOURCES): Likewise.
14421         (vbe_test_mod_CFLAGS): Likewise.
14423 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14425         * normal/command.c (grub_command_execute): If INTERACTIVE is
14426         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14427         CMDLINE. Disable the pager if INTERACTIVE is true.
14428         All callers are changed.
14430         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14431         before reading a config file.
14432         * normal/main.c (read_config_file): Even if a command is not
14433         found, register it if it is within an entry.
14435         * util/grub-emu.c: Include sys/types.h and unistd.h.
14436         (options): Added --hold.
14437         (struct arguments): Added a new member "hold".
14438         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14439         missing.
14440         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14441         cleared by a debugger, if it is not zero.
14443         * include/grub/normal.h (grub_command_execute): Add an argument
14444         INTERACTIVE.
14446 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14448         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14450 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14452         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14453         program with another one, because the old one didn't detect a bug
14454         in gcc-3.4. Always use regparm 2, because the new test is still
14455         not enough for gcc-4.0. Someone must investigate a simple test
14456         case which detects a bug in gcc-4.0.
14458 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14460         * DISTLIST: Added normal/completion.c.
14462         * normal/completion.c: New file.
14464         * term/i386/pc/console.c (grub_console_getwh): New function.
14465         (grub_console_term): Assign grub_console_getwh to getwh.
14467         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14468         function is defined in normal/completion.c as
14469         grub_normal_do_completion.
14470         (grub_cmdline_get): Use grub_normal_do_completion instead of
14471         grub_tab_complete.
14473         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14474         returns non-zero, otherwise return 0.
14475         (grub_partition_iterate): First, probe the partition map. Then,
14476         call ITERATE only for this partition map.
14478         * kern/misc.c (grub_strncmp): Rewritten.
14480         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14481         returns non-zero. Otherwise return 0.
14483         * include/grub/partition.h (grub_partition_map_iterate): Return
14484         int instead of void.
14486         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14488         * include/grub/misc.h (grub_strncmp): Change the type of N to
14489         grub_size_t.
14491         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14492         of void.
14494         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14495         unsigned explicitly before comparing it with I.
14497         * kern/main.c (grub_env_write_root): Add the attribute unused into
14498         VAR.
14500         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14501         normal/completion.c.
14502         (normal_mod_SOURCES): Likewise.
14503         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14504         (normal_mod_SOURCES): Likewise.
14506         * normal/command.c (grub_iterate_commands): If ITERATE returns
14507         non-zero, return one immediately.
14509 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14511         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14512         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14513         descriptions.
14514         (grub_vbe_get_controller_info): New function.
14515         (grub_vbe_get_mode_info): Likewise.
14516         (grub_vbe_set_mode): Likewise.
14517         (grub_vbe_get_mode): Likewise.
14518         (grub_vbe_set_memory_window): Likewise.
14519         (grub_vbe_get_memory_window): Likewise.
14520         (grub_vbe_set_scanline_length): Likewise.
14521         (grub_vbe_get_scanline_length): Likewise.
14522         (grub_vbe_set_display_start): Likewise.
14523         (grub_vbe_get_display_start): Likewise.
14524         (grub_vbe_set_palette_data): Likewise.
14525         * include/grub/i386/pc/vbe.h: New file.
14527 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14529         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14530         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14531         * DISTLIST: Likewise.
14532         * kern/ieee1275/of.c: Moved to ...
14533         * kern/ieee1275/ieee1275.c: ... here.
14535 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14537         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14538         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14539         Pass 0 as `end' parameter to grub_strtoul().
14541 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14543         * include/grub/powerpc/ieee1275/console.h: Do not include
14544         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14545         ifdef.
14546         (grub_console_cur_color): Remove i386-specific prototype.
14547         (grub_console_real_putchar): Likewise.
14548         (grub_console_checkkey): Likewise.
14549         (grub_console_getkey): Likewise.
14550         (grub_console_getxy): Likewise.
14551         (grub_console_gotoxy): Likewise.
14552         (grub_console_cls): Likewise.
14553         (grub_console_setcursor): Likewise.
14554         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14555         Include <grub/machine/console.h>.
14556         * term/ieee1275/ofconsole.c: Likewise.
14558 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14560         * Makefile.in (LIBLZO): New variable.
14562         * configure.ac: Check for LZO version 2.
14564         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14565         lzo/lzo1x.h instead of lzo1x.h.
14567         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14568         of -llzo.
14570         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14571         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14573         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14574         copying the data from PARTITION to P.
14576 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14578         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14579         negative, unload the module.
14581         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14582         map is "pc_partition_map" but not "pc".
14583         (usage): Fix the description. The options are --boot-image and
14584         --core-image but not --boot-file or --core-file.
14585         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14586         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14587         DEFAULT_DIRECTORY.
14589         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14590         --core-file. Specify INSTALL_DEVICE as an argument.
14592         * util/console.c: Include config.h.
14593         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14594         [HAVE_NCURSES_H]: Include ncurses.h.
14595         [HAVE_CURSES_H]: Include curses.h.
14596         [!A_NORMAL] (A_NORMAL): Defined as zero.
14597         [!A_STANDOUT] (A_STANDOUT): Likewise.
14599         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14600         -lncurses.
14601         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14603         * configure.ac: Check for curses libraries and headers.
14605         * Makefile.in (LIBCURSES): New variable.
14607         * genmk.rb (Script::rule): Set the executable bits.
14609         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14610         name of the PC partition map is "pc_partition_map" but not "pc".
14612 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14614         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14615         (modules): Likewise.
14616         (usage): Added descriptions for --modules and --grub-probefs.
14617         Handle --modules and --grub-probefs. Save the arguments in MODULES
14618         and GRUB_PROBEFS, respectively.
14619         Auto-detect a filesystem module against GRUBDIR. If the result is
14620         empty and modules are not specified explicitly, abort the
14621         installation. Add the result to MODULES.
14623         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14624         disk/powerpc/ieee1275/ofdisk.c,
14625         include/grub/powerpc/ieee1275/init.h and
14626         term/powerpc/ieee1275/ofconsole.c.
14627         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14628         term/ieee1275/ofconsole.c.
14630         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14632         * COPYING: Upgraded to the latest version. Only the address of the
14633         FSF office has changed.
14635 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14637         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14638         kern/ieee1275.c with kern/ieee1275/of.c.
14640         * kern/ieee1275.c: Moved to ...
14641         * kern/ieee1275/of.c: ... here.
14643 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14645         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14646         readability.
14648         * config.guess: Updated to the latest version from gnulib.
14649         * config.sub: Likewise.
14650         * install.sh: Likewise.
14651         * mkinstalldirs: Likewise.
14653         * include/grub/console.h: Removed. This file is arch-specific. Do
14654         not put this in include/grub.
14656         * include/grub/i386/pc/console.h: Resurrected.
14658         * util/console.c: Include grub/machine/console.h instead of
14659         grub/console.h.
14660         * util/grub-emu.c: Likewise.
14662 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14664         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14665         hardcoded value.
14667         From Vincent Pelletier  <subdino2004@yahoo.fr>
14668         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14669         Redefined to use grub_getwh.
14670         (grub_term): New member named getwh.
14671         (grub_getwh): New prototype.
14672         * kern/term.c (grub_getwh): New function.
14673         * term/i386/pc/console.c (grub_console_getwh): New function.
14674         (grub_console_term): New member `getwh'.
14675         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14676         (grub_vga_term): New member `getwh'.
14677         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14678         grub_ssize_t.
14679         (grub_ofconsole_getw): New function.
14680         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14681         (grub_ofconsole_term): New field named getwh and new initial
14682         value.
14684 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14686         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14687         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14688         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14689         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14690         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14691         of <grub/machine/ieee1275.h>.
14692         * commands/ieee1275/reboot.c: Likewise.
14693         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14694         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14695         parameter structs to use new type `grub_ieee1275_cell_t'.
14696         * term/powerpc/ieee1275/ofconsole.c: Move ...
14697         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14698         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14699         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14700         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14701         to return int.
14702         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14703         Remove unused prototypes.  All users updated.
14704         * include/grub/powerpc/ieee1275/console.h: Removed.
14705         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14706         `grub_ieee1275_cell_t'.
14707         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14708         Cast comparisons with -1 to the correct type.
14709         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14710         type to match `grub_ieee1275_entry_fn'.
14712 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14714         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14716         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14717         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14718         partmap/sun.c.
14719         (grub_probefs_SOURCES): New variable.
14721         * util/i386/pc/grub-probefs.c: New file.
14723         * util/i386/pc/grub-setup.c (main): Call
14724         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14725         grub_hfs_init and grub_jfs_init to initialize the system. Call
14726         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14727         grub_pc_partition_map_fini to finish the system.
14729 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14731         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14732         function.
14733         (grub_multiboot_load_elf32): Likewise.
14734         (grub_multiboot_is_elf64): Likewise.
14735         (grub_multiboot_load_elf64): Likewise.
14736         (grub_multiboot_load_elf): Likewise.
14737         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14738         an ELF32 or ELF64 file.
14739         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14741         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14742         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14743         NULL before calling FS->LABEL.
14744         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14745         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14746         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14747         before calling FS->LABEL.
14749 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14751         * util/i386/pc/grub-install.in (datadir): New variable.
14752         (libdir): Removed.
14753         (pkgdatadir): New variable.
14754         (pkglibdir): Removed.
14756 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14758         * DISTLIST: Added util/i386/pc/grub-install.in.
14760         * util/i386/pc/grub-install.in: New file.
14762         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14763         (grub_install_SOURCES): Likewise.
14765         * genmk.rb: Added support for scripts.
14766         (Script): New class.
14767         (scripts): New variable.
14769         * Makefile.in (install-local): Install sbin_SCRIPTS by
14770         INSTALL_SCRIPT.
14771         (uninstall): Remove sbin_SCRIPTS.
14773         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14774         device, try to get a GRUB device by
14775         grub_util_biosdisk_get_grub_dev.
14776         Free DEST_DEV.
14778         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14779         description for --device-map.
14781 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14783         Change the semantics of variable hooks. They now return strings
14784         instead of error values.
14786         * util/i386/pc/grub-setup.c: Include grub/env.h.
14787         (setup): Use grub_device_set_root instead of grub_env_set.
14789         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14790         grub_env_get instead of grub_device_set_root and
14791         grub_device_get_root, respectively.
14793         * kern/main.c (grub_env_write_root): New function.
14794         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14795         grub_env_set instead of grub_device_set_root.
14797         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14798         many variables.
14799         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14800         rather than calling ENV->WRITE_HOOK afterwards.
14801         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14802         passing a pointer of a pointer.
14803         (grub_register_variable_hook): Change the types of "read_hook" and
14804         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14805         respectively.
14806         Allocate the default empty string on the heap, because this string
14807         may be freed later.
14809         * kern/device.c: Include grub/env.h.
14810         (grub_device_set_root): Removed.
14811         (grub_device_get_root): Likewise.
14812         (grub_device_open): Use grub_env_get instead of
14813         grub_device_get_root.
14815         * include/grub/env.h (grub_env_read_hook_t): New type.
14816         (grub_env_write_hook_t): Likewise.
14817         (grub_env_var): Change the types of "read_hook" and "write_hook"
14818         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14819         (grub_register_variable_hook): Likewise.
14821         * include/grub/device.h (grub_device_set_root): Removed.
14822         (grub_device_set_root): Likewise.
14824         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14825         make sure that DIRNAME terminates with '/', so that
14826         grub_fat_find_dir will fail if PATH is not a directory.
14828         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14829         from DIRNAME.
14830         Use the qualifier auto for print_files and print_files_long.
14831         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14832         as a regular file.
14833         Put a newline only if there is no error.
14834         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14835         used.
14837 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14839         * kern/partition.c (grub_partition_probe): Initialize PART to
14840         NULL. Otherwise, when no partition map is registered, this returns
14841         a garbage.
14843 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14845         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14846         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14847         valid.
14849 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14851         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14852         information on each device, if it does not have partitions. Print
14853         "Device" instead of "Disk", because this function is not specific
14854         to disk devices.
14856         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14857         static to ensure that it is put on the memory rather than a
14858         register.
14860 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14862         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14863         (grub_cat_init): Likewise.
14864         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14865         (options): Likewise.
14866         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14867         (grub_configfile_init): Likewise.
14868         * font/manager.c (GRUB_MOD_INIT): Likewise.
14869         * commands/help.c (GRUB_MOD_INIT): Likewise.
14870         (grub_help_init): Likewise.
14871         * normal/command.c (grub_command_init): Likewise.
14872         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14873         * disk/loopback.c (grub_loop_init): Likewise.
14874         (GRUB_MOD_INIT): Likewise.
14875         * commands/ls.c (grub_ls_init): Likewise.
14876         (GRUB_MOD_INIT): Likewise.
14877         (options): Likewise.
14878         * commands/boot.c (grub_boot_init): Likewise.
14879         (GRUB_MOD_INIT): Likewise.
14880         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14881         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14882         (GRUB_MOD_INIT): Likewise.
14883         * commands/cmp.c (grub_cmp_init): Likewise.
14884         (GRUB_MOD_INIT): Likewise.
14886         * normal/arg.c: Use <> instead of "" to include header files.
14887         (SHORT_ARG_HELP): New macro.
14888         (SHORT_ARG_USAGE): Likewise.
14889         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14890         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14891         descriptions.
14892         (find_short): Check if C is 'h' or 'u' explicitly.
14893         (grub_arg_show_help): Use space characters instead of tabs. Treat
14894         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14895         are shown with --help and --usage only if they are not used for
14896         the command itself.
14897         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14898         'h' and 'u'.
14900         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14901         const into "longarg". Change the type of "shortarg" to int.
14903 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14905         * boot/i386/pc/boot.S (boot_drive_check): New label.
14907         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14908         macro.
14910         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14911         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14913 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14915         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14916         When turning off Gate A20, skip the check and return immediately,
14917         because this is not fatal usually.
14919 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14921         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14922         be 0x7C00 instead of 0x8000.
14924         * boot/i386/pc/pxeboot.S: Rewritten.
14926         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14927         EXT_C.
14928         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14929         result.
14931 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14933         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14934         robustness. This routine now supports a BIOS call and System
14935         Control Port A to modify the gate A20.
14937         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14938         Increased to 0x440.
14940 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14942         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14943         device path and resulting ihandle.
14944         (grub_ofdisk_close): dprintf the ihandle being closed.
14945         (grub_ofdisk_read): dprintf function parameters.
14946         * kern/mm.c (grub_mm_init_region): Likewise.
14947         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14948         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14949         size, and boot arguments.
14950         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14951         before loading into memory.
14952         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14953         before loading into memory.
14955 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14957         * kern/mm.c: Added much documentation.
14958         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14959         8, set to 5 instead of 8.
14961 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14963         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14965         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14966         (grub_mkdevicemap_SOURCES): New variable.
14968         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14969         lib/device.c of GRUB Legacy.
14971 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14973         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14974         instead of PATH is NULL.
14976 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14978         * commands/cmp.c (BUFFER_SIZE): New macro.
14979         (grub_cmd_cmp): Close the right file at the right time.  Compare
14980         only data just read.  Don't report files of different  size as
14981         identical.  Dynamically allocate buffers.  Move variable
14982         declarations at the beginning of function.
14984 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14986         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14987         reverse.
14989 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14991         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14992         when backspace is pressed at beginning of line.
14994 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14996         * DISTLIST: Added genfslist.sh.
14998         * normal/main.c (fs_module_list): New variable.
14999         (autoload_fs_module): New function.
15000         (read_fs_list): Likewise.
15001         (grub_normal_execute): Call read_fs_list.
15003         * kern/fs.c (grub_fs_autoload_hook): New variable.
15004         (grub_fs_probe): Added support for auto-loading.
15006         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15007         (grub_fs_module_list_t): New type.
15009         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15010         (grub_fs_autoload_hook): New prototype.
15012         * genfslist.sh: New file.
15014         * genmk.rb: Added a rule to generate a filesystem list.
15016 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15018         * configure.ac: Fix the test for cross-compiling.
15020         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15021         define GRUB_UTIL anymore.
15023         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15024         so this function works on other systems than just big endian.
15025         (load_modules): Likewise.
15026         (add_segments): Likewise.
15028 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15030         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15031         contains `l' modifier, get a long from va_arg().
15033 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15035         * kern/mm.c (grub_free): If the next free block which is being
15036         merged is the first free block, set the first block to the block
15037         being freed.
15038         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15040 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15042         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15043         `grub_ieee1275_chosen'.
15045 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15047         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15048         (grub_ieee1275_chosen): New variable.
15049         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15050         `chosen'.
15051         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15052         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15053         Rename first argument to `phandle' for consistency.
15054         (grub_ieee1275_get_property_length): Likewise.
15055         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15056         to grub_ieee1275_phandle_t.
15057         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15058         Move export next to declaration.
15059         (grub_ieee1275_chosen): New variable.
15060         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15061         Correct cosmetic typo.
15062         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15063         `grub_ieee1275_chosen'.
15064         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15065         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15066         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15067         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15068         `grub_ieee1275_chosen'.
15070 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15072         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15073         /chosen/bootargs.
15074         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15075         /chosen/bootargs as "variable=value" pairs.
15077 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15079         * include/grub/misc.h (grub_dprintf): New macro.
15080         (grub_real_dprintf): New prototype.
15081         (grub_strword): Likewise.
15082         (grub_iswordseparator): Likewise.
15083         * kern/misc.c (grub_real_dprintf): New function.
15084         (grub_strword): Likewise.
15085         (grub_iswordseparator): Likewise.
15087 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15089         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15090         (roundup): Remove macro.
15091         (grub_ieee1275_flags): Make static.
15092         (grub_ieee1275_realmode): Remove.
15093         (grub_ieee1275_test_flag): New function.
15094         (grub_ieee1275_set_flag): Likewise.
15095         (find_options): Rename to `grub_ieee1275_find_options'; update
15096         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15097         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15098         (cmain): New prototype.
15099         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15100         `grub_ieee1275_flags' directly.
15101         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15102         machine/biosdisk.h.
15103         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15104         Don't include grub/machine/init.h.
15105         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15106         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15107         Remove prototype.
15108         (grub_ieee1275_realmode): Likewise.
15109         (grub_ieee1275_flag): New enum.
15110         (grub_ieee1275_test_flag): New prototype.
15111         (grub_ieee1275_set_flag): New prototype.
15112         * include/grub/powerpc/ieee1275/init.h: Remove file.
15113         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15114         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15115         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15116         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15117         comment.
15118         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15119         `grub_ieee1275_test_flag'.
15120         (grub_ieee1275_encode_devname): Likewise.
15122 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15124         * include/grub/powerpc/ieee1275/ieee1275.h
15125         (grub_ieee1275_encode_devname): New prototype.
15126         (grub_ieee1275_get_filename): Likewise.
15127         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15128         function.
15129         (grub_set_prefix): Likewise.
15130         (grub_machine_init): Call grub_set_prefix.
15131         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15132         (grub_parse_type): New enum.
15133         (grub_ieee1275_get_devargs): New function.
15134         (grub_ieee1275_get_devname): Likewise.
15135         (grub_ieee1275_parse_args): Likewise.
15136         (grub_ieee1275_get_filename): Likewise.
15137         (grub_ieee1275_encode_devname): Likewise.
15139 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15141         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15142         `grub_loader_unset'.
15144 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15146         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15147         instead of grub_ieee1275_interpret.
15148         (grub_halt_init): New function.
15149         (grub_halt_fini): Likewise.
15150         (GRUB_MOD_INIT): Correct message grammar.
15151         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15152         instead of grub_ieee1275_interpret.
15153         (grub_reboot_init): New function.
15154         (grub_reboot_fini): Likewise.
15155         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15156         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15157         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15158         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15159         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15160         function.
15161         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15162         Add prototype.
15163         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15164         prototype.
15165         (grub_halt): Likewise.
15166         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15167         (cmain): Remove __attribute__((unused)).
15168         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15169         (grub_heap_len): Likewise.
15170         (grub_machine_fini): New function.
15171         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15172         (grub_halt): Likewise.
15173         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15174         function.
15175         * util/powerpc/ieee1275/misc.c: New file.
15177 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15179         * DISTLIST: New file.
15180         * gendistlist.sh: Likewise.
15182         * Makefile.in (COMMON_DISTFILES): Removed.
15183         (BOOT_DISTFILES): Likewise.
15184         (CONF_DISTFILES): Likewise.
15185         (DISK_DISTFILES): Likewise.
15186         (FS_DISTFILES): Likewise.
15187         (INCLUDE_DISTFILES): Likewise.
15188         (KERN_DISTFILES): Likewise.
15189         (LOADER_DISTFILES): Likewise.
15190         (TERM_DISTFILES): Likewise.
15191         (UTIL_DISTFILES): Likewise.
15192         (DISTFILES): Likewise.
15193         (uninstall): Uninstall files in $(pkgdata_DATA).
15194         (DISTLIST): New target.
15195         (distdir): Use the contents of the file DISTLIST to get a list of
15196         distributed files.
15198 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15200         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15201         descriptor. This is ported from GRUB Legacy.
15203         * gencmdlist.sh: Added an extra semicolon to make it work with
15204         old sed versions. Reported by Robert Bihlmeyer
15205         <robbe@orcus.priv.at>.
15207 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15209         Automatic loading of commands is supported.
15211         * normal/main.c (read_command_list): New function.
15212         (grub_normal_execute): Call read_command_list.
15214         * normal/command.c (grub_register_command): Return zero or CMD.
15215         Allocate CMD->NAME from the heap.
15216         Initialize CMD->MODULE_NAME to zero.
15217         Find the same name as well. If the same command is found and it is
15218         a dummy command, overwrite members. If it is not a dummy command,
15219         return zero.
15220         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15221         (grub_command_find): If a dummy command is found, load a module
15222         and retry to find a command only once.
15224         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15225         make sure that each command is loaded.
15227         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15228         macro.
15229         (struct grub_command): Remove const from the member `name'.
15230         Add a new member `module_name'.
15231         (grub_register_command): Return grub_command_t.
15233         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15234         sure that each command is loaded.
15236         * genmk.rb (PModule::rule): Specify a module name without the
15237         suffix ".mod" to gencmdlist.sh.
15239 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15241         * gencmdlist.sh: New file.
15243         * genmk.rb (PModule::rule): Generate a rule for a command list.
15244         Clean command.lst.
15245         Generate command.lst from $(COMMANDFILES).
15247         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15248         (DATA): Added $(pkgdata_DATA).
15249         (install-local): Install files in $(pkgdata_DATA).
15251 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15253         * term/i386/pc/vga.c (debug_command): Removed.
15254         (GRUB_MOD_INIT): Do not register the command "debug".
15256         From Hollis Blanchard:
15257         * commands/configfile.c: New file.
15258         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15259         commands/configfile.c.
15260         (pkgdata_MODULES): Added configfile.mod.
15261         (configfile_mod_SOURCES): New variable.
15262         (configfile_mod_CFLAGS): Likewise.
15263         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15264         commands/configfile.c.
15265         (pkgdata_MODULES): Added configfile.mod.
15266         (configfile_mod_SOURCES): New variable.
15267         (configfile_mod_CFLAGS): Likewise.
15268         * util/grub-emu.c (main): Call grub_configfile_init and
15269         grub_configfile_fini.
15270         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15271         prototype.
15272         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15274 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15276         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15277         address.
15279         * commands/help.c (grub_cmd_help): Do not print newlines after
15280         the last command in print_command_help.
15282 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15284         * commands/default.h: New file.
15285         * commands/timeout.h: Likewise.
15286         * normal/context.c: Likewise.
15288         * util/misc.c: Do not include sys/times.h.
15289         Include sys/time.h and grub/machine/time.h.
15290         (grub_get_rtc): Rewritten with gettimeofday.
15292         * util/grub-emu.c (main): Call grub_default_init and
15293         grub_timeout_init before grub_normal_init, and call
15294         grub_timeout_fini and grub_default_fini after grub_main.
15296         * util/console.c (grub_ncurses_checkkey): Return the read
15297         character or -1.
15299         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15300         timeouts.
15302         * normal/main.c (read_config_file): Push MENU. If this fails,
15303         print an error and wait for a user input.
15304         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15305         If a menu is empty or an error occurs, pop MENU.
15306         (grub_normal_execute): Pop and free MENU after grub_menu_run
15307         returns.
15309         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15311         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15312         include time.h.
15313         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15314         without GRUB_UTIL.
15315         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15316         time.h.
15317         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15318         without GRUB_UTIL.
15320         * include/grub/normal.h (struct grub_menu_list): New struct.
15321         (grub_menu_list_t): New type.
15322         (struct grub_context): New struct.
15323         (grub_context_t): New type.
15324         (grub_register_command): Got rid of EXPORT_FUNC.
15325         (grub_unregister_command): Likewise.
15326         (grub_context_get): New prototype.
15327         (grub_context_get_current_menu): Likewise.
15328         (grub_context_push_menu): Likewise.
15329         (grub_context_pop_menu): Likewise.
15330         [GRUB_UTIL] (grub_default_init): Likewise.
15331         [GRUB_UTIL] (grub_default_fini): Likewise.
15332         [GRUB_UTIL] (grub_timeout_init): Likewise.
15333         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15335         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15336         commands/timeout.c and normal/context.c.
15337         (pkgdata_MODULES): Added default.mod and timeout.mod.
15338         (normal_mod_SOURCES): Added normal/context.c.
15339         (default_mod_SOURCES): New variable.
15340         (default_mod_CFLAGS): Likewise.
15341         (timeout_mod_SOURCES): Likewise.
15342         (timeout_mod_CFLAGS): Likewise.
15343         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15344         conf/i386-pc.rmk.
15345         (pkgdata_MODULES): Added default.mod and timeout.mod.
15346         (normal_mod_SOURCES): Added normal/context.c.
15347         (default_mod_SOURCES): New variable.
15348         (default_mod_CFLAGS): Likewise.
15349         (timeout_mod_SOURCES): Likewise.
15350         (timeout_mod_CFLAGS): Likewise.
15352         * Makefile.in (all-local): Added $(MKFILES).
15354 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15356         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15357         (grub_emu_SOURCES): Likewise.
15358         (pkgdata_MODULES): Add `sun.mod'.
15359         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15360         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15361         `partmap/sun.c'.
15362         (pkgdata_MODULES): Add `sun.mod'.
15363         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15364         * include/grub/partition.h (grub_sun_partition_map_init): New
15365         prototype.
15366         (grub_sun_partition_map_fini): Likewise.
15367         * partmap/sun.c: New file.
15368         * util/grub-emu.c (main): Initialize and de-initialize the sun
15369         partitionmap support.
15371 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15373         This implements an Emacs-like menu entry editor.
15375         * normal/menu_entry.c: New file.
15377         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15378         characters to ASCII.
15379         (saved_char): New variable.
15380         (grub_ncurses_checkkey): Rewritten completely.
15381         (grub_ncurses_getkey): Likewise.
15382         (grub_ncurses_init): Call raw instead of cbreak.
15384         * normal/menu.c (print_entry): Do not put a space.
15385         (init_page): Renamed to ...
15386         (grub_menu_init_page): ... this. All callers changed.
15387         (edit_menu_entry): Removed.
15388         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15390         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15392         * kern/misc.c (grub_vprintf): Call grub_refresh.
15394         * normal/menu.c (DISP_LEFT): Renamed to ...
15395         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15396         * normal/menu.c (DISP_UP): Renamed to ...
15397         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15398         * normal/menu.c (DISP_RIGHT): Renamed to ...
15399         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15400         * normal/menu.c (DISP_DOWN): Renamed to ...
15401         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15402         * normal/menu.c (DISP_HLINE): Renamed to ...
15403         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15404         * normal/menu.c (DISP_VLINE): Renamed to ...
15405         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15406         * normal/menu.c (DISP_UL): Renamed to ...
15407         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15408         * normal/menu.c (DISP_UR): Renamed to ...
15409         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15410         * normal/menu.c (DISP_LL): Renamed to ...
15411         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15412         * normal/menu.c (DISP_LR): Renamed to ...
15413         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15414         * normal/menu.c (TERM_WIDTH): Renamed to ...
15415         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15416         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15417         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15418         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15419         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15420         * normal/menu.c (TERM_MARGIN): Renamed to ...
15421         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15422         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15423         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15424         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15425         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15426         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15427         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15428         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15429         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15430         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15431         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15432         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15433         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15434         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15435         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15436         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15437         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15438         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15439         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15440         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15441         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15442         All callers changed.
15444         * include/grub/normal.h: New prototype.
15446         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15447         normal/menu_entry.c.
15448         (normal_mod_SOURCES): Likewise.
15449         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15450         (normal_mod_SOURCES): Likewise.
15452 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15454         * include/grub/normal.h (grub_halt_init): New prototype.
15455         (grub_halt_fini): Likewise.
15456         (grub_reboot_init): Likewise.
15457         (grub_reboot_fini): Likewise.
15459         * util/grub-emu.c: Include signal.h.
15460         (main_env): New global variable.
15461         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15462         catch C-c.
15463         (grub_machine_fini): New function.
15464         (main): Call grub_halt_init and grub_reboot_init before
15465         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15466         Call setjmp with MAIN_ENV to go back afterwards.
15467         Call grub_machine_fini right before return.
15469         * include/grub/util/misc.h: Include setjmp.h.
15470         (main_env): New prototype.
15472         * include/grub/kernel.h (grub_machine_fini): New prototype.
15473         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15474         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15476         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15477         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15478         * term/i386/pc/console.c (grub_console_fini): Likewise.
15480         * util/i386/pc/misc.c: New file.
15482         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15483         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15484         commands/i386/pc/reboot.c.
15486 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15488         * include/grub/dl.h (grub_dl_check_header): New prototype.
15489         (grub_arch_dl_check_header): Change return type to grub_err_t,
15490         remove size parameter and export function.  Update all callers.
15491         * kern/dl.c (grub_dl_check_header): New function.
15492         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15493         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15494         are inside the core.
15495         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15496         independent ELF header checks.
15497         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15498         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15499         `grub_dl_check_header' instead of explicit checks.  Check for the
15500         ELF type.
15501         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15502         `grub_dl_check_header' instead of explicit checks.  Remove arch
15503         specific ELF header checks.
15505         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15506         argument SIZE.
15508 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15510         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15511         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15513 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15515         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15516         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15517         (part_map_iterate): Clear `grub_errno' and return 0 if
15518         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15519         * partmap/amiga.c (amiga_partition_map_iterate): Return
15520         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15521         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15523 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15525         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15526         help info.
15528 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15530         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15531         Removed prototype.
15532         (grub_rescue_cmd_linux): New prototype.
15533         (grub_rescue_cmd_initrd): Likewise.
15534         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15535         `bi_rec'.
15536         (grub_linux_release_mem): Release the memory for the initrd.
15537         (grub_load_linux): Renamed from this...
15538         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15539         Changed `entry' not to be static.  Loop over memory regions to
15540         find another one when the default fails.
15541         (grub_rescue_cmd_initrd): New function.
15542         (grub_linux_init): Remove function.
15543         (grub_linux_fini): Likewise.
15544         (GRUB_MOD_INIT): Register `initrd'.
15545         (GRUB_MOD_FINI): Unregister `initrd'.
15546         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15547         Function removed.
15548         (grub_linux_normal_fini): Likewise.
15549         (GRUB_MOD_INIT): Register `initrd'.
15550         (GRUB_MOD_FINI): Unregister `initrd'.
15552 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15554         * commands/help.c: New file.
15555         * normal/arg.c (show_help): Renamed to...
15556         (grub_arg_show_help): ... this.
15557         * commands/i386/pc/halt.c: New file.
15558         * commands/i386/pc/reboot.c: Likewise.
15559         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15560         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15561         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15562         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15563         variables.
15564         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15565         `commands/help.c'.
15566         (pkgdata_MODULES): Add `help.mod'.
15567         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15568         * grub/i386/pc/init.h (grub_reboot): New prototype.
15569         (grub_halt): Likewise.
15570         * include/grub/normal.h (grub_arg_show_help): New prototype.
15571         (grub_help_init): Likewise.
15572         (grub_help_fini): Likewise.
15573         * util/grub-emu.c (main): Initialize and deinitialize the help
15574         command.
15576         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15578         * normal/command.c (grub_command_init): Fixed the description of
15579         the `set' and `unset' commands.
15581 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15583         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15584         function.
15585         * commands/ieee1275/halt.c: New file.
15586         * commands/ieee1275/reboot.c: Likewise.
15587         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15588         `__attribute__ ((unused))'.  Some GCS related fixed.
15589         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15590         (grub_suspend_fini): Likewise.
15591         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15592         and `halt.mod'.
15593         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15594         (halt_mod_CFLAGS): New variables.
15595         * include/grub/powerpc/ieee1275/ieee1275.h
15596         (grub_ieee1275_interpret): New prototype.
15598 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15600         * include/grub/misc.h (memmove): New prototype.
15601         (memcpy): Likewise.
15603 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15605         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15606         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15608 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15610         * kern/misc.c (grub_strndup): Function rewritten.
15612 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15614         * normal/menu.c (TERM_WIDTH): Macro redefined.
15615         (TERM_TOP_BORDER_Y): Likewise.
15616         (draw_border): Replaced while-loop by a for-loop.  Make the number
15617         of lines consistent with the number of lines displayed in
15618         print_entries.  Added a margin below the rectangle.
15619         (print_entry): Make the entry fit in the rectangle.
15620         (print_entries): Display the scroll arrows next to the right
15621         border.
15623 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15625         * fs/minix.c (grub_minix_find_file): Reserve more space for
15626         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15627         `grub_strncpy' to copy `path' into it.
15629 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15631         Add the loopback device, a device via which files can be accessed
15632         as devices.
15634         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15635         (pkgdata_MODULES): Add loopback.mod.
15636         (loopback_mod_SOURCES): New variable.
15637         (loopback_mod_CFLAGS): Likewise.
15638         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15639         `disk/loopback.c'.
15640         (pkgdata_MODULES): Add loopback.mod.
15641         (loopback_mod_SOURCES): New variable.
15642         (loopback_mod_CFLAGS): Likewise.
15643         * disk/loopback.c: new file.
15644         * include/grub/normal.h (grub_loop_init): New prototype.
15645         (grub_loop_fini): New prototype.
15646         * util/grub-emu.c (main): Initialize and de-initialize loopback
15647         support.
15648         * include/grub/disk.h (grub_disk_dev_id): Add
15649         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15651 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15653         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15654         function.
15655         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15656         (suspend_mod_SOURCES): New variable.
15657         (suspend_mod_CFLAGS): Likewise.
15658         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15659         New prototype.
15660         * commands/ieee1275/suspend.c: New file.
15662 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15664         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15665         ((unused))' to `__attribute__ ((used))'.
15666         (GRUB_MOD_FINI): Likewise.
15667         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15668         * genmk.rb (PModule): Assign space to common symbols when linking
15669         modules.
15671 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15673         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15674         `unsigned' arguments to `grub_size_t'.
15675         (grub_malloc): Likewise.
15676         (grub_realloc): Likewise.
15677         (grub_memalign): Likewise.
15678         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15679         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15680         * util/misc.c (grub_malloc): Likewise.
15681         (grub_realloc): Likewise.
15682         * kern/mm.c (get_header_from_pointer): Change the casts to
15683         `unsigned' into a cast to `grub_size_t'.
15685         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15686         point to `currnode' when `currnode' is changed.
15688         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15689         Schottelius <nico-linux@schottelius.org>.
15691 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15693         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15694         (note_path): Remove variable.
15695         (GRUB_IEEE1275_NOTE_NAME): New macro.
15696         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15697         (grub_ieee1275_note_hdr): New structure.
15698         (grub_ieee1275_note_desc): Likewise.
15699         (grub_ieee1275_note): Likewise.
15700         (load_note): Remove `dir' argument.  All callers updated.  Remove
15701         `note_img' and `path'.  Do not load a file from `note_path'.
15702         Initialize a struct grub_ieee1275_note and write that to `out'.
15703         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15705 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15707         * util/misc.c (grub_util_read_image): Revert last change.  It
15708         called `grub_util_read_at', which seeks from the beginning of the
15709         file.
15711 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15713         * TODO: Add note about endianness in grub-mkimage.
15714         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15715         section.
15716         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15717         (grub_mkimage_SOURCES): New target.
15718         * include/grub/kernel.h (grub_start_addr): Remove variable.
15719         (grub_end_addr): Likewise.
15720         (grub_total_module_size): Likewise.
15721         (grub_kernel_image_size): Likewise.
15722         (GRUB_MODULE_MAGIC): New constant.
15723         (grub_module_info): New structure.
15724         (grub_arch_modules_addr): New prototype.
15725         (grub_get_end_addr): Remove prototype.
15726         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15727         * include/grub/powerpc/ieee1275/kernel.h: New file.
15728         * include/grub/util/misc.h (grub_util_get_fp_size): New
15729         prototype.
15730         (grub_util_read_at): Likewise.
15731         (grub_util_write_image_at): Likewise.
15732         * kern/main.c (grub_get_end_addr): Remove function.
15733         (grub_load_modules): Call grub_arch_modules_addr instead of using
15734         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15735         the grub_module_info fields instead of calling grub_get_end_addr
15736         as loop conditions.  Move grub_add_unused_region code here.
15737         (grub_add_unused_region): Remove function.
15738         * kern/i386/pc/init.c: Include grub/cache.h.
15739         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15740         one call to add_mem_region.
15741         (grub_arch_modules_addr): New function.
15742         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15743         (grub_total_module_size): Likewise.
15744         Include grub/machine/kernel.h.
15745         (grub_arch_modules_addr): New function.
15746         * util/grub-emu.c (grub_end_addr): Remove variable.
15747         (grub_total_module_size): Likewise.
15748         (grub_arch_modules_addr): New function.
15749         * util/misc.c: Include unistd.h.
15750         (grub_util_get_fp_size): New function.
15751         (grub_util_read_at): Likewise.
15752         (grub_util_write_image_at): Likewise.
15753         (grub_util_read_image): Call grub_util_read_at.
15754         (grub_util_write_image): Call grub_util_write_image_at.
15755         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15756         additional memory in kernel_img for a struct grub_module_info.
15757         Fill in that grub_module_info.
15758         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15760 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15762         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15763         New function.
15764         * include/grub/powerpc/ieee1275/ieee1275.h
15765         (grub_ieee1275_milliseconds): New prototype.
15766         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15767         Change to 1000.
15768         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15769         grub_ieee1275_milliseconds.
15771 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15773         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15774         variable.
15775         (find_options): New function.
15776         (cmain): Call find_options.
15777         * include/grub/powerpc/ieee1275/ieee1275.h
15778         (grub_ieee1275_realmode): New extern variable.
15779         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15780         grub_map if grub_ieee1275_realmode is false.
15782 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15784         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15785         lines are inserted and make it work like readline.  Reported by
15786         Vincent Pelletier <subdino2004@yahoo.fr>.
15788 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15790         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15792         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15793         `kern/powerpc/cache.S'.
15795 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15797         * genmk.rb: Handle the `Program' class in the main loop.  Written
15798         by Johan Rydberg <jrydberg@gnu.org>.
15799         (Program): New class.
15800         (programs): New variable.
15801         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15802         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15803         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15804         (help_arch): Function removed.
15805         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15806         `powerpc/libgcc.h' and `loader.h'.
15807         (pkgdata_PROGRAMS): New variable.
15808         (sbin_UTILITIES): Variable removed.
15809         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15810         (grubof_SOURCES): Variable re-defined so it only includes the
15811         core functionality.
15812         (grubof_CFLAGS): Remove `-DGRUBOF'.
15813         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15814         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15815         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15816         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15817         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15818         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15819         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15820         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15821         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15822         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15823         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15824         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15825         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15826         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15827         (pc_mod_CFLAGS): New variables.
15828         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15829         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15830         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15831         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15832         Moved from here...
15833         * include/grub/i386/pc/init.h (grub_os_area_addr)
15834         (rub_os_area_size): ... to here.
15835         * include/grub/powerpc/ieee1275/ieee1275.h
15836         (grub_ieee1275_entry_fn): Export symbol.
15837         * include/grub/powerpc/ieee1275/init.h: New file.
15838         * include/grub/powerpc/libgcc.h: Likewise.
15839         * include/grub/cache.h: Likewise.
15840         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15841         <hollis@penguinppc.org>.
15842         * kern/dl.c: Include <grub/cache.h>.
15843         (grub_dl_flush_cache): New function.
15844         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15845         for this module.
15846         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15847         (grub_console_init): Removed prototypes.
15848         (grub_machine_init): Don't initialize the modules anymore.
15849         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15850         static.
15851         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15852         Macro undef removed.
15853         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15854         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15855         relocation `R_PPC_REL32'.  Return an error when the relocation is
15856         unknown.
15857         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15858         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15859         * util/misc.c (grub_arch_sync_caches): Likewise.
15861 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15863         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15864         `symlist.c', add `grubof_symlist.c'.
15865         (symlist.c): Variable removed.
15866         (grubof_HEADERS): Variable added.
15867         (grubof_symlist.c): New target.
15868         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15869         `kernel_img_HEADERS'.
15870         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15871         * kern/powerpc/dl.c: New file.
15872         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15873         Function removed.
15874         (grub_arch_dl_relocate_symbols): Likewise.
15875         (grub_register_exported_symbols): Likewise.
15877 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15879         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15880         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15881         to fail instead.  Reported by Vincent Pelletier
15882         <subdino2004@yahoo.fr>.
15884         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15885         it is not allocated.  Reported by Vincent Pelletier
15886         <subdino2004@yahoo.fr>.
15888         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15889         output so the output looks better.
15891 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15893         Modulize the partition map support and add support for the amiga
15894         partition map.
15896         * commands/ls.c: Include <grub/partition.h> instead of
15897         <grub/machine/partition.h>.
15898         * kern/disk.c: Likewise.
15899         * kern/rescue.c: Likewise.
15900         * loader/i386/pc/chainloader.c: Likewise.
15901         * normal/cmdline.c: Likewise.
15902         * kern/powerpc/ieee1275/init.c: Likewise.
15903         (grub_machine_init): Call `grub_pc_partition_map_init',
15904         `grub_amiga_partition_map_init' and
15905         `grub_apple_partition_map_init'.
15906         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15907         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15908         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15909         `partition.h' and `pc_partition.h'.
15910         (grub_setup_SOURCES): Remove
15911         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15912         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15913         (grub_emu_SOURCES): Likewise.
15914         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15915         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15916         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15917         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15918         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15919         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15920         (grubof_SOURCES): Likewise.
15921         * disk/i386/pc/partition.c: File removed.
15922         * disk/powerpc/ieee1275/partition.c: Likewise.
15923         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15924         * include/grub/i386/pc/partition.h: Likewise.
15925         * kern/partition.c: New file.
15926         * partmap/amiga.c: Likewise.
15927         * partmap/apple.c: Likewise.
15928         * partmap/pc.c: Likewise.
15929         * include/grub/partition.h: Likewise..
15930         * include/grub/pc_partition.h: Likewise.
15931         * util/grub-emu.c: Include <grub/partition.h> instead of
15932         <grub/machine/partition.h>.
15933         (main): Call `grub_pc_partition_map_init',
15934         `grub_amiga_partition_map_init' and
15935         `grub_apple_partition_map_init' and deinitialize afterwards.
15936         * util/i386/pc/biosdisk.c: Include `#include
15937         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15938         `<grub/machine/partition.h>'.
15939         * util/i386/pc/grub-setup.c: Likewise.
15940         * util/i386/pc/biosdisk.c: Likewise.
15941         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15942         partition information in case of a PC partition.
15943         * util/i386/pc/grub-setup.c: Include `#include
15944         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15945         `<grub/machine/partition.h>'.
15946         (setup): Only access the PC specific partition information in case
15947         of a PC partition.
15949 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15951         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15952         (grub_longjmp): Likewise.
15953         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15954         20.
15955         * normal/powerpc/setjmp.S: New file.
15956         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15957         `normal/powerpc/setjmp.S'.
15958         (grubof_CFLAGS): Add `-DGRUBOF'.
15959         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15960         [GRUB_UTIL && !GRUBOF].
15962 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15964         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15965         property named `name'.  Correctly handle the error returned by
15966         `grub_ieee1275_finddevice' if a device can not be opened.
15968 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15970         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15971         `actual' for negativity.
15972         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15973         kern/fshelp.c.
15975 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15977         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15978         (PAGE_OFFSET): New macro.
15979         (CRTC_ADDR_PORT): Likewise.
15980         (CRTC_DATA_PORT): Likewise.
15981         (START_ADDR_HIGH_REGISTER): Likewise.
15982         (START_ADDR_LOW_REGISTER): Likewise.
15983         (GRAPHICS_ADDR_PORT): Likewise.
15984         (GRAPHICS_DATA_PORT): Likewise.
15985         (READ_MAP_REGISTER): Likewise.
15986         (INPUT_STATUS1_REGISTER): Likewise.
15987         (INPUT_STATUS1_VERTR_BIT): Likewise.
15988         (page): New variable.
15989         (wait_vretrace): New function.
15990         (set_read_map): Likewise.
15991         (set_start_address): Likewise.
15992         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15993         the right page.
15994         (check_vga_mem): Take the page into account.
15995         (write_char): Likewise.
15996         (write_cursor): Likewise.
15997         (scroll_up): Likewise.  Copy the page to the page that is not
15998         shown and switch between both pages.
15999         (grub_vga_putchar): Fix off by one error.
16000         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16001         account.
16003 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16005         Add support for iso9660 (including rockridge).
16007         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16008         (iso9660_mod_SOURCES): New variable.
16009         (iso9660_mod_CFLAGS): Likewise.
16010         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16011         * include/grub/fs.h (grub_iso9660_init): New prototype.
16012         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16013         * fs/iso9660.c: New file.
16015         * include/grub/misc.h (grub_strncat): New prototype.
16016         * kern/misc.c (grub_strncat): New function.
16018         * fs/hfs.c (grub_hfs_mount): Translate the error
16019         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16020         * fs/jfs.c (grub_jfs_mount): Likewise.
16021         * fs/ufs.c (grub_ufs_mount): Likewise.
16023 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16025         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16026         which initialized BAT registers.
16027         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16028         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16029         Move from here...
16030         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16031         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16032         ... to here.
16033         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16034         (grub_mapclaim): Likewise.
16035         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16036         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16037         hand.
16039 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16041         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16042         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16043         -ffreestanding and -msoft-float.
16045 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16047         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16048         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16049         set in grub_ieee1275_flags.
16051 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16053         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16054         prototype.
16055         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16056         grub_console_init first.
16057         Change the memory range used for grub_ieee1275_claim and
16058         grub_mm_init_region.
16059         Print an error message if the claim fails.
16060         Include <grub/misc.h>.
16062 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16064         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16065         Call grub_children_iterate for device nodes of type `scsi',
16066         `ide', or `ata'.
16067         (grub_ofdisk_open): Remove manual device alias resolution.
16068         Fix memory leak when device cannot be opened.
16069         * include/grub/powerpc/ieee1275/ieee1275.h
16070         (grub_children_iterate): New prototype.
16071         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16072         New function.
16073         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16074         Return -1 if args.size was -1.
16076 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16078         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16079         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16080         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16081         Open Firmware's memory for it; claim memory from _start to _end.
16082         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16083         (_end): New extern.
16084         (_start): Zero BSS from __bss_start to _end.
16085         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16086         New extern.
16087         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16089 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16091         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16092         -1 if args.base was -1.
16094 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16096         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16097         escape sequence instead of a literal ^L. Also call
16098         grub_ofconsole_gotoxy.
16100 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16102         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16103         void *  arguments to grub_addr_t.  All callers updated.  Also make
16104         the `result' argument optional.
16105         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16106         All callers updated.
16108 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16110         * commands/ls.c (grub_ls_list_files): Use the string following the
16111         initial ')', if present, as the filesystem path.
16112         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16114         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16116 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16118         Make the source code of the menu interface more readable.
16120         * normal/menu.c: Include grub/mm.h.
16121         (TERM_WIDTH): New macro.
16122         (TERM_HEIGHT): Likewise.
16123         (TERM_INFO_HEIGHT): Likewise.
16124         (TERM_MARGIN): Likewise.
16125         (TERM_SCROLL_WIDTH): Likewise.
16126         (TERM_TOP_BORDER_Y): Likewise.
16127         (TERM_LEFT_BORDER_X): Likewise.
16128         (TERM_BORDER_WIDTH): Likewise.
16129         (TERM_MESSAGE_HEIGHT): Likewise.
16130         (TERM_BORDER_HEIGHT): Likewise.
16131         (TERM_NUM_ENTRIES): Likewise.
16132         (TERM_FIRST_ENTRY_Y): Likewise.
16133         (TERM_ENTRY_WIDTH): Likewise.
16134         (TERM_CURSOR_X): Likewise.
16135         (draw_border): Use macros instead of magic numbers.
16136         (print_entry): Likewise.
16137         (print_entries): Likewise.
16138         (run_menu): Likewise. Also, handle the key 'e'.
16139         (run_menu_entry): Ignore empty command lines.
16140         (print_message): Added a new argument EDIT. If EDIT is true,
16141         print a different message.
16142         (init_page): Likewise.
16143         (edit_menu_entry): New function. Not implemented yet.
16145 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16147         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16148         can be loaded from normal mode.
16150         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16151         `multiboot.mod'.
16152         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16153         (multiboot_mod_CFLAGS): New variables.
16154         * loader/i386/pc/linux_normal.c: New file.
16155         * loader/i386/pc/multiboot_normal.c: Likewise.
16157         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16158         attribute `unused'.
16160         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16161         `fdiro' to read the mode information from instead of `diro'.
16163         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16164         looking up a symlink.
16166         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16167         macro.
16168         * normal/command.c (grub_command_execute): Don't parse the
16169         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16170         flags of the command.
16172         * normal/menu.c (grub_menu_run): Fix typo.
16174 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16176         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16178         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16179         `y + 1' instead of `y - 1'.
16181         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16183 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16185         From Hollis Blanchard <hollis@penguinppc.org>:
16186         * kern/misc.c (memmove): New alias for grub_memmove.
16187         (memcmp): New alias for grub_memcmp.
16188         (memset): New alias for grub_memset.
16189         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16190         Change "int handle" to "grub_ieee1275_phandle_t handle".
16191         * include/grub/powerpc/ieee1275/ieee1275.h
16192         (grub_ieee1275_get_property): Likewise.
16194 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16196         Added normal mode command `chainloader' as module chain.mod, which
16197         depends on normal.mod and _chain.mod.
16199         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16200         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16201         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16202         Deleted prototype.
16203         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16204         but arguments parsing moved to ...
16205         (grub_chainloader_cmd): ... here.  New function.
16206         * include/grub/i386/pc/chainloader.h: New file.
16207         * loader/i386/pc/chainloader_normal.c: Likewise.
16209 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16211         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16212         (grub_mkimage_LDFLAGS): Likewise.
16213         (grub_emu_SOURCES): Likewise.
16214         (kernel_img_HEADERS): Added fshelp.h.
16215         * fs/ext2.c: Include <grub/fshelp.h>.
16216         (FILETYPE_REG): New macro.
16217         (FILETYPE_INO_REG): Likewise.
16218         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16219         Changed all users.
16220         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16221         all users.
16222         (grub_fshelp_node): New struct.
16223         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16224         to a pointer.
16225         (grub_ext2_get_file_block): Removed function.
16226         (grub_ext2_read_block): New function.
16227         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16228         This function was written.
16229         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16230         (grub_ext2_find_file): Removed function.
16231         (grub_ext2_read_symlink): New function.
16232         (grub_ext2_iterate_dir): Likewise.
16233         (grub_ext2_open): Rewritten.
16234         (grub_ext2_dir): Rewritten.
16235         * include/grub/fshelp.h: New file.
16236         * fs/fshelp.c: Likewise.
16238 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16240         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16241         (print_message): Add a missing newline.
16242         (run_menu): Added timeout support.
16243         (run_menu_entry): New local function.
16244         (grub_menu_run): Added support for booting.
16246         * kern/loader.c (grub_loader_is_loaded): New function.
16248         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16249         (grub_get_rtc): Exported.
16251         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16252         (grub_get_rtc): Exported.
16254         * include/grub/normal.h (struct grub_command_list): Remove
16255         constant from the member `command'.
16257         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16259         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16261         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16263 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16265         Add support for the JFS filesystem.
16267         * fs/jfs.c: New file.
16268         * include/grub/fs.h (grub_jfs_init): New prototype.
16269         (grub_jfs_fini): New prototype.
16270         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16271         (grub_emu_SOURCES): Likewise.
16272         (pkgdata_MODULES): Add jfs.mod.
16273         (jfs_mod_SOURCES): New variable.
16274         (jfs_mod_CFLAGS): Likewise.
16275         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16276         (grubof_SOURCES): Likewise.
16277         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16279         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16280         endian to the host endian.
16281         (grub_fat_utf16_to_utf8): Move function from there...
16282         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16283         the endianness of the source string anymore.
16284         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16286 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16288         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16289         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16290         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16291         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16293         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16294         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16295         for `node_found' and `it_dir'.
16296         (grub_hfs_dir): Add prototype for `dir_hook'.
16298         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16299         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16300         and `indir32' to silence a gcc warning.
16302         * include/grub/fs.h (grub_hfs_init): New prototype.
16303         (grub_hfs_fini): Likewise.
16306 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16308         Each disk device has its own id now. This is useful to make use
16309         of multiple disk devices.
16311         * include/grub/disk.h (grub_disk_dev_id): New enum.
16312         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16313         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16315         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16316         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16318         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16319         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16321         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16322         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16324         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16325         "id" which is used by the cache manager.
16327         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16328         of just "GRUB".
16330 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16332         * fs/hfs.c: New file.
16333         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16334         (grub_emu_SOURCES): Likewise.
16335         (pkgdata_MODULES): Add hfs.mod.
16336         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16337         (grubof_SOURCES): Likewise.
16338         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16340         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16341         * kern/misc.c (grub_strncasecmp): Add function.
16343 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16345         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16346         with parentheses.
16348         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16349         (grub_ext2_dir): In case the directory entry type is unknown, read
16350         it from the inode.
16352 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16354         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16355         grub_load_linux instead of grub_rescue_cmd_linux as second
16356         argument of grub_rescue_register_command.
16358         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16360 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16362         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16363         function.
16364         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16365         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16366         `loader/powerpc/ieee1275/linux.c',
16367         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16368         * include/grub/powerpc/ieee1275/ieee1275.h
16369         (grub_ieee1275_release): New prototype.
16370         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16371         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16372         normal, boot, linux and linux_normal.
16373         * loader/powerpc/ieee1275/linux.c: New file.
16374         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16376 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16378         * normal/arg.c (grub_arg_parse): Correct error handling after
16379         reallocating the argumentlist (check if `argl' is not null instead
16380         of checking if `args' is not null).
16381         * kern/mm.c (grub_realloc): Return the same pointer when using the
16382         same region, instead of returning the header address.
16384 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16386         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16387         one block instead of two when looking for the initial partition.
16388         (grub_partition_probe): Initialize the local variable `p' with 0.
16389         Use base 10 for the grub_strtoul call.
16390         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16391         need for one local variable.
16392         (grub_strtoul): Don't add the new value to `num', instead of that
16393         just assign it.
16395 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16397         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16398         (pxeboot_img_SOURCES): New variable.
16399         (pxeboot_img_ASFLAGS): Likewise.
16400         (pxeboot_img_LDFLAGS): Likewise.
16401         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16402         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16403         <lode_leroy@hotmail.com>.
16405 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16407         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16408         there was no input.
16410 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16412         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16413         the history buffer logic.
16415 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16417         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16418         (FILETYPE_INO_SYMLINK): New macros.
16419         (grub_ext2_find_file): Check if the node is a directory using the
16420         inode stat information instead of using the filetype in the
16421         dirent.  Exclude the first character of an absolute symlink.
16422         (grub_ext2_dir): Mask out the filetype part of the mode member of
16423         the inode.
16425 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16427         Add support for UFS version 1 and 2.  Add support for the minix
16428         filesystem version 1 and 2, both the variants with 14 and 30 long
16429         filenames.
16431         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16432         fs/minix.c.
16433         (grub_emu_SOURCES): Likewise.
16434         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16435         (ufs_mod_SOURCES): New variable.
16436         (ufs_mod_CFLAGS): Likewise.
16437         (minix_mod_SOURCES): Likewise.
16438         (minix_mod_CFLAGS): Likewise.
16439         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16440         fs/minix.c.
16441         (grubof_SOURCES): Likewise.
16442         * fs/ufs.c: New file.
16443         * fs/minix.c: New file.
16444         * include/grub/fs.h (grub_ufs_init): New prototype.
16445         (grub_ufs_fini): Likewise.
16446         (grub_minix_init): Likewise.
16447         (grub_minix_fini): Likewise.
16448         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16449         minix fs.
16451 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16453         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16454         commands/ls.c, commands/terminal.c, commands/boot.c,
16455         commands/cmp.c and commands/cat.c.
16456         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16458         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16459         "env.h"
16461 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16463         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16464         and grub_, respectively. Because the conversion is trivial and
16465         mechanical, I omit the details here. Please refer to the CVS
16466         if you need more information.
16468 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16470         * include/pupa: Renamed to ...
16471         * include/grub: ... this.
16472         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16473         * util/i386/pc/grub-mkimage.c: ... this.
16474         * util/i386/pc/pupa-setup.c: Renamed to ...
16475         * util/i386/pc/grub-setup.c: ... this.
16476         * util/pupa-emu.c: Renamed to ...
16477         * util/grub-emu.c: ... this.
16479 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16481         Add support for the newworld apple macintosh (PPC).  This has been
16482         tested on the powerbook 2000 only.  It only adds support for
16483         generic ieee1275 functions, console and disk support.  This should
16484         be easy to port to other architectures with support for Open
16485         Firmware.
16487         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16488         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16489         specific tests are only executed while building for the i386.
16490         Inverse test for crosscompile.
16491         * genmk.rb (Utility): Allow assembler files.
16492         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16493         * conf/powerpc-ieee1275.rmk: New file.
16494         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16495         * disk/powerpc/ieee1275/partition.c: Likewise.
16496         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16497         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16498         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16499         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16500         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16501         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16502         * include/pupa/powerpc/ieee1275/loader.h
16503         * include/pupa/powerpc/setjmp.h: Likewise.
16504         * include/pupa/powerpc/types.h: Likewise.
16505         * kern/powerpc/ieee1275/init.c: Likewise.
16506         * kern/powerpc/ieee1275/openfw.c: Likewise.
16507         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16509         These files were written by Johan Rydberg
16510         (jrydberg@night.trouble.net) and I only modified them slightly.
16512         * boot/powerpc/ieee1275/cmain.c: New file.
16513         * boot/powerpc/ieee1275/crt0.S: Likewise.
16514         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16515         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16517 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16519         * Makefile.in: Update copyright.
16520         * genmodsrc.sh: Likewise.
16521         * gensymlist.sh: Likewise.
16522         * term/i386/pc/vga.c: Indent correctly.
16524         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16525         bugreporting address.
16526         * util/i386/pc/pupa-setup.c (usage): Likewise,
16527         (main): Call pupa_ext2_init and pupa_ext2_fini.
16529         * fs/fat.c (log2): Renamed to ...
16530         (fat_log2): ... this.
16531         All callers changed.
16532         * kern/misc.c (memcpy): Alias to pupa_memmove.
16533         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16534         lvalue cast.
16535         * util/console.c (pupa_ncurses_fini): Return 0.
16537         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16538         Move fail label here.
16539         [__GNU__]: Don't warn when using stat.
16540         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16541         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16542         long int. Use strtol instead of strtoul.
16544 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16546         * commands/boot.c: New file.
16547         * commands/cat.c: Likewise.
16548         * commands/cmp.c: Likewise.
16549         * commands/ls.c: Likewise.
16550         * commands/terminal.c: Likewise.
16551         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16552         (pupa_register_command): Changed interface to match the new
16553         argument parser.
16554         (pupa_command_execute): Changed (almost rewritten) so it uses
16555         pupa_split_command.  Added support for setting variables using the
16556         syntax `foo=bar'.
16557         (rescue_command): Changed to work with the new argument parser.
16558         (terminal_command): Moved from here to commands/terminal.c.
16559         (set_command): New function.
16560         (unset_command): New function.
16561         (insmod_command): New function.
16562         (rmmod_command): New function.
16563         (lsmod_command): New function.
16564         (pupa_command_init): Don't initialize the command terminal
16565         anymore.  Initialize the commands set, unset, insmod, rmmod and
16566         lsmod.
16567         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16568         (kernel_img_HEADERS): Add arg.h and env.h.
16569         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16570         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16571         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16572         normal/arg.c.
16573         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16574         terminal.mod.
16575         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16576         (boot_mod_SOURCES): New variable.
16577         (terminal_mod_SOURCES): Likewise.
16578         (ls_mod_SOURCES): Likewise.
16579         (cmp_mod_SOURCES): Likewise.
16580         (cat_mod_SOURCES): Likewise.
16582         * normal/arg.c: New file.
16583         * kern/env.c: Likewise.
16584         * include/pupa/arg.h: Likewise.
16585         * include/pupa/env.h: Likewise.
16586         * font/manager.c (font_command): Changed to match argument parsing
16587         interface changes.
16588         (PUPA_MOD_INIT): Likewise.
16589         * hello/hello.c (pupa_cmd_hello): Likewise.
16590         (PUPA_MOD_INIT): Likewise.
16591         * include/pupa/disk.h: Include <pupa/device.h>.
16592         (pupa_print_partinfo): New prototype.
16593         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16594         (pupa_dl_get_prefix): Likewise.
16595         * include/pupa/misc.h: Include <pupa/err.h>.
16596         (pupa_isgraph): New prototype.
16597         (pupa_isdigit): Likewise.
16598         (pupa_split_cmdline): Likewise.
16599         * include/pupa/normal.h: Include <pupa/arg.h>.
16600         (pupa_command): Changed the prototype of the member `func' to
16601         match the argument parsing interface.  Added member `options'.
16602         (pupa_register_command): Updated to match function.
16603         (pupa_arg_parse): New prototype.
16604         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16605         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16606         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16607         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16608         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16609         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16610         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16611         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16612         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16613         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16614         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16615         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16616         * kern/disk.c: Include <pupa/file.h>.
16617         (pupa_print_partinfo): New function.
16618         * kern/dl.c: Include <pupa/env.h>.
16619         (pupa_dl_dir): Variable removed.
16620         (pupa_dl_load): Use the environment variable `prefix' instead of
16621         the variable pupa_dl_dir.
16622         (pupa_dl_set_prefix): Function removed.
16623         (pupa_dl_get_prefix): Likewise.
16624         * kern/i386/pc/init.c: Include <pupa/env.h>.
16625         (pupa_machine_init): Use the environment variable `prefix' instead of
16626         using pupa_dl_set_prefix to set the prefix.
16627         * kern/main.c: Include <pupa/env.h>.
16628         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16629         using pupa_dl_get_prefix to get the prefix.
16630         * kern/misc.c: Include <pupa/env.h>.
16631         (pupa_isdigit): New function.
16632         (pupa_isgraph): Likewise.
16633         (pupa_ftoa): Likewise.
16634         (pupa_vsprintf): Added support for printing values of the type
16635         `double'.  Make it possible to format variable output when using
16636         formatting like `%1.2%f'.
16637         (pupa_split_cmdline): New function.
16638         * kern/rescue.c: Include <pupa/env.h>.
16639         (next_word): Removed function.
16640         (pupa_rescue_cmd_prefix): Likewise.
16641         (pupa_rescue_cmd_set): New function.
16642         (pupa_rescue_cmd_unset): New function.
16643         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16644         split the command line instead of splitting it here.  Added
16645         support for setting variables using the syntax `foo=bar'.  Don't
16646         initialize the prefix command anymore.  Initialized the set and
16647         unset commands.
16648         * normal/cmdline.c: Include <pupa/env.h>.
16649         (pupa_tab_complete): Added prototypes for print_simple_completion,
16650         print_partition_completion, add_completion, iterate_commands,
16651         iterate_dev, iterate_part and iterate_dir. Moved code to print
16652         partition information from here to kern/disk.c.
16653         (pupa_cmdline_run): Don't check if the function exists anymore.
16654         * normal/main.c: Include <pupa/env.h>.
16655         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16656         instead of using pupa_dl_get_prefix to get the prefix.
16657         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16658         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16659         warning.
16660         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16661         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16662         ((unused))' to silence a gcc warning.
16663         (pupa_vga_setcolor): Likewise.
16664         (debug_command): Changed to match argument parsing
16665         interface changes.
16666         * util/pupa-emu.c: Include <pupa/env.h>.
16667         (options): Added 0's for unused fields to silence a gcc warning.
16668         (argp): Likewise.
16669         (main): Use the environment variable `prefix' instead of using
16670         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16671         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16672         and terminal.
16674         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16675         * util/misc.c: Include <malloc.h>.
16676         (pupa_malloc): Rewritten so errors are correctly reported.
16677         (pupa_realloc): Likewise.
16678         (pupa_memalign): Likewise.
16679         (pupa_mm_init_region): Declare unused variables with
16680         `__attribute__ ((unused))' to silence a gcc warning.
16681         * normal/i386/setjmp.S: Remove tab at the end of the file to
16682         silence a gcc warning.
16683         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16684         variables with `__attribute__ ((unused))' to silence a gcc
16685         warning.
16686         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16687         local variable i unsigned to silence a gcc warning.
16689         * kern/term.c: Include <pupa/misc.h>.
16690         (pupa_more_lines): New variable.
16691         (pupa_more): Likewise.
16692         (pupa_putcode): When the pager is active pause at the end of every
16693         screen.
16694         (pupa_set_more): New function.
16695         * include/pupa/term.h (pupa_set_more): New prototype.
16698 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16700         Now this project is GRUB 2 rather than PUPA. The location of
16701         the CVS repository was moved to GRUB's.
16703         * configure.ac: Use bug-grub as the reporting address.
16704         Use GRUB instead of PUPA.
16705         Change the version number to 1.90.
16707 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16709         * genkernsyms.sh: Updated copyright information.
16710         * genmk.rb: Likewise.
16711         * genmodsrc.sh: Likewise.
16712         * gensymlist.sh: Likewise.
16713         * boot/i386/pc/boot.S: Likewise.
16714         * boot/i386/pc/diskboot.S: Likewise.
16715         * disk/i386/pc/biosdisk.c: Likewise.
16716         * disk/i386/pc/partition.c: Likewise.
16717         * font/manager.c: Likewise.
16718         * fs/ext2.c: Likewise.
16719         * fs/fat.c: Likewise.
16720         * include/pupa/boot.h: Likewise.
16721         * include/pupa/device.h: Likewise.
16722         * include/pupa/disk.h: Likewise.
16723         * include/pupa/dl.h: Likewise.
16724         * include/pupa/elf.h: Likewise.
16725         * include/pupa/err.h: Likewise.
16726         * include/pupa/file.h: Likewise.
16727         * include/pupa/font.h: Likewise.
16728         * include/pupa/fs.h: Likewise.
16729         * include/pupa/kernel.h: Likewise.
16730         * include/pupa/loader.h: Likewise.
16731         * include/pupa/misc.h: Likewise.
16732         * include/pupa/mm.h: Likewise.
16733         * include/pupa/net.h: Likewise.
16734         * include/pupa/normal.h: Likewise.
16735         * include/pupa/rescue.h: Likewise.
16736         * include/pupa/setjmp.h: Likewise.
16737         * include/pupa/symbol.h: Likewise.
16738         * include/pupa/term.h: Likewise.
16739         * include/pupa/types.h: Likewise.
16740         * include/pupa/i386/setjmp.h: Likewise.
16741         * include/pupa/i386/types.h: Likewise.
16742         * include/pupa/i386/pc/biosdisk.h: Likewise.
16743         * include/pupa/i386/pc/boot.h: Likewise.
16744         * include/pupa/i386/pc/console.h: Likewise.
16745         * include/pupa/i386/pc/init.h: Likewise.
16746         * include/pupa/i386/pc/kernel.h: Likewise.
16747         * include/pupa/i386/pc/linux.h: Likewise.
16748         * include/pupa/i386/pc/loader.h: Likewise.
16749         * include/pupa/i386/pc/memory.h: Likewise.
16750         * include/pupa/i386/pc/multiboot.h: Likewise.
16751         * include/pupa/i386/pc/partition.h: Likewise.
16752         * include/pupa/i386/pc/time.h: Likewise.
16753         * include/pupa/i386/pc/vga.h: Likewise.
16754         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16755         * include/pupa/util/getroot.h: Likewise.
16756         * include/pupa/util/misc.h: Likewise.
16757         * include/pupa/util/resolve.h: Likewise.
16758         * kern/device.c: Likewise.
16759         * kern/disk.c: Likewise.
16760         * kern/dl.c: Likewise.
16761         * kern/err.c: Likewise.
16762         * kern/file.c: Likewise.
16763         * kern/fs.c: Likewise.
16764         * kern/loader.c: Likewise.
16765         * kern/main.c: Likewise.
16766         * kern/misc.c: Likewise.
16767         * kern/mm.c: Likewise.
16768         * kern/rescue.c: Likewise.
16769         * kern/term.c: Likewise.
16770         * kern/i386/dl.c: Likewise.
16771         * kern/i386/pc/init.c: Likewise.
16772         * kern/i386/pc/lzo1x.S: Likewise.
16773         * kern/i386/pc/startup.S: Likewise.
16774         * loader/i386/pc/chainloader.c: Likewise.
16775         * loader/i386/pc/linux.c: Likewise.
16776         * loader/i386/pc/multiboot.c: Likewise.
16777         * normal/cmdline.c: Likewise.
16778         * normal/command.c: Likewise.
16779         * normal/main.c: Likewise.
16780         * normal/menu.c: Likewise.
16781         * normal/i386/setjmp.S: Likewise.
16782         * term/i386/pc/console.c: Likewise.
16783         * term/i386/pc/vga.c: Likewise.
16784         * util/console.c: Likewise.
16785         * util/genmoddep.c: Likewise.
16786         * util/misc.c: Likewise.
16787         * util/pupa-emu.c: Likewise.
16788         * util/resolve.c: Likewise.
16789         * util/unifont2pff.rb: Likewise.
16790         * util/i386/pc/biosdisk.c: Likewise.
16791         * util/i386/pc/getroot.c: Likewise.
16792         * util/i386/pc/pupa-mkimage.c: Likewise.
16793         * util/i386/pc/pupa-setup.c: Likewise.
16795 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16797         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16798         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16799         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16800         reading and reset it after reading.
16801         (pupa_ext2_close): Return PUPA_ERR_NONE.
16803         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16804         Correct value.
16805         (struct linux_kernel_header): Add kernel_version and
16806         initrd_addr_max.
16807         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16808         pupa_file_read succeeds.
16809         (pupa_rescue_cmd_initrd): Implement.
16811 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16813         * fs/ext2.c (pupa_ext2_label): New function.
16814         (pupa_ext2_fs): Added label.
16815         * fs/fat.c (pupa_fat_label): New function.
16816         (pupa_fat_fs): Added label.
16817         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16819         * kern/misc.c (pupa_strndup): New function.
16820         * include/pupa/misc.h (pupa_strndup): New prototype.
16822         * include/pupa/normal.h: Include <pupa/err.h>.
16823         (pupa_set_history): New prototype.
16824         (pupa_iterate_commands): New prototype.
16825         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16826         <pupa/disk.h>, <pupa/file.h>.
16827         (hist_size): New variable.
16828         (hist_lines): Likewise.
16829         (hist_end): Likewise.
16830         (hist_used): Likewise.
16831         (pupa_set_history): New function.
16832         (pupa_history_get): Likewise.
16833         (pupa_history_add): Likewise.
16834         (pupa_history_replace): Likewise.
16835         (pupa_tab_complete): Likewise.
16836         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16837         completion shows partitionnames while completing partitions, this
16838         feature was suggested by Jeff Bailey.
16839         * normal/command.c (pupa_iterate_commands): New function.
16840         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16841         (pupa_normal_init): Initialize history buffer.
16842         (PUPA_MOD_INIT): Likewise.
16843         (pupa_normal_fini): Free the history buffer.
16844         (PUPA_MOD_FINI): Likewise.
16846         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16847         key.
16849         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16850         * configure.ac [i386]: Check for regparam bug.
16851         (NESTED_FUNC_ATTR) [! i386]: Defined.
16853 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16855         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16856         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16857         (pupa_emu_SOURCES): New variable.
16858         (pupa_emu_LDFLAGS): Likewise.
16859         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16860         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16861         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16862         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16863         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16864         (pupa_jmp_buf): New typedef.
16865         (pupa_setjmp) [PUPA_UTIL]: New macro.
16866         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16867         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16868         (pupa_refresh): New prototype.
16869         * include/pupa/util/getroot.h: New file.
16870         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16871         it.
16872         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16873         (pupa_rescue_cmd_cat): Likewise.
16874         (pupa_rescue_cmd_ls): Likewise.
16875         (pupa_rescue_cmd_testload): Likewise.
16876         (pupa_rescue_cmd_lsmod): Likewise.
16877         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16878         * normal/menu.c (run_menu): Likewise.
16879         * kern/term.c (pupa_cls): Likewise.
16880         (pupa_refresh): New function.
16881         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16882         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16883         * util/console.c: New file.
16885         * util/i386/pc/getroot.c: New file.
16886         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16887         (pupa_putchar): New function.
16888         (pupa_refresh): Likewise.
16889         (xgetcwd): Function moved to ...
16890         (strip_extra_slashes): Likewise.
16891         (get_prefix): Likewise.
16892         * util/i386/pc/getroot.c: ... here.
16893         (find_root_device): Function moved and renamed to...
16894         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16895         Changed all callers.
16896         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16897         and renamed to...
16898         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16899         Changed all callers.
16900         * util/misc.c (pupa_memalign): New function.
16901         (pupa_mm_init_region): Likewise.
16902         (pupa_register_exported_symbols): Likewise.
16903         (pupa_putchar): Function removed.
16904         * util/pupa-emu.c: New file.
16906 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16908         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16909         (_multiboot_mod_SOURCES): New variable.
16910         (_multiboot_mod_CFLAGS): Likewise.
16911         * loader/i386/pc/multiboot.c: New file.
16912         * include/pupa/i386/pc/multiboot.h: Likewise.
16913         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16914         (pupa_multiboot_real_boot): New function.
16915         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16916         (pupa_multiboot_real_boot): New prototype.
16917         (pupa_rescue_cmd_multiboot): Likewise
16918         (pupa_rescue_cmd_module): Likewise.
16920         * kern/loader.c (pupa_loader_set): Continue when
16921         pupa_loader_unload_func() fails.
16922         (pupa_loader_unset): New function.
16923         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16925         * kern/misc.c (pupa_stpcpy): New function.
16926         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16928 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16930         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16931         for available extensions.
16933         * include/pupa/i386/pc/time.h: New file.
16934         * kern/disk.c: Include <pupa/machine/time.h>.
16935         (PUPA_CACHE_TIMEOUT): New macro.
16936         (pupa_last_time): New variable.
16937         (pupa_disk_open): Flush the cache when there was a timeout.
16938         (pupa_disk_close): Reset the timer.
16939         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16940         pupa_currticks.
16941         * util/misc.c: Include <sys/times.h>
16942         (pupa_get_rtc): New function.
16944 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16946         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16947         as blocks.
16948         (pupa_ext2_get_file_block): Use blocks member.
16950         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16951         first block. Return -1 instead of pupa_errno on error.
16953 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16955         * README: In the pupa-mkimage example use _chain instead of chain
16956         and ext2 instead of fat.
16957         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16958         adding journal playback for ext2fs.
16959         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16960         (pkgdata_MODULES): Added ext2.mod.
16961         (ext2_mod_SOURCES): New variable.
16962         (ext2_mod_CFLAGS): Likewise.
16963         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16964         * include/pupa/misc.h (pupa_strncpy): New prototype.
16965         (pupa_strcat): Likewise.
16966         (pupa_strncmp): Likewise.
16967         * kern/misc.c (pupa_strcat): Enable function.
16968         (pupa_strncpy): New function.
16969         (pupa_strncmp): Likewise.
16970         * fs/ext2.c: New file.
16972         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16973         when the read failed before retrying.
16974         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16975         (_FILE_OFFSET_BITS): Likewise.
16976         * configure.ac: Added AC_SYS_LARGEFILE.
16978 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16980         * genmk.rb (PModule#rule): Make sure to get only symbol names
16981         from the output of nm.
16982         Reported by Robert Millan <zeratul2@wanadoo.es>.
16984 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16986         I forgot to check in these changes for a long time. This adds
16987         incomplete support for VGA console, and this is still very
16988         buggy. Also, a lot of consideration is required for I18N,
16989         UNICODE, and VGA font issues. Therefore, assume that this is
16990         such that "better than nothing".
16992         * font/manager.c: New file.
16993         * include/pupa/font.h: Likewise.
16994         * include/pupa/i386/pc/vga.h: Likewise.
16995         * term/i386/pc/vga.c: Likewise.
16996         * util/unifont2pff.rb: Likewise.
16998         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16999         (pkgdata_MODULES): Added vga.mod and font.mod.
17000         (vga_mod_SOURCES): New variables.
17001         (vga_mod_CFLAGS): Likewise.
17002         (font_mod_SOURCES): Likewise.
17003         (font_mod_CFLAGS): Likewise.
17005         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17007         * include/pupa/term.h: Include pupa/err.h.
17008         (struct pupa_term): Added init and fini.
17009         Changed the argument of putchar to pupa_uint32_t.
17011         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17012         (pupa_console_real_putchar): New prototype.
17013         (pupa_console_putchar): Removed.
17014         (pupa_console_checkkey): Exported.
17015         (pupa_console_getkey): Likewise.
17017         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17018         characters.
17020         * kern/term.c (pupa_term_set_current): Rewritten.
17021         (pupa_putchar): Likewise.
17022         (pupa_putcode): New function.
17024         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17025         (pupa_console_real_putchar): ... this.
17026         (pupa_vga_set_mode): New function.
17027         (pupa_vga_get_font): Likewise.
17029         * normal/command.c: Include pupa/term.h.
17030         (terminal_command): New function.
17031         (pupa_command_init): Register the command "terminal".
17033         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17034         (DISP_UP): Likewise.
17035         (DISP_RIGHT): Likewise.
17036         (DISP_DOWN): Likewise.
17037         (DISP_HLINE): Likewise.
17038         (DISP_VLINE): Likewise.
17039         (DISP_UL): Likewise.
17040         (DISP_UR): Likewise.
17041         (DISP_LL): Likewise.
17042         (DISP_LR): Likewise.
17044         * term/i386/pc/console.c (pupa_console_putchar): New function.
17046 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17048         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17049         FIX. Reverse the path_list.
17051         * include/pupa/normal.h: Export pupa_register_command and
17052         pupa_unregister_command.
17054         * hello/hello.c (pupa_cmd_hello): New module.
17055         * conf/i386-pc.rmk: Added hello.mod.
17057 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17059         * kern/i386/pc/lzo1x.S: New file.
17061         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17062         (compress_kernel): New variable.
17063         (generate_image): Heavily modified to support compressing a
17064         large part of the core image.
17066         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17067         leak.
17068         (pupa_util_load_image): New function.
17070         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17071         (pupa_compressed_size): New variable.
17072         (codestart): Enable Gate A20 here.
17073         Decompress the compressed part of the core image.
17074         Rearrange the code to put functions and variables which are
17075         required for initialization in the non-compressed part.
17076         Include lzo1x.S.
17078         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17079         here.
17081         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17083         * include/pupa/i386/pc/kernel.h
17084         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17085         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17086         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17087         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17088         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17090         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17092         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17093         (Utility#rule): Likewise.
17095         * configure.ac: Check if LZO is available.
17097 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17099         * include/pupa/normal.h: New file.
17100         * include/pupa/setjmp.h: Likewise.
17101         * include/pupa/i386/setjmp.h: Likewise.
17102         * normal/cmdline.c: Likewise.
17103         * normal/command.c: Likewise.
17104         * normal/main.c: Likewise.
17105         * normal/menu.c: Likewise.
17106         * normal/i386/setjmp.S: Likewise.
17108         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17109         (pupa_rescue_cmd_initrd): Likewise.
17111         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17112         Likewise.
17114         * kern/i386/pc/startup.S (translation_table): New variable.
17115         (translate_keycode): New function.
17116         (pupa_console_getkey): Call translate_keycode.
17118         * kern/rescue.c (attempt_normal_mode): New function.
17119         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17120         it failed, print a message.
17122         * kern/mm.c (pupa_real_malloc): Print more information when a
17123         free magic is broken.
17124         (pupa_free): If the first free header is not free actually, set
17125         it to P.
17127         * kern/main.c (pupa_load_normal_mode): Just load the module
17128         "normal".
17129         (pupa_main): Don't print the message
17130         "Entering into rescue mode..." here.
17132         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17133         Declared.
17134         (pupa_rescue_cmd_initrd): Likewise.
17135         (pupa_rescue_cmd_initrd): Likewise.
17137         * include/pupa/symbol.h (FUNCTION): Specify the type.
17138         (VARIABLE): Likewise.
17140         * include/pupa/err.h (pupa_err_t): Added
17141         PUPA_ERR_UNKNOWN_COMMAND.
17143         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17144         (pupa_dl_get_prefix): Likewise.
17146         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17147         Added _chain.mod and _linux.mod instead of chain.mod and
17148         linux.mod.
17149         (chain_mod_SOURCES): Renamed to ...
17150         (_chain_mod_SOURCES): ... this.
17151         (chain_mod_CFLAGS): Renamed to ...
17152         (_chain_mod_CFLAGS): ... this.
17153         (linux_mod_SOURCES): Renamed to ...
17154         (_linux_mod_SOURCES): ... this.
17155         (linux_mod_CFLAGS): Renamed to ...
17156         (_linux_mod_CFLAGS): ... this.
17157         (normal_mod_SOURCES): New variable.
17158         (normal_mod_CFLAGS): Likewise.
17159         (normal_mod_ASFLAGS): Likewise.
17161 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17163         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17164         possible.
17166         * kern/dl.c (pupa_dl_ref): Refer depending modules
17167         recursively.
17168         (pupa_dl_unref): Unrefer depending modules recursively.
17169         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17170         a module is unloaded before one depending on that module is
17171         unloaded.
17172         (pupa_dl_unload): Unload depending modules explicitly,
17173         if possible.
17175 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17177         * include/pupa/i386/pc/linux.h: New file.
17178         * loader/i386/pc/linux.c: Likewise.
17180         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17181         Removed.
17182         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17183         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17184         of PUPA_CHAINLOADER_BOOT_SECTOR.
17186         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17187         (pupa_linux_prot_size): New variable.
17188         (pupa_linux_tmp_addr): Likewise.
17189         (pupa_linux_real_addr): Likewise.
17190         (pupa_linux_boot_zimage): New function.
17191         (pupa_linux_boot_bzimage): Likewise.
17193         * kern/i386/pc/init.c (struct mem_region): New structure.
17194         (MAX_REGIONS): New macro.
17195         (mem_regions): New variable.
17196         (num_regions): Likewise.
17197         (pupa_os_area_addr): Likewise.
17198         (pupa_os_area_size): Likewise.
17199         (pupa_lower_mem): Likewise.
17200         (pupa_upper_mem): Likewise.
17201         (add_mem_region): New function.
17202         (compact_mem_regions): Likewise.
17203         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17204         the size of the conventional memory and that of so-called upper
17205         memory (before the first memory hole).
17206         Instead of adding each found region to free memory, use
17207         add_mem_region and add them after removing overlaps.
17208         Also, add only 1/4 of the upper memory to free memory. The rest
17209         is used for loading OS images. Maybe this is ad hoc, but this
17210         makes it much easier to relocate OS images when booting.
17212         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17213         (pupa_enter_rescue_mode): Don't register initrd and module.
17215         * kern/mm.c: Include pupa/dl.h.
17217         * kern/main.c: Include pupa/file.h and pupa/device.h.
17219         * kern/loader.c (pupa_loader_load_module_func): Removed.
17220         (pupa_loader_load_module): Likewise.
17222         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17223         ``.o''.
17225         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17226         (pupa_linux_tmp_addr): Likewise.
17227         (pupa_linux_real_addr): Likewise.
17228         (pupa_linux_boot_zimage): Likewise.
17229         (pupa_linux_boot_bzimage): Likewise.
17231         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17232         (pupa_upper_mem): Likewise.
17233         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17234         module is too dangerous.
17236         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17237         (pupa_os_area_size): Likewise.
17238         (pupa_loader_set): Remove the first argument. Loader doesn't
17239         manage modules or initrd any longer.
17240         (pupa_loader_load_module): Removed.
17242         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17243         (linux_mod_SOURCES): New variable.
17244         (linux_mod_CFLAGS): Likewise.
17246 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17248         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17249         the length of a blocklist correctly.
17251         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17252         Use ioctl only if the OS file is a block device.
17253         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17254         not very useful for normal files.
17256         * kern/main.c (pupa_set_root_dev): New function.
17257         (pupa_load_normal_mode): Likewise.
17258         (pupa_main): Call those above.
17260         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17261         pupa_uint16_t.
17263         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17265 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17267         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17268         (setup): Configure the installed partition information and the
17269         dl prefix.
17271         * loader/i386/pc/chainloader.c (my_mod): New variable.
17272         (pupa_chainloader_unload): New function.
17273         (pupa_rescue_cmd_chainloader): Refer itself.
17274         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17276         * kern/i386/pc/startup.S (install_partition): Removed.
17277         (version_string): Likewise.
17278         (config_file): Likewise.
17279         (pupa_install_dos_part): New variable.
17280         (pupa_install_bsd_part): Likewise.
17281         (pupa_prefix): Likewise.
17282         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17284         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17285         and pupa/misc.h.
17286         (make_install_device): New function.
17287         (pupa_machine_init): Set the dl prefix.
17289         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17290         (buf): Renamed to ...
17291         (linebuf): ... this.
17292         (pupa_rescue_cmd_prefix): New function.
17293         (pupa_rescue_cmd_insmod): Likewise.
17294         (pupa_rescue_cmd_rmmod): Likewise.
17295         (pupa_rescue_cmd_lsmod): Likewise.
17296         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17297         rmmod and lsmod.
17299         * kern/mm.c (pupa_memalign): If failed even after invalidating
17300         disk caches, unload unneeded modules and retry.
17302         * kern/misc.c (pupa_memmove): New function.
17303         (pupa_memcpy): Removed.
17304         (pupa_strcpy): New function.
17305         (pupa_itoa): Made static.
17307         * kern/dl.c (pupa_dl_iterate): New function.
17308         (pupa_dl_ref): Likewise.
17309         (pupa_dl_unref): Likewise.
17310         (pupa_dl_unload): Return if succeeded or not.
17311         (pupa_dl_unload_unneeded): New function.
17312         (pupa_dl_unload_all): Likewise.
17313         (pupa_dl_init): Renamed to ...
17314         (pupa_dl_set_prefix): ... this.
17315         (pupa_dl_get_prefix): New function.
17317         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17318         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17319         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17320         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17321         (pupa_install_dos_part): Declared.
17322         (pupa_install_bsd_part): Likewise.
17323         (pupa_prefix): Likewise.
17324         (pupa_boot_drive): Likewise.
17326         * include/pupa/types.h: Fix a typo.
17328         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17329         pupa_memmove.
17330         (pupa_memmove): Declared.
17331         (pupa_strcpy): Likewise.
17333         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17334         pupa_mod_init takes one argument, its own module.
17335         (pupa_dl_unload_unneeded): Declared.
17336         (pupa_dl_unload_all): Likewise.
17337         (pupa_dl_ref): Likewise.
17338         (pupa_dl_unref): Likewise.
17339         (pupa_dl_iterate): Likewise.
17340         (pupa_dl_init): Renamed to ...
17341         (pupa_dl_set_prefix): ... this.
17342         (pupa_dl_get_prefix): Declared.
17344         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17345         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17346         unloaded.
17347         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17348         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17350         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17351         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17353 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17355         * util/i386/pc/pupa-setup.c (setup): Define the internal
17356         function find_first_partition_start at the top level, because GCC
17357         3.0.x cannot compile internal functions in deeper scopes
17358         correctly.
17359         (find_root_device): Use lstat instead of stat.
17360         Don't follow symbolic links.
17361         Fix the path-constructing code.
17363         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17364         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17365         by a BLKGETSIZE ioctl first, because block devices don't fill
17366         the member st_mode of the structure stat on Linux.
17367         [__linux__] (linux_find_partition): Use a temporary buffer
17368         REAL_DEV for the working space. Copy it to DEV before returning.
17369         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17370         buffer cache consistent.
17371         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17372         strncmp. The previous value was merely wrong.
17373         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17375         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17376         FAT size is 12. The previous value was merely wrong.
17378         * kern/main.c (pupa_main): Don't split the starting message from
17379         newlines.
17381         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17382         LF, because BIOS goes crazy about character attributes in this
17383         case.
17385 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17387         * include/i386/pc/util/biosdisk.h: New file.
17388         * util/i386/pc/biosdisk.c: Likewise.
17389         * util/i386/pc/pupa-setup.c: Likewise.
17391         * Makefile.in (INCLUDE_DISTFILES): Added
17392         include/pupa/i386/pc/util/biosdisk.h.
17393         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17394         directory util/i386/pc.
17395         (install-local): Added a rule for sbin_UTILITIES.
17396         (uninstall): Likewise.
17398         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17400         * util/misc.c (xrealloc): New function.
17401         (pupa_malloc): Likewise.
17402         (pupa_free): Likewise.
17403         (pupa_realloc): Likewise.
17404         (pupa_stop): Likewise.
17405         (pupa_putchar): Likewise.
17407         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17409         * include/pupa/util/misc.h (xrealloc): Declared.
17411         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17412         macro.
17413         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17414         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17416         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17417         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17419         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17420         way should be implemented.
17421         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17423         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17424         the size of NAME for safety.
17425         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17426         0x88.
17428         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17429         (pupa_setup_SOURCES): Likewise.
17431         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17433 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17435         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17436         bunch of pushl's from pusha, because this destroys the return
17437         value.
17439 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17441         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17442         This means that any missing prototypes could be fatal. Also, you
17443         must take care when writing assembly code. See the comments at
17444         the beginning of startup.S, for more details.
17446         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17447         compilation mechanism.
17448         (pupa_chainloader_real_boot): Likewise.
17449         (pupa_biosdisk_rw_int13_extensions): Likewise.
17450         (pupa_biosdisk_rw_standard): Likewise.
17451         (pupa_biosdisk_check_int13_extensions): Likewise.
17452         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17453         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17454         (pupa_get_memsize): Likewise.
17455         (pupa_get_mmap_entry): Likewise.
17456         (pupa_console_putchar): Likewise.
17457         (pupa_console_setcursor): Likewise.
17458         (pupa_getrtsecs): Use pushl instead of push.
17460         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17461         memory instead of the stack for a mmap entry, because some
17462         BIOSes may ignore the maximum size and overflow.
17464         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17466         * genmk.rb (PModule#rule): Compile automatically generated
17467         sources with module-specific CFLAGS as well as other sources.
17469 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17471         * configure.ac: Check ld.
17472         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17473         respectively, before checking endianness and sizes.
17475         * Makefile.in (LD): New variable.
17477 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17479         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17481 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17483         * Changelog: New file.