Remove trailing spaces
[grub2/jjazz.git] / ChangeLog
blob2053f2d598b0558fa31556406fb233486ce0ba51
1 2009-06-11  Pavel Roskin  <proski@gnu.org>
3         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
4         casts to short - they are not portable and cause warnings.  Fix
5         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
7 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
9         Drivemap fixes
11         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
12         new function
13         (grub_get_root_biosnumber_saved): new variable
14         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
15         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
16         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
17         %dx after the call if necessary
18         * conf/common.rmk (pkglib_MODULES): remove boot.mod
19         (boot_mod_SOURCES): remove
20         (boot_mod_CFLAGS): remove
21         (boot_mod_LDFLAGS): remove
22         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
23         (boot_mod_SOURCES): new variable
24         (boot_mod_CFLAGS): likewise
25         (boot_mod_LDFLAGS): likewise
26         * conf/i386-efi.rmk: likewise
27         * conf/i386-ieee1275.rmk: likewise
28         * conf/i386-pc.rmk: likewise
29         * conf/powerpc-ieee1275.rmk: likewise
30         * conf/sparc64-ieee1275.rmk: likewise
31         * conf/x86_64-efi.rmk: likewise
32         * include/grub/i386/pc/biosnum.h: new file
33         * lib/i386/pc/biosnum.c: likewise
34         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
35         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
36         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
38 2009-06-10  Pavel Roskin  <proski@gnu.org>
40         * io/gzio.c (test_header): Don't reuse one buffer for all data.
41         Use separate variables.  Read only the file size at the end, but
42         not the checksum that we don't use.
44         * kern/file.c (grub_file_read): Use void pointer for the buffer.
45         Adjust all callers.
47         * kern/ieee1275/openfw.c: Remove libc includes.
48         * kern/ieee1275/cmain.c: Likewise.
49         * include/grub/ieee1275/ieee1275.h: Likewise.
51         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
52         compiler warnings.
54 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
56         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
57         `genparttoollist.sh'.
58         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
59         Add `*.sh' to the list find searches for and change `mdate.sh'
60         to `mdate-sh'.
62 2009-06-10  Pavel Roskin  <proski@gnu.org>
64         * include/grub/multiboot2.h: Provide compatibility defines for
65         multiboot2.h.
66         * include/multiboot2.h: Include stdint.h only if needed, using
67         angle brackets.
68         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
69         grub/multiboot2.h.
70         * loader/ieee1275/multiboot2.c: Likewise.
71         * loader/multiboot2.c: Likewise.
72         * loader/multiboot_loader.c: Likewise.
74         * configure.ac: Use -nostdlib when probing for the target.  It
75         should not be required to have libc for the target.
77         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
78         they fail without libc headers for the target.
79         * include/grub/powerpc/libgcc.h: Use weak attribute for all
80         exports.
81         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
82         preprocessor conditionals.
84         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
85         build system doesn't need to be aware of the tar.c internals.
87 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
89         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
91 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
93         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
94         disk limit to 26 for IDE, Virtio, Xen and SCSI.
96 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
98         * util/i386/pc/grub-install.in: Change the error message if UUIDs
99         aren't available if ata.mod gets used.
101 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
103         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
104         initialising controller.
105         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
107 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
109         * util/i386/pc/grub-install.in: Add a parameter --disk-module
110         to choose between ata and biosdisk module on i386-pc.
112 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
114         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
115         Subclass and Programming Interface fields in terms of the 3 byte
116         Class Code register.
117         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
119         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
120         interface is OHCI.  Add grub_dprintf for symmetry with
121         bus/usb/uhci.c.
122         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
123         interface is UHCI.  Add interf variable for programming
124         interface.  Print interface with class/subclass.
126         * bus/usb/ohci.c: Set interf with correct field.
128         * bus/usb/uhci.c: Remove unneeded doubled lines.
129         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
130         Remove whitespace inside comment.
132 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
134         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
135         as fallback an equivalent option without depth.
137 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
139         Not fail if unable to retrieve C/H/S on LBA disks
141         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
142         if unable to retrieve C/H/S on LBA disks
144 2009-06-08  Pavel Roskin  <proski@gnu.org>
146         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
147         about aliasing.
149 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
151         * Makefile.in (uninstall): Remove all $lib_DATA files.
153 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
155         Bugfix: install on partitionless device
157         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
158         is a whole disk
160 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
162         * Makefile.in (uninstall): Remove all $include_DATA files.
164 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
166         * commands/true.c: New file.  Implement the true and false commands.
167         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
168         (true_mod_SOURCES): New variable.
169         (true_mod_CFLAGS): Likewise.
170         (true_mod_LDFLAGS): Likewise.
172 2009-06-05  Colin D Bennett  <colin@gibibit.com>
174         Optimized font character lookup using binary search instead of linear
175         search.  Fonts now are required to have the character index ordered by
176         code point.
178         * font/font.c (load_font_index): Verify that fonts have ordered
179         character indices.
180         (find_glyph): Use binary search instead of linear search to find a
181         character in a font.
183 2009-06-05  Michael Scherer  <misc@mandriva.org>
185         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
186         uses case sensitive btree.
187         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
188         only for case insensitive filesystems.
190 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
192         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
193         * conf/common.rmk (search_mod_CFLAGS): likewise
195 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
197         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
198         compensate a compiler bug
200 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
202         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
203         instead of '\b'
205 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
207         Definitions for creating asm symbols with Apple's CC
209         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
210         [APPLE_CC] (VARIABLE): likewise
212 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
214         Disable lnxboot.img when compiled
215         with Apple's CC
217         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
218         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
219         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
220         [! APPLE_CC] (CODE_LENG): skip
221         [! APPLE_CC] (setup_sects): likewise
222         [! APPLE_CC]: skip filling
224 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
226         Address in trampolines based on 32-bit registers when compiled
227         with Apple's CC
229         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
230         for addresses
231         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
233 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
235         Avoid aliases when compiling with Apple's CC for PCBIOS machine
237         * kern/misc.c [APPLE_CC] (memcpy): new function
238         [APPLE_CC] (memmove): likewise
239         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
240         (memcpy): define alias conditionally on !APPLE_CC
241         (memset): likewise
242         (abort): likewise
243         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
244         APPLE_CC are defined
245         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
246         (grub_assert_fail): make prototype conditional
248 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
250         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
252         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
253         grub-macho2img
254         (CLEANFILES): add grub-macho2img
255         (grub_macho2img_SOURCES): new variable
256         * kern/i386/pc/startup.S (bss_start): new variable
257         (bss_end): likewise
258         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
259         * util/grub-macho2img.c: new file
261 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
263         Use objconv when compiling with Apple's CC
265         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
266         (efiemu64.o): likewise
267         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
268         when compiling with Apple's CC
269         (efiemu64_s.o): likewise
270         * configure.ac: check for objconv when compiling with Apple's CC
271         * genmk.rb: use objconv for modules when compiled with Apple's CC
273 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
275         Define segment as well as section when compiling with
276         Apple's CC
278         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
279         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
280         (efiemu_convert_pointer): likewise
281         (efiemu_set_virtual_address_map): likewise
282         (efiemu_convert_pointer): likewise
283         (efiemu_getcrc32): likewise
284         (init_crc32_table): likewise
285         (reflect): likewise
286         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
287         (GRUB_MOD_DEP): likewise
289 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
291         Allow a compilation without -mcmodel=large
293         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
294         when compiled without -mcmodel=large
295         (filter_memory_map): remove memory post 4 GiB when compiled
296         without -mcmodel=large
297         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
298         TARGET_CFLAGS when -mcmodel=large isn't supported
300 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
302         Remove nested functions in efiemu core
304         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
306 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
308         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
310         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
311         temporary storage
312         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
313         using Apple's CC
314         (grub_cpu_is_tsc_supported): likewise
315         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
317 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
319         Absolute addressing through constant with Apple's cc
321         * kern/i386/pc/startup.S: Define necessary constants
322         and address through it when using ABS with Apple's CC
323         * boot/i386/pc/diskboot.S: likewise
324         * boot/i386/pc/boot.S: likewise
325         * boot/i386/pc/lnxboot.S: likewise
326         * boot/i386/pc/cdboot.S: likewise
327         * mmap/i386/pc/mmap_helper.S: likewise
328         * commands/i386/pc/drivemap_int13h.S: likewise
330 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
332         Check if compiler is apple cc
334         * Makefile.in (ASFLAGS): new variable
335         (TARGET_ASFLAGS): likewise
336         (TARGET_MODULE_FORMAT): likewise
337         (TARGET_APPLE_CC): likewise
338         (OBJCONV): likewise
339         (TARGET_IMG_CFLAGS): likewise
340         (TARGET_CPPFLAGS): add includedir
341         * configure.ac: call grub_apple_cc and grub_apple_target_cc
342         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
343         Check for linker script only if compiler isn't Apple's CC
344         (TARGET_MODULE_FORMAT): set
345         (TARGET_APPLE_CC): likewise
346         (TARGET_ASFLAGS): likewise
347         (ASFLAGS): likewise
348         Check for objcopy only if compiler isn't Apple's CC
349         Check for BSS symbol only if compiler isn't Apple's CC
350         * genmk.rb: adapt nm options if we use Apple's utils
351         * aclocal.m4 (grub_apple_cc): new test
352         (grub_apple_target_cc): likewise
354 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
356         Simplify sed expressions and improve awk
358         * Makefile.in (install-local): simplify sed expression
359         * gencmdlist.sh: likewise
360         * genmoddep.awk: avoid adding module as a dependency of itself
362 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
364         Add missing start symbols
366         * boot/i386/pc/boot.S: add start
367         * boot/i386/pc/pxeboot.S: likewise
369 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
371         Fix wrong assumptions with grub-mkimage on EFI
373         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
374         (relocate_addresses): consider both r_addend and value at offset
375         (make_mods_section): zerofill modinfo and header
376         (convert_elf): write prefix here
378 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
380         Use .asciz instead of .string
382         * i386/pc/diskboot.S: use .asciz instead of .string
383         * i386/pc/boot.S: likewise
384         * include/grub/dl.h (GRUB_MOD_DEP): likewise
385         (GRUB_MOD_NAME): likewise
387 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
389         gfxpayload support
391         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
392         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
393         (grub_video_setup): remove
394         (grub_video_set_mode): new prototype
395         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
396         (vid_mode): remove
397         (linux_vesafb_res): compile only on PCBIOS
398         (grub_linux_boot): support gfxpayload
399         * loader/i386/pc/xnu.c (video_hook): new function
400         (grub_xnu_set_video): support gfxpayload
401         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
402         (DEFAULT_VIDEO_HEIGHT): likewise
403         (DEFAULT_VIDEO_FLAGS): likewise
404         (DEFAULT_VIDEO_MODE): new definition
405         (video_hook): new function
406         (grub_gfxterm_init): use grub_video_set_mode
407         * util/grub.d/30_os-prober.in: remove explicit modesetting before
408         loading xnu
409         * video/video.c (grub_video_setup): removed
410         (grub_video_set_mode): new function based on grub_gfxterm_init and
411         grub_video_setup
413 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
415         Avoid calling biosdisk in drivemap
417         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
418         (revparse_biosdisk): likewise
419         (list_mappings): derive name from id directly
420         (grub_cmd_drivemap): use tryparse_diskstring
422 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
424         Script fixes
426         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
427         (grub_lexer_param): add tokenonhold
428         (grub_script_create_cmdline): remove cmdline. All callers updated
429         (grub_script_function_create): make functionname
430         grub_script_arg. All callers updated
431         (grub_script_execute_argument_to_string): new prototype
432         * kern/parser.c (state_transitions): reorder
433         (grub_parser_cmdline_state): fix a bug and make more compact
434         * script/sh/execute.c (grub_script_execute_argument_to_string):
435         make global
436         (grub_script_execute_cmdline): use new format
437         * script/sh/function.c (grub_script_function_create): make functionname
438         grub_script_arg. All callers updated
439         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
440         (grub_script_yylex): remove
441         (grub_script_yylex2): renamed to ...
442         (grub_script_yylex): ...renamed
443         parse the expressions like a${b}c
444         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
445         (GRUB_PARSER_TOKEN_VAR): remove
446         (GRUB_PARSER_TOKEN_NAME): likewise
447         ("if"): declare as typeless
448         ("while"): likewise
449         ("function"): likewise
450         ("else"): likewise
451         ("then"): likewise
452         ("fi"): likewise
453         (text): remove
454         (argument): likewise
455         (script): accept empty scripts and make exit on error
456         (arguments): use GRUB_PARSER_TOKEN_ARG
457         (function): likewise
458         (command): move error handling to script
459         (menuentry): move grub_script_lexer_ref before
460         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
461         argument. All callers updated
463 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
465         Prevent GRUB from probing floppies during boot.
467         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
468         * commands/search.c (options): Add --no-floppy.
469         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
470         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
471         --no-floppy when searching for UUIDs.
473 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
475         Simplify the code duplication in commands/search.c.
477         * commands/search.c (search_label, search_fs_uuid): Merge into ...
478         (search_fs): ... this.  Update all users.
480 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
482         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
484 2009-05-28  Pavel Roskin  <proski@gnu.org>
486         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
487         Remove the original symlink explicitly.
489         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
490         just one slash.  That's how grub_fshelp_find_file() does it.
492 2009-05-26  Pavel Roskin  <proski@gnu.org>
494         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
495         to `str'.
497         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
498         possibly unused.
500 2009-05-25  Christian Franke  <franke@computer.org>
502         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
503         register.
504         (grub_atapi_identify): Add wait after drive select.
505         (grub_ata_identify): Do more strict status register check before
506         calling grub_atapi_identify ().  Suppress error message if status
507         register is 0x00 after command failure.  Add status register
508         check after PIO read to avoid bogus identify due to stuck DRQ.
509         Thanks to Pavel Roskin for testing.
510         (grub_device_initialize): Remove unsafe status register check.
511         Thanks to 'phcoder' for problem report and patch.
512         Prevent sign extension in debug message.
514 2009-05-23  Colin D Bennett  <colin@gibibit.com>
516         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
517         definition file, and functions defined in `normal/menu.c' have had
518         their prototypes moved to `include/grub/menu.h' for consistency.
520         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
521         from normal.h.
522         (grub_menu_get_entry): Likewise.
523         (grub_menu_get_timeout): Likewise.
524         (grub_menu_set_timeout): Likewise.
525         (grub_menu_execute_entry): Likewise.
526         (grub_menu_execute_with_fallback): Likewise.
527         (grub_menu_entry_run): Likewise.
529         * include/grub/normal.h: Re-ordered and grouped function
530         prototypes by file that the function is defined in.
531         (grub_menu_execute_callback): Removed; moved to menu.h.
532         (grub_menu_get_entry): Likewise.
533         (grub_menu_get_timeout): Likewise.
534         (grub_menu_set_timeout): Likewise.
535         (grub_menu_execute_entry): Likewise.
536         (grub_menu_execute_with_fallback): Likewise.
537         (grub_menu_entry_run): Likewise.
538         (grub_menu_addentry): Renamed from this ...
539         (grub_normal_add_menu_entry): ... to this.
541         * normal/main.c (grub_menu_addentry): Renamed from this ...
542         (grub_normal_add_menu_entry): ... to this.
544         * script/sh/execute.c (grub_script_execute_menuentry): Update
545         reference to renamed grub_menu_addentry function.
547 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
549         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
551 2009-05-22  Pavel Roskin  <proski@gnu.org>
553         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
554         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
555         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
556         compiling for the i386 targets, but not for the utilities.
558         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
559         to grub_uint8_t.
560         (grub_root_drive): Likewise.
561         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
562         remove alignment.
563         (grub_root_drive): Change size to byte.
564         (grub_start_addr): Remove.
565         (grub_end_addr): Likewise.
566         (grub_apm_bios_info): Likewise.
568 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
570         * normal/i386: Remove.
571         * normal/powerpc: Likewise.
572         * normal/sparc64: Likewise.
573         * normal/x86_64: Likewise.
575 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
577         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
578         * loader/i386/linux_trampoline.S: Fix indentation
579         * loader/i386/xnu_helper.S: Likewise
581 2009-05-18  Colin D Bennett  <colin@gibibit.com>
583         Display error messages when parsing a Lua statement fails.
584         Previously, executing a syntactically invalid statement like
585         ")foo" or "bar;" would silently fail.
587         * script/lua/grub_main.c (handle_lua_error): New function.
588         (grub_lua_parse_line): Improved reporting of Lua parser and
589         execution errors.
591 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
593         Remove -Werror which causes build to fail on some systems
595         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
596         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
597         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
599 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
601         trampoline for linux on 64-bit platform
603         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
604         loader/i386/efi/linux_trampoline.S
605         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
606         declaration
607         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
608         here
609         * loader/i386/linux_trampoline.S: moved here
610         * loader/i386/efi/linux.c (allocate_pages): reserve space for
611         trampoline
612         (jumpvector): removed
613         (grub_linux_trampoline_start): new declaration
614         (grub_linux_trampoline_end): likewise
615         (grub_linux_boot): use trampoline when on 64-bit platform
616         * loader/i386/linux.c: likewise
618 2009-05-16  Pavel Roskin  <proski@gnu.org>
620         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
621         const to avoid a warning.
622         (grub_lua_setenv): Likewise.
623         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
624         lmsg to fix a warning.
626 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
628         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
629         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
630         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
631         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
632         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
633         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
634         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
635         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
637 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
639         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
641 2009-05-16  Bean  <bean123ch@gmail.com>
643         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
644         (lua_mod_SOURCES): New variable.
645         (lua_mod_CFLAGS): Likewise.
646         (lua_mod_LDFLAGS): Likewise.
648         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
649         (setjmp_mod_SOURCES): New variable.
650         (setjmp_mod_CFLAGS): Likewise.
651         (setjmp_LDFLAGS): Likewise.
653         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
654         (setjmp_mod_SOURCES): New variable.
655         (setjmp_mod_CFLAGS): Likewise.
656         (setjmp_LDFLAGS): Likewise.
658         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
659         (setjmp_mod_SOURCES): New variable.
660         (setjmp_mod_CFLAGS): Likewise.
661         (setjmp_LDFLAGS): Likewise.
663         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
664         (setjmp_mod_SOURCES): New variable.
665         (setjmp_mod_CFLAGS): Likewise.
666         (setjmp_LDFLAGS): Likewise.
668         * normal/i386/setjmp.S: Moved from here ...
669         * lib/i386/setjmp.S: ... Moved here
670         * normal/x86_64/setjmp.S: Moved from here ...
671         * lib/x86_64/setjmp.S: ... Moved here
672         * normal/powerpc/setjmp.S: Moved from here ...
673         * lib/powerpc/setjmp.S: ... Moved here
674         * normal/sparc64/setjmp.S: Moved from here ...
675         * lib/sparc64/setjmp.S: ... Moved here
677         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
678         returns_twice in mingw.
680         * script/lua/grub_lib.c: New file.
681         * script/lua/grub_lib.h: Likewise.
682         * script/lua/grub_lua.h: Likewise.
683         * script/lua/grub_main.c: Likewise.
684         * script/lua/lapi.c: Likewise.
685         * script/lua/lapi.h: Likewise.
686         * script/lua/lauxlib.c: Likewise.
687         * script/lua/lauxlib.h: Likewise.
688         * script/lua/lbaselib.c: Likewise.
689         * script/lua/lcode.c: Likewise.
690         * script/lua/lcode.h: Likewise.
691         * script/lua/ldblib.c: Likewise.
692         * script/lua/ldebug.c: Likewise.
693         * script/lua/ldebug.h: Likewise.
694         * script/lua/ldo.c: Likewise.
695         * script/lua/ldo.h: Likewise.
696         * script/lua/ldump.c: Likewise.
697         * script/lua/lfunc.c: Likewise.
698         * script/lua/lfunc.h: Likewise.
699         * script/lua/lgc.c: Likewise.
700         * script/lua/lgc.h: Likewise.
701         * script/lua/linit.c: Likewise.
702         * script/lua/liolib.c: Likewise.
703         * script/lua/llex.c: Likewise.
704         * script/lua/llex.h: Likewise.
705         * script/lua/llimits.h: Likewise.
706         * script/lua/lmathlib.c: Likewise.
707         * script/lua/lmem.c: Likewise.
708         * script/lua/lmem.h: Likewise.
709         * script/lua/loadlib.c: Likewise.
710         * script/lua/lobject.c: Likewise.
711         * script/lua/lobject.h: Likewise.
712         * script/lua/lopcodes.c: Likewise.
713         * script/lua/lopcodes.h: Likewise.
714         * script/lua/loslib.c: Likewise.
715         * script/lua/lparser.c: Likewise.
716         * script/lua/lparser.h: Likewise.
717         * script/lua/lstate.c: Likewise.
718         * script/lua/lstate.h: Likewise.
719         * script/lua/lstring.c: Likewise.
720         * script/lua/lstring.h: Likewise.
721         * script/lua/lstrlib.c: Likewise.
722         * script/lua/ltable.c: Likewise.
723         * script/lua/ltable.h: Likewise.
724         * script/lua/ltablib.c: Likewise.
725         * script/lua/ltm.c: Likewise.
726         * script/lua/ltm.h: Likewise.
727         * script/lua/lua.h: Likewise.
728         * script/lua/luaconf.h: Likewise.
729         * script/lua/lualib.h: Likewise.
730         * script/lua/lundump.c: Likewise.
731         * script/lua/lundump.h: Likewise.
732         * script/lua/lvm.c: Likewise.
733         * script/lua/lvm.h: Likewise.
734         * script/lua/lzio.c: Likewise.
735         * script/lua/lzio.h: Likewise.
737 2009-05-16  Bean  <bean123ch@gmail.com>
739         * include/grub/kernel.h (grub_module_header_types): Add type
740         OBJ_TYPE_CONFIG.
742         * kern/main.c (grub_load_config): New function.
743         (grub_main): Call grub_load_config to read boot config.
745         * grub-mkimage (generate_image): New parameter config_path.
746         (options): New option --config.
747         (main): Parse --config option, and pass it to generate_image.
749 2009-05-14  Christian Franke  <franke@computer.org>
751         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
752         This fixes build on Cygwin.
754 2009-05-14  Pavel Roskin  <proski@gnu.org>
756         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
757         jump.  This saves two bytes, so the typical case of 2 swapped
758         drives would fit 32 bytes.
760 2009-05-13  Pavel Roskin  <proski@gnu.org>
762         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
763         grub_uint32_t to avoid a warning.
765         * loader/i386/linux.c (allocate_pages): When assigning
766         real_mode_mem, cast through grub_size_t to fix a warning.  The
767         code already makes sure that the value would fit a pointer.
768         (grub_linux_setup_video): Cast render_target->data to
769         grub_size_t to fix a warning.
771 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
773         * commands/i386/pc/drivemap.c: New file - implement drivemap
774         command.
775         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
776         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
778 2009-05-13  Pavel Roskin  <proski@gnu.org>
780         * util/i386/pc/grub-setup.c (setup): Remove unused variable
781         embedding_area_exists.
783 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
785         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
786         it easier to understand / work with.
787         Improve warning messages for cases where there's no embedding area,
788         or when it is too small (or core.img too large).
790 2009-05-13  Pavel Roskin  <proski@gnu.org>
792         * loader/i386/pc/multiboot2.c: Add necessary includes for
793         grub_multiboot2_real_boot().
795         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
796         PX record is always little-endian.  We only need the lower 2
797         bytes of the mode.
799         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
800         facilitate code reuse.
801         (grub_cpio_mount): Use "struct head", not a char buffer.  This
802         fixes a warning reported by gcc 4.4.
804         * kernel/disk.c (grub_disk_read): Use void pointer for the
805         buffer.
806         (grub_disk_write): Use const void pointer for the buffer.
807         Adjust all callers.  Remove unnecessary casts.
809 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
811         * util/i386/pc/grub-install.in: Update copyright year.
813 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
815         gptsync
817         * commands/gptsync.c: new file
818         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
819         (gptsync_mod_SOURCES): new variable
820         (gptsync_mod_CFLAGS): likewise
821         (gptsync_mod_LDFLAGS): likewise
822         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
823         new definition
824         (GRUB_PC_PARTITION_TYPE_HFS): likewise
825         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
826         * conf/i386-ieee1275.rmk: likewise
827         * conf/i386-pc.rmk: likewise
828         * conf/powerpc-ieee1275.rmk: likewise
830 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
832         Fixed grub-emu
834         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
835         (grub_dl_ref): likewise
837 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
839         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
840         split in two functions (one for msdos and one for gpt).
842 2009-05-08  Pavel Roskin  <proski@gnu.org>
844         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
845         not modified.
847         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
848         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
849         Initialize them with -1.  Add sanity check for bad1.  Eliminate
850         nerr variable.
852 2009-05-08  David S. Miller  <davem@davemloft.net>
854         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
856 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
858         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
859         existence.
861 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
863         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
864         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
866 2009-05-05  David S. Miller  <davem@davemloft.net>
868         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
870 2009-05-05  Pavel Roskin  <proski@gnu.org>
872         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
873         of grub_dl_ref() and grub_dl_unref().
874         * commands/parttool.c: Remove preprocessor conditionals around
875         grub_dl_ref() and grub_dl_unref().
876         * fs/affs.c: Likewise.
877         * fs/afs.c: Likewise.
878         * fs/cpio.c: Likewise.
879         * fs/ext2.c: Likewise.
880         * fs/fat.c: Likewise.
881         * fs/hfs.c: Likewise.
882         * fs/hfsplus.c: Likewise.
883         * fs/iso9660.c: Likewise.
884         * fs/jfs.c: Likewise.
885         * fs/minix.c: Likewise.
886         * fs/ntfs.c: Likewise.
887         * fs/reiserfs.c: Likewise.
888         * fs/sfs.c: Likewise.
889         * fs/udf.c: Likewise.
890         * fs/ufs.c: Likewise.
891         * fs/xfs.c: Likewise.
892         * include/grub/dl.h: Likewise.
893         * loader/xnu.c: Likewise.
895 2009-05-04  Pavel Roskin  <proski@gnu.org>
897         * commands/acpi.c: Remove unused variable my_mod.
898         * partmap/amiga.c: Likewise.
899         * partmap/apple.c: Likewise.
900         * partmap/gpt.c: Likewise.
901         * partmap/pc.c: Likewise.
902         * partmap/sun.c: Likewise.
903         * term/gfxterm.c: Likewise.
904         * term/i386/pc/vesafb.c: Likewise.
905         * term/i386/pc/vga.c: Likewise.
907 2009-05-04  David S. Miller  <davem@davemloft.net>
909         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
910         pointer args to grub_ieee1275_get_property().
912         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
914         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
915         devices, and do not traverse down under controller nodes.
917         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
918         (grub_ofdisk_open): Use it to un-escape "," characters.
919         * kern/disk.c (find_part_sep): New.
920         (grub_disk_open): Use it to find the first non-escaped ','
921         character in the disk name.
922         * util/ieee1275/devicemap.c (escape_of_path): New.
923         (grub_util_emit_devicemap_entry): Use it.
924         * util/sparc64/ieee1275/grub-install.in: Update script to
925         strip partition specifiers properly by not triggering on
926         '\' escaped ',' characters.
928 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
930         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
931         to 0x300.
932         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
933         resolutions.
934         (linux_vesafb_modes): Add a lot of additional modes to the list (based
935         on documentation from Wikipedia).
937 2009-05-04  Pavel Roskin  <proski@gnu.org>
939         * disk/ata.c: Spelling fixes.
940         * disk/raid.c: Likewise.
941         * disk/usbms.c: Likewise.
942         * disk/dmraid_nvidia.c: Likewise.
943         * kern/ieee1275/openfw.c: Likewise.
944         * kern/ieee1275/init.c: Likewise.
945         * kern/ieee1275/cmain.c: Likewise.
946         * boot/i386/pc/cdboot.S: Likewise.
947         * video/readers/png.c: Likewise.
948         * video/i386/pc/vbe.c: Likewise.
949         * fs/udf.c: Likewise.
950         * fs/hfs.c: Likewise.
951         * fs/reiserfs.c: Likewise.
952         * efiemu/runtime/efiemu.c: Likewise.
953         * efiemu/main.c: Likewise.
954         * efiemu/mm.c: Likewise.
955         * include/grub/elf.h: Likewise.
956         * include/grub/xnu.h: Likewise.
957         * include/grub/usbdesc.h: Likewise.
958         * include/grub/usb.h: Likewise.
959         * include/grub/script_sh.h: Likewise.
960         * include/grub/lib/LzmaEnc.h: Likewise.
961         * include/grub/efiemu/efiemu.h: Likewise.
962         * include/grub/command.h: Likewise.
963         * normal/menu.c: Likewise.
964         * normal/main.c: Likewise.
965         * normal/datetime.c: Likewise.
966         * bus/usb/uhci.c: Likewise.
967         * mmap/i386/uppermem.c: Likewise.
968         * mmap/mmap.c: Likewise.
969         * commands/acpi.c: Likewise.
970         * commands/test.c: Likewise.
971         * partmap/apple.c: Likewise.
972         * font/font.c: Likewise.
973         * loader/sparc64/ieee1275/linux.c: Likewise.
974         * loader/macho.c: Likewise.
975         * loader/i386/bsd_trampoline.S: Likewise.
976         * loader/i386/bsd.c: Likewise.
977         * loader/xnu.c: Likewise.
978         * term/i386/pc/vesafb.c: Likewise.
979         * term/usb_keyboard.c: Likewise.
980         * util/resolve.c: Likewise.
981         * util/getroot.c: Likewise.
983 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
985         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
987 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
989         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
990         build error.
992 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
994         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
995         parameter only available on BIOS.
997 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
999         Removed wrong semicolon in declaration
1001         * grub/misc.h (grub_dprintf): remove semicolon
1003 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1005         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1006         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1007         is done by grub_cmd_linux() now).
1008         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1009         restore video to text mode.
1010         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1011         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1012         `GRUB_LINUX_VID_MODE_NORMAL'.
1014 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1016         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1017         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1018         and `normal/script.c'.  Add `kern/rescue_reader.c',
1019         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1020         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1021         `grub_script.tab.c'.
1023         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1024         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1025         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1026         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1027         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1029         * Makefile.in: Remove duplicated 2008 in Copyright line.
1031 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1033         * util/misc.c (grub_util_warn): New function.  Emits a warning
1034         unconditionally.
1035         * include/grub/util/misc.h (grub_util_warn): New declaration.
1037         * util/i386/pc/grub-install.in: Understand --force and pass it down
1038         to grub-setup.
1040         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1041         down to setup().
1042         (setup): Improve error messages and add warnings when requested to
1043         install in odd layouts.  Refuse to install using blocklists unless
1044         --force was set.
1046 2009-05-04  martin f. krafft  <madduck@madduck.net>
1048         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1050 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1052         Updated copyright year
1054         * fs/hfsplus.c: updated copyright year
1056 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1058         HFS+ UUID
1060         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1061         in the space previously used by unused3
1062         (grub_hfsplus_uuid): new function
1063         (grub_hfsplus_fs): added uuid field
1065 2009-05-03  Pavel Roskin  <proski@gnu.org>
1067         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1068         suppress warnings.  It's no longer needed.
1069         * disk/host.c: Likewise.
1070         * disk/ata_pthru.c: Likewise.
1071         * disk/loopback.c: Likewise.
1072         * hook/datehook.c: Likewise.
1073         * parttool/pcpart.c: Likewise.
1074         * fs/i386/pc/pxe.c: Likewise.
1075         * fs/ntfscomp.c: Likewise.
1076         * efiemu/main.c: Likewise.
1077         * mmap/mmap.c: Likewise.
1078         * commands/crc.c: Likewise.
1079         * commands/hexdump.c: Likewise.
1080         * commands/hdparm.c: Likewise.
1081         * commands/acpi.c: Likewise.
1082         * commands/echo.c: Likewise.
1083         * commands/minicmd.c: Likewise.
1084         * commands/blocklist.c: Likewise.
1085         * commands/memrw.c: Likewise.
1086         * commands/loadenv.c: Likewise.
1087         * commands/usbtest.c: Likewise.
1088         * commands/lsmmap.c: Likewise.
1089         * commands/boot.c: Likewise.
1090         * commands/parttool.c: Likewise.
1091         * commands/configfile.c: Likewise.
1092         * commands/search.c: Likewise.
1093         * commands/ieee1275/suspend.c: Likewise.
1094         * commands/cat.c: Likewise.
1095         * commands/i386/pc/pxecmd.c: Likewise.
1096         * commands/i386/pc/play.c: Likewise.
1097         * commands/i386/pc/halt.c: Likewise.
1098         * commands/i386/pc/vbeinfo.c: Likewise.
1099         * commands/i386/pc/vbetest.c: Likewise.
1100         * commands/lspci.c: Likewise.
1101         * commands/date.c: Likewise.
1102         * commands/handler.c: Likewise.
1103         * commands/ls.c: Likewise.
1104         * commands/test.c: Likewise.
1105         * commands/cmp.c: Likewise.
1106         * commands/efi/loadbios.c: Likewise.
1107         * commands/efi/fixvideo.c: Likewise.
1108         * commands/halt.c: Likewise.
1109         * commands/help.c: Likewise.
1110         * commands/reboot.c: Likewise.
1111         * hello/hello.c: Likewise.
1112         * script/sh/main.c: Likewise.
1113         * loader/xnu.c: Likewise.
1114         * term/terminfo.c: Likewise.
1115         * term/i386/pc/serial.c: Likewise.
1116         * term/usb_keyboard.c: Likewise.
1118 2009-05-03  David S. Miller  <davem@davemloft.net>
1120         * normal/menu.c: Include grub/parser.h
1122 2009-05-03  Pavel Roskin  <proski@gnu.org>
1124         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1125         not char*.
1126         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1127         Suggested by Javier Martín <lordhabbit@gmail.com>
1129         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1130         efiemu??.o doesn't exist.
1131         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1132         copying.
1134 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1136         FreeBSD 64-bit support
1138         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1139         and loader/i386/bsd_trampoline.S
1140         (bsd_mod_ASFLAGS): new variable
1141         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1142         (FREEBSD_MODTYPE_KERNEL64): likewise
1143         (grub_bsd64_trampoline_start): likewise
1144         (grub_bsd64_trampoline_end): likewise
1145         (grub_bsd64_trampoline_selfjump): likewise
1146         (grub_bsd64_trampoline_gdt): likewise
1147         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1148         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1149         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1150         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1151         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1152         of "attrib" member
1153         * loader/i386/bsd_pagetable.c: new file
1154         * loader/i386/bsd_trampoline.S: likewise
1155         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1156         (ALIGN_VAR): likewise
1157         (entry_hi): new variable
1158         (kern_end_mdofs): likewise
1159         (is_64bit): likewise
1160         (grub_freebsd_add_meta): use ALIGN_VAR
1161         (grub_e820_mmap): new declaration
1162         (grub_freebsd_add_mmap): new function
1163         (grub_freebsd_add_meta_module): support 64 bit kernels
1164         (grub_freebsd_list_modules): use ALIGN_VAR
1165         (gdt_descriptor): new declaration
1166         (grub_freebsd_boot): support 64 bit kernels
1167         (grub_bsd_elf64_hook): new function
1168         (grub_bsd_load_elf): support elf64
1170 2009-05-03  Bean  <bean123ch@gmail.com>
1172         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1173         after we get the result of if statement.
1175 2009-05-03  Bean  <bean123ch@gmail.com>
1177         * Makefile.in (enable_efiemu): New variable.
1179         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1180         set.
1181         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1182         path.
1183         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1184         path, add -mno-red-zone option.
1185         (efiemu64_s.o): Likewise.
1186         (efiemu64.o): Use macro $^ for source file.
1188         * configure.ac (--enable-efiemu): New option.
1190 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1192         xnu support
1194         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1195         (pkglib_MODULES): add xnu.mod
1196         (xnu_mod_SOURCES): new variable
1197         (xnu_mod_CFLAGS): likewise
1198         (xnu_mod_LDFLAGS): likewise
1199         (xnu_mod_ASFLAGS): likewise
1200         * conf/i386-pc.rmk: likewise
1201         * conf/x86_64-efi.rmk: likewise
1202         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1203         new declaration
1204         * include/grub/i386/macho.h: new file
1205         * include/grub/i386/xnu.h: likewise
1206         * include/grub/macho.h: likewise
1207         * include/grub/machoload.h: likewise
1208         * include/grub/x86_64/macho.h: likewise
1209         * include/grub/x86_64/xnu.h: likewise
1210         * include/grub/xnu.h: likewise
1211         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1212         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1213         * loader/i386/efi/xnu.c: new file
1214         * loader/i386/pc/xnu.c: likewise
1215         * loader/i386/xnu.c: likewise
1216         * loader/i386/xnu_helper.S: likewise
1217         * loader/macho.c: likewise
1218         * loader/xnu.c: likewise
1219         * loader/xnu_resume.c: likewise
1220         * util/grub-dumpdevtree: likewise
1221         * include/grub/i386/pit.h: include grub/err.h
1222         (grub_pit_wait): export
1223         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1225 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1227         Efiemu
1229         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1230         _linux_efi, linux_efi.
1231         new files in grub-emu
1232         new targets efiemu32.o and efiemu64.o
1233         * loader/linux_normal_efiemu.c: likewise
1234         * loader/i386/efi/linux.c: added preliminary efiemu support
1235         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1236         files to copy
1237         * include/grub/autoefi.h: new file
1238         * include/grub/i386/efiemu.h: likewise
1239         * include/grub/i386/pc/efiemu.h: likewise
1240         * include/grub/efi/api.h: add LL suffix when necessary
1241         new definitions relating to tables
1242         * include/grub/efiemu/efiemu.h: new file
1243         * include/grub/efiemu/runtime.h: likewise
1244         * efiemu/prepare.c: likewise
1245         * efiemu/loadcore_common.c: likewise
1246         * efiemu/loadcore64.c: likewise
1247         * efiemu/runtime/efiemu.sh: likewise
1248         * efiemu/runtime/efiemu.S: likewise
1249         * efiemu/runtime/efiemu.c: likewise
1250         * efiemu/runtime/config.h: likewise
1251         * efiemu/prepare32.c: likewise
1252         * efiemu/main.c: likewise
1253         * efiemu/modules/pnvram.c: likewise
1254         * efiemu/modules/i386: likewise
1255         * efiemu/modules/i386/pc: likewise
1256         * efiemu/modules/acpi.c: likewise
1257         * efiemu/i386/pc/cfgtables.c: likewise
1258         * efiemu/i386/loadcore64.c: likewise
1259         * efiemu/i386/loadcore32.c: likewise
1260         * efiemu/prepare64.c: likewise
1261         * efiemu/loadcore.c: likewise
1262         * efiemu/symbols.c: likewise
1263         * efiemu/mm.c: likewise
1264         * efiemu/loadcore32.c: likewise
1266 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1268         ACPI spoofing
1270         * commands/acpi.c: new file
1271         * commands/i386/pc/acpi.c: likewise
1272         * commands/efi/acpi.c: likewise
1273         * include/grub/acpi.h: likewise
1274         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1275         (acpi_mod_SOURCES): new variable
1276         (acpi_mod_CFLAGS): likewise
1277         (acpi_mod_LDFLAGS): likewise
1278         * conf/i386-efi.rmk: likewise
1279         * conf/x86_64-efi.rmk: likewise
1281 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1283         Missing part from mmap patch
1285         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1286         (grub_mmap_unregister)
1287         (grub_mmap_free_and_unregister): use grub_mmap_register
1289 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1291         Mmap services
1293         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1294         * loader/i386/linux.c (find_mmap_size): likewise
1295         (allocate_pages): likewise
1296         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1297         (grub_fill_multiboot_mmap): likewise
1298         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1299         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1300         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1301         (OPENBSD_MMAP_RESERVED): likewise
1302         * include/grub/i386/pc/memory.h: include grub/memory.h
1303         (grub_lower_mem): removed
1304         (grub_upper_mem): likewise
1305         (GRUB_MACHINE_MEMORY_ACPI): new definition
1306         (GRUB_MACHINE_MEMORY_NVS): likewise
1307         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1308         (GRUB_MACHINE_MEMORY_HOLE): likewise
1309         (grub_machine_mmap_register): likewise
1310         (grub_machine_mmap_unregister): likewise
1311         (grub_machine_get_upper): likewise
1312         (grub_machine_get_lower): likewise
1313         (grub_machine_get_post64): likewise
1314         * include/grub/i386/efi/memory.h: new file
1315         * include/grub/x86_64/efi/memory.h: likewise
1316         * include/grub/efi/memory.h: likewise
1317         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1318         (mmap_mod_SOURCES): new variable
1319         (mmap_mod_LDFLAGS): likewise
1320         (mmap_mod_ASFLAGS): likewise
1321         * conf/i386-coreboot.rmk: likewise
1322         * conf/i386-ieee1275.rmk: likewise
1323         * conf/i386-efi.rmk: likewise
1324         * conf/x86_64-efi.rmk: likewise
1325         * include/grub/types.h (UINT_TO_PTR): new macro
1326         (PTR_TO_UINT32): likewise
1327         (PTR_TO_UINT64): likewise
1328         * include/grub/memory.h: new file
1329         * mmap/i386/pc/mmap.c: likewise
1330         * mmap/i386/pc/mmap_helper.S: likewise
1331         * mmap/i386/uppermem.c: likewise
1332         * mmap/mmap.c: likewise
1333         * mmap/efi/mmap.c: likewise
1334         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1335         grub_upper_mem
1336         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1337         (grub_upper_mem): likewise
1338         (grub_machine_init): don't use grub_upper_mem,
1339         make grub_lower_mem local
1340         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1341         grub_mmap_iterate and grub_mmap_get_upper
1342         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1344 2009-05-02  Bean  <bean123ch@gmail.com>
1346         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1347         script/sh/parser.y.
1348         (pkglib_MODULES): Add normal.mod and sh.mod.
1349         (normal_SOURCES): New variable.
1350         (normal_mod_CFLAGS): Likewise.
1351         (normal_mod_LDFLAGS): Likewise.
1352         (sh_mod_SOURCES): Likewise.
1353         (sh_mod_CFLAGS): Likewise.
1354         (sh_mod_LDFLAGS): Likewise.
1356         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1357         script/sh/lexer.c_DEPENDENCIES.
1358         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1359         kern/rescue_reader.c and kern/rescue_parser.c.
1360         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1361         (grub_emu_SOURCES): Change source files.
1362         (pkglib_MODULES): Remove normal.mod.
1363         (normal_SOURCES): Removed.
1364         (normal_mod_CFLAGS): Likewise.
1365         (normal_mod_LDFLAGS): Likewise.
1366         * conf/i386-coreboot.rmk: Likewise.
1367         * conf/i386-efi.rmk: Likewise.
1368         * conf/i386-ieee1276.rmk: Likewise.
1369         * conf/powerpc-ieee1275.rmk: Likewise.
1370         * conf/sparc64-ieee1275.rmk: Likewise.
1371         * conf/x86_64-efi.rmk: Likewise.
1373         * include/grub/command.h (grub_command_execute): New inline function.
1375         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1377         * include/grub/normal.h: Remove <grub/setjmp.h>.
1378         (grub_fs_module_list): Moved to normal/autofs.c.
1379         (grub_exit_env): Removed.
1380         (grub_command_execute): Likewise.
1381         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1382         parameter script.
1383         (read_command_list): New function declaration.
1384         (read_fs_list): Likewise.
1386         * include/parser.h: Include <grub/reader.h>.
1387         (grub_parser_split_cmdline): Change type of getline parameter.
1388         (grub_parser): New structure.
1389         (grub_parser_class): New variable.
1390         (grub_parser_execute): New function declaration.
1391         (grub_register_rescue_parser): Likewise.
1392         (grub_parser_register): New inline function.
1393         (grub_parser_unregister): Likewise.
1394         (grub_parser_get_current): Likewise.
1395         (grub_parser_set_current): Likewise.
1397         * include/grub/reader.h: New file.
1398         * kern/reader.c: Likewise.
1399         * kern/rescue_parser.c: Likewise.
1400         * kern/rescue_reader.c: Likewise.
1401         * normal/autofs.c: Likewise.
1402         * normal/dyncmd.c: Likewise.
1404         * include/grub/rescue.h: Removed.
1405         * normal/command.h: Likewise.
1407         * include/grub/script.h: Moved to ...
1408         * include/grub/script_sh.h: ... Moved here.
1409         * normal/execute.c: Moved to ...
1410         * script/sh/execute.c: ... Moved here.
1411         * normal/function.c: Moved to ...
1412         * script/sh/function.c: ... Moved here.
1413         * normal/lexer.c: Moved to ...
1414         * script/sh/lexer.c: ... Moved here.
1415         * normal/parser.y: Moved to ...
1416         * script/sh/parser.y: ... Moved here.
1417         * normal/script.c: Moved to ...
1418         * script/sh/script.c: ... Moved here.
1420         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1421         <grub/reader.h>.
1422         (grub_exit_env): Removed.
1423         (fs_module_list): Moved to normal/autofs.c.
1424         (grub_file_getline): Don't handle comment here.
1425         (free_menu): Skip removed field entry->commands.
1426         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1427         script parameter.
1428         (read_config_file): Removed nested parameter, change getline function.
1429         (grub_enter_normal_mode): Removed.
1430         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1431         (read_command_list): Likewise.
1432         (autoload_fs_module): Moved to normal/autofs.c.
1433         (read_fs_list): Likewise.
1434         (reader_nested): New variable.
1435         (grub_normal_execute): Run parser.sh to switch to sh parser.
1436         (grub_cmd_rescue): Removed.
1437         (cmd_normal): Removed.
1438         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1439         rescue command.
1440         (grub_cmdline_run): New function.
1441         (grub_normal_reader_init): Likewise.
1442         (grub_normal_read_line): Likewise.
1443         (grub_env_write_pager): Likewise.
1444         (cmdline): New variable.
1445         (grub_normal_reader): Likewise.
1446         (GRUB_MOD_INIT): Register normal reader and set as current, register
1447         pager hook, register normal command with grub_register_command_prio,
1448         so that it won't show up in command.lst.
1449         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1450         grub_fs_autoload_hook.
1452         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1453         (grub_menu_execute_entry): Replace grub_script_execute with
1454         grub_parser_execute, change parameter to grub_command_execute.
1456         * normal/menu_text.c: Remove <grub/script.h>.
1458         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1459         and <grub/parser.h>.
1460         (run): Change editor_getline to use new parser interface. Change
1461         parameter to grub_command_execute.
1463         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1464         <grub/reader.h> and <grub/parser.h>.
1465         (grub_load_normal_mode): Execute normal command.
1466         (grub_main): Call grub_register_core_commands,
1467         grub_register_rescue_parser and grub_register_rescue_reader, use
1468         grub_reader_loop to enter input loop.
1470         * kern/parser.c (grub_parser_split_cmdline): Change type of
1471         getline parameter.
1472         (grub_parser_class): New variable.
1473         (grub_parser_execute): New function.
1475         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1476         * loader/multiboot2.c: Likewise.
1477         * loader/sparc64/ieee1275/linux.c: Likewise.
1479         * util/grub-emu.c (read_command_list): New dummy function.
1481 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1483         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1484         count to 16 for CCISS and IDA.
1486 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1488         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1489         after waiting for user input.
1491         * loader/i386/linux.c: Include `<grub/normal.h>'.
1492         (grub_cmd_linux): Improve the error message about `ask' mode, by
1493         waiting for user input so it's not missed (we can do this, since
1494         user requested interaction).
1496 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1498         Added missing lst to grub-mkrescue
1500         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1501         and ${input_dir}/parttool.lst
1503 2009-04-30  David S. Miller  <davem@davemloft.net>
1505         * util/hostdisk.c (device_is_wholedisk): New function.
1506         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1507         zero only if device_is_wholedisk() returns true.
1509         * util/hostdisk.c (convert_system_partition_to_system_disk):
1510         Handle virtual disk devices named /dev/vdiskX as found on sparc
1511         and powerpc.
1513         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1514         lettered partition specifier is found, convert to numbered.
1516 2009-04-29  David S. Miller  <davem@davemloft.net>
1518         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1519         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1521         * normal/command.c: Add missing newline at end of file.
1523         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1524         warnings.
1525         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1526         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1527         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1528         ihandles have a 32-bit type but need to be stored in a "void *".
1530 2009-04-28  Pavel Roskin  <proski@gnu.org>
1532         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1533         not disk.  Adjust all dependencies.
1534         (grub_fs_uuid_close): Use grub_device_close(), not
1535         grub_disk_close().
1537         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1538         parent's partition, don't copy it by reference, as it gets freed
1539         on close.
1541 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1543         Preboot hooks support
1545         * commands/boot.c (struct grub_preboot_t): new declaration
1546         (preboots_head): new variable
1547         (preboots_tail): likewise
1548         (grub_loader_register_preboot_hook): new function
1549         (grub_loader_unregister_preboot_hook): likewise
1550         (grub_loader_set): launch preboot hooks
1551         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1552         (grub_loader_register_preboot_hook): new declaration
1553         (grub_loader_unregister_preboot_hook): likewise
1555 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1557         Warning fix
1559         * disk/scsi.c (grub_scsi_open): added missing cast when
1560         calling grub_dprintf
1562 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1564         Bug and warning fixes
1566         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1567         declaration
1568         * commands/test.c (test_parse): fixed bug with file tests and corrected
1569         declaration of find_file
1571 2009-04-26  Pavel Roskin  <proski@gnu.org>
1573         * Makefile.in: Don't install empty manual pages if help2man is
1574         missing.  Use help2man option for output, not shell redirection.
1576 2009-04-26  David S. Miller  <davem@davemloft.net>
1578         * util/grub-mkdevicemap.c (make_device_map): Add missing
1579         NESTED_FUNC_ATTR to process_device().
1581 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1583         Test command
1585         * commands/test.c: rewritten to use bash-like test
1587 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1589         Parttool autoloading and improvements
1591         * Makefile.in (pkglib_DATA): add parttool.lst
1592         (parttool.lst): new target
1593         * genmk.rb: generate parttool-*
1594         (CLEANFILES): add #{parttool}
1595         (PARTTOOLFILES): new variable
1596         * genparttoollist.sh: new file
1597         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1598         (grub_pcpart_type): likewise
1599         * commands/parttool.c (helpmsg): new variable
1600         (grub_cmd_parttool): output help if not enough arguments are supplied
1601         autoload modules
1602         (GRUB_MOD_INIT(parttool)): use helpmsg
1604 2009-04-24  David S. Miller  <davem@davemloft.net>
1606         Avoiding opening same device multiple times in device iterator.
1608         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1609         and use it to build a list of partitions in iterate_disk() and
1610         iterate_partition().
1612         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1613         on disk->data.
1615         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1616         grub_devalias_iterate() result instead of unconditional 0.
1617         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1618         Also, capture hook return value, either directly or via
1619         grub_children_iterate(), and propagate to caller.
1620         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1621         grub_children_iterate): Return value is now 'int' instead of
1622         'grub_err_t'.
1623         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1624         like a proper iterator, stopping when hooks return non-zero.
1625         (grub_devalias_iterate): Likewise.
1627 2009-04-23  David S. Miller  <davem@davemloft.net>
1629         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1631 2009-04-22  David S. Miller  <davem@davemloft.net>
1633         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1634         is larger than address_cells, use that value for address_cells too.
1636         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1637         IEEE1275_MAX_PATH_LEN): Define.
1638         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1639         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1640         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1641         'devtype'.  Explicitly NULL terminate devalias expansion.
1643         * util/sparc64/ieee1275/misc.c: New file.
1644         * util/sparc64/ieee1275/grub-setup.c: New file.
1645         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1646         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1647         * util/sparc64/ieee1275/grub-install.in: New file.
1648         * util/ieee1275/ofpath.c: New file.
1649         * util/ieee1275/devicemap.c: New file.
1650         * util/devicemap.c: New file.
1651         * util/deviceiter.c: New file.
1652         * kern/sparc64/ieee1275/init.c: New file.
1653         * include/grub/util/ofpath.h: New file.
1654         * include/grub/util/deviceiter.h: New file.
1655         * util/grub-mkdevicemap.c: Include deviceiter.h.
1656         Implement using grub_util_emit_devicemap_entry and
1657         grub_util_iterate_devices.
1658         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1659         util/devicemap.c into grub-mkdevicemap
1660         * conf/i386-efi.rmk: Likewise.
1661         * conf/i386-ieee1275.rmk: Likewise.
1662         * conf/i386-pc.rmk: Likewise.
1663         * conf/powerpc-ieee1275.rmk: Likewise.
1664         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1665         images and installation utilities.  Build kernel as image
1666         instead of as elf binary.  Use common rules as much as possible.
1668 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1670         Correct GPT definition
1672         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1673         of "attrib" member
1675 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1677         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1679 2009-04-19  David S. Miller  <davem@davemloft.net>
1681         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1682         (grub_rescue_cmd_linux): Rename to...
1683         (grub_cmd_linux): and fix prototype.
1684         (grub_rescue_cmd_initrd): Rename to...
1685         (grub_cmd_initrd): and fix prototype.
1686         (cmd_linux, cmd_initrd): New.
1687         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1688         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1690 2009-04-17  Pavel Roskin  <proski@gnu.org>
1692         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1693         format.
1694         (grub_ohci_transfer): Likewise.
1696         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1698         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1699         return without a value.  Fix inconsistent indentation.
1701         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1702         match struct grub_fs.
1704         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1705         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1706         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1707         * commands/lspci.c (grub_lspci_iter): Likewise.
1709 2009-04-16  Bean  <bean123ch@gmail.com>
1711         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1712         value.
1714 2009-04-15  Pavel Roskin  <proski@gnu.org>
1716         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1717         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1718         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1719         definitions.
1721 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1723         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1724         that no multiple data or metadata areas are supported and `Unknown
1725         metadata header'.
1727 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1729         Move loader out of the kernel
1731         * kern/loader.c: moved to ...
1732         * commands/boot.c: ... moved here
1733         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1734         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1735         * include/grub/kernel.h (grub_machine_fini): export
1736         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1737         (grub_loader_set): likewise
1738         (grub_loader_unset): likewise
1739         (grub_loader_boot): likewise
1740         * conf/common.rmk: new module boot.mod
1741         (pkglib_MODULES): add boot.mod
1742         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1743         (grub_emu_SOURCES): likewise
1744         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1745         (grub_emu_SOURCES): likewise
1746         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1747         (grub_emu_SOURCES): likewise
1748         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1749         (grub_emu_SOURCES): likewise
1750         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1751         (grub_emu_SOURCES): likewise
1752         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1753         (grub_emu_SOURCES): likewise
1754         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1755         (grub_emu_SOURCES): likewise
1757 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1759         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1761         * kern/misc.c (grub_itoa): Removed function
1762         (grub_ltoa): likewise
1763         (grub_vsprintf): use grub_lltoa
1765 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1767         Restore grub-emu
1769         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1770         * conf/i386-coreboot.rmk: likewise
1771         * conf/i386-ieee1275.rmk: likewise
1772         * conf/powerpc-ieee1275.rmk: likewise
1774 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1776         * INSTALL: Add that `./autogen.sh' needs to be run before
1777         `./configure.'.
1779 2009-04-14  Bean  <bean123ch@gmail.com>
1781         * Makefile.in (pkglib_DATA): Add handler.lst.
1782         (handler.lst): New rule.
1784         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1785         * conf/i386-coreboot.rmk: Likewise.
1786         * conf/i386-ieee1275.rmk: Likewise.
1787         * conf/i386-efi.rmk: Likewise.
1788         * conf/x86_64-efi.rmk: Likewise.
1789         * conf/powerpc-ieee1275.rmk: Likewise.
1790         * conf/sparc64-ieee1275.rmk: Likewise.
1792         * genhandlerlist.sh: New file.
1794         * genmk.rb: Add rules to generate handler.lst.
1796         * include/grub/normal.h (grub_file_getline): New function definition.
1797         (read_handler_list): Likewise.
1798         (free_handler_list): Likewise.
1800         * include/grub/term.h (grub_term_register_input): Add name parameter
1801         for auto generation of handler.lst.
1802         (grub_term_register_output): Likewise.
1804         * normal/handler.c: New file.
1806         * normal/main.c (get_line): Renamed to grub_file_getline.
1807         (read_config_file): Use the newly renamed grub_file_getline.
1808         (read_command_list): Likewise.
1809         (read_fs_list): Likewise.
1810         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1811         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1813         * term/efi/console.c (grub_console_init): Add name parameter for auto
1814         generation of handler.lst.
1815         * term/gfxterm.c: Likewise.
1816         * term/i386/pc/at_keyboard.c: Likewise.
1817         * term/i386/pc/console.c: Likewise.
1818         * term/i386/pc/serial.c: Likewise.
1819         * term/i386/pc/vesafb.c: Likewise.
1820         * term/i386/pc/vga.c: Likewise.
1821         * term/i386/pc/vga_text.c: Likewise.
1822         * term/ieee1275/ofconsole.c: Likewise.
1823         * term/usb_keyboard.c: Likewise.
1825 2009-04-14  Bean  <bean123ch@gmail.com>
1827         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1828         properly with null character.
1830 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1832         * configure: Remove.
1833         * config.h.in: Likewise.
1834         * stamp-h.in: Likewise.
1835         * DISTLIST: Likewise.
1836         * conf/common.mk: Likewise.
1837         * conf/i386-coreboot.mk: Likewise.
1838         * conf/i386-efi.mk: Likewise.
1839         * conf/i386-ieee1275.mk: Likewise.
1840         * conf/i386.mk: Likewise.
1841         * conf/i386-pc.mk: Likewise.
1842         * conf/powerpc-ieee1275.mk: Likewise.
1843         * conf/sparc64-ieee1275.mk: Likewise.
1844         * conf/x86_64-efi.mk: Likewise.
1846         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1847         develop on GRUB.
1849 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1850             David S. Miller  <davem@davemloft.net>
1852         * util/hostdisk.c (make_device_name): Fix buffer length
1853         calculations.
1855 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1857         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1858         <sys/param.h> and <sys/sysctl.h>.
1859         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1860         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1861         opening the device and reset them afterwards.
1863 2009-04-13  Pavel Roskin  <proski@gnu.org>
1865         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1866         Reported by John Stanley <jpsinthemix@verizon.net>
1868 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1870         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1871         that name for menuentries when appropriate.
1873 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1875         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1877 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1879         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1880         to Linux, simply abort telling the user it's no longer supported.
1882 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1884         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1885         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1886         `freebsd_loadenv' only when devices.hints exist.
1888 2009-04-13  Pavel Roskin  <proski@gnu.org>
1890         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1892 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1894         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1895         partition number.
1896         (grub_drive): Likewise.
1898 2009-04-13  David S. Miller  <davem@davemloft.net>
1900         * kern/sparc64/ieee1275/ieee1275.c: New file.
1901         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1902         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1903         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1904         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1905         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1906         grub_ieee1275_alloc_physmem): Declare new exported functions.
1908         * include/grub/sparc64/ieee1275/loader.h: New file.
1909         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1910         * include/grub/sparc64/kernel.h: Likewise.
1911         * loader/sparc64/ieee1275/linux.c: Likewise.
1913         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1914         (grub_fstest_SOURCES): Likewise.
1916         * util/hostdisk.c (make_device_name): Do not make any assumptions
1917         about the length of drive names.
1919         * kern/dl.c (grub_dl_load_file): Close file immediately when
1920         we are done using it.
1922 2009-04-12  David S. Miller  <davem@davemloft.net>
1924         * kern/misc.c (grub_ltoa): Fix cast when handling negative
1925         values.  Noticed by Pavel Roskin.
1927         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
1928         target compiler.
1930         * genmk.rb: Add more flexible image type specification, also
1931         pass --strip-unneeded to objcopy.
1932         * conf/i386-pc.rmk: Use *_FORMAT.
1933         * conf/i386-pc.mk: Rebuilt.
1935         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
1936         (OFDISK_HASH_SZ): Define.
1937         (ofdisk_hash): New hash table.
1938         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
1939         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
1940         instead of device phandle which is not unique.
1942         * kern/sparc64/ieee1275/init.c: Delete, replace with...
1943         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
1944         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
1945         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
1946         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
1947         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
1948         GRUB_KERNEL_MACHINE_DATA_END): Define.
1949         (grub_kernel_image_size, grub_total_module_size): Declare.
1951 2009-04-12  Pavel Roskin  <proski@gnu.org>
1953          * configure.ac: Change the logic when we check for target tools.
1954          Do it when the target is specified and it's different from the
1955          specified value of the host.
1957 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
1959         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
1960         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
1961         GNU/kFreeBSD. Check if a device is a character device. Use
1962         DIOCGMEDIASIZE to get the size.
1963         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
1964         support for GNU/kFreeBSD.
1965         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
1966         is a character device instead of a block device. Add support for
1967         FreeBSD device names.
1969         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
1970         is a character device instead of a block device.
1972         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
1973         is a character device instead of a block device.
1975 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
1977         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
1978         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
1979         FreeBSD. Check if a device is a character device. Use
1980         DIOCGMEDIASIZE to get the size.
1981         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
1982         support for FreeBSD.
1983         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
1984         is a character device instead of a block device. Add support for
1985         FreeBSD device names.
1987         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
1988         a character device instead of a block device.
1989         (grub_util_check_char_device): New function.
1991         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
1992         a character device instead of a block device.
1994         * include/grub/util/getroot.h (grub_util_check_char_device): New
1995         prototype.
1997 2009-04-11  David S. Miller  <davem@davemloft.net>
1999         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2000         static libgcc.
2001         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2002         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2003         function, if present.
2004         (__bswapdi2): Likewise.
2006         * include/grub/sparc64/ieee1275/boot.h: New file.
2007         * boot/sparc64/ieee1275/boot.S: Likewise.
2008         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2010         * kern/misc.c (grub_ltoa): New function.
2011         (grub_vsprintf): Use it to format 'long' integers.
2013 2009-04-10  David S. Miller  <davem@davemloft.net>
2015         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2016         slots are of type grub_ieee1275_cell_t.
2017         (grub_nand_read): Likewise.
2018         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2019         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2020         macros are used to compare values in arg/ret block of the call.
2021         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2022         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2023         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2024         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2025         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2026         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2027         grub_ieee1275_close, grub_ieee1275_set_property,
2028         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2029         grub_ieee1275_cell_t.
2030         * kern/ieee1275/openfw.c (grub_map): Likewise.
2031         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2032         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2034         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2035         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2036         (grub_devalias_iterate): Likewise.
2038 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2040         UFS improvements
2042         * fs/ufs.c (INODE_NBLOCKS): new definition
2043         (struct grub_ufs_dirent): added fields for non-BSD dirents
2044         (grub_ufs_get_file_block): fixed double indirect handling
2045         (grub_ufs_lookup_symlink): use more robust way to determine whether
2046         symlink is inline
2047         (grub_ufs_find_file): support for non-BSD dirents
2048         (grub_ufs_dir): support for non-BSD dirents
2050 2009-04-10  Bean  <bean123ch@gnail.com>
2052         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2053         attribute, otherwise the size would be wrong for i386 platform.
2055         * include/grub/pci.h (grub_pci_read_word): New inline function.
2056         (grub_pci_read_byte): Likewise.
2057         (grub_pci_write): Likewise.
2058         (grub_pci_write_word): Likewise.
2059         (grub_pci_write_byte): Likewise.
2061         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2063         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2064         (find_framebuf): Scan pci to locate the frame buffer address.
2066         * commands/efi/fixvideo.c: New file.
2068         * commands/efi/loadbios.c: Likewise.
2070         * commands/memrw.c: Likewise.
2072         * util/grub-dumpbios.in: Likewise.
2074         * conf/common.rmk (grub-dumpbios): New utility.
2075         (pkglib_MODULES): New module memrw.mod.
2076         (memrw_mod_SOURCE): New macro.
2077         (memrw_mod_CFLAGS): Likewise.
2078         (memrw_mod_LDFLAGS): Likewise.
2080         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2081         fixvideo.mod.
2082         (loadbios_mod_SOURCE): New macro.
2083         (loadbios_mod_CFLAGS): Likewise.
2084         (loadbios_mod_LDFLAGS): Likewise.
2085         (fixvideo_mod_SOURCE): Likewise.
2086         (fixvideo_mod_CFLAGS): Likewise.
2087         (fixvideo_mod_LDFLAGS): Likewise.
2089         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2090         fixvideo.mod.
2091         (loadbios_mod_SOURCE): New macro.
2092         (loadbios_mod_CFLAGS): Likewise.
2093         (loadbios_mod_LDFLAGS): Likewise.
2094         (fixvideo_mod_SOURCE): Likewise.
2095         (fixvideo_mod_CFLAGS): Likewise.
2096         (fixvideo_mod_LDFLAGS): Likewise.
2098 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2100         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2102 2009-04-07  David S. Miller  <davem@davemloft.net>
2104         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2105         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2106         R_SPARC_WDISP30 case.
2107         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2109 2009-04-06  Pavel Roskin  <proski@gnu.org>
2111         * include/grub/misc.h (ARRAY_SIZE): New macro.
2112         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2113         New macro.
2114         * loader/i386/linux.c (allocate_pages): Use free_pages().
2115         (grub_linux_unload): Don't use free_pages().
2116         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2117         wrong index.  Treat all other modes as text modes.
2118         (grub_cmd_linux): Initialize vid_mode unconditionally to
2119         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2121         * commands/help.c (print_command_help): Use cmd->prio, not
2122         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2124 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2126         Parttool
2128         * parttool/pcpart.c: new file
2129         * commands/parttool.c: likewise
2130         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2131         (parttool_mod_SOURCES): new variable
2132         (parttool_mod_CFLAGS): likewise
2133         (parttool_mod_LDFLAGS): likewise
2134         (pcpart_mod_SOURCES): likewise
2135         (pcpart_mod_CFLAGS): likewise
2136         (pcpart_mod_LDFLAGS): likewise
2137         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2138         and parttool/pcpart.c
2139         * conf/i386-efi.rmk: likewise
2140         * conf/i386-ieee1275.rmk: likewise
2141         * conf/i386-pc.rmk: likewise
2142         * conf/powerpc-ieee1275.rmk: likewise
2143         * conf/sparc64-ieee1275.rmk: likewise
2144         * conf/x86_64-ieee1275.rmk: likewise
2146 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2148         Support for mtime and further expandability of dir command
2150         * include/grub/lib/datetime.h: moved to ...
2151         * include/grub/datetime.h: ... moved here and added
2152         declaration of grub_unixtime2datetime. All users updated
2153         * include/grub/fs.h: new syntax for dir and mtime functions in
2154         struct grub_fs
2155         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2156         and GRUB_FSHELP_FLAGS_MASK
2157         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2158         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2159         (grub_ext2_mtime): new function
2160         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2161         (grub_hfsplus_mtime): new function
2162         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2163         (GRUB_UFS_ATTR_FILE): likewise
2164         (GRUB_UFS_ATTR_LNK): likewise
2165         (struct grub_ufs_sblock): new fields mtime
2166         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2167         all users updated
2168         (grub_ufs_dir): mtime support
2169         (grub_ufs_mtime): new function
2170         * fs/affs.c (grub_affs_dir): use new dir syntax
2171         * fs/afs.c (grub_afs_dir): likewise
2172         * fs/cpio.c (grub_cpio_dir): likewise
2173         * fs/fat.c (grub_fat_find_dir): likewise
2174         * fs/hfs.c (grub_hfs_dir): likewise
2175         * fs/iso9660.c (grub_iso9660_dir): likewise
2176         * fs/jfs.c (grub_jfs_dir): likewise
2177         * fs/minix.c (grub_minix_dir): likewise
2178         * fs/ntfs.c (grub_ntfs_dir): likewise
2179         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2180         * fs/sfs.c (grub_sfs_dir): likewise
2181         * fs/xfs.c (grub_xfs_dir): likewise
2182         * util/hostfs.c (grub_hostfs_dir): likewise
2183         * lib/datetime.c: moved to ...
2184         * normal/datetime.c: ... moved here
2185         (grub_unixtime2datetime): new function
2186         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2187         * normal/completion.c (iterate_dir): use new dir syntax
2188         * normal/misc.c (grub_normal_print_device_info): tell the
2189         last modification time of a volume
2190         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2191         * conf/common.rmk: added lib/datetime.c to ls.mod
2192         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2193         (normal_mod_SOURCES): likewise
2194         (datetime_mod_SOURCES): Removed lib/datetime.c
2195         * conf/i386-efi.rmk: likewise
2196         * conf/i386-ieee1275.rmk: likewise
2197         * conf/i386-pc.rmk: likewise
2198         * conf/powerpc-ieee1275.rmk: likewise
2199         * conf/sparc64-ieee1275.rmk: likewise
2200         * conf/x86_64-efi.rmk: likewise
2202 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2204         Trim trailing spaces in FAT label and support mtools-like labels
2206         * fs/fat.c (grub_fat_iterate_dir): New function based
2207         on grub_fat_find_dir
2208         (grub_fat_find_dir): use grub_fat_iterate_dir
2209         (grub_fat_label): likewise
2211 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2213         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2214         and command.h
2215         remove extraneous kernel_elf_HEADERS
2217 2009-04-04  Bean  <bean123ch@gnail.com>
2219         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2221         * util/misc.c: Likewise.
2223 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2225         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2226         instead of grub_printf.
2228 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2230         * loader/i386/linux.c (grub_linux_setup_video): Fill
2231         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2232         values from `mode info' structure instead of hardcoded
2233         values.
2235 2009-04-01  Pavel Roskin  <proski@gnu.org>
2237         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2238         unused now.
2239         * genmk.rb: Likewise.
2240         * configure.ac: Likewise.
2242 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2244         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2245         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2247 2009-04-01  David S. Miller  <davem@davemloft.net>
2249         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2250         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2251         (grub_setjmp): Mark with 'returns_twice' attribute.
2252         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2253         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2254         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2256 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2258         Reapply fix from 2008-07-28 which was accidentally reverted; also
2259         perform the same fix to a similar check in same function.
2261         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2262         with the same number are found, just use issue a warning with
2263         grub_dprintf(), as this error has been reported to be non-fatal.
2265 2009-03-31  Pavel Roskin  <proski@gnu.org>
2267         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2268         for cross-compilation.
2270 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2272         Fix i386-ieee1275 build.
2274         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2275         Remove declaration.
2277 2009-03-30  Pavel Roskin  <proski@gnu.org>
2279         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2280         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2281         zero-terminated, rely only on the strlen value.  Fix comparison
2282         of strings differing in length.
2284 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2286         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2287         checking for abi version.  Improve error messages on BIOS to notify
2288         user about `linux16' command.
2290 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2292         Leak fixes
2294         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2295         in case of collision
2296         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2298 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2300         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2301         set `vid_mode' accordingly.
2302         (grub_linux_boot): Process `vid_mode' and set video mode.
2304 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2306         * util/grub.d/10_linux.in (linux_entry): New function.
2307         Factorize generation of Linux boot entries.
2309 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2311         Make the format of Environment Block plain text. The boot loader
2312         part is not tested well yet.
2314         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2315         (buffer): Removed.
2316         (envblk): Likewise.
2317         (usage): Remove "info" and "clear". Add "unset". Update the
2318         description of "set", as this does not delete variables any
2319         longer.
2320         (create_envblk_file): Complete rewrite.
2321         (open_envblk_file): Likewise.
2322         (cmd_info): Removed.
2323         (cmd_list): Likewise.
2324         (cmd_set): Likewise.
2325         (cmd_clear): Likewise.
2326         (list_variables): New function.
2327         (write_envblk): Likewise.
2328         (set_variables): Likewise.
2329         (unset_variables): Likewise.
2330         (main): Complete rewrite.
2332         * commands/loadenv.c (buffer): Removed.
2333         (envblk): Likewise.
2334         (open_envblk_file): New function.
2335         (read_envblk_file): Complete rewrite.
2336         (grub_cmd_load_env): Likewise.
2337         (grub_cmd_list_env): Likewise.
2338         (struct blocklist): New struct.
2339         (free_blocklists): New function.
2340         (check_blocklists): Likewise.
2341         (write_blocklists): Likewise.
2342         (grub_cmd_save_env): Complete rewrite.
2344         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2345         a plain text signature.
2346         (GRUB_ENVBLK_MAXLEN): Removed.
2347         (struct grub_envblk): Complete rewrite.
2348         (grub_envblk_find): Removed.
2349         (grub_envblk_insert): Likewise.
2350         (grub_envblk_open): New prototype.
2351         (grub_envblk_set): Likewise.
2352         (grub_envblk_delete): Put const to VALUE.
2353         (grub_envblk_iterate): Put const to NAME and VALUE.
2354         (grub_envblk_close): New prototype.
2355         (grub_envblk_buffer): New inline function.
2356         (grub_envblk_size): Likewise.
2358         * lib/envblk.c: Include grub/mm.h.
2359         (grub_env_find): Removed.
2360         (grub_envblk_open): New function.
2361         (grub_envblk_close): Likewise.
2362         (escaped_value_len): Likewise.
2363         (find_next_line): Likewise.
2364         (grub_envblk_insert): Removed.
2365         (grub_envblk_set): New function.
2366         (grub_envblk_delete): Complete rewrite.
2367         (grub_envblk_iterate): Likewise.
2369 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2371         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2372         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2373         variables.  Use 16-bit loader.
2374         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2375         loader.
2376         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2377         (grub_linux16_boot): ... this.  Update all users.
2378         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2379         (grub_linux_boot): ... this.  Update all users.
2381         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2382         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2383         commands to `linux16' and `initrd16'.
2384         (GRUB_MOD_FINI(linux)): Rename to ...
2385         (GRUB_MOD_FINI(linux16)): ... this.
2387 2009-03-24  Pavel Roskin  <proski@gnu.org>
2389         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2390         not just for compilation.
2392 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2394         Move multiboot helper out of kernel
2396         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2397         `loader/i386/multiboot_helper.S'.
2398         * conf/i386-coreboot.rmk: Likewise
2399         * conf/i386-ieee1275.rmk: Likewise
2401         * kern/i386/loader.S: Move multiboot helpers from here...
2402         * loader/i386/multiboot_helper.S: ...moved here
2403         * include/grub/i386/loader.h: Move declarations of multiboot
2404         helpers from here...
2405         * include/grub/i386/multiboot.h: ...moved here
2406         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2408 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2410         * kern/env.c (grub_env_context_open): Added an argument to specify
2411         whether a new context inherits exported variables from current
2412         one. This is useful when making a sandbox to interpret a config
2413         file.
2414         All callers updated.
2416         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2418 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2420         * kern/env.c (grub_env_context_close): Fix memory leaks.
2422 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2424         * normal/main.c (grub_normal_execute): Added an argument
2425         BATCH to specify if an interactive interface should be provided
2426         after reading a config file.
2427         All callers updated.
2428         (read_command_list): Prevent being executed twice.
2429         (read_fs_list): Likewise.
2431         * include/grub/normal.h (grub_normal_execute): Updated the
2432         prototype.
2434 2009-03-22  Pavel Roskin  <proski@gno.org>
2436         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2437         _start.
2438         * kern/i386/pc/startup.S: Likewise.
2439         * kern/i386/efi/startup.S: Likewise.
2440         * kern/i386/ieee1275/startup.S: Likewise.
2441         * kern/i386/coreboot/startup.S: Likewise.
2442         * kern/x86_64/efi/startup.S: Likewise.
2444         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2445         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2446         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2448 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2450         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2452         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2453         limit detection.
2454         Use vaddr of correct segment for entry_point.
2456 2009-03-21  Bean  <bean123ch@gmail.com>
2458         * commands/blocklist.c: Add include file <grub/command.h>, remove
2459         <grub/normal.h> and <grub/arg.h>.
2460         (grub_cmd_blocklist): Use the new command interface.
2461         (GRUB_MOD_INIT): Likewise.
2462         (GRUB_MOD_FINI): Likewise.
2463         * commands/boot.c: Likewise.
2464         * commands/cat.c: Likewise.
2465         * commands/cmp.c: Likewise.
2466         * commands/configfile.c: Likewise.
2467         * commands/crc.c: Likewise.
2468         * commands/echo.c: Likewise.
2469         * commands/halt.c: Likewise.
2470         * commands/handler.c: Likewise.
2471         * commands/hdparm.c: Likewise.
2472         * commands/help.c: Likewise.
2473         * commands/hexdump.c: Likewise.
2474         * commands/loadenv.c: Likewise.
2475         * commands/ls.c: Likewise.
2476         * commands/lsmmap.c: Likewise.
2477         * commands/lspci.c: Likewise.
2478         * commands/loadenv.c: Likewise.
2479         * commands/read.c: Likewise.
2480         * commands/reboot.c: Likewise.
2481         * commands/search.c: Likewise.
2482         * commands/sleep.c: Likewise.
2483         * commands/test.c: Likewise.
2484         * commands/usbtest.c: Likewise.
2485         * commands/videotest.c: Likewise.
2486         * commands/i386/cpuid.c: Likewise.
2487         * commands/i386/pc/halt.c: Likewise.
2488         * commands/i386/pc/play.c: Likewise.
2489         * commands/i386/pc/pxecmd.c: Likewise.
2490         * commands/i386/pc/vbeinfo.c: Likewise.
2491         * commands/i386/pc/vbetest.c: Likewise.
2492         * commands/ieee1275/suspend.c: Likewise.
2493         * disk/loopback.c: Likewise.
2494         * font/font_cmd.c: Likewise.
2495         * hello/hello.c: Likewise.
2496         * loader/efi/appleloader.c: Likewise.
2497         * loader/efi/chainloader.c: Likewise.
2498         * loader/i386/bsd.c: Likewise.
2499         * loader/i386/efi/linux.c: Likewise.
2500         * loader/i386/ieee1275/linux.c: Likewise.
2501         * loader/i386/linux.c: Likewise.
2502         * loader/i386/pc/chainloader.c: Likewise.
2503         * loader/i386/pc/linux.c: Likewise.
2504         * loader/powerpc/ieee1275/linux.c: Likewise.
2505         * loader/multiboot_loader.c: Likewise.
2506         * term/gfxterm.c: Likewise.
2507         * term/i386/pc/serial.c: Likewise.
2508         * term/terminfo.c: Likewise.
2510         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2511         * term/i386/pc/vga.c: Likewise.
2512         * video/readers/jpeg.c: Likewise.
2513         * video/readers/png.c: Likewise.
2514         * video/readers/tga.c: Likewise.
2516         * util/grub-fstest (cmd_loopback): Removed.
2517         (cmd_blocklist): Likewise.
2518         (cmd_ls): Likewise.
2519         (grub_register_command): Likewise.
2520         (grub_unregister_command): Likewise.
2521         (execute_command): Use grub_command_find to locate command and execute
2522         it.
2524         * include/grub/efi/chainloader.h: Removed.
2525         * loader/efi/chainloader_normal.c: Likewise.
2526         * loader/i386/bsd_normal.c: Likewise.
2527         * loader/i386/pc/chainloader_normal.c: Likewise.
2528         * loader/i386/pc/multiboot_normal.c: Likewise.
2529         * loader/linux_normal.c: Likewise.
2530         * loader/multiboot_loader_normal.c: Likewise.
2531         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2533         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2534         and grub_register_command_p1.
2536         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2537         kern/command.c, lib/arg.c and commands/extcmd.c.
2538         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2539         (minicmd_mod_SOURCES): New variable.
2540         (minicmd_mod_CFLAGS): Likewise.
2541         (minicmd_mod_LDFLAGS): Likewise.
2542         (extcmd_mod_SOURCES): Likewise.
2543         (extcmd_mod_CFLAGS): Likewise.
2544         (extcmd_mod_LDFLAGS): Likewise.
2545         (boot_mod_SOURCES): Removed.
2546         (boot_mod_CFLAGS): Likewise.
2547         (boot_mod_LDFLAGS): Likewise.
2549         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2550         kern/corecmd.c.
2551         (kernel_img_HEADERS): Add command.h.
2552         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2553         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2554         and lib/arg.c.
2555         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2556         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2557         remove the corresponding normal mode command.
2558         (normal_mod_SOURCES): Remove normal/arg.c.
2559         * conf/i386-coreboot.rmk: Likewise.
2560         * conf/i386-efi.rmk: Likewise.
2561         * conf/i386-ieee1275.rmk: Likewise.
2562         * conf/powerpc-ieee1275.rmk: Likewise.
2563         * conf/x86_64-efi.rmk: Likewise.
2565         * include/grub/arg.h: Move from here ...
2566         * include/grub/lib/arg.h: ... to here.
2568         * normal/arg.c: Move from here ...
2569         * lib/arg.c: ... to here.
2571         * commands/extcmd.c: New file.
2572         * commands/minicmd.c: Likewise.
2573         * include/grub/command.h: Likewise.
2574         * include/grub/extcmd.h: Likewise.
2575         * kern/command.c: Likewise.
2576         * kern/corecmd.c: Likewise.
2578         * kern/list.c (grub_list_iterate): Return int instead of void.
2579         (grub_list_insert): New function.
2580         (grub_prio_list_insert): Likewise.
2582         * kern/rescue.c (grub_rescue_command): Removed.
2583         (grub_rescue_command_list): Likewise.
2584         (grub_rescue_register_command): Likewise.
2585         (grub_rescue_unregister_command): Likewise.
2586         (grub_rescue_cmd_boot): Move to minicmd.c
2587         (grub_rescue_cmd_help): Likewise.
2588         (grub_rescue_cmd_info): Likewise.
2589         (grub_rescue_cmd_boot): Likewise.
2590         (grub_rescue_cmd_testload): Likewise.
2591         (grub_rescue_cmd_dump): Likewise.
2592         (grub_rescue_cmd_rmmod): Likewise.
2593         (grub_rescue_cmd_lsmod): Likewise.
2594         (grub_rescue_cmd_exit): Likewise.
2595         (grub_rescue_print_devices): Moved to corecmd.c.
2596         (grub_rescue_print_files): Likewise.
2597         (grub_rescue_cmd_ls): Likewise.
2598         (grub_rescue_cmd_insmod): Likewise.
2599         (grub_rescue_cmd_set): Likewise.
2600         (grub_rescue_cmd_unset): Likewise.
2601         (attempt_normal_mode): Use grub_command_find to get normal module.
2602         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2603         commands, remove grub_rescue_register_command calls.
2605         * normal/command.c (grub_register_command): Removed.
2606         (grub_unregister_command): Likewise.
2607         (grub_command_find): Likewise.
2608         (grub_iterate_commands): Likewise.
2609         (rescue_command): Likewise.
2610         (export_command): Moved to corecmd.c.
2611         (set_command): Removed.
2612         (unset_command): Likewise.
2613         (insmod_command): Likewise.
2614         (rmmod_command): Likewise.
2615         (lsmod_command): Likewise.
2616         (grub_command_init): Likewise.
2618         * normal/completion.c (iterate_command): Use cmd->prio to check for
2619         active command.
2620         (complete_arguments): Use grub_extcmd_t structure to find options.
2621         (grub_normal_do_completion): Change function grub_iterate_commands to
2622         grub_command_iterate.
2624         * normal/execute.c (grub_script_execute_cmd): No need to parse
2625         argument here.
2627         * normal/main.c (grub_dyncmd_dispatcher): New function.
2628         (read_command_list): Register unload commands as dyncmd.
2629         (grub_cmd_normal): Use new command interface, register rescue,
2630         unregister normal at entry, register normal, unregister rescue at exit.
2632         * include/grub/list.h (grub_list_test_t): New type.
2633         (grub_list_iterate): Return int instead of void.
2634         (grub_list_insert): New function.
2635         (GRUB_AS_NAMED_LIST_P): New macro.
2636         (GRUB_AS_PRIO_LIST): Likewise.
2637         (GRUB_AS_PRIO_LIST_P): Likewise.
2638         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2639         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2640         (grub_prio_list): New structure.
2641         (grub_prio_list_insert): New function.
2642         (grub_prio_list_remove): New inline function.
2644         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2645         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2646         (GRUB_COMMAND_FLAG_MENU): Likewise.
2647         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2648         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2649         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2650         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2651         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2652         (grub_command): Likewise.
2653         (grub_register_command): Likewise.
2654         (grub_command_find): Likewise.
2655         (grub_iterate_commands): Likewise.
2656         (grub_command_init): Likewise.
2657         (grub_arg_parse): Likewise.
2658         (grub_arg_show_help): Likewise.
2660         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2661         (grub_rescue_unregister_command): Likewise.
2663         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2664         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2665         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2667         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2668         grub_rescue_cmd_initrd.
2669         * include/grub/i386/loader.h: Likewise.
2670         * include/grub/x86_64/loader.h: Likewise.
2672         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2674 2009-03-21  Bean  <bean123ch@gmail.com>
2676         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2677         instead of stat in mingw environment.
2679         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2681         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2683         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2684         AC_CONFIG_LINKS.
2686 2009-03-21  Bean  <bean123ch@gmail.com>
2688         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2689         out of range error.
2691 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2693         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2694         checking inode flags for EXT4_EXTENTS_FLAG.
2696 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2698         * loader/i386/linux.c: Include `<grub/video.h>' and
2699         `<grub/i386/pc/vbe.h>'..
2700         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2701         (grub_linux32_boot): Attempt to configure video settings with
2702         grub_linux_setup_video().
2703         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2704         to avoid grub_console_fini() which would step out of graphical mode
2705         unconditionally.
2707 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2709         Fix build on powerpc.
2710         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2712 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2714         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2715         background image command.
2717 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2719         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2720         (grub_gfxterm_putchar): Extract pairs of identical calls to
2721         draw_cursor out of conditional blocks.
2723 2009-03-11  Pavel Roskin  <proski@gnu.org>
2725         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2726         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2728 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2730         * loader/i386/multiboot_elfxx.c
2731         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2733 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2735         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2736         `kern/handler.c'.
2738 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2740         * loader/i386/multiboot.c (code_size): New variable.
2741         (grub_multiboot): Define offsets by adding to `code_size' rather
2742         than subtracting from `grub_multiboot_payload_size'.  Provide
2743         4-byte alignment to MBI and others by increasing
2744         `boot_loader_name_length' appropriately.
2746         * loader/i386/multiboot_elfxx.c
2747         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2749 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2751         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2752         `fs/ext2.c'.
2754 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2756         Make loader/i386/linux.c usable on i386-pc again.
2758         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2759         memory to heap.
2760         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2761         `#error' stanza.
2763 2009-03-07  Bean  <bean123ch@gmail.com>
2765         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2766         allocation.
2768 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2770         Fix display issue on terminals with screen size other than 80x25
2771         (e.g. gfxterm with resolution higher than 640x480).
2773         * normal/main.c (grub_normal_init_page): Display title text in a
2774         position relative to the center of the terminal instead of relying
2775         on a hardcoded offset.
2777 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2779         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2780         installed.
2782         * Makefile.in (host_kernel): New variable.
2783         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2784         scripts instead of just the windows one.
2785         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2787 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2789         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2790         `kern/handler.c'.
2791         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2792         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2793         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2794         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2795         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2796         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2798 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2800         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2801         or if there's no space for the disk label and print the partition number on a
2802         invalid magic.
2804 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2806         * util/misc.c: Include <time.h>.
2807         (grub_millisleep): New function.
2809 2009-03-04  Bean  <bean123ch@gmail.com>
2811         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2812         another option -mno-red-zone.
2814         * commands/handler.c: Change module description.
2816         * kern/handler.c: Add missing space at the end of description line.
2818         * kern/list.c: Likewise.
2820 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2822         Move more components to the relocation area, and fix mbi pointer
2823         handling to use the destination rather than the origin (thanks to
2824         Vladimir Serbinenko for spotting).
2826         * loader/i386/multiboot.c (mbi_dest): New variable.
2827         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2828         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2829         relocation area.
2831 2009-03-01  Bean  <bean123ch@gmail.com>
2833         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2834         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2835         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2836         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2838         * loader/i386/efi/linux.c (acpi_guid): New variable.
2839         (acpi_guid): Likewise.
2840         (EBDA_SEG_ADDR): New constant.
2841         (LOW_MEM_ADDR): Likewise.
2842         (FAKE_EBDA_SEG): Likewise.
2843         (fake_bios_data): New function.
2844         (grub_linux_boot): Call fake_bios_data.
2846 2009-03-01  Bean  <bean123ch@gmail.com>
2848         * commands/terminal.c: Removed.
2850         * commands/handler.c: New file.
2852         * include/grub/list.h: Likewise.
2854         * include/grub/handler.h: Likewise.
2856         * kern/list.c: Likewise.
2858         * kern/handler.c: Likewise.
2860         * kern/term.h: Include header file <grub/handler.h>.
2861         (grub_term_input): Move next field to the beginning.
2862         (grub_term_output): Likewise.
2863         (grub_term_input_class): New variable.
2864         (grub_term_output_class): Likewise.
2865         (grub_term_register_input): Changed to inline function.
2866         (grub_term_register_output): Likewise.
2867         (grub_term_unregister_input): Likewise.
2868         (grub_term_unregister_output): Likewise.
2869         (grub_term_set_current_input): Likewise.
2870         (grub_term_set_current_output): Likewise.
2871         (grub_term_get_current_input): Likewise.
2872         (grub_term_get_current_output): Likewise.
2873         (grub_term_iterate_input): Removed.
2874         (grub_term_iterate_output): Likewise.
2876         * kern/term.c (grub_term_list_input): Removed.
2877         (grub_term_list_output): Likewise.
2878         (grub_term_input_class): New variable.
2879         (grub_term_output_class): Likewise.
2880         (grub_cur_term_input): Change variable as macro.
2881         (grub_cur_term_output): Likewise.
2882         (grub_term_register_input): Removed.
2883         (grub_term_register_output): Likewise.
2884         (grub_term_unregister_input): Likewise.
2885         (grub_term_unregister_output): Likewise.
2886         (grub_term_set_current_input): Likewise.
2887         (grub_term_set_current_output): Likewise.
2888         (grub_term_iterate_input): Likewise.
2889         (grub_term_iterate_output): Likewise.
2890         (grub_term_get_current_input): Likewise.
2891         (grub_term_get_current_output): Likewise.
2893         * util/grub-editenv.c: Include header file <grub/handler.h>.
2894         (grub_term_get_current_input): Removed.
2895         (grub_term_get_current_output): Likewise.
2896         (grub_term_input_class): New variable.
2897         (grub_term_output_class): Likewise.
2899         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2900         (grub_term_get_current_output): Likewise.
2901         (grub_term_input_class): New variable.
2902         (grub_term_output_class): Likewise.
2904         * util/grub-probe.c (grub_term_get_current_input): Removed.
2905         (grub_term_get_current_output): Likewise.
2906         (grub_term_input_class): New variable.
2907         (grub_term_output_class): Likewise.
2909         * util/i386/pc/grub-setup.c (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         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
2915         (terminal_mod_SOURCES): Likewise.
2916         (terminal_mod_CFLAGS): Likewise.
2917         (terminal_mod_LDFLAGS): Likewise.
2919         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
2920         handler.c.
2921         (kernel_img_SOURCES): Add list.c and handler.c.
2922         (kernel_img_HEADERS): Add list.h and handler.h.
2924         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
2925         handler.c.
2926         (kernel_mod_SOURCES): Add list.c and handler.c.
2927         (kernel_mod_HEADERS): Add list.h and handler.h.
2929         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
2930         handler.c.
2931         (kernel_elf_SOURCES): Add list.c and handler.c.
2932         (kernel_elf_HEADERS): Add list.h and handler.h.
2934         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
2935         handler.c.
2936         (kernel_elf_SOURCES): Add list.c and handler.c.
2937         (kernel_elf_HEADERS): Add list.h and handler.h.
2939         * conf/x86_64-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/powerpc-ieee1275.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 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2951         Factorize elf32 / elf64 code in Multiboot loader.  This will
2952         prevent it from getting out of sync again.
2954         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
2955         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
2956         grub_multiboot_load_elf64): Move from here ...
2957         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
2958         grub_multiboot_load_elf): ... to here (new file).
2960 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2962         * util/grub.d/10_linux.in: Rename "single-user mode" to
2963         "recovery mode".
2965 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
2967         Don't leak in SCSI code.
2968         * disk/scsi.c (grub_scsi_close): free `scsi'.
2970 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2972         * loader/i386/pc/multiboot.c: Move from here ...
2973         * loader/i386/multiboot.c: ... to here.  Update all users.
2975 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2977         Patch from Alexandre Bique <bique.alexandre@gmail.com>
2978         * util/i386/pc/grub-setup.c (setup): Fix directory path.
2980 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
2982         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
2983         b-tree.
2985 2009-02-27  Robert Millan  <rmh@aybabtu.com>
2987         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
2988         `0x' qualifier as 0 when base is specified as parameter).
2990 2009-02-24  Bean  <bean123ch@gmail.com>
2992         * configure.ac: Check for -mcmodel=large in x86_64 target.
2994         * include/grub/efi/api.h (efi_call_10): New macro.
2995         (efi_wrap_10): New function.
2997         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
2998         (GRUB_PE32_REL_BASED_HIGH): Likewise.
2999         (GRUB_PE32_REL_BASED_LOW): Likewise.
3000         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3001         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3002         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3003         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3004         (GRUB_PE32_REL_BASED_REL): Likewise.
3005         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3006         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3007         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3009         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3010         issue.
3012         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3013         (efi_wrap_10): New function.
3015         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3017         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3018         MB/MBP model (NV chipset).
3019         (devdata_devs): Add devpath_5 to the list.
3021         * load/i386/efi/linux.c (video_base): Remove variable.
3022         (RGB_MASK): New macro.
3023         (RGB_MAGIC): Likewise.
3024         (LINE_MIN): Likewise.
3025         (LINE_MAX): Likewise.
3026         (FBTEST_STEP): Likewise.
3027         (FBTEST_COUNT): Likewise.
3028         (fb_list): New variable.
3029         (grub_find_video_card): Remove function.
3030         (find_framebuf): New function.
3031         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3032         line length.
3034         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3035         problem for x86_64.
3037 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3039         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3041         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3042         coding tool name.
3044 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3046         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3047         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3048         in our relocation, instead of using it directly from heap.  Also
3049         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3051 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3053         Implement USB keyboard support (based on patch by Marco Gerards)
3055         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3056         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3057         (usb_keyboard_mod_LDFLAGS): New variables.
3059         * term/usb_keyboard.c: New file.
3061 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3063         Corrected wrong declaration
3065         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3067 2009-02-14  Christian Franke  <franke@computer.org>
3069         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3070         (grub_lspci_iter): Print class code and programming interface byte.
3072 2009-02-14  Christian Franke  <franke@computer.org>
3074         * gendistlist.sh: Ignore `.svn' directories.
3076 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3078         * fs/fat.c: Add 2009 to Copyright line.
3080 2009-02-14  Christian Franke  <franke@computer.org>
3082         * commands/hdparm.c: New file.  Provides `hdparm' command
3083         which sends ATA commands via grub_disk_ata_pass_through ().
3085         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3087         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3088         and <grub/cpu/io.h> to include/grub/ata.h.
3089         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3090         (GRUB_CDROM_SECTOR_SIZE): Remove.
3091         (GRUB_ATA_*): Move to include/grub/ata.h.
3092         (GRUB_ATAPI_*): Likewise.
3093         (enum grub_ata_commands): Likewise.
3094         (enum grub_ata_timeout_milliseconds): Likewise.
3095         (struct grub_ata_device): Likewise.
3096         (grub_ata_regset): Likewise.
3097         (grub_ata_regget): Likewise.
3098         (grub_ata_regset2): Likewise.
3099         (grub_ata_regget2): Likewise.
3100         (grub_ata_check_ready): Likewise.
3101         (grub_ata_wait_not_busy): Remove static, exported in
3102         include/grub/ata.h.
3103         (grub_ata_wait_drq): Likewise.
3104         (grub_ata_pio_read): Likewise.
3106         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3107         function for hdparm.mod.
3109         * include/grub/ata.h: New file, contains declarations from
3110         disk/ata.c.
3111         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3113         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3114         (grub_disk_ata_pass_through): New exported variable.
3116         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3118 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3120         Support multiple fallback entries, and provide an API to support
3121         executing default+fallback menu entries.  Renamed the `terminal' menu
3122         viewer to `text'.
3124         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3125         variable declaration.
3126         (grub_menu_execute_callback): New structure declaration.
3127         (grub_menu_execute_callback_t): New typedef.
3128         (grub_menu_execute_with_fallback): New function declaration.
3129         (grub_menu_get_entry): Likewise.
3130         (grub_menu_get_timeout): Likewise.
3131         (grub_menu_set_timeout): Likewise.
3133         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3135         * normal/menu.c (grub_wait_after_message): Moved to
3136         `normal/menu_text.c'.
3137         (draw_border): Likewise.
3138         (print_message): Likewise.
3139         (print_entry): Likewise.
3140         (print_entries): Likewise.
3141         (grub_menu_init_page): Likewise.
3142         (get_entry_number): Likewise.
3143         (print_timeout): Likewise.
3144         (run_menu): Likewise.
3145         (grub_menu_execute_entry): Likewise.
3146         (show_text_menu): Likewise.
3147         (get_and_remove_first_entry_number): New function.
3148         (grub_menu_execute_with_fallback): Likewise.
3149         (get_entry): Renamed to ...
3150         (grub_menu_get_entry): .. this and made it global.
3151         (get_timeout): Renamed to ...
3152         (grub_menu_get_timeout): ... this and made it global.
3153         (set_timeout): Renamed to ...
3154         (grub_menu_set_timeout): ... this and made it global.
3155         (grub_normal_terminal_menu_viewer): Renamed to ...
3156         (grub_normal_text_menu_viewer): ... this.
3158         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3159         from normal/menu.c.
3161         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3162         (normal_mod_SOURCES): Likewise.
3164         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3165         (normal_mod_SOURCES): Likewise.
3167         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3168         (normal_mod_SOURCES): Likewise.
3170         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3171         (normal_mod_SOURCES): Likewise.
3173         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3174         (normal_mod_SOURCES): Likewise.
3176         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3177         (normal_mod_SOURCES): Likewise.
3179         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3180         (normal_mod_SOURCES): Likewise.
3182 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3184         * util/grub.d/00_header.in: Update old reference to `font' command.
3186 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3188         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3190         Based on patch from Javier Martín.
3192 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3194         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3195         to avoid false positives with FAT.
3196         (grub_fstest_SOURCES): Likewise.
3197         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3198         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3199         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3200         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3201         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3202         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3204 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3206         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3207         bpb.version_specific.fat12_or_fat16.fstype and
3208         bpb.version_specific.fat32.fstype.
3210 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3212         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3214 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3216         * Makefile.in (host_os, host_cpu): New variables.
3217         (target_os): Remove.  Update all users.
3219 2009-02-08  Marco Gerards  <marco@gnu.org>
3221         * Makefile.in (enable_grub_emu_usb): New variable.
3222         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3223         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3224         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3225         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3226         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3227         `usbtest.mod' and `usbms.mod'.
3228         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3229         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3230         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3231         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3232         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3233         variables.
3235         * disk/usbms.c: New file.
3237         * include/grub/usb.h: Likewise.
3239         * include/grub/usbtrans.h: Likewise.
3241         * include/grub/usbdesc.h: Likewise.
3243         * bus/usb/usbtrans.c: Likewise.
3245         * bus/usb/ohci.c: Likewise.
3247         * bus/usb/uhci.c: Likewise.
3249         * bus/usb/usbhub.c: Likewise.
3251         * bus/usb/usb.c: Likewise.
3253         * commands/usbtest.c: Likewise.
3255         * util/usb.c: Likewise.
3257         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3259         * configure.ac: Test for libusb presence.
3261         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3263 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3265         * kern/mm.c: Add more comments.
3267 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3269         Patch from Javier Martín.
3270         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3271         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3273 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3275         * fs/cpio.c: Split tar functionality to ...
3276         * fs/tar.c: ... here (new file).  Update all users.
3278 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3280         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3281         backward-incompatible features.
3283         Based on patch from Javier Martín, with some adjustments.
3285 2009-02-07  Michael Scherer  <misc@mandriva.org>
3287         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3289 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3291         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3292         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3293         after the RAID stuff.
3295 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3297         Fixes problem when running vbetest command as reported by
3298         Vladimir Serbinenko <phcoder@gmail.com>.
3300         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3302 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3304         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3305         /dev/md/NpN style mdraid devices.
3307 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3309         * util/unifont2pff.rb: Remove.
3311 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3313         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3314         `#'.
3316 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3318         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3319         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3320         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3321         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3322         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3323         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3324         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3326 2009-02-02  Christian Franke  <franke@computer.org>
3328         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3330 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3332         * INSTALL: Note that we now require at least autoconf 2.59 and
3333         that LZO is optional.
3335 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3337         Base on patch on bug #24154 created by Tomas Tintera
3338         <trosos@seznam.cz>.
3340         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3342 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3344         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3345         <bero@arklinux.org>.
3347         * normal/parser.y (script_init): Add missing semicolon.
3349 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3351         * normal/main.c: Add include to grub/menu_viewer.h.
3352         (free_menu_entry_classes): Added.
3353         (grub_normal_menu_addentry): Added class property handling.
3354         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3355         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3357         * normal/menu_viewer.c: New file.
3359         * normal/menu.c (run_menu_entry): Renamed to ...
3360         (grub_menu_execute_entry): ... this and made it as global.
3361         (grub_menu_run): Renamed to ...
3362         (show_text_menu): ... this and made it local.
3363         (show_text_menu): Adapt to new function names.
3364         (grub_normal_terminal_menu_viewer): New global variable.
3366         * include/grub/menu.h: New file.
3368         * include/grub/menu_viewer.h: New file.
3370         * include/grub/normal.h: Added include to grub/menu.h.
3371         (grub_menu_entry): Moved to include/grub/menu.h.
3372         (grub_menu_entry_t): Likewise.
3373         (grub_menu): Likewise.
3374         (grub_menu_t): Likewise.
3375         (grub_normal_terminal_menu_viewer): Added.
3376         (grub_menu_execute_entry): Likewise.
3377         (grub_menu_run): Removed.
3379         * DISTLIST: Added include/grub/menu.h.
3380         Added include/grub/menu_viewer.h.
3381         Added normal/menu_viewer.c.
3383 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3385         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3386         arglist for menutitle arguments.
3388         * normal/main.c (grub_normal_menu_addentry): Likewise.
3390         * normal/parser.y (menuentry): Likewise.
3392         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3394         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3395         (grub_script_create_cmdmenu): Likewise.
3397         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3399         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3400         changes.
3402         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3404         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3406         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3408         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3410         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3412         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3414 2009-01-30  Christian Franke  <franke@computer.org>
3416         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3417         in option help text.
3419 2009-01-27  Pavel Roskin  <proski@gnu.org>
3421         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3423 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3425         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3427         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3429         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3430         unregister function.
3432 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3434         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3436         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3438         * util/grub-mkfont.c (usage): Fix typo.
3440         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3442 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3444         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3446         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3448         * kern/misc.c (grub_strcasecmp): New function.
3449         (grub_strcasecmp): Use grub_size_t instead of int for length.
3450         Fix return value.
3451         * include/grub/misc.h: Update function prototypes.
3453 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3455         * configure.ac: Fix cross-compilation check.
3457 2009-01-22  Christian Franke  <franke@computer.org>
3459         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3460         (precision) digit string.  Allow `.format2' without `format1' (width).
3461         Limit input chars for `%s' output to `format2' if specified.  This is
3462         compatible with standard printf ().
3464 2009-01-22  Christian Franke  <franke@computer.org>
3466         * disk/ata.c (grub_ata_wait_status): Replace by ...
3467         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3468         other status bits may be invalid while BSY is asserted.
3469         (grub_ata_check_ready): New function.
3470         (grub_ata_cmd): Removed.
3471         (grub_ata_wait_drq): New function.
3472         (grub_ata_strncpy): Remove inline.
3473         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3474         and error check now done by grub_ata_wait_drq ().
3475         (grub_ata_pio_write): Likewise.
3476         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3477         grub_ata_wait_drq () to wait for data.
3478         (grub_ata_device_initialize): Add status register check to
3479         detect missing SATA slave devices.  Add debug messages.
3480         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3481         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3482         transfer loop by grub_ata_pio_write ().
3483         (grub_ata_identify): Set DEV before check for !BSY. Use
3484         grub_ata_wait_drq () to wait for data.
3485         (grub_ata_setaddress): Set DEV before check for !BSY.
3486         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3487         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3488         command on (size % batch) == 0.  Add missing error check after write of
3489         last block.  Add debug messages.
3490         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3492 2009-01-19  Christian Franke  <franke@computer.org>
3494         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3495         (GRUB_ATAPI_IREASON_*): Likewise.
3496         (grub_ata_pio_write): Fix timeout error return.
3497         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3498         (grub_atapi_wait_drq): New function.
3499         (grub_atapi_packet): New parameter `size'.
3500         Use grub_atapi_wait_drq () and direct write instead of
3501         grub_ata_pio_write ().
3502         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3503         reads the number of bytes requested by the device for each DRQ
3504         assertion.
3505         (grub_atapi_write): Remove old implementation, return not
3506         implemented instead.
3508 2009-01-19  Christian Franke  <franke@computer.org>
3510         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3511         of 512 to calculate data size.
3512         (grub_scsi_read12): Likewise.
3513         (grub_scsi_write10): Likewise.
3514         (grub_scsi_write12): Likewise.
3515         (grub_scsi_read): Adjust size according to blocksize.
3516         Add checks for invalid blocksize and unaligned transfer.
3518 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3520         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3522         * term/gfxterm.c (write_char): Fix background rendering for wide
3523         width glyphs.
3525 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3527         * config.guess: Update to latest version from config git.
3528         * config.sub: Likewise.
3530 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3532         * Makefile.in: Change font compilation to use new grub-mkfont instead
3533         of java version.
3535         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3536         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3537         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3538         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3539         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3540         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3541         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3542         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3543         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3545 2009-01-16  Christian Franke  <franke@computer.org>
3547         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3548         (enum grub_ata_timeout_milliseconds): New enum.
3549         (grub_ata_wait_status): Add parameter milliseconds.
3550         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3551         recovery from timed-out commands.
3552         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3553         return grub_errno instead of REG_ERROR.
3554         (grub_ata_pio_write): Add parameter milliseconds.
3555         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3556         Pass milliseconds to grub_ata_wait_status () and
3557         grub_ata_pio_read ().
3558         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3559         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3560         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3561         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3562         It is not suitable for device detection, because DEV bit is ignored,
3563         the command may run too long, and not all devices set the signature
3564         properly.
3565         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3566         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3567         Fix device selection, DEV bit must be set first to address the registers
3568         of the correct device.
3569         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3570         grub_ata_pio_read/write ().
3571         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3572         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3574 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3576         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3578 2009-01-13  Bean  <bean123ch@gmail.com>
3580         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3582 2009-01-13  Bean  <bean123ch@gmail.com>
3584         * Makefile.in: (enable_grub_mkfont): New variable.
3585         (freetype_cflags): Likewise.
3586         (freetype_libs): Likewise.
3588         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3589         (grub_mkfont_SOURCES): New variable.
3590         (grub_mkfont_CFLAGS): Likewise.
3591         (grub_mkfont_LDFLAGS): Likewise.
3593         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3594         library if `--enable-grub-mkfont' is requested.
3595         (enable_grub_mkfont): New variable.
3596         (freetype_cflags): Likewise.
3597         (freetype_libs): Likewise.
3599         * util/grub-mkfont.c: New file.
3601 2009-01-12  Christian Franke  <franke@computer.org>
3603         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3604         mode check.  Fix setting of compat_use[].
3606 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3608         Update a few copyright years which we forgot to do in 2008 (only for
3609         files whose changes made in 2008 were copyright-significant)
3611         * Makefile.in: Add 2008 to Copyright line.
3612         * disk/ieee1275/ofdisk.c: Likewise.
3613         * disk/efi/efidisk.c: Likewise.
3614         * kern/dl.c: Likewise.
3615         * kern/sparc64/ieee1275/init.c: Likewise.
3616         * kern/mm.c: Likewise.
3617         * kern/efi/mm.c: Likewise.
3618         * boot/i386/pc/boot.S: Likewise.
3619         * genfslist.sh: Likewise.
3620         * fs/iso9660.c: Likewise.
3621         * fs/hfs.c: Likewise.
3622         * fs/jfs.c: Likewise.
3623         * fs/minix.c: Likewise.
3624         * fs/ufs.c: Likewise.
3625         * gensymlist.sh.in: Likewise.
3626         * genkernsyms.sh.in: Likewise.
3627         * include/grub/misc.h: Likewise.
3628         * include/grub/types.h: Likewise.
3629         * include/grub/symbol.h: Likewise.
3630         * include/grub/elf.h: Likewise.
3631         * include/grub/kernel.h: Likewise.
3632         * include/grub/disk.h: Likewise.
3633         * include/grub/dl.h: Likewise.
3634         * include/grub/i386/linux.h: Likewise.
3635         * include/grub/i386/pc/biosdisk.h: Likewise.
3636         * include/grub/efi/api.h: Likewise.
3637         * include/grub/efi/pe32.h: Likewise.
3638         * include/grub/util/misc.h: Likewise.
3639         * normal/execute.c: Likewise.
3640         * normal/arg.c: Likewise.
3641         * normal/completion.c: Likewise.
3642         * normal/lexer.c: Likewise.
3643         * normal/parser.y: Likewise.
3644         * normal/misc.c: Likewise.
3645         * commands/i386/pc/vbeinfo.c: Likewise.
3646         * commands/hexdump.c: Likewise.
3647         * commands/terminal.c: Likewise.
3648         * commands/ls.c: Likewise.
3649         * commands/help.c: Likewise.
3650         * partmap/pc.c: Likewise.
3651         * loader/efi/chainloader.c: Likewise.
3652         * loader/multiboot_loader.c: Likewise.
3653         * loader/i386/pc/multiboot2.c: Likewise.
3654         * term/efi/console.c: Likewise.
3655         * term/i386/pc/serial.c: Likewise.
3656         * util/lvm.c: Likewise.
3657         * util/console.c: Likewise.
3658         * util/i386/efi/grub-mkimage.c: Likewise.
3659         * util/raid.c: Likewise.
3661 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3663         * commands/videotest.c: Removed include to grub/machine/memory.h.
3665         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3666         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3667         (video_mod_SOURCES): Removed.
3668         (video_mod_CFLAGS): Likewise.
3669         (video_mod_LDFLAGS): Likewise.
3670         (gfxterm_mod_SOURCES): Likewise.
3671         (gfxterm_mod_CFLAGS): Likewise.
3672         (gfxterm_mod_LDFLAGS): Likewise.
3673         (videotest_mod_SOURCES): Likewise.
3674         (videotest_mod_CFLAGS): Likewise.
3675         (videotest_mod_LDFLAGS): Likewise.
3676         (bitmap_mod_SOURCES): Likewise.
3677         (bitmap_mod_CFLAGS): Likewise.
3678         (bitmap_mod_LDFLAGS): Likewise.
3679         (tga_mod_SOURCES): Likewise.
3680         (tga_mod_CFLAGS): Likewise.
3681         (tga_mod_LDFLAGS): Likewise.
3682         (jpeg_mod_SOURCES): Likewise.
3683         (jpeg_mod_CFLAGS): Likewise.
3684         (jpeg_mod_LDFLAGS): Likewise.
3685         (png_mod_SOURCES): Likewise.
3686         (png_mod_CFLAGS): Likewise.
3687         (png_mod_LDFLAGS): Likewise.
3689         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3690         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3691         (video_mod_SOURCES): Added.
3692         (video_mod_CFLAGS): Likewise.
3693         (video_mod_LDFLAGS): Likewise.
3694         (videotest_mod_SOURCES): Likewise.
3695         (videotest_mod_CFLAGS): Likewise.
3696         (videotest_mod_LDFLAGS): Likewise.
3697         (bitmap_mod_SOURCES): Likewise.
3698         (bitmap_mod_CFLAGS): Likewise.
3699         (bitmap_mod_LDFLAGS): Likewise.
3700         (tga_mod_SOURCES): Likewise.
3701         (tga_mod_CFLAGS): Likewise.
3702         (tga_mod_LDFLAGS): Likewise.
3703         (jpeg_mod_SOURCES): Likewise.
3704         (jpeg_mod_CFLAGS): Likewise.
3705         (jpeg_mod_LDFLAGS): Likewise.
3706         (png_mod_SOURCES): Likewise.
3707         (png_mod_CFLAGS): Likewise.
3708         (png_mod_LDFLAGS): Likewise.
3709         (gfxterm_mod_SOURCES): Likewise.
3710         (gfxterm_mod_CFLAGS): Likewise.
3711         (gfxterm_mod_LDFLAGS): Likewise.
3713         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3714         grub/machine/console.h.
3716 2009-01-04  Jerone Young  <jerone@gmail.com>
3718         Make on screen instructions clearer
3720         Based on patch created by Jidanni <jidanni@jidanni.org>
3722         * normal/menu.c: print clearer instructions on the screen
3724 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3726         New font engine.
3728         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3729         build system and fixed gfxterm.c to work with different sized fonts.
3731         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3733         * configure: Re-generated.
3735         * DISTLIST: Removed font/manager.c.
3736         Added font/font.c.
3737         Added font/font_cmd.c.
3739         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3740         compilation.
3742         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3744         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3746         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3748         * normal/menu.c: Likewise.
3750         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3751         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3753         * include/grub/font.h: Replaced with new file.
3755         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3756         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3757         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3758         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3759         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3760         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3761         fg_red, fg_green, fg_blue, fg_alpha.
3762         (grub_video_adapter): Removed blit_glyph.
3763         (grub_video_blit_glyph): Removed.
3765         * font/manager.c: Removed file.
3767         * font/font.c: New file.
3769         * font/font_cmd.c: Likewise.
3771         * video/video.c (grub_video_blit_glyph): Removed.
3773         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3774         (grub_video_vbe_map_rgba): Likewise.
3775         (grub_video_vbe_unmap_color_int): Likewise.
3776         (grub_video_vbe_blit_glyph): Removed.
3777         (grub_video_vbe_adapter): Removed blit_glyph.
3779         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3780         (get_pixel): Likewise.
3781         (set_pixel): Likewise.
3783         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3785         * term/gfxterm.c: Adapted to new font engine.
3787         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3789         * term/i386/pc/vga.c: Likewise.
3791         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3793         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3795         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3797         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3799         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3801         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3803         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3805         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3807         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3809         * util/grub.d/00_header.in: Changed to use new loadfont command.
3811         * util/grub-mkconfig_lib.in: Changed font extension.
3813 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3815         * util/getroot.c (grub_util_get_grub_dev): Add support for
3816         /dev/md/dNNpNN style partitionable mdraid devices.
3818 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3820         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3821         at a time limit of the PXE TFTP API correctly.
3822         (grub_pxefs_close): Likewise.
3824 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3826         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3827         grub_ata_device_initialize() calls.
3829 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3831         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3832         iteration failed.
3833         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3835 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3837         Fix build on powerpc-ieee1275.  Based on patch created by
3838         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3839         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3840         `kern/ieee1275/mmap.c'.
3841         * include/grub/powerpc/ieee1275/memory.h: New file.
3843         Provide grub-install on coreboot.
3844         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3845         (grub_install_SOURCES): New variable.
3846         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3847         usable on coreboot.
3849 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3851         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3852         to `grub_term_input_t'.
3853         (grub_term_get_current_output): Change return type to
3854         `grub_term_output_t'.
3856 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3858         Fix breakage on coreboot due to declaration mismatch.
3859         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3860         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3861         grub_vga_text_cls().
3863         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3864         comments.  Avoid copying one more byte than necessary (just in case).
3866         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3867         to 0x200000 (avoids trouble with some OFW implementations, and matches
3868         with the one in Yaboot).
3869         Reported by Manoel Abranches
3871 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3873         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3874         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3876         * util/grub-mkconfig_lib.in (grub_warn): New function.
3877         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3878         warnings, to obtain consistent formatting.
3879         * util/grub.d/00_header.in: Likewise.
3880         * util/update-grub_lib.in: Likewise.
3882         * loader/i386/linux.c (allocate_pages): Fix a warning.
3883         Move comment text to `#error' stanza.
3885         Harmonize ieee1275's grub_available_iterate() with the generic
3886         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3887         build problem on i386-ieee1275):
3888         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3889         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3890         parameter `type'.  Update all users of this function.
3891         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3892         `kern/ieee1275/mmap.c'.
3893         * kern/ieee1275/init.c
3894         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3895         with ...
3896         (grub_machine_mmap_iterate): ... this.
3897         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3898         return type to `grub_err_t'.  Update all implementations of this
3899         function prototype.
3900         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3901         Likewise.
3903         Add `lsmmap' command (lists firmware-provided memory map):
3904         * commands/lsmmap.c: New file.
3905         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3906         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3907         variables.
3908         * conf/powerpc-ieee1275.rmk: Likewise.
3909         * conf/i386-coreboot.rmk: Likewise.
3910         * conf/i386-ieee1275.rmk: Likewise.
3912 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3914         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
3915         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
3916         constraints to initrd allocation (based on code from
3917         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
3918         for Linux to find it.
3920 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3922         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
3923         order to cope with duplicate slashes.
3925 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3927         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
3928         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
3929         don't want to mess with lower memory, because it is used in the Linux
3930         loader.
3932         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
3933         an appropriate place in lower memory, between 0x10000 and 0x90000,
3934         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
3935         is in our heap (probably as a result of it being corrupted during
3936         decompression).  Add #error instance with comment to explain why this
3937         loader isn't currently usable on PC/BIOS.
3939 2008-11-14  Robert Millan  <rmh@aybabtu.com>
3941         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
3942         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
3944 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3946         Make loader/i386/linux.c buildable on i386-pc (although disabled).
3948         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
3949         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
3950         from here ...
3951         * include/grub/i386/pc/memory.h: ... to here.
3953 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3955         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
3956         split).
3958         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
3959         (grub_console_cur_color, grub_console_real_putchar)
3960         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3961         (grub_console_setcolorstate, grub_console_setcolor)
3962         (grub_console_getcolor): Move from here ...
3963         * include/grub/i386/vga_common.h: ... to here (new file).
3965         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
3966         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
3967         `<grub/i386/io.h>'.
3968         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
3969         `<grub/i386/vga_common.h>'.
3971 2008-11-12  Robert Millan  <rmh@aybabtu.com>
3973         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
3974         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
3975         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
3976         variables.
3977         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
3978         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
3980         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
3981         grub_console_init() with call to grub_vga_text_init().
3982         (grub_machine_fini): Replace call to
3983         grub_console_fini() with call to grub_vga_text_fini() and
3984         grub_at_keyboard_fini().
3986         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
3987         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
3988         (grub_console_setcolorstate, grub_console_setcolor)
3989         (grub_console_getcolor): New function prototypes.
3991         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
3992         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
3993         (grub_vga_text_setcursor): Static-ize.
3994         (grub_vga_text_term): New structure.
3995         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
3997         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
3998         (grub_console_cur_color, grub_console_standard_color)
3999         (grub_console_normal_color, grub_console_highlight_color)
4000         (map_char, grub_console_putchar, grub_console_getcharwidth)
4001         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4002         (grub_console_getcolor): Move from here ...
4003         * term/i386/vga_common.c: ... to here (same function names).
4005 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4007         Use newly-added Multiboot support in coreboot.
4009         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4010         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4012         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4013         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4014         (codestart): Store the MBI in `startup_multiboot_info' when we're
4015         being loaded using Multiboot.
4017         * kern/i386/coreboot/init.c (grub_machine_init): Move
4018         grub_at_keyboard_init() call to beginning of function (useful for
4019         debugging).  Call grub_machine_mmap_init() before attempting to use
4020         grub_machine_mmap_iterate().
4021         (grub_lower_mem, grub_upper_mem): Move from here ...
4022         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4023         here (new file).
4025         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4026         function prototype.
4028 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4030         Fix a regression introduced by the at_keyboard.mod split.  Because
4031         some terminals are default on some platforms and non-default on
4032         others, the first terminal being registered determines which is
4033         going to be default.
4035         * kern/term.c (grub_term_register_input): If this is the first
4036         terminal being registered, set it as the current one.
4037         (grub_term_register_output): Likewise.
4039         * term/efi/console.c (grub_console_init): Do not call
4040         grub_term_set_current_output() or grub_term_set_current_input().
4041         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4042         * term/i386/pc/console.c (grub_console_init): Likewise.
4043         (grub_console_fini): Do not call grub_term_set_current_input()
4044         (but leave grub_term_set_current_output() to restore text mode).
4046 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4048         * util/grub.d/00_header.in: Add backward compatibility check for
4049         versions of terminal.mod that don't understand `terminal_input' or
4050         `terminal_output'.
4052 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4054         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4055         `terminal_input' / `terminal_output', not `terminal'.
4057 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4059         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4060         (DISTCLEANFILES): Add `build_env.mk'.
4062 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4064         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4065         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4066         members.  Update all users.
4067         * util/console.c (grub_ncurses_term): Split in ...
4068         (grub_ncurses_term_input): ... this, and ...
4069         (grub_ncurses_term_output): ... this.  Update all users.
4070         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4072 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4074         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4075         (PKGDATA): Add $(pkgdata_SRCDIR).
4076         (pkglib_BUILDDIR): New variable.
4077         (pkgdata_SRCDIR): New variable.
4078         (build_env.mk): New target.
4079         (include_DATA): New variable.
4080         (install-local): Install $(include_DATA) files in $(includedir).
4082 2008-11-07  Pavel Roskin  <proski@gnu.org>
4084         * gendistlist.sh: Use C locale for sorting to ensure consistent
4085         output on all systems.
4087         * util/grub.d/00_header.in: Remove incorrect space before
4088         "serial".
4090 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4092         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4093         per specification.
4094         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4095         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4096         (based on find_multi_boot1_header).
4097         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4098         using find_multi_boot2_header(), and abort if neither Multiboot or
4099         Multiboot headers were found.
4101 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4103         Modularize at_keyboard.mod:
4105         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4106         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4107         (at_keyboard_mod_LDFLAGS): New variables.
4109         Actual terminal split:
4111         * include/grub/term.h (struct grub_term): Split in ...
4112         (struct grub_term_input): ... this, and ...
4113         (struct grub_term_output): ... this.  Update all users.
4114         (grub_term_set_current): Split in ...
4115         (grub_term_set_current_input): ... this, and ...
4116         (grub_term_set_current_output): ... this.
4117         (grub_term_get_current): Split in ...
4118         (grub_term_get_current_input): ... this, and ...
4119         (grub_term_get_current_output): ... this.
4120         (grub_term_register): Split in ...
4121         (grub_term_register_input): ... this, and ...
4122         (grub_term_register_output): ... this.
4123         (grub_term_unregister): Split in ...
4124         (grub_term_unregister_input): ... this, and ...
4125         (grub_term_unregister_output): ... this.
4126         (grub_term_iterate): Split in ...
4127         (grub_term_iterate_input): ... this, and ...
4128         (grub_term_iterate_output): ... this.
4130         * kern/term.c (grub_term_list): Split in ...
4131         (grub_term_list_input): ... this, and ...
4132         (grub_term_list_output): ... this.  Update all users.
4133         (grub_cur_term): Split in ...
4134         (grub_cur_term_input): ... this, and ...
4135         (grub_cur_term_output): ... this.  Update all users.
4136         (grub_term_set_current): Split in ...
4137         (grub_term_set_current_input): ... this, and ...
4138         (grub_term_set_current_output): ... this.
4139         (grub_term_get_current): Split in ...
4140         (grub_term_get_current_input): ... this, and ...
4141         (grub_term_get_current_output): ... this.
4142         (grub_term_register): Split in ...
4143         (grub_term_register_input): ... this, and ...
4144         (grub_term_register_output): ... this.
4145         (grub_term_unregister): Split in ...
4146         (grub_term_unregister_input): ... this, and ...
4147         (grub_term_unregister_output): ... this.
4148         (grub_term_iterate): Split in ...
4149         (grub_term_iterate_input): ... this, and ...
4150         (grub_term_iterate_output): ... this.
4152         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4153         a check for input and one for output (and only attempt to get keys
4154         from user when input works).
4156         * util/grub-probe.c (grub_term_get_current): Split in ...
4157         (grub_term_get_current_input): ... this, and ...
4158         (grub_term_get_current_output): ... this.
4159         * util/grub-fstest.c: Likewise.
4160         * util/i386/pc/grub-setup.c: Likewise.
4161         * util/grub-editenv.c: Likewise.
4163         Portability adjustments:
4165         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4166         `term/i386/pc/at_keyboard.c'.
4167         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4168         grub_keyboard_controller_init() (now handled by terminal .init).
4169         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4170         grub_at_keyboard_init().
4171         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4172         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4173         at_keyboard.mod via input terminal interface).
4174         * include/grub/i386/coreboot/console.h: Convert into a stub for
4175         `<grub/i386/pc/console.h>'.
4177         Migrate full terminals to new API:
4179         * term/efi/console.c (grub_console_term): Split into ...
4180         (grub_console_term_input): ... this, and ...
4181         (grub_console_term_output): ... this.  Update all users.
4182         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4183         (grub_ofconsole_init): Split into ...
4184         (grub_ofconsole_init_input): ... this, and ...
4185         (grub_ofconsole_init_output): ... this.
4186         (grub_ofconsole_term): Split into ...
4187         (grub_ofconsole_term_input): ... this, and ...
4188         (grub_ofconsole_term_output): ... this.  Update all users.
4189         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4190         (grub_serial_term_input): ... this, and ...
4191         (grub_serial_term_output): ... this.  Update all users.
4192         * term/i386/pc/console.c (grub_console_term): Split into ...
4193         (grub_console_term_input): ... this, and ...
4194         (grub_console_term_output): ... this.  Update all users.
4195         (grub_console_term_input): Only enable it on PC/BIOS platform.
4196         (grub_console_init): Remove grub_keyboard_controller_init() call.
4198         Migrate input terminals to new API:
4200         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4201         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4202         i386-specific anyway).
4203         (grub_console_checkkey): Rename to ...
4204         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4205         users.
4206         (grub_keyboard_controller_orig): New variable.
4207         (grub_console_getkey): Rename to ...
4208         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4209         users.
4210         (grub_keyboard_controller_init): Static-ize.  Save original
4211         controller value so that it can be restored ...
4212         (grub_keyboard_controller_fini): ... here (new function).
4213         (grub_at_keyboard_term): New structure.
4214         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4215         functions.
4217         Migrate output terminals to new API:
4219         * term/i386/pc/vga.c (grub_vga_term): Change type to
4220         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4221         members.  Update all users.
4222         * term/gfxterm.c (grub_video_term): Change type to
4223         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4224         members.  Update all users.
4225         * include/grub/i386/pc/console.h (grub_console_checkkey)
4226         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4227         etc).
4229         Migrate `terminal' command and userland tools to new API:
4231         * commands/terminal.c (grub_cmd_terminal): Split into ...
4232         (grub_cmd_terminal_input): ... this, and ...
4233         (grub_cmd_terminal_output): ... this.
4234         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4235         `terminal_input' and `terminal_output'.
4236         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4237         `terminal_input' / `terminal_output' API.
4238         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4239         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4240         provided ${GRUB_TERMINAL}, convert it).
4242 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4244         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4245         for FreeBSD.
4246         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4248 2008-11-03  Bean  <bean123ch@gmail.com>
4250         * kern/elf.c (grub_elf32_load): Revert to previous code.
4251         (grub_elf64_load): Likewise.
4253         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4255 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4257         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4258         (TARGET_CPPFLAGS): Likewise.
4259         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4261 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4263         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4265 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4267         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4268         addition of objects until the code is not going to be able to fail.
4270 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4272         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4273         (add a missing NULL check, and correct them by moving the pointer
4274         operations after the actual check).
4276 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4278         * util/i386/pc/grub-install.in: Handle empty string as output from
4279         make_system_path_relative_to_its_root().
4281 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4283         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4284         circular metadata worst case scenario. If the metadata is circular
4285         then copy the wrap in place.
4286         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4287         project lib/format_text/layout.h
4288         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4290 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4292         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4294 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4296         * util/update-grub_lib.in: Mention filename in warning message.
4298 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4300         * NEWS: Update for rename of update-grub to grub-mkconfig.
4302 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4304         * util/update-grub_lib.in: Copy to ...
4305         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4306         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4307         * util/update-grub.in: Rename to ...
4308         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4309         option. Add `--output' option to allow users to specify the generated
4310         configuration file.  Default to stdout.
4311         (update_grub_dir): Rename to ...
4312         (grub_mkconfig_dir): ... this.
4313         (grub_cfg): Default to an empty string.
4314         * conf/common.rmk (update-grub): Rename to ...
4315         (grub-mkconfig): ... this.
4316         (update-grub_lib): Copy to ...
4317         (grub-mkconfig_lib): ... this.
4318         (update-grub_SCRIPTS): Copy to ...
4319         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4320         (update-grub_DATA): Rename to ...
4321         (grub-mkconfig_DATA): ... this.
4323 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4325         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4326         to `modified'.  Add the real `created' field.
4327         (grub_iso9660_uuid): Use `modified' rather than `created' for
4328         constructing the UUID.
4330 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4332         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4333         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4335 2008-09-28  Bean  <bean123ch@gmail.com>
4337         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4338         Thanks to Christian Franke for finding this bug.
4340 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4342         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4343         instances of grub_util_get_disk_name() (see previous commit).
4345 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4347         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4348         `util/i386/get_disk_name.c'.
4349         * conf/i386-efi.rmk: Likewise.
4350         * conf/x86_64-efi.rmk: Likewise.
4351         * conf/i386-coreboot.rmk: Likewise.
4352         * conf/i386-ieee1275.rmk: Likewise.
4353         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4354         `util/ieee1275/get_disk_name.c'.
4355         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4356         * util/ieee1275/get_disk_name.c: Remove file.
4357         * util/i386/get_disk_name.c: Remove file.
4358         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4359         "hd%d" for device.map entries, rather than using
4360         grub_util_get_disk_name().
4362 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4364         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4365         warning.
4366         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4368 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4370         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4371         Changed to 0x5100.
4372         (GRUB_TERM_PPAGE): Changed to 0x4900.
4374 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4376         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4377         macros (they were i386-pc specific).
4378         * include/grub/sparc64/ieee1275/console.h: Likewise.
4379         * include/grub/efi/console.h: Likewise.
4381 2008-09-22  Bean  <bean123ch@gmail.com>
4383         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4384         resident and in attribute list.
4386         * include/grub/ntfs.h (BMP_LEN): Removed.
4388 2008-09-22  Bean  <bean123ch@gmail.com>
4390         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4391         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4393         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4394         error occurs, as grub_disk_open will call grub_disk_close, which will
4395         call p->close (scsi).
4397 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4399         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4400         (AC_PREREQ): Bumped to 2.59.
4401         (AC_TRY_COMPILE): Replace obsolete macro with ...
4402         (AC_COMPILE_IFELSE): ... this.
4403         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4404         (AC_LINK_IFELSE): ... this.
4406 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4408         * autogen.sh: Add a call to `gendistlist.sh'.
4410 2008-09-19  Christian Franke  <franke@computer.org>
4412         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4413         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4414         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4415         Export __enable_execute_stack() to modules.
4416         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4417         New function.
4419 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4421         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4422         Sort the list.
4424 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4426         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4427         #include <grub/util/hostdisk.h>.
4429 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4431         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4432         segments when their filesz is zero (grub_file_read() interprets
4433         zero-size as "read until EOF", which results in memory corruption).
4434         Use `lowest_segment' rather than 0 for calculating the current
4435         segment load address.
4437 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4439         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4440         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4441         clobbered useful information.
4443 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4445         * include/grub/util/biosdisk.h: Move to ...
4446         * include/grub/util/hostdisk.h: ... here.  Update all users.
4447         * util/biosdisk.c: Move to ...
4448         * util/hostdisk.c: ... here.  Update all users.
4450 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4452         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4453         variables.
4454         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4455         and length can be stored directly in the `mbi->mmap_addr' and
4456         `mbi->mmap_length' struct fields.
4458 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4460         * conf/i386.rmk: New file.  Provides declaration for building
4461         `cpuid.mod'.
4462         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4463         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4464         variables.
4465         Include `conf/i386.mk'.
4466         * conf/i386-efi.rmk: Likewise.
4467         * conf/x86_64-efi.rmk: Likewise.
4468         * conf/i386-coreboot.rmk: Likewise.
4469         * conf/i386-ieee1275.rmk: Likewise.
4471 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4473         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4474         Adds optimization support for BGR based modes.
4476         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4477         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4478         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4479         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4480         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4481         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4482         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4483         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4484         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4485         (grub_video_i386_vbeblit_index_index): Likewise.
4486         (grub_video_i386_vbeblit_replace_directN): Added.
4487         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4488         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4489         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4490         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4491         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4492         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4493         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4494         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4495         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4496         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4497         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4498         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4499         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4501         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4502         (grub_video_i386_vbefill_R8G8B8): Likewise.
4503         (grub_video_i386_vbefill_index): Likewise.
4504         (grub_video_i386_vbefill_direct32): Added.
4505         (grub_video_i386_vbefill_direct24): Likewise.
4506         (grub_video_i386_vbefill_direct16): Likewise.
4507         (grub_video_i386_vbefill_direct8): Likewise.
4509         * include/grub/video.h (grub_video_blit_format): Removed
4510         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4511         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4512         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4513         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4514         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4516         * video/video.c (grub_video_get_blit_format): Updated to use new
4517         blit formats.  Added handling for 16 bit color modes.
4519         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4520         fillers.
4521         (common_blitter): Updated to use new blitters.
4523         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4524         Removed.
4525         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4526         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4527         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4528         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4529         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4530         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4531         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4532         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4533         (grub_video_i386_vbeblit_index_index): Likewise.
4534         (grub_video_i386_vbeblit_replace_directN): Added.
4535         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4536         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4537         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4538         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4539         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4540         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4541         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4542         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4543         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4544         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4545         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4546         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4547         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4549         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4550         (grub_video_i386_vbefill_R8G8B8): Likewise.
4551         (grub_video_i386_vbefill_index): Likewise.
4552         (grub_video_i386_vbefill_direct32): Added.
4553         (grub_video_i386_vbefill_direct24): Likewise.
4554         (grub_video_i386_vbefill_direct16): Likewise.
4555         (grub_video_i386_vbefill_direct8): Likewise.
4557         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4558         types.
4560         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4561         types.
4563         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4564         blitter types.
4566         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4567         types.
4569 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4571         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4572         RAID level 1.
4574 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4576         * fs/iso9660.c (grub_iso9660_date): New structure.
4577         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4578         (grub_iso9660_uuid): New function.
4580 2008-09-05  Bean  <bean123ch@gmail.com>
4582         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4584         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4585         insensitive bit for names in Win32 and Win32 & DOS namespace.
4587         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4589         * include/grub/types.h (LONG_MAX): Likewise.
4591 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4593         * util/getroot.c: Include <config.h>.
4594         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4595         add support for /dev/md/N devices and handle LVM double dash escaping.
4597 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4599         * config.guess: Update to latest version from config git.
4600         * config.sub: Likewise.
4602 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4604         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4605         `disk->total_sectors'.
4607 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4609         * include/grub/normal.h: Fixed incorrect comment for
4610         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4612 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4614         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4615         values with defines.
4617         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4618         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4619         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4620         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4621         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4622         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4623         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4624         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4625         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4626         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4627         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4628         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4629         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4630         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4631         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4632         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4633         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4634         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4635         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4637 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4639         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4640         declaration.
4641         (grub_multiboot): Fix a few warnings.
4643 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4645         * loader/i386/pc/multiboot.c: Update comment not to say that
4646         boot_device support is unimplemented.
4648 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4650         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4651         or memory map support are unimplemented.
4653 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4655         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4657 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4659         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4660         total video memory in 'vbeinfo' output; show color format details for
4661         each video mode.
4663 2008-08-30  Pavel Roskin  <proski@gnu.org>
4665         * util/genmoddep.c: Remove for real this time.
4666         * DISTLIST: Remove util/genmoddep.c.
4668 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4670         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4671         as required by Multiboot spec (it was already 4-byte aligned, but
4672         only by chance).
4674 2008-08-29  Pavel Roskin  <proski@gnu.org>
4676         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4677         * kern/powerpc/ieee1275/startup.S: ... this.
4678         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4679         * DISTLIST: Likewise.
4681         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4682         grub/cpu/kernel.h.  Add start label for consistency with other
4683         platforms.  Add grub_prefix immediately after start.  Add jump
4684         to the code after grub_prefix.
4685         * include/grub/powerpc/kernel.h: Provide valid values for
4686         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4688 2008-08-29  Bean  <bean123ch@gmail.com>
4690         * configure.ac: Change host_os to cygwin for mingw.
4691         (asprintf): New check for function.
4693         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4694         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4696         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4697         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4698         sync, sleep and grub_util_get_disk_size for mingw.
4700         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4701         to get size in mingw.
4702         (open_device): Use flag O_BINARY if it's defined.
4703         (find_root_device): Add dummy code for mingw.
4705         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4706         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4707         (get_scsi_disk_name): Return 0 for mingw.
4709         * util/hostfs.c: #include <grub/util/misc.h>.
4710         (grub_hostfs_open): Use "rb" flag to open file, use
4711         grub_util_get_disk_size to get disk size for mingw.
4713         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4714         (asprintf): New function if HAVE_ASPRINTF is not set.
4715         (sync): New function for mingw.
4716         (sleep): Likewise.
4717         (grub_util_get_disk_size): Likewise.
4719 2008-08-28  Pavel Roskin  <proski@gnu.org>
4721         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4722         kern/time.c.
4724 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4726         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4728 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4730         Change find_grub_drive() syntax so it doesn't prevent it from
4731         detecting NULL names as errors.
4733         * util/biosdisk.c (find_grub_drive): Move free slot search code
4734         from here ...
4735         (find_free_slot): ... to here.
4736         (read_device_map): Use find_free_slot() to search for free slots.
4738 2008-08-27  Marco Gerards  <marco@gnu.org>
4740         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4741         (scsi_mod_SOURCES): New variable.
4742         (scsi_mod_CFLAGS): Likewise
4743         (scsi_mod_LDFLAGS): Likewise.
4745         * disk/scsi.c: New file.
4747         * include/grub/scsi.h: Likewise.
4749         * include/grub/scsicmd.h: Likewise.
4751         * disk/ata.c: Include <grub/scsi.h>.
4752         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4753         instead.
4754         (grub_ata_iterate): Skip ATAPI devices.
4755         (grub_ata_open): Only handle ATAPI devices.
4756         (struct grub_atapi_read): Removed.
4757         (grub_atapi_readsector): Likewise.
4758         (grub_ata_read): No longer handle ATAPI devices.
4759         (grub_ata_write): Likewise.
4760         (grub_atapi_iterate): New function.
4761         (grub_atapi_read): Likewise.
4762         (grub_atapi_write): Likewise.
4763         (grub_atapi_open): Likewise.
4764         (grub_atapi_close): Likewise.
4765         (grub_atapi_dev): New variable.
4766         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4767         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4769         * include/grub/disk.h (enum grub_disk_dev_id): Add
4770         `GRUB_DISK_DEVICE_SCSI_ID'.
4772 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4774         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4775         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4776         descriptive.
4778 2008-08-23  Bean  <bean123ch@gmail.com>
4780         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4781         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4782         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4783         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4784         dm_nv.mod.
4785         (raid5rec_mod_SOURCES): New macro.
4786         (raid5rec_mod_CFLAGS): Likewise.
4787         (raid5rec_mod_LDFLAGS): Likewise.
4788         (raid6rec_mod_SOURCES): Likewise.
4789         (raid6rec_mod_CFLAGS): Likewise.
4790         (raid6rec_mod_LDFLAGS): Likewise.
4791         (mdraid_mod_SOURCES): Likewise.
4792         (mdraid_mod_CFLAGS): Likewise.
4793         (mdraid_mod_LDFLAGS): Likewise.
4794         (dm_nv_mod_SOURCES): Likewise.
4795         (dm_nv_mod_CFLAGS): Likewise.
4796         (dm_nv_mod_LDFLAGS): Likewise.
4798         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4799         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4800         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4802         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4803         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4805         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4807         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4809         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4811         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4813         * disk/raid5_recover.c: New file.
4815         * disk/raid6_recover.c: Likewise.
4817         * disk/mdraid_linux.c: Likewise.
4819         * disk/dmraid_nvidia.c: Likewise.
4821         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4822         ULONG_MAX.
4824         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4825         calculate the size of raid device.
4826         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4827         different layout of raid5.
4828         (grub_raid_scan_device): Remove code specific to mdraid.
4829         (grub_raid_list): New variable.
4830         (free_array): New function.
4831         (grub_raid_register): Likewise.
4832         (grub_raid_unregister): Likewise.
4833         (grub_raid_rescan): Likewise.
4834         (GRUB_MOD_INIT): Don't iterate device here.
4835         (GRUB_MOD_FINI): Use free_array to release resource.
4837         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4838         (grub_raid5_recover_func_t): New function variable type.
4839         (grub_raid6_recover_func_t): Likewise.
4840         (grub_raid5_recover_func): New variable.
4841         (grub_raid6_recover_func): Likewise.
4842         (grub_raid_register): New function.
4843         (grub_raid_unregister): Likewise.
4844         (grub_raid_rescan): Likewise.
4845         (grub_raid_block_xor): Likewise.
4847         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4848         (CMD_CRC): New macro.
4849         (part): Removed.
4850         (read_file): Handle device as well as file.
4851         (cmd_crc): New function.
4852         (fstest): Handle multiple disks.
4853         (options): Remove part, raw and long, add root and diskcount.
4854         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4855         (main): Find the first non option entry and ignore subsequent options,
4856         add handling for the new options, support multiple disks.
4858         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4860 2008-08-23  Bean  <bean123ch@gmail.com>
4862         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4864         * genfslist.sh: Ignore kernel.mod.
4866         * genpartmaplist.sh: Likewise.
4868 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4870         * util/getroot.c (find_root_device): Skip anything that starts with
4871         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4873 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4875         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4876         * util/grub.d/00_header.in: Allow the administrator to change default
4877         gfxmode via ${GRUB_GFXMODE}.
4879 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4881         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4883 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4885         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4886         loader.
4887         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4888         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4890 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4892         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4893         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4895 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4897         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4898         (struct grub_virtual_screen): Remove `cursor_color'.
4899         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4900         initialization.
4901         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4903 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4905         Unify (identical) linux_normal.c files.
4906         * loader/i386/efi/linux_normal.c: Move from here ...
4907         * loader/linux_normal.c: ... to here.  Update all users.
4908         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4909         * loader/i386/ieee1275/linux_normal.c: Likewise.
4911 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4913         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4914         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
4915         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
4916         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
4917         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
4918         New macros.
4919         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
4920         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
4921         (GRUB_LINUX_CL_END_OFFSET): ... to here.
4922         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
4923         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
4924         (GRUB_EFI_CL_END_OFFSET): Rename to ...
4925         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
4926         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
4927         Initialize `params->video_cursor_x' and `params->video_cursor_y'
4928         portably using grub_getxy().
4929         Replace `-EFI' with `-bzImage' in boot message.
4931 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4933         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
4935 2008-08-17  Robert Millan  <rmh@aybabtu.com>
4937         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
4939         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
4940         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
4941         (grub_machine_mmap_iterate): New function declaration.
4942         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
4943         structure.
4944         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
4945         macros.
4947         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
4948         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
4949         Move e820 parsing from here ...
4950         * kern/i386/pc/mmap.c: New file.
4951         (grub_machine_mmap_iterate): ... to here.
4953         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
4954         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
4955         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
4956         (grub_available_iterate): Redeclare to return `void', and redeclare
4957         its hook to use grub_uint64_t as addr and size parameters, and rename
4958         to ...
4959         (grub_machine_mmap_iterate): ... this.  Update all users.
4961         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
4962         to make it more readable.  Rename to ...
4963         (grub_machine_mmap_iterate): ... this.
4965         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
4966         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
4967         (grub_multiboot): Allocate an extra region after the payload, and fill
4968         it with a Multiboot memory map.  Adjust a.out loader to calculate size
4969         with the extra space.
4970         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
4971         with the extra space.
4973 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
4975         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
4977 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
4979         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
4980         mdate-sh to the list `find' searches for.
4981         * DISTLIST: Regenerated.
4983 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
4985         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
4986         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
4987         genmoddep.awk, gensymlist.sh.in.
4988         (DISTDIRS): Add bus, docs, hook, lib.
4989         * DISTLIST: Regenerated.
4990         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
4992 2008-08-16  Robert Millan  <rmh@aybabtu.com>
4994         * disk/raid.c (grub_raid_init): Handle/report errors set by
4995         grub_device_iterate().
4996         * disk/lvm.c (grub_lvm_init): Likewise.
4998 2008-08-15  Bean  <bean123ch@gmail.com>
5000         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5001         and datehook.mod.
5002         (datetime_mod_SOURCES): New macro.
5003         (datetime_mod_CFLAGS): Likewise.
5004         (datetime_mod_LDFLAGS): Likewise.
5005         (date_mod_SOURCES): Likewise.
5006         (date_mod_CFLAGS): Likewise.
5007         (date_mod_LDFLAGS): Likewise.
5008         (datehook_mod_SOURCES): Likewise.
5009         (datehook_mod_CFLAGS): Likewise.
5010         (datehook_mod_LDFLAGS): Likewise.
5012         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5013         and datehook.mod.
5014         (datetime_mod_SOURCES): New macro.
5015         (datetime_mod_CFLAGS): Likewise.
5016         (datetime_mod_LDFLAGS): Likewise.
5017         (date_mod_SOURCES): Likewise.
5018         (date_mod_CFLAGS): Likewise.
5019         (date_mod_LDFLAGS): Likewise.
5020         (datehook_mod_SOURCES): Likewise.
5021         (datehook_mod_CFLAGS): Likewise.
5022         (datehook_mod_LDFLAGS): Likewise.
5024         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5025         and datehook.mod.
5026         (datetime_mod_SOURCES): New macro.
5027         (datetime_mod_CFLAGS): Likewise.
5028         (datetime_mod_LDFLAGS): Likewise.
5029         (date_mod_SOURCES): Likewise.
5030         (date_mod_CFLAGS): Likewise.
5031         (date_mod_LDFLAGS): Likewise.
5032         (datehook_mod_SOURCES): Likewise.
5033         (datehook_mod_CFLAGS): Likewise.
5034         (datehook_mod_LDFLAGS): Likewise.
5036         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5037         and datehook.mod.
5038         (datetime_mod_SOURCES): New macro.
5039         (datetime_mod_CFLAGS): Likewise.
5040         (datetime_mod_LDFLAGS): Likewise.
5041         (date_mod_SOURCES): Likewise.
5042         (date_mod_CFLAGS): Likewise.
5043         (date_mod_LDFLAGS): Likewise.
5044         (datehook_mod_SOURCES): Likewise.
5045         (datehook_mod_CFLAGS): Likewise.
5046         (datehook_mod_LDFLAGS): Likewise.
5048         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5049         and datehook.mod.
5050         (datetime_mod_SOURCES): New macro.
5051         (datetime_mod_CFLAGS): Likewise.
5052         (datetime_mod_LDFLAGS): Likewise.
5053         (date_mod_SOURCES): Likewise.
5054         (date_mod_CFLAGS): Likewise.
5055         (date_mod_LDFLAGS): Likewise.
5056         (datehook_mod_SOURCES): Likewise.
5057         (datehook_mod_CFLAGS): Likewise.
5058         (datehook_mod_LDFLAGS): Likewise.
5060         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5062         * commands/date.c: New file.
5064         * hook/datehook.c: Likewise.
5066         * include/grub/lib/datetime.h: Likewise.
5068         * include/grub/i386/cmos.h: Likewise.
5070         * lib/datetime.c: Likewise.
5072         * lib/i386/datetime.c: Likewise.
5074         * lib/efi/datetime.c: Likewise.
5076 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5078         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5079         (grub_mkelfimage_SOURCES): New variable.
5080         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5082         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5083         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5084         * conf/powerpc-ieee1275.rmk: Likewise.
5085         * conf/i386-ieee1275.rmk: Likewise.
5087         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5088         * kern/i386/coreboot/init.c: Likewise.
5090         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5091         with `<grub/cpu/kernel.h>'.
5092         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5093         to ...
5094         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5095         * kern/i386/coreboot/startup.S: Likewise.
5097         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5098         (GRUB_MOD_GAP): Remove.
5099         * include/grub/powerpc/kernel.h: New file.
5100         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5101         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5102         * include/grub/i386/kernel.h: New file.
5103         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5104         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5105         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5107         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5108         `grub-mkelfimage'.
5109         Use --directory when invoking grub_mkimage.
5111         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5112         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5113         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5114         and GRUB_KERNEL_CPU_PREFIX.
5116 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5118         * include/grub/err.h (grub_err_printf): New function prototype.
5119         * util/misc.c (grub_err_printf): New function.
5120         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5121         grub_printf.
5122         * kern/err.c (grub_print_error): Use grub_err_printf.
5124 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5126         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5128 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5130         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5131         boot entry.
5133 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5135         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5136         of the relocation code from here ...
5137         (grub_multiboot): ... to here.
5138         (forward_relocator, backward_relocator): Move from here ...
5139         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5140         (grub_multiboot_backward_relocator): ... to here.
5141         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5142         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5143         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5144         (grub_multiboot_forward_relocator_end)
5145         (grub_multiboot_backward_relocator)
5146         (grub_multiboot_backward_relocator_end): New variables.
5148 2008-08-12  Bean  <bean123ch@gmail.com>
5150         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5152 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5154         * kern/i386/linuxbios/startup.S: Move from here ...
5155         * kern/i386/coreboot/startup.S: ... to here.
5157         * kern/i386/linuxbios/init.c: Move from here ...
5158         * kern/i386/coreboot/init.c: ... to here.
5160         * kern/i386/linuxbios/table.c: Move from here ...
5161         * kern/i386/coreboot/mmap.c: ... to here.
5163         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5165 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5167         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5168         errors.  Leave it to the upper layer to handle them.
5170 2008-08-09  Christian Franke  <franke@computer.org>
5172         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5173         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5174         Install `grub.d/10_windows' only on Cygwin.
5175         * configure.ac: Add subst of `target_os'.
5176         Check `target_os' also before setting TARGET_OBJ2ELF.
5177         Add `--enable-grub-pe2elf'.
5179 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5181         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5182         (grub_last_time): Change type to grub_uint64_t.
5183         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5184         (grub_disk_close): Likewise.
5186         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5187         (run_menu): Migrate code from to using grub_get_time_ms().
5189         * util/misc.c (grub_get_time_ms): New function.
5191 2008-08-08  Marco Gerards  <marco@gnu.org>
5193         * disk/ata.c (grub_ata_regget): Change return type to
5194         `grub_uint8_t'.
5195         (grub_ata_regget2): Likewise.
5196         (grub_ata_wait_status): New function.
5197         (grub_ata_wait_busy): Removed function, updated all users to use
5198         `grub_ata_wait_status'.
5199         (grub_ata_wait_drq): Likewise.
5200         (grub_ata_cmd): New function.
5201         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5202         error handling.
5203         (grub_ata_pio_write): Add error handling.
5204         (grub_atapi_identify): Likewise.
5205         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5206         handling.
5207         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5208         handling.  Actually use the detected registers.  Reorder the
5209         detection logic such that it is easier to read.
5210         (grub_ata_pciinit): Do not assign the same ID to each controller.
5211         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5212         handling.
5213         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5215         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5217 2008-08-08  Marco Gerards  <marco@gnu.org>
5219         * NEWS: Update.
5221 2008-08-07  Bean  <bean123ch@gmail.com>
5223         * include/grub/x86_64/pci.h: New file.
5225 2008-08-07  Christian Franke  <franke@computer.org>
5227         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5228         (TIMER2_GATE): Likewise.
5229         (grub_pit_wait): Add enable/disable of the timer2 gate
5230         bit of port 0x61.  This fixes a possible infinite loop.
5232 2008-08-07  Bean  <bean123ch@gmail.com>
5234         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5235         kern/i386/tsc.c and kern/i386/pit.c.
5237         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5238         x86_64 platform.
5240         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5241         <grub/i386/tsc.h>.
5243         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5245 2008-08-07  Bean  <bean123ch@gmail.com>
5247         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5249         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5251         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5252         multiple inclusion. Add #include <grub/types.h>.
5254 2008-08-06  Christian Franke  <franke@computer.org>
5256         * conf/common.rmk: Build and install `10_windows'.
5257         * util/grub.d/10_windows.in: New script.
5259 2008-08-06  Pavel Roskin  <proski@gnu.org>
5261         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5263 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5265         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5266         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5268 2008-08-06  Bean  <bean123ch@gmail.com>
5270         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5271         (grub_pxefs_fs_int): Remove dummy definition.
5272         (grub_pxefs_open): Use data->block_size to store the current block
5273         size setting.
5274         (grub_pxefs_read): Use block size stored in data->block_size. As the
5275         value of grub_pxe_blksize can be changed after the file is opened.
5277 2008-08-06  Bean  <bean123ch@gmail.com>
5279         * fs/i386/pc/pxe.c (curr_file): new variable.
5280         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5281         require the dummy internal file system anymore.
5282         (grub_pxefs_read): Removed.
5283         (grub_pxefs_close): Likewise.
5284         (grub_pxefs_fs_int): Likewise.
5285         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5286         connection when we switch file.
5287         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5289 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5291         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5292         `halt.mod'.
5293         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5294         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5296         * kern/i386/halt.c: New file.
5297         * kern/i386/reboot.c: Likewise.
5298         * include/grub/i386/reboot.h: Likewise.
5299         * include/grub/i386/halt.h: Likewise.
5301         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5302         Include `<grub/cpu/halt.h>'.
5303         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5304         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5306         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5307         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5308         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5309         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5310         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5311         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5312         from here ...
5313         * include/grub/i386/at_keyboard.h: ... to here.
5315 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5317         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5318         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5319         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5320         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5321         `kern/generic/millisleep.c'.
5323         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5324         instead of grub_get_rtc().
5325         (grub_tsc_init): Initialize `tsc_boot_time'.
5327         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5328         (grub_machine_init): Use grub_tsc_init() rather than
5329         installing an RTC-based handler via grub_install_get_time_ms().
5331         * kern/i386/pit.c: New file.
5332         * include/grub/i386/pit.h: Likewise.
5334 2008-08-05  Bean  <bean123ch@gmail.com>
5336         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5338         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5339         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5340         (pxe_mod_SOURCES): New macro.
5341         (pxe_mod_CFLAGS): Likewise.
5342         (pxe_mod_LDFLAGS): Likewise.
5343         (pxecmd_mod_SOURCES): Likewise.
5344         (pxecmd_mod_CFLAGS): Likewise.
5345         (pxecmd_mod_LDFLAGS): Likewise.
5347         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5348         (grub_pxe_call): Likewise.
5350         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5352         * commands/i386/pc/pxecmd.c: New file.
5354         * fs/i386/pc/pxe.c: Likewise.
5356         * include/grub/i386/pc/pxe.h: Likewise.
5358 2008-08-05  Bean  <bean123ch@gmail.com>
5360         * util/console.c (grub_console_cur_color): New variable.
5361         (grub_console_standard_color): Likewise.
5362         (grub_console_normal_color): Likewise.
5363         (grub_console_highlight_color): Likewise.
5364         (color_map): Likewise.
5365         (use_color): Likewise.
5366         (NUM_COLORS): New macro.
5367         (grub_ncurses_setcolorstate): Handle color properly.
5368         (grub_ncurses_setcolor): Don't change color here, just remember the
5369         settings, color will be set in grub_ncurses_setcolorstate.
5370         (grub_ncurses_getcolor): New function.
5371         (grub_ncurses_init): Initialize color pairs.
5372         (grub_ncurses_term): New member grub_ncurses_getcolor.
5374 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5376         High resolution timer support.  Implemented for x86 CPUs using TSC.
5377         Extracted generic grub_millisleep() so it's linked in only as needed.
5378         This requires a Pentium compatible CPU; if the RDTSC instruction is
5379         not supported, then it falls back on the generic grub_get_time_ms()
5380         implementation that uses the machine's RTC.
5382         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5383         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5384         `kern/generic/millisleep.c'.
5386         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5387         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5389         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5390         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5392         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5394         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5395         `kern/generic/millisleep.c'.
5397         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5399         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5401         * kern/generic/rtc_get_time_ms.c: New file.
5403         * kern/generic/millisleep.c: New file.
5405         * kern/misc.c: Don't include
5406         <kern/time.h> anymore.
5407         (grub_millisleep_generic): Removed.
5409         * commands/sleep.c (grub_interruptible_millisleep): Uses
5410         grub_get_time_ms() instead of grub_get_rtc().
5412         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5413         function.
5414         (grub_cpu_is_cpuid_supported): New inline function.
5415         (grub_cpu_is_tsc_supported): New inline function.
5416         (grub_tsc_init): New function prototype.
5417         (grub_tsc_get_time_ms): New function prototype.
5419         * kern/i386/tsc.c (grub_get_time_ms): New file.
5421         * include/grub/time.h: Include <grub/types.h.
5422         (grub_millisleep_generic): Removed.
5423         (grub_get_time_ms): New prototype.
5424         (grub_install_get_time_ms): New prototype.
5425         (grub_rtc_get_time_ms): New prototype.
5427         * kern/time.c (grub_get_time_ms): New function.
5428         (grub_install_get_time_ms): New function.
5430         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5431         <grub/time.h> anymore.
5432         (grub_millisleep): Removed.
5433         (grub_machine_init): Call grub_tsc_init.
5435         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5436         get_time_ms() implementation.
5438         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5439         (ieee1275_get_time_ms): New function.
5440         (grub_machine_init): Install get_time_ms() implementation.
5442         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5443         (grub_machine_init): Call grub_tsc_init().
5444         (grub_millisleep): Removed.
5446         * kern/ieee1275/init.c (grub_millisleep): Removed.
5447         (grub_machine_init): Install ieee1275_get_time_ms()
5448         implementation.
5449         (ieee1275_get_time_ms): New function.
5450         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5451         real work.
5453 2008-08-05  Marco Gerards  <marco@gnu.org>
5455         * disk/ata.c: Include <grub/pci.h>.
5456         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5457         (grub_ata_initialize): Rewritten.
5458         (grub_ata_device_initialize): New function.
5460 2008-08-04  Pavel Roskin  <proski@gnu.org>
5462         * kern/main.c: Include grub/mm.h.
5464 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5466         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5467         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5468         corruption problem).
5470 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5472         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5473         warnings introduced in my last commit.
5475 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5477         Make PCI available on all i386 architectures.
5479         * include/grub/i386/pc/pci.h: Move from here ...
5480         * include/grub/i386/pci.h: ... to here.
5482         * include/grub/i386/pc/pci.h: Remove.
5483         * include/grub/i386/efi/pci.h: Remove.
5484         * include/grub/x86_64/efi/pci.h: Remove.
5486         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5487         `<grub/cpu/pci.h>'.
5489         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5490         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5491         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5493         * conf/i386-ieee1275.rmk: Likewise.
5495 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5497         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5498         (grub_console_setcursor): Make it possible to set cursor off.
5500 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5502         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5503         of modules instead of assuming which platform provides what.
5504         * util/update-grub.in: Likewise.
5506 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5508         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5509         instead of `grub_install_dos_part' to determine whether a drive needs
5510         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5511         because it can be overridden when loading GRUB via Multiboot).
5513 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5515         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5517 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5519         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5520         of informational grub_dprintf() calls.
5522 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5524         * disk/memdisk.c (memdisk_size): Don't initialize.
5525         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5527         * include/grub/i386/pc/kernel.h
5528         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5529         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5530         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5531         (grub_arch_memdisk_size): Remove.
5533         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5534         field (was only used to transfer a constant).  Add `type' field to
5535         support multiple module types.
5536         (grub_module_iterate): New function.
5538         * kern/device.c (grub_device_open): Do not hide error messages
5539         when grub_disk_open() fails.  Use grub_print_error() instead.
5541         * kern/i386/pc/init.c (grub_arch_modules_addr)
5542         (grub_arch_memdisk_size): Remove functions.
5543         (grub_arch_modules_addr): Return the module address in high memory
5544         (now that it isn't copied anymore).
5546         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5547         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5548         decompression routine (grub_total_module_size already includes that
5549         now).  Don't copy modules back to low memory.
5551         * kern/main.c: Include `<grub/mm.h>'.
5552         (grub_load_modules): Split out (and use) ...
5553         (grub_module_iterate): ... this function, which iterates through
5554         module objects and runs a hook.
5555         Comment out grub_mm_init_region() call, as it would cause non-ELF
5556         modules to be overwritten.
5558         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5559         the memdisk image in its own region, make it part of the module list.
5560         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5561         (main): Parse --memdisk|-m option, and pass user-provided path as
5562         parameter to generate_image().
5563         (add_segments): Pass `memdisk_path' down to load_modules().
5564         (load_modules): Embed memdisk image in module section when requested.
5565         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5566         `header.type' instead of `header.offset'.
5568         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5569         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5570         (memdisk_mod_LDFLAGS): New variables.
5571         * conf/i386-coreboot.rmk: Likewise.
5572         * conf/i386-ieee1275.rmk: Likewise.
5574 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5576         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5577         (backward_relocator): New variables.  Used to allocate and relocate
5578         the payload, respectively.
5579         (grub_multiboot_load_elf32): Load into heap instead of requested
5580         address, install the appropriate relocator code in each bound of
5581         the payload, and set the entry point such that
5582         grub_multiboot_real_boot() will jump to one of them.
5584         * kern/i386/loader.S (grub_multiboot_payload_size)
5585         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5586         (grub_multiboot_payload_entry_offset): New variables.
5587         (grub_multiboot_real_boot): Set cpu context to what the relocator
5588         expects, and jump to the relocator instead of the payload.
5590         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5591         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5592         (grub_multiboot_payload_entry_offset): Export.
5594 2008-08-01  Bean  <bean123ch@gmail.com>
5596         * normal/menu_entry.c (editor_getline): Don't return the original
5597         string as result, as it will be released by lexer once it has done
5598         using it.
5600 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5602         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5603         within menuentries, not before them.
5604         util/grub.d/10_hurd.in: Likewise.
5606 2008-08-01  Bean  <bean123ch@gmail.com>
5608         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5609         (bufio_mod_SOURCES): New macro.
5610         (bufio_mod_CFLAGS): Likewise.
5611         (bufio_mod_LDFLAGS): Likewise.
5613         * include/grub/bufio.h: New file.
5615         * io/bufio.c: Likewise.
5617         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5618         (grub_video_reader_png): Use grub_buffile_open to open file.
5620         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5621         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5623         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5624         (grub_video_reader_tga): Use grub_buffile_open to open file.
5626         * font/manager.c: Include <grub/bufio.h>.
5627         (add_font): Use grub_buffile_open to open file.
5629 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5631         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5632         ELF segments, use a macro for arbitrarily accessing any of them instead
5633         of preparing a pointer that allows access to one at a time.
5634         (grub_multiboot_load_elf64): Likewise.
5636 2008-07-31  Bean  <bean123ch@gmail.com>
5638         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5639         GRUB_KERNEL_MACHINE_DATA_END.
5641 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5643         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5644         Increase from 0x50 to 0x60.
5645         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5646         use UUIDs to identify the root drive for them.  If that's not
5647         possible, abort.
5648         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5649         check, for cross-disk installs.
5651 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5653         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5654         is non-empty, use it to set the `prefix' environment variable instead
5655         of the usual approach.
5656         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5657         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5658         environment variable instead of dummy make_install_device().
5660         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5661         (start): Insert a data section, with `grub_prefix' variable.
5662         * kern/i386/linuxbios/startup.S: Likewise.
5664         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5665         New variable reference.
5666         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5667         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5668         to `start').
5669         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5670         section within startup.S (relative to `start').
5671         * include/grub/i386/coreboot/kernel.h: Likewise.
5673         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5674         Overwrite grub_prefix with its contents, at the beginning of the
5675         first segment.
5676         (main): Understand -p|--prefix.
5678 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5680         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5682 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5684         * term/i386/pc/vga_text.c (grub_console_cls): Use
5685         grub_console_gotoxy() to go back to beginning of the screen.
5686         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5688 2008-07-29  Christian Franke  <franke@computer.org>
5690         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5691         Add conversion of emulated mount points on Cygwin.
5693 2008-07-29  Christian Franke  <franke@computer.org>
5695         * util/update-grub.in: Add a check for admin
5696         group on Cygwin.
5697         Remove old `grub.cfg.new' before creation.
5698         Add `-f' to `mv' to handle the different filesystem
5699         semantics of Windows.
5701 2008-07-29  Bean  <bean123ch@gmail.com>
5703         * normal/main.c (get_line): Fix buffer overflow bug.
5705 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5707         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5708         (struct grub_apple_header): New struct.  Describes the layout of
5709         the partmap header.
5710         (apple_partition_map_iterate): Check the header magic as well as the
5711         partition magic (which was already being checked).
5713 2008-07-28  Pavel Roskin  <proski@gnu.org>
5715         * genmk.rb: Add a warning to the beginning of the output that
5716         it's a generated file and should not be edited.
5718 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5720         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5721         with the same number are found, just use issue a warning with
5722         grub_dprintf(), as this error has been reported to be non-fatal.
5724 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5726         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5727         information.
5729 2008-07-27  Bean  <bean123ch@gmail.com>
5731         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5732         (grub_fat_find_dir): Ignore case when comparing filename.
5734 2008-07-27  Bean  <bean123ch@gmail.com>
5736         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5737         smallino, as it's more descriptive, and i8count can be confused with
5738         the other field count.
5739         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5740         inode type.
5742 2008-07-27  Bean  <bean123ch@gmail.com>
5744         * commands/crc.c: New file.
5746         * lib/crc.c: Likewise.
5748         * include/grub/lib/crc.h: Likewise.
5750         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5752         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5753         (hexdump): Move this function to ...
5755         * lib/hexdump.c: ... here.
5757         * include/grub/hexdump.h: Renamed to ...
5759         * include/grub/lib/hexdump.h: ... this.
5761         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5763         * util/grub-editenv.c: Likewise.
5765         * include/envblk.h: Renamed to ...
5767         * include/lib/envblk.h: ... this.
5769         * util/envblk.c: Renamed to ...
5771         * lib/envblk.c: ... this.
5773         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5774         lib/hexdump.c.
5775         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5776         (pkglib_MODULES): Add crc.mod.
5777         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5778         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5779         (crc_mod_SOURCES): New macro.
5780         (crc_mod_CFLAGS): Likewise.
5781         (crc_mod_LDFLAGS): Likewise.
5783         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5785         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5787         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5789         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5791         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5793 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5795         * commands/help.c: Include <grub/term.h>.
5796         (TERM_WIDTH): Removed.  Updated all users.
5798 2008-07-27  Pavel Roskin  <proski@gnu.org>
5800         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5801         spurious warnings about a comment within a comment.
5803 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5805         * util/getroot.c (find_root_device): Skip devices that match
5806         /dev/dm-[0-9].  This lets the real device be found for any type of
5807         abstraction (LVM, EVMS, RAID..).
5808         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5809         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5810         device is found first, find_root_device() will now skip it.
5812 2008-07-24  Pavel Roskin  <proski@gnu.org>
5814         * include/grub/types.h: Use __builtin_bswap32() and
5815         __builtin_bswap64() with gcc 4.3 and newer.
5817 2008-07-24  Christian Franke  <franke@computer.org>
5819         * util/i386/pc/grub-install.in: If `--debug' is specified,
5820         pass `--verbose' to grub-setup.
5821         Abort script if make_system_path_relative_to_its_root() fails.
5823 2008-07-24  Bean  <bean123ch@gmail.com>
5825         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5826         variable `target_platform' should be `platform'.
5828 2008-07-24  Bean  <bean123ch@gmail.com>
5830         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5831         (grub_png_init_fixed_block): New function.
5832         (grub_png_decode_image_data): Handle fixed huffman code compression.
5834 2008-07-24  Bean  <bean123ch@gmail.com>
5836         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5837         (grub_pe2elf_SOURCES): New macro.
5838         (CLEANFILES): Add grub-pe2elf.
5840         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5841         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5842         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5843         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5844         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5845         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5846         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5847         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5848         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5849         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5850         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5851         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5852         (GRUB_PE32_DT_FUNCTION): Likewise.
5853         (GRUB_PE32_REL_I386_DIR32): Likewise.
5854         (GRUB_PE32_REL_I386_REL32): Likewise.
5855         (grub_pe32_symbol): New structure.
5856         (grub_pe32_reloc): Likewise.
5858         * util/grub-pe2elf.c: New file.
5860         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5861         start symbol in non pc platform.
5863         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5865         The following patches are from Christian Franke.
5867         * include/grub/dl.h: Remove .previous, gas supports this only
5868         for ELF format.
5870         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5871         Remove .type, gas supports this only for ELF format.
5873         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5874         nullbytes in symbol table. This fixes an infinite loop if table is
5875         zero filled.
5877         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5878         TARGET_IMG_LDFLAGS and EXEEXT.
5880         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5881         TARGET_IMG_LDFLAGS_AC.
5882         (grub_CHECK_STACK_ARG_PROBE): New function.
5884         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5886         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5888         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5889         to set TARGET_IMG_LD* accordingly.
5890         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5891         Add call to grub_CHECK_STACK_ARG_PROBE.
5892         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5894         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5896         * genmk.rb: Add EXEEXT to CLEANFILES.
5898 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5900         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5901         define the codes for arrows and lines used for the menu).
5902         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5903         as well.
5905         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5906         fonts, because the latter are too slow.
5908 2008-07-21  Bean  <bean123ch@gmail.com>
5910         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5911         a20. Run keyboard test last, as it will cause macbook to halt.
5913 2008-07-18  Pavel Roskin  <proski@gnu.org>
5915         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
5916         load foreign architecture modules correctly anyway.  Keep
5917         support for loading host architecture modules, whether we
5918         compile them or not.
5920 2008-07-17  Pavel Roskin  <proski@gnu.org>
5922         * configure.ac: Use -m32 or -m64 regardless of whether we had to
5923         change target_cpu.  The compiler default can mismatch target_cpu
5924         in any case.
5926         * disk/efi/efidisk.c: Fix format warnings on x86_64.
5927         * kern/efi/efi.c: Likewise.
5929         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
5930         target compiler is functional.
5931         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
5932         are set up.
5934         * configure.ac: Default to efi platform for x86_64-apple.  Allow
5935         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
5936         adjustments from the rest, only do them if target is not
5937         explicitly given.  Merge other adjustments with the final sanity
5938         check.  Remove an extraneous check for supported CPU.  Be
5939         specific which CPU and which platform is not supported.
5941         * configure.ac: Default to pc platform for x86_64.
5943 2008-07-17  Robert Millan  <rmh@aybabtu.com>
5945         Partial LinuxBIOS -> Coreboot rename.
5947         * conf/i386-linuxbios.rmk: Renamed to ...
5948         * conf/i386-coreboot.rmk: ... this.
5949         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
5950         * configure.ac: Accept "coreboot" as input platform (but maintain
5951         compatibility with "linuxbios").
5952         * include/grub/i386/linuxbios: Renamed to ...
5953         * include/grub/i386/coreboot: ... this.
5955 2008-07-17  Bean  <bean123ch@gmail.com>
5957         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
5958         (appleldr_mod_SOURCE): New variable.
5959         (appleldr_mod_CFLAGS): Likewise.
5960         (appleldr_mod_LDFLAGS): Likewise.
5961         (pci_mod_SOURCES): Likewise.
5962         (pci_mod_CFLAGS): Likewise.
5963         (pci_mod_LDFLAGS): Likewise.
5964         (lspci_mod_SOURCES): Likewise.
5965         (lspci_mod_CFLAGS): Likewise.
5966         (lspci_mod_LDFLAGS): Likewise.
5968         * conf/x86_64-efi.rmk: New file.
5970         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
5971         macro.
5972         (grub_efidisk_write): Likewise.
5974         * include/efi/api.h (efi_call_0): New macro.
5975         (efi_call_1): Likewise.
5976         (efi_call_2): Likewise.
5977         (efi_call_3): Likewise.
5978         (efi_call_4): Likewise.
5979         (efi_call_5): Likewise.
5980         (efi_call_6): Likewise.
5982         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
5983         grub_rescue_cmd_chainloader.
5985         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
5986         (grub_pe32_optional_header): Change some fields based on i386 or
5987         x86_64 platform.
5988         (GRUB_PE32_PE32_MAGIC): Likewise.
5990         * include/grub/efi/uga_draw.h: New file.
5992         * include/grub/elf.h (STN_ABS): New constant.
5993         (R_X86_64_NONE): Relocation constant for x86_64.
5994         (R_X86_64_64): Likewise.
5995         (R_X86_64_PC32): Likewise.
5996         (R_X86_64_GOT32): Likewise.
5997         (R_X86_64_PLT32): Likewise.
5998         (R_X86_64_COPY): Likewise.
5999         (R_X86_64_GLOB_DAT): Likewise.
6000         (R_X86_64_JUMP_SLOT): Likewise.
6001         (R_X86_64_RELATIVE): Likewise.
6002         (R_X86_64_GOTPCREL): Likewise.
6003         (R_X86_64_32): Likewise.
6004         (R_X86_64_32S): Likewise.
6005         (R_X86_64_16): Likewise.
6006         (R_X86_64_PC16): Likewise.
6007         (R_X86_64_8): Likewise.
6008         (R_X86_64_PC8): Likewise.
6010         * include/grub/i386/efi/pci.h: New file.
6012         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6013         Change it value based on platform.
6014         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6015         (GRUB_E820_RAM): Likewise.
6016         (GRUB_E820_RESERVED): Likewise.
6017         (GRUB_E820_ACPI): Likewise.
6018         (GRUB_E820_NVS): Likewise.
6019         (GRUB_E820_EXEC_CODE): Likewise.
6020         (GRUB_E820_MAX_ENTRY): Likewise.
6021         (grub_e820_mmap): New structure.
6022         (linux_kernel_header): Change the efi field according to different
6023         kernel version, also field from linux_kernel_header.
6025         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6027         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6028         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6029         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6030         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6031         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6032         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6033         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6034         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6035         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6036         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6038         * include/grub/x86_64/efi/kernel.h: New file.
6040         * include/grub/x86_64/efi/loader.h: Likewise.
6042         * include/grub/x86_64/efi/machine.h: Likewise.
6044         * include/grub/x86_64/efi/pci.h: Likewise.
6046         * include/grub/x86_64/efi/time.h: Likewise.
6048         * include/grub/x86_64/linux.h: Likewise.
6050         * include/grub/x86_64/setjmp.h: Likewise.
6052         * include/grub/x86_64/time.h: Likewise.
6054         * include/grub/x86_64/types.h: Likewise.
6056         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6057          GRUB_TARGET_SIZEOF_VOID_P.
6059         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6060         (grub_efi_locate_handle): Likewise.
6061         (grub_efi_open_protocol): Likewise.
6062         (grub_efi_set_text_mode): Likewise.
6063         (grub_efi_stall): Likewise.
6064         (grub_exit): Likewise.
6065         (grub_reboot): Likewise.
6066         (grub_halt): Likewise.
6067         (grub_efi_exit_boot_services): Likewise.
6068         (grub_get_rtc): Likewise.
6070         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6071         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6072         (grub_efi_allocate_pages): Wrap efi calls.
6073         (grub_efi_free_pages): Wrap efi calls.
6074         (grub_efi_get_memory_map): Wrap efi calls.
6076         * kern/x86_64/dl.c: New file.
6078         * kern/x86_64/efi/callwrap.S: Likewise.
6080         * kern/x86_64/efi/startup.S: Likewise.
6082         * loader/efi/appleloader.c: Likewise.
6084         * loader/efi/chainloader.c (cmdline): New variable.
6085         (grub_chainloader_unload): Wrap efi calls.
6086         (grub_chainloader_boot): Likewise.
6087         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6088         command line.
6090         * loader/efi/chainloader_normal.c (chainloader_command):
6091         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6092         command line.
6094         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6095         method.
6096         (grub_e820_add_region): New function.
6097         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6098         booting.
6099         (grub_find_video_card): New function.
6100         (grub_linux_setup_video): New function.
6101         (grub_rescue_cmd_linux): Probe for video information.
6103         * normal/x86_64/setjmp.S: New file.
6105         * term/efi/console.c (map_char): New function.
6106         (grub_console_putchar): Map unicode char.
6107         (grub_console_checkkey): Wrap efi calls.
6108         (grub_console_getkey): Likewise.
6109         (grub_console_getwh): Likewise.
6110         (grub_console_gotoxy): Likewise.
6111         (grub_console_cls): Likewise.
6112         (grub_console_setcolorstate): Likewise.
6113         (grub_console_setcursor): Likewise.
6115         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6117 2008-07-16  Pavel Roskin  <proski@gnu.org>
6119         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6120         format strings.
6122         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6123         pointer, not an integer.  This fixes a warning and prevents
6124         precision loss on 64-bit systems.
6125         (relocate_addresses): Remove unneeded cast.
6127 2008-07-15  Pavel Roskin  <proski@gnu.org>
6129         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6131         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6133         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6134         Fix comparison between signed and unsigned.
6136         * include/grub/i386/ieee1275/console.h: Declare
6137         grub_console_init() and grub_console_fini().
6139         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6140         It's empty and unused.
6142         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6143         beginning to avoid warnings with some compilers.
6145         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6146         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6148 2008-07-14  Pavel Roskin  <proski@gnu.org>
6150         * kern/env.c (grub_register_variable_hook): Don't copy empty
6151         string, it leaks memory.  Pass "" to grub_env_set(), it should
6152         handle constant strings.
6154         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6155         * commands/cmp.c (grub_cmd_cmp): Likewise.
6156         * kern/dl.c (grub_dl_flush_cache): Likewise.
6157         (grub_dl_load_core): Likewise.
6158         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6159         (grub_elf64_load_phdrs): Likewise.
6161 2008-07-13  Pavel Roskin  <proski@gnu.org>
6163         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6164         between signed and unsigned.
6165         (LzmaEnc_Finish): Fix warning about an unused parameter.
6167 2008-07-13  Bean  <bean123ch@gmail.com>
6169         * Makefile.in (enable_lzo): New rule.
6171         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6173         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6175         * boot/i386/pc/lnxboot.S: #include <config.h>.
6177         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6178         its value according to the compression algorithm used, lzo or lzma.
6180         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6181         compression algorithm according to configure macro.
6183         * kern/i386/pc/startup.S (codestart): Likewise.
6185         * kern/i386/pc/lzma_decode.S: New file.
6187         * include/grub/lib/LzFind.h: Likewise.
6189         * include/grub/lib/LzHash.h: Likewise.
6191         * include/grub/lib/LzmaDec.h: Likewise.
6193         * include/grub/lib/LzmaEnc.h: Likewise.
6195         * include/grub/lib/LzmaTypes.h: Likewise.
6197         * lib/LzFind.c: Likewise.
6199         * lib/LzmaDec.c: Likewise.
6201         * lib/LzmaEnc.c: Likewise.
6203 2008-07-13  Bean  <bean123ch@gmail.com>
6205         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6206         (grub_ext4_extent_header): New structure.
6207         (grub_ext4_extent): Likewise.
6208         (grub_ext4_extent_idx): Likewise.
6209         (grub_ext4_find_leaf): New function.
6210         (grub_ext2_read_block): Handle extents.
6212 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6214         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6216 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6218         * util/grub.d/40_custom.in: New file. Example on how to add custom
6219         entries to /etc/grub.d.
6220         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6221         40_custom (implicitly, by merging all the grub.d rules).
6223 2008-07-11  Pavel Roskin  <proski@gnu.org>
6225         * commands/read.c (grub_getline): Fix invalid memory access.
6226         Don't add newline to the variable value.
6228         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6229         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6230         (serial_hw_get_port): Check validity of the port number.
6231         (grub_cmd_serial): Check return value of serial_hw_get_port().
6233 2008-07-07  Pavel Roskin  <proski@gnu.org>
6235         * boot/i386/pc/diskboot.S (notification_string): Replace
6236         "Loading kernel" with just "loading".  This is shorter, less
6237         confusing and saves a few bytes for possible future changes.
6239 2008-07-05  Pavel Roskin  <proski@gnu.org>
6241         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6242         size for ATAPI devices, they are undefined.  Output sector
6243         number in decimal form.
6245         * disk/ata.c: Use named constants for status bits.
6247 2008-07-04  Pavel Roskin  <proski@gnu.org>
6249         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6250         grub_addr_t before casting it to the void pointer to fix a
6251         warning.  Non-addressable regions are discarded earlier.
6252         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6253         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6254         (check_signature): Don't shadow table_header.
6255         (grub_linuxbios_table_iterate): Cast numeric constants to
6256         grub_linuxbios_table_header_t.
6257         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6258         grub_stop().
6260         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6261         prevent warnings.
6263         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6264         pointer, which can cause warnings.  Support 64-bit addresses.
6266         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6267         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6269 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6271         This fixes a performance issue when pc & gpt partmap iterators
6272         didn't abort iteration even after our hook found what it was
6273         looking for (often causing expensive probes of non-existent drives).
6275         Some callers relied on previous buggy behaviour, since they would
6276         raise an error when their own hooks caused early abortion of its
6277         iteration.
6279         * kern/device.c (grub_device_open): Improve error message.
6280         * disk/lvm.c (grub_lvm_open): Likewise.
6281         * disk/raid.c (grub_raid_open): Likewise.
6283         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6284         when hook requests it, independently of grub_errno.
6285         (pc_partition_map_probe): Do not fail when find_func() caused
6286         early abortion of pc_partition_map_iterate().
6288         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6289         when hook requests it, independently of grub_errno.
6290         (gpt_partition_map_probe): Do not fail when find_func() caused
6291         early abortion of gpt_partition_map_iterate().
6293         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6294         when hook requests it, independently of grub_errno.  Do not fail when
6295         part_map_iterate_hook() caused early abortion of p->iterate().
6297         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6298         when grub_partition_iterate() returned with non-zero.
6300 2008-07-03  Pavel Roskin  <proski@gnu.org>
6302         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6303         like we do in grub_ata_pio_read().
6304         (grub_ata_readwrite): Always write individual sectors.  Fix the
6305         sector count for the remainder.
6306         (grub_ata_write): Enable writing to ATA devices.  Correctly
6307         report error for ATAPI devices.
6309 2008-07-02  Pavel Roskin  <proski@gnu.org>
6311         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6312         warning.
6314         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6315         for every read sector, we already increment it for the whole
6316         batch.  This fixes reading more than 256 sectors at once.
6318         * util/grub-editenv.c (cmd_info): Cast argument to long
6319         explicitly.  ptrdiff_t reduces to int on i386.
6321         * util/grub-editenv.c (main): Be specific which parameter is
6322         missing.
6324         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6325         (memdisk): Make memdisk_orig_addr a pointer.
6327         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6328         for file offsets, use grub_off_t instead.  Fix printf format
6329         warnings.
6331         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6332         there.  Real unexpected warnings should not drown in the noise
6333         about known problems.
6335         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6336         grub_disk_addr_t for memory addresses.
6338         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6339         explicitly to fix a warning.
6341         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6343         * Makefile.in (MODULE_LDFLAGS): New variable.
6344         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6345         the linker accepts --build-id=none.
6346         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6347         MODULE_LDFLAGS.
6348         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6350         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6351         those in Linux XFS code.  Provide a way to access 64-bit parent
6352         inode.
6353         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6354         the end of struct grub_xfs_dir_header.
6356 2008-07-02  Bean  <bean123ch@gmail.com>
6358         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6359         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6360         and GRUB_IEEE1275_FLAG_NO_ANSI.
6362         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6363         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6364         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6366         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6367         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6369         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6370         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6372         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6373         esc sequence on non ANSI terminal.
6374         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6376         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6377         beginning of file.
6379 2008-07-02  Bean  <bean123ch@gmail.com>
6381         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6382         (grub_editenv_SOURCES): New variable.
6383         (pkglib_MODULES): Add loadenv.mod.
6384         (loadenv_mod_SOURCES): New variable.
6385         (loadenv_mod_CFLAGS): Likewise.
6386         (loadenv_mod_LDFLAGS): Likewise.
6388         * include/grub/envblk.h: New file.
6390         * util/envblk.c: New file.
6392         * util/grub-editenv.c: New file.
6394         * commands/loadenv.c: New file.
6396 2008-07-01  Pavel Roskin  <proski@gnu.org>
6398         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6399         not unsigned char.  This fixes warnings and is consistent with
6400         other tags.
6402         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6404         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6406         * term/tparm.c (analyze): Always set *popcount.
6408         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6409         cast to fix a warning.
6411         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6412         cast to suppress a warning.
6414         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6415         grub_fshelp_read_file() expects.
6417         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6418         write uuid as a 32-bit value in CPU byte order, so declare and
6419         use it as such.
6421         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6422         long if the format specifier expects it.
6423         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6424         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6425         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6426         long to fix a warning.
6427         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6428         grub_dprintf() arguments to fix warnings.
6430 2008-06-30  Pavel Roskin  <proski@gnu.org>
6432         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6433         install_bsd_part immediately before core.img is embedded or
6434         modified on disk.  This fixes core.img verification if core.img
6435         cannot be embedded.
6437         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6438         core_path to calculate the blocklist.
6439         Patch from Javier Martín <lordhabbit@gmail.com>
6441 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6443         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6444         block to disk block.
6445         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6446         Patch from Niels Böhm <bitbucket@arcor.de>
6448 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6450         * util/update-grub_lib.in (font_path): Search for fonts in
6451         /boot/grub first, which is more likely to be readable (we aren't
6452         deciding where fonts live, just looking for them).
6454 2008-06-26  Pavel Roskin  <proski@gnu.org>
6456         * util/biosdisk.c (read_device_map): Don't leave dead map
6457         entries for devices failing stat() check.
6459         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6460         core_path_dev for the core.img path on the target device.
6462 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6464         * disk/fs_uuid.c: New file.
6465         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6466         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6467         (fs_uuid_mod_LDFLAGS): New variables.
6468         * include/grub/disk.h (grub_disk_dev_id): Add
6469         `GRUB_DISK_DEVICE_UUID_ID'.
6470         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6471         implement iterate().
6473 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6475         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6476         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6477         Linux image includes no initrd.
6479 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6481         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6482         call to resolve the core image location that effectively appended the
6483         name twice.
6485 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6487         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6488         call from here ...
6490         * util/grub.d/10_hurd.in: ... to here ...
6491         * util/grub.d/10_linux.in: ... and here.
6493 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6495         * kern/main.c (grub_main): Export `prefix' variable immediately
6496         after it has been set by grub_machine_set_prefix().
6498 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6500         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6501         search result when not saving to variable, not the other way around.
6502         When saving to variable, abort iteration as soon as a match is found.
6504 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6506         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6507         check for partition that provides /boot/grub.  Its logic is flawed,
6508         as it prevents prepare_grub_to_access_device() from being called
6509         multiple times.
6511 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6513         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6514         "insmod" command directly when abstraction modules are needed,
6515         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6516         since it had already been processed).
6518 2008-06-19  Pavel Roskin  <proski@gnu.org>
6520         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6521         changed.  This is needed in case GRUB_LIBDIR changes.
6522         * conf/i386-ieee1275.rmk: Likewise.
6523         * conf/i386-linuxbios.rmk: Likewise.
6524         * conf/i386-pc.rmk: Likewise.
6525         * conf/powerpc-ieee1275.rmk: Likewise.
6527 2008-06-18  Pavel Roskin  <proski@gnu.org>
6529         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6530         kernel_elf_symlist.c to symlist.c for consistency with other
6531         architectures.  Update all users.
6532         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6534 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6536         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6537         it in prefix.
6539         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6540         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6541         a RAID device, run setup() for all members independently on whether
6542         LVM abstraction is being used.
6543         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6544         If grub-mkimage has set `*install_dos_part == -2', don't override this
6545         value.
6546         Perform *install_dos_part adjustments independently on whether
6547         we're embedding or not.
6548         Clarify error message when image is too big for embedding.
6549         Remove duplicate *install_dos_part stanza.
6551 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6553         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6554         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6555         variables.
6556         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6557         values in grub_ofconsole_normal_color and
6558         grub_ofconsole_highlight_color (they're not directly related to
6559         background and foreground).
6560         (grub_ofconsole_setcolorstate): Extract background and foreground
6561         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6563 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6565         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6566         /boot/grub for the check in last commit, not /boot (they could be
6567         different partitions).
6569 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6571         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6572         asked to setup access for the same partition that provides /boot,
6573         don't bother using UUIDs since our root already has the value we
6574         want.
6576 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6578         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6579         I2O devices.
6580         Patch from Sven Mueller <sven@debian.org>.
6582 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6584         * util/update-grub.in: Check for $EUID instead of $UID.
6585         Reported by Vincent Zweije.
6587 2008-06-16  Bean  <bean123ch@gmail.com>
6589         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6590         (grub_ext2_read_block): Likewise.
6591         (grub_ext2_read_inode): Likewise.
6592         (grub_ext2_mount): Likewise.
6593         (grub_ext2_close): Likewise.
6594         (grub_ext3_get_journal): Removed.
6596         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6597         (grub_reiserfs_read_symlink): Likewise.
6598         (grub_reiserfs_mount): Likewise.
6599         (grub_reiserfs_open): Likewise.
6600         (grub_reiserfs_read): Likewise.
6601         (grub_reiserfs_close): Likewise.
6602         (grub_reiserfs_get_journal): Removed.
6604         * fs/fshelp.c (grub_fshelp_read): Removed.
6605         (grub_fshelp_map_block): Likewise.
6607         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6608         (grub_fshelp_journal): Likewise.
6609         (grub_fshelp_read): Likewise.
6610         (grub_fshelp_map_block): Likewise.
6612 2008-06-16  Pavel Roskin  <proski@gnu.org>
6614         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6615         floating point anymore.
6616         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6618 2008-06-15  Pavel Roskin  <proski@gnu.org>
6620         * commands/ls.c (grub_ls_list_files): Use integer calculations
6621         for human readable format, avoid floating point use.
6622         * kern/misc.c (grub_ftoa): Remove.
6623         (grub_vsprintf): Remove floating point support.
6625 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6627         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6628         devices.
6629         Reported by Max Vozeler.
6631 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6633         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6634         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6635         skipped later.
6636         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6637         the beginning of the prefix.
6639         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6640         It is assumed that if we have a memdisk, grub-mkimage has set
6641         grub_prefix to include the "(memdisk)" drive in it.
6643 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6645         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6646         Initialize keyboard controller after registering the terminal, so that
6647         grub_printf() can be called from grub_keyboard_controller_init().
6649 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6651         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6652         extent-btree which is written as big endian on disk.
6653         Reported by Alain Greppin  <al@chilibi.org>.
6655 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6657         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6658         * util/i386/pc/grub-install.in (modules): Likewise.
6660 2008-06-13  Pavel Roskin  <proski@gnu.org>
6662         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6664 2008-06-13  Bean  <bean123ch@gmail.com>
6666         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6668         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6670         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6671         to indicate sparse block.
6673 2008-06-12  Pavel Roskin  <proski@gnu.org>
6675         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6676         number, grub_fshelp_read() does it for us.
6678         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6679         linear disk read with journal translation.
6680         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6681         * include/grub/fshelp.h: Declare grub_fshelp_read().
6683 2008-06-09  Pavel Roskin  <proski@gnu.org>
6685         * fs/minix.c (grub_minix_mount): Handle error reading
6686         superblock.
6688 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6690         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6691         don't append the RAID prefix afterwards.
6692         Reported by Clint Adams.
6694 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6696         Based on description from Pavel:
6697         * kern/disk.c (grub_disk_check_range): Rename to ...
6698         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6699         tasks performed by this function.
6701 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6703         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6704         `num_serial' (for consistency with other variables).
6705         (struct grub_ntfs_data): Add `uuid' member.
6706         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6707         (grub_ntfs_uuid): New function.
6708         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6710 2008-06-07  Pavel Roskin  <proski@gnu.org>
6712         * util/biosdisk.c (open_device): Revert last change to the
6713         function, it broke installation.  The sector needs to be
6714         different dependent on which device is opened.
6716 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6718         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6719         rest of GRUB, and breakage doesn't happen if its value were modified.
6721         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6722         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6723         a constant (same value).
6724         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6725         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6727 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6729         * util/biosdisk.c (open_device): Do not modify sector offset when
6730         accessing a partition.  kern/disk.c already handles this for us.
6732 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6734         * util/grub-emu.c (grub_machine_init): Move code in this function from
6735         here ...
6736         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6737         segfault in case grub_printf() is called).
6739         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6740         grub_probe.  Update all users not to explicitly add it again.
6741         (grub_device): New variable; contains corresponding device for grubdir.
6742         (fs_module, partmap_module, devabstraction_module): Pass
6743         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6744         every time.
6746 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6748         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6749         is found, print it (same layout as with labels).
6751 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6753         * util/biosdisk.c (get_drive): Rename to ...
6754         (find_grub_drive): ... this.  Update all users.
6756         (get_os_disk): Rename to ...
6757         (convert_system_partition_to_system_disk): ... this.  Update all users.
6759         (find_drive): Rename to ...
6760         (find_system_device): ... this.  Update all users.
6762 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6764         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6765         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6766         (make_device_map): Likewise.
6768 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6770         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6771         before dereferencing it.
6773         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6774         union with fat12/fat16-specific ones.  Add some new fields, including
6775         `num_serial' for both versions.
6776         (struct grub_fat_data): Add `uuid' member.
6777         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6778         names.  Initialize `data->uuid' using `num_serial'.
6779         (grub_fat_uuid): New function.
6780         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6782         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6783         (grub_reiserfs_uuid): New function.
6784         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6785         member.
6787         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6788         (grub_xfs_uuid): New function.
6789         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6791 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6793         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6794         code that is backward compatible with pre-uuid search command.
6796 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6798         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6799         floppies after everything else, to ensure floppy drive isn't accessed
6800         unnecessarily (patch from Bean).
6802 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6804         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6805         not print device names when we were asked to set a variable.
6807 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6809         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6810         using "cursor-on" and "cursor-off" commands (understood at least by
6811         the Open Firmware flavour on OLPC).
6813 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6815         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6816         on and off sequences.
6818 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6820         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6821         * util/update-grub.in: Likewise.
6823 2008-05-30  Pavel Roskin  <proski@gnu.org>
6825         * util/biosdisk.c (linux_find_partition): Simplify logic and
6826         make the code more universal.  Keep special processing for
6827         devfs, but use a simple rule for all other devices.  If the
6828         device ends with a number, append 'p' and the partition number.
6829         Otherwise, append only the partition number.
6831 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6833         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6834         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6835         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6836         the `root' parameter to Linux.
6838 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6840         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6841         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6842         --fs_uuid with --fs-uuid.
6843         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6844         all filesystems support them).
6846 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6848         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6849         grub_printf() flags, since we're printing in units of 2 bytes.
6851 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6853         * util/grub.d/00_header.in: Remove obsolete comment referencing
6854         convert_system_path_to_grub_path().
6855         * util/update-grub.in: Likewise.
6856         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6857         (convert_system_path_to_grub_path): Add a warning message explaining
6858         that this function is deprecated.  Rely on is_path_readable_by_grub()
6859         for the readability checks.
6860         (font_path): Use is_path_readable_by_grub() for the readability
6861         check rather than convert_system_path_to_grub_path().
6863 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6865         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6866         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6867         converting it first.
6868         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6869         grub.cfg for access to font file, and afterwards call it again to set
6870         the root device.
6872 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6874         * commands/search.c (options): Add --fs_uuid option.
6875         (search_fs_uuid): New function.
6876         (grub_cmd_search): Fix --set argument passing.
6877         Use search_fs_uuid() when requested via --fs_uuid.
6878         (grub_search_init): Update help message.
6879         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6880         and redeclare it as an array of 16-bit words.
6881         (grub_ext2_uuid): New function.
6882         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6883         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6884         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6885         (GRUB_DEVICE_BOOT_UUID): New variables.
6886         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6887         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6888         whenever possible.
6889         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6890         just assume `root' variable has the right value.
6891         * util/grub.d/10_linux.in: Likewise.
6892         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6893         via PRINT_FS_UUID.
6894         (main): Recognise `-t fs_uuid' argument.
6896 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6898         * util/biosdisk.c (map): Redefine structure to hold information
6899         about GRUB drive name.
6900         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6901         drive names.
6902         (call_hook): Remove.
6903         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6904         member.  Assume drive has partitions.
6905         (grub_util_biosdisk_open): Access device names via `.device' struct
6906         member.
6907         (open_device): Likewise.
6908         (find_drive): Likewise.
6909         (read_device_map): Adjust map[] usage to match the new struct
6910         definition.  Don't check for duplicates (still possible, but not cheap
6911         anymore).
6912         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6913         (make_device_name): Remove assumption of BIOS-like drive names.
6915 2008-05-30  Pavel Roskin  <proski@gnu.org>
6917         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
6918         compiling execute.c doesn't need grub_script.tab.h anymore.
6919         (normal/command.c_DEPENDENCIES): Likewise.
6920         (normal/function.c_DEPENDENCIES): Likewise.
6921         * conf/i386-ieee1275.rmk: Likewise.
6922         * conf/i386-linuxbios.rmk: Likewise.
6923         * conf/i386-pc.rmk: Likewise.
6924         * conf/powerpc-ieee1275.rmk: Likewise.
6925         * conf/sparc64-ieee1275.rmk: Likewise.
6927 2008-05-29  Pavel Roskin  <proski@gnu.org>
6929         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
6930         when scanning metadata for volume group name.
6932         * include/grub/script.h: Don't include grub_script.tab.h.  It's
6933         a generated file, which may only be included from the files with
6934         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
6935         use union YYSTYPE, as the later allows forward declaration.
6936         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
6938 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6940         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
6941         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
6942         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
6943         (grub_console_checkkey): Add grub_dprintf() call to report unknown
6944         scan codes.
6946 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6948         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
6949         control key combinations.
6951 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6953         * util/powerpc/ieee1275/grub-install.in: Move from here ...
6954         * util/ieee1275/grub-install.in: ... to here.
6955         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
6956         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
6957         (grub_install_SOURCES): Likewise.
6959 2008-05-29  Robert Millan  <rmh@aybabtu.com>
6961         * fs/affs.c: Update copyright year.
6962         * fs/ext2.c: Likewise.
6963         * fs/fshelp.c: Likewise.
6964         * fs/hfsplus.c: Likewise.
6965         * fs/ntfs.c: Likewise.
6966         * fs/xfs.c: Likewise.
6967         * include/grub/fshelp.h: Likewise.
6968         * util/grub-mkdevicemap.c: Likewise.
6970 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6972         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
6973         might need to be fatfs to support some firmware implementations
6974         (e.g. OFW or EFI).
6976 2008-05-28  Robert Millan  <rmh@aybabtu.com>
6978         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
6979         devices.
6980         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6981         (make_device_map): Likewise.
6983 2008-05-20  Bean  <bean123ch@gmail.com>
6985         * fs/fshelp.c (grub_fshelp_map_block): New function.
6986         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
6987         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
6989         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
6990         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
6991         (grub_fshelp_journal): New structure.
6992         (grub_fshelp_map_block): New function prototype.
6993         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
6994         (grub_fshelp_map_block): Likewise.
6996         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
6997         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
6998         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
6999         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7000         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7001         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7002         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7003         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7004         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7005         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7006         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7007         (grub_ext2_sblock): New members for journal support.
7008         (grub_ext3_journal_header): New structure.
7009         (grub_ext3_journal_revoke_header): Likewise.
7010         (grub_ext3_journal_block_tag): Likewise.
7011         (grub_ext3_journal_sblock): Likewise.
7012         (grub_fshelp_node): New members logfile and journal.
7013         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7014         grub_fshelp_map_block to get real block number.
7015         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7016         number.
7017         (grub_ext2_read_inode): Likewise.
7018         (grub_ext3_get_journal): New function.
7019         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7020         (grub_ext2_close): Release memory used by journal.
7022         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7023         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7024         (grub_reiserfs_transaction_header): Renamed to
7025         grub_reiserfs_description_block, replace field data with real_blocks.
7026         (grub_reiserfs_commit_block): New structure.
7027         (grub_reiserfs_data): New member journal.
7028         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7029         number.
7030         (grub_reiserfs_read_symlink): Likewise.
7031         (grub_reiserfs_iterate_dir): Likewise.
7032         (grub_reiserfs_open): Likewise.
7033         (grub_reiserfs_read): Likewise.
7034         (grub_reiserfs_get_journal): New function.
7035         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7036         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7037         using grub_reiserfs_get_journal.
7038         (grub_reiserfs_close): Release memory used by journal.
7040         * fs/affs.c (grub_affs_read_block): Change block type to
7041         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7043         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7045         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7047         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7049         * fs/udf.c (grub_udf_read_block): Change block type to
7050         grub_disk_addr_t. Use type cast to avoid warning.
7052         * fs/xfs.c (grub_xfs_read_block): Likewise.
7054 2008-05-16  Christian Franke  <franke@computer.org>
7056         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7057         to ensure that break with ESC will always work.
7058         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7059         Remove ESC from keyboard queue.
7061 2008-05-16  Christian Franke  <franke@computer.org>
7063         * util/biosdisk.c: [__CYGWIN__] Add includes.
7064         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7065         (get_os_disk): Move variable declarations to OS specific
7066         parts to avoid warning.
7067         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7068         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7069         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7070         Cygwin.
7071         * util/getroot.c: [__CYGWIN__] Add includes.
7072         (strip_extra_slashes): Fix "/" case.
7073         [__CYGWIN__] (get_win32_path): New function.
7074         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7075         [__CYGWIN__] (find_root_device): Disable.
7076         [__CYGWIN__] (get_bootsec_serial): New function.
7077         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7078         [__linux__] (grub_guess_root_device): Add early returns to simplify
7079         structure.
7080         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7081         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7082         check for Linux only.
7084 2008-05-15  Bean  <bean123ch@gmail.com>
7086         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7087         keyboard hang problem in apple's intel mac.
7089 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7091         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7092         devices.
7093         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7094         (make_device_map): Likewise.
7095         Reported by Aurelien Jarno <aurel32@debian.org>
7097 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7099         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7100         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7101         (make_device_map): Output entries for xvd type disks.
7103 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7105         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7106         devices.
7107         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7108         (make_device_map): Likewise.
7109         Reported by Roland Dreier <rdreier@cisco.com>
7111 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7113         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7114         grub_strstr() call.  Correct a few mistakes in failure path handling.
7116 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7118         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7119         Do not print a trailing slash (therefore, the root directory is an
7120         empty string).
7121         (convert_system_path_to_grub_path): Do not remove trailing slash
7122         from make_system_path_relative_to_its_root() output.
7124         * util/i386/pc/grub-install.in: Add trailing slash to output from
7125         make_system_path_relative_to_its_root().
7127 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7129         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7130         ensures that output lines aren't intermangled with those sent to
7131         stderr (via grub_util_info()).
7132         * util/grub-probe.c (grub_refresh): Likewise.
7133         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7135 2008-05-05  Christian Franke  <franke@computer.org>
7137         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7138         Add Cygwin device names.
7139         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7140         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7141         (check_device): Return error instead of success on empty name.
7142         (make_device_map): Move label inside linux specific code to
7143         prevent compiler warning.
7145 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7147         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7148         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7149         first boot option.
7150         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7152 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7154         * docs/grub.cfg: New file (example GRUB configuration).
7156 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7158         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7159         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7160         and `disk/ieee1275/nand.c'.
7162 2008-04-25  Bean  <bean123ch@gmail.com>
7164         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7165         i386-linuxbios.
7167         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7168         change the buffer size to 4096 for cdrom device.
7170         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7171         and nand.mod.
7172         (_linux_mod_SOURCES): New variable.
7173         (_linux_mod_CFLAGS): Likewise.
7174         (_linux_mod_LDFLAGS): Likewise.
7175         (linux_mod_SOURCES): Likewise.
7176         (linux_mod_CFLAGS): Likewise.
7177         (linux_mod_LDFLAGS): Likewise.
7178         (nand_mod_SOURCES): Likewise.
7179         (nand_mod_CFLAGS): Likewise.
7180         (nand_mod_LDFLAGS): Likewise.
7182         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7183         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7184         type property. (nand device in olpc don't have this property)
7186         * include/grub/disk.h (grub_disk_dev_id): New macro
7187         GRUB_DISK_DEVICE_NAND_ID.
7189         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7190         function prototype.
7191         (grub_rescue_cmd_initrd): Likewise.
7193         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7194         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7195         ofw_cif_handler and ofw_idt, adjust padding number.
7197         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7198         GRUB_MACHINE_IEEE1275 is defined.
7200         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7201         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7203         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7204         on nested function heap_init.
7205         (grub_upper_mem): New variable for i386-ieee1275.
7206         (grub_get_extended_memory): New function for i386-ieee1275.
7207         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7209         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7210         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7211         property.
7213         * loader/i386/ieee1275/linux.c: New file.
7215         * loader/i386/ieee1275/linux_normal.c: New file.
7217         * disk/ieee1275/nand.c: New file.
7219 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7221         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7222         value.
7223         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7225 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7227         Restructures early code path on ieee1275 to unify grub_main() as
7228         the first C function that is executed in every platform.
7230         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7231         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7232         cmain().
7233         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7234         * kern/ieee1275/cmain.c (cmain): Rename to ...
7235         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7236         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7237         at the beginning.
7239 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7241         * util/update-grub.in: Fix syntax error when setting
7242         `GRUB_PRELOAD_MODULES'.
7243         Reported by Stephane Chazelas <stephane@artesyncp.com>
7245 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7247         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7248         section into account, newer toolchains generate unique build ids
7249         * configure.ac: remove the test for --build-id=none acceptance,
7250         we want build ids to be preserved
7251         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7252         far from other sections don't cause the raw binary images grow
7253         size
7255 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7257         * disk/lvm.c: Update copyright year.
7258         * kern/misc.c: Likewise.
7260 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7262         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7263         there is no memory left for physical volume name.
7265 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7267         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7268         volume name mapping to support bigger than 9 character names properly.
7270 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7272         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7273         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7275 2008-04-13  Christian Franke  <franke@computer.org>
7277         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7278         to create a floppy emulation boot CD when non emulation mode
7279         does not work.
7280         Enable Joliet CD filesystem extension.
7282 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7284         * kern/misc.c (grub_strncat): Fix off-by-one error.
7285         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7287         * kern/env.c (grub_env_context_close): Clear current context, not
7288         previous one.
7289         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7291         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7293 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7295         Improve robustness when handling LVM.
7297         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7298         (and leave `*p' unmodified).
7299         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7300         through it.
7301         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7302         iterating through it.
7303         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7304         through it.
7305         (grub_lvm_scan_device): Check the return value (and fail gracefully
7306         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7307         Don't assume `vg->pvs != NULL' when iterating through it.
7309 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7311         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7312         * genmk.rb (partmap): New variable.
7313         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7314         (#{partmap}): New target rule.
7315         * genpartmaplist.sh: New file.
7316         * Makefile.in (pkglib_DATA): Add partmap.lst.
7317         (partmap.lst): New target rule.
7318         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7319         modules (including all partition maps), instead of preloading them.
7321 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7323         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7324         `linux-boot-prober' (if installed) to detect other operating
7325         systems which are installed on the computer and add them to
7326         the boot menu.
7327         * conf/common.rmk: Build and install 30_os-prober.
7329 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7331         * kern/powerpc/ieee1275/init.c: Move from here ...
7332         * kern/ieee1275/init.c: ... to here.  Update all users.
7334         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7335         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7337         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7338         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7340         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7341         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7343 2008-04-10  Pavel Roskin  <proski@gnu.org>
7345         * configure.ac: Always use "_cv_" in cache variables for
7346         compatibility with Autoconf 2.62.
7348 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7350         Revert grub/machine/init.h addition by Pavel (since it breaks on
7351         i386-ieee1275 and others):
7352         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7353         * util/powerpc/ieee1275/misc.c: Likewise.
7355 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7357         * util/grub-probe.c (probe): Improve error message.
7359 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7361         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7362         (this prevents the presence of a bogus entry from ruining the whole
7363         thing).
7365 2008-04-06  Pavel Roskin  <proski@gnu.org>
7367         * util/biosdisk.c: Include grub/util/biosdisk.h.
7368         * util/grub-fstest.c (execute_command): Make static.
7369         * util/grub-mkdevicemap.c (check_device): Likewise.
7370         * util/i386/pc/misc.c: Include grub/machine/init.h.
7371         * util/powerpc/ieee1275/misc.c: Likewise.
7372         * util/lvm.c: Include grub/util/lvm.h.
7373         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7374         grub/cache.h.
7375         * util/raid.c: Include grub/util/raid.h.
7376         (grub_util_getdiskname): Make static.
7378         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7379         grub_hostfs_fini(), as they are called from grub_init_all() and
7380         grub_fini_all() respectively.  This fixes an infinite loop in
7381         grub-fstest due to double registration of hostfs.
7382         Reported by Christian Franke <Christian.Franke@t-online.de>
7384 2008-04-05  Pavel Roskin  <proski@gnu.org>
7386         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7387         all 8 functions.  Otherwise, probe function 0 only.
7389 2008-04-04  Pavel Roskin  <proski@gnu.org>
7391         * commands/lspci.c (grub_lspci_iter): Print the bus number
7392         correctly.
7394         * commands/lspci.c (grub_pci_classes): Fix typos.
7395         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7396         before device ID, as it's normally done.
7398         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7399         Fix signedness warnings.
7400         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7401         Likewise.
7402         * util/ieee1275/get_disk_name.c: Include config.h so that
7403         _GNU_SOURCE is defined and getline() is declared.  Mark an
7404         unused argument as such.  Fix a signedness warning.
7406 2008-04-02  Pavel Roskin  <proski@gnu.org>
7408         * genkernsyms.sh.in: Use more robust assignments for CC and
7409         srcdir.  Quote srcdir.
7410         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7411         the symbol table is not empty.
7413         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7414         * fs/cpio.c (grub_cpio_read): Likewise.
7416 2008-04-01  Pavel Roskin  <proski@gnu.org>
7418         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7419         * disk/host.c (grub_host_open): Likewise.
7420         * disk/loopback.c (grub_loopback_open): Likewise.
7421         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7422         disk->id as in disk/host.c, not a multi-character constant.
7424         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7425         later is obsolete, potentially dangerous and sets a bad example.
7426         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7427         * util/misc.c (grub_util_get_image_size): Likewise.
7429         * disk/loopback.c (options): Improve help for "--partitions".
7431         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7432         options to align them with the short options, e.g. "echo -e".
7434 2008-03-31  Bean  <bean123ch@gmail.com>
7436         * video/reader/png.c (grub_png_data): New member is_16bit and
7437         image_data.
7438         (grub_png_decode_image_header): Detect 16 bit png image.
7439         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7440         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7441         (grub_video_reader_png): Release memory occupied by image_data.
7443         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7444         4096 bytes.
7445         (grub_nfs_mount): Skip the test for sector per cluster.
7447         * include/grub/ntfs.h (MAX_SPC): Removed.
7449 2008-03-31  Bean  <bean123ch@gmail.com>
7451         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7452         (grub_probe_SOURCES): Add fs/afs.c.
7453         (grub_fstest_SOURCES): Likewise.
7454         (afs_mod_SOURCES): New variable.
7455         (afs_mod_CFLAGS): Likewise.
7456         (afs_mod_LDFLAGS): Likewise.
7458         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7459         (grub_emu_SOURCES): Likewise.
7461         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7463         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7465         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7467         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7469         * fs/afs.c: New file.
7471 2008-03-30  Pavel Roskin  <proski@gnu.org>
7473         * disk/host.c: Include grub/misc.h to fix a warning.
7474         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7475         warnings about implicit declarations.
7477         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7478         variable.
7479         * include/grub/i386/loader.h: Change declaration of
7480         grub_linux_boot() to match what grub_loader_set() expects.
7481         * util/getroot.c (grub_guess_root_device): Return const char* to
7482         fix a warning.
7483         * util/grub-probe.c (probe): Fix a warning about uninitialized
7484         abstraction_name variable.
7485         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7486         second argument as unused to fix a warning.
7488         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7489         missing grub_error() call.
7491         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7492         2.60 and newer uses it to define datadir.
7494         * commands/sleep.c: Fix warning about implicit declaration.
7495         * disk/memdisk.c: Likewise.
7496         * loader/aout.c: Likewise.
7497         * loader/i386/bsd_normal.c: Likewise.
7498         * util/grub-probe.c: Likewise.
7500         * commands/i386/cpuid.c (has_longmode): Make static.
7501         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7502         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7504         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7505         GDT.  This is more robust, as %ds can change.
7506         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7507         calling real_to_prot().
7508         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7510 2008-03-28  Pavel Roskin  <proski@gnu.org>
7512         * kern/i386/pc/startup.S: Assert that uncompressed functions
7513         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7514         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7515         code, as they push parts of the code (error handlers) beyond
7516         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7517         code as correctness and size.
7519 2008-03-28  Pavel Roskin  <proski@gnu.org>
7521         * kern/i386/pc/startup.S
7522         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7523         data block address to the real mode, keep offset minimal.  This
7524         works around a bug in AWARD BIOS on old Athlon systems, which
7525         makes CD detection hang.
7527 2008-03-26  Pavel Roskin  <proski@gnu.org>
7529         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7530         const.
7531         * include/grub/normal.h: Add grub_parse_color_name_pair()
7532         declaration.
7534 2008-03-24  Bean  <bean123ch@gmail.com>
7536         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7537         (cd_count): Removed.
7538         (cd_drive): New variable.
7539         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7540         (grub_biosdisk_call_hook): Likewise.
7541         (grub_biosdisk_iterate): Change cdrom detection method.
7542         (grub_biosdisk_open): Replace cd_start with cd_drive.
7543         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7544         detect cdrom device.
7546         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7547         Removed.
7548         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7549         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7550         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7551         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7552         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7553         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7554         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7555         (grub_biosdisk_cdrp): New structure.
7556         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7558         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7560         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7561         device.
7563         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7564         New function.
7566 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7568         Remove 2 TiB limit in ata.mod.
7569         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7570         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7571         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7572         grub_uint64_t instead of grub_uint32_t.
7574 2008-03-05  Bean  <bean123ch@gmail.com>
7576         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7577         (grub_multiboot): Set boot device.
7579         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7581 2008-03-02  Bean  <bean123ch@gmail.com>
7583         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7584         symlink_buffer.
7586 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7588         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7589         texinfo.tex.
7591         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7592         modified.
7594         * docs/fdl.texi: New file.
7596         * docs/mdate-sh: New file. Copied from gnulib.
7597         * docs/texinfo.tex: Likewise.
7599         * config.guess: Updated from gnulib.
7600         * install-sh: Likewise.
7602 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7604         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7605         (aout_mod_SOURCES): New variable.
7606         (aout_mod_CFLAGS): Likewise.
7607         (aout_mod_LDFLAGS): Likewise.
7609         * conf/i386-ieee1275.rmk: Likewise.
7611 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7613         * util/update-grub.in: Reorganise terminal validity check.  Accept
7614         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7615         Based on suggestion by Franklin PIAT.
7617 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7619         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7620         function.
7621         * util/getroot.c (grub_util_check_block_device): New function that
7622         returns the given argument if it is a block device and returns NULL else.
7623         * util/grub-probe.c (argument_is_device): New variable.
7624         (probe): Promote device_name from a variable to an argument. Receive
7625         device_name from grub_util_check_block_device() if path is NULL and from
7626         grub_guess_root_device() else. Do not free() device_name anymore.
7627         (options): Introduce new parameter '-d, --device'.
7628         (main): Add description of the new parameter to the help screen.
7629         Rename path variable to argument. Set argument_is_device if the '-d'
7630         option is given. Pass argument to probe() depending on
7631         argument_is_device.
7633 2008-02-24  Bean  <bean123ch@gmail.com>
7635         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7636         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7637         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7638         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7639         (GRUB_ISO9660_VOLDESC_END): Likewise.
7640         (grub_iso9660_primary_voldesc): New member escape.
7641         (grub_iso9660_data): New member joliet.
7642         (grub_iso9660_convert_string): New function.
7643         (grub_iso9660_mount): Detect joliet extension.
7644         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7645         (grub_iso9660_iso9660_label): Likewise.
7647         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7648         (grub_setup_SOURCES): Add fs/udf.c.
7649         (grub_fstest_SOURCES): Likewise.
7650         (udf_mod_SOURCES): New variable.
7651         (udf_mod_CFLAGS): Likewise.
7652         (udf_mod_LDFLAGS): Likewise.
7654         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7655         (grub_emu_SOURCES): Likewise.
7657         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7659         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7661         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7663         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7665         * fs/udf.c: New file.
7667 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7669         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7670         (normal/lexer.c_DEPENDENCIES): New variables.
7671         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7672         (normal/lexer.c_DEPENDENCIES): Likewise.
7673         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7674         (normal/lexer.c_DEPENDENCIES): Likewise.
7675         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7676         (normal/lexer.c_DEPENDENCIES): Likewise.
7677         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7678         (normal/lexer.c_DEPENDENCIES): Likewise.
7679         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7680         (normal/lexer.c_DEPENDENCIES): Likewise.
7682 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7684         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7685         since they were intended to be in hex.  This didn't break previously
7686         because of a bug in gpt_partition_map_iterate() (see below).
7688         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7689         when checking the validity of GPT header.
7690         Remove `partno', since it always provides the same information as `i'.
7692 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7694         * include/grub/efi/time.h: Fix a wrong comment.
7696 2008-02-19  Pavel Roskin  <proski@gnu.org>
7698         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7699         message.
7701 2008-02-19  Bean  <bean123ch@gmail.com>
7703         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7704         (aout_mod_SOURCES): New variable.
7705         (aout_mod_CFLAGS): Likewise.
7706         (aout_mod_LDFLAGS): Likewise.
7707         (_bsd_mod_SOURCES): New variable.
7708         (_bsd_mod_CFLAGS): Likewise.
7709         (_bsd_mod_LDFLAGS): Likewise.
7710         (bsd_mod_SOURCES): New variable.
7711         (bsd_mod_CFLAGS): Likewise.
7712         (bsd_mod_LDFLAGS): Likewise.
7714         * include/grub/aout.h: New file.
7716         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7718         * include/grub/i386/bsd.h: New file.
7720         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7721         to make it public.
7723         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7724         function is called, so that it's possible to change it inside the hook.
7725         (grub_elf64_load): Likewise.
7726         (grub_elf_file): Don't close the file if elf header is not found.
7727         (grub_elf_close): Close the file if grub_elf_file fails (The new
7728         grub_elf_file won't close it).
7729         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7730         (grub_elf64_size): Likewise.
7732         * kern/i386/loader.S (grub_unix_real_boot): New function.
7734         * loader/aout.c: New file.
7736         * loader/i386/bsd.c: New file.
7738         * loader/i386/bsd_normal.c: New file.
7740         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7742         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7743         can test other formats.
7745 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7747         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7748         (grub_gpt_partition_type_empty): Redefine with macro from
7749         `<grub/gpt_partition.h>'.
7750         (gpt_partition_map_iterate): Adjust partition type comparison.
7752         Export `entry' as partmap-specific `part.data' struct.
7753         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7755         * include/grub/gpt_partition.h (grub_gpt_header)
7756         (grub_gpt_partentry): ... to here (new file).
7758         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7760         (grub_gpt_partition_type_bios_boot): New const variable, defined
7761         with macro from `<grub/gpt_partition.h>'.
7763         (setup): Replace `first_start' with `embed_region', which keeps
7764         track of the embed region (and is partmap-agnostic).
7766         Replace find_first_partition_start() with find_usable_region(),
7767         which finds a usable region for embedding using partmap-specific
7768         knowledge (supports PC/MSDOS and GPT).
7770         Fix all assumptions that the embed region start at sector 1, using
7771         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7772         rather than `first_start' to calculate available size.
7774         In grub_util_info() message, replace "into after the MBR" with an
7775         indication of the specific sector our embed region starts at.
7777 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7779         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7780         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7781         `commands/reboot.c'.
7782         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7783         (halt_mod_SOURCES): Likewise.
7784         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7785         (halt_mod_SOURCES): Likewise.
7787 2008-02-17  Christian Franke  <franke@computer.org>
7789         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7791 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7793         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7794         set `first_start' to 0 for non-PC/MSDOS partition maps.
7796 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7798         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7799         do not assume partition map is PC/MSDOS before performing checks that
7800         are specific to that layout.
7802 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7804         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7805         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7806         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7808 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7810         * configure.ac: Only a cosmetic change on the handling of
7811         -fno-stack-protector.
7813 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7815         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7816         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7817         reboot.c.
7818         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7819         (halt_mod_SOURCES): New variable.
7820         (halt_mod_CFLAGS): Likewise.
7821         (halt_mod_LDFLAGS): Likewise.
7822         (reboot_mod_SOURCES): Likewise.
7823         (reboot_mod_CFLAGS): Likewise.
7824         (reboot_mod_LDFLAGS): Likewise.
7826         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7827         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7828         reboot.c.
7829         (halt_mod_SOURCES): Likewise.
7830         (reboot_mod_SOURCES): Likewise.
7832         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7833         commands/i386/pc/reboot.c by commands/reboot.c.
7834         (reboot_mod_SOURCES): Likewise.
7836         * commands/i386/pc/reboot.c: merge this file ...
7838         * commands/ieee1275/reboot.c: ... and this file ...
7840         * commands/reboot.c: ... to this file.
7841         Add some precompiler directive to include the correct header for
7842         each machine.
7844         * commands/ieee1275/halt.c: move this file ...
7846         * commands/halt.c: ... to here.
7847         Add some precompiler directive to include the correct header for
7848         each machine.
7850         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7851         (grub_halt): Likewise.
7853         * kern/efi/efi.c (grub_reboot): New function.
7854         (grub_halt): Likewise.
7856 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7858         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7859         /dev (like it is done for /dev/mapper).  This doesn't provide support
7860         for EVMS, but at least it is now easy to identify the problem when it
7861         arises.
7863 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7865         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7866         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7867         comparing it with -1, not 0.
7869 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7871         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7872         `disk/lvm.c'.
7873         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7874         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7876         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7877         `disk/lvm.c' to the end of the list.
7878         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7879         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7881 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7883         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7884         grub_print_error() instead.  This will let user know why we're entering
7885         rescue mode.
7886         Based on suggestions from Sam Morris.
7888 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7890         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7891         on remaining N args, instead of "--" arg N times.
7893 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7895         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7896         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7897         pattern for unknown glyphs.
7899 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7901         * configure.ac: Probe for `help2man'.
7902         * Makefile.in (builddir): New variable.
7903         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7904         or otherwise add a few flags/options to it.
7905         (install-local): For every executable utility or script that is
7906         installed, invoke $(HELP2MAN) to install a manpage based on --help
7907         output.
7909         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7910         that it doesn't prevent --help from working in build tree.
7912         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7913         with `bug-grub@gnu.org'.
7914         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
7915         * util/update-grub.in (usage): New function.
7916         Implement proper argument check, with support for --help and --version
7917         (as well as existing -y).
7919 2008-02-09  Christian Franke  <franke@computer.org>
7921         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
7922         avoid overwriting previous output.
7923         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
7925 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7927         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
7928         drawing the menu.
7930 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7932         * commands/sleep.c: New file.
7933         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
7934         (sleep_mod_SOURCES): New variable.
7935         (sleep_mod_CFLAGS): Likewise.
7936         (sleep_mod_LDFLAGS): Likewise.
7938 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7940         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
7941         situations in which we can deduce the RAID size and the superblock
7942         doesn't match it.
7944 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7946         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
7947         and return a grub_diskmemberlist_t composed of LVM physical volumes.
7948         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
7950         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
7951         and return a grub_diskmemberlist_t composed of physical array members.
7952         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
7954         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
7955         prototype.
7956         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
7957         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
7958         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
7960         * util/grub-probe.c (probe): Move partmap probing code from here ...
7961         (probe_partmap): ... to here.
7962         (probe): Use probe_partmap() once for the disk we're probing, and
7963         additionally, when such disk contains a memberlist() struct member,
7964         once for each disk that is contained in the structure returned by
7965         memberlist().
7967 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7969         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
7970         environment variable to 'all' in order to obtain debug output from
7971         non-util/ code.
7972         * util/i386/pc/grub-setup.c (main): Likewise.
7974 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7976         * disk/raid.c (grub_raid_scan_device): Check for
7977         `array->device[sb.this_disk.number]' rather than for
7978         `array->device[sb.this_disk.number]->name', since the latter is not
7979         guaranteed to be accessible.
7981 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7983         * disk/raid.c: Update copyright.
7984         * fs/cpio.c: Likewise.
7985         * include/grub/raid.h: Likewise.
7986         * loader/i386/pc/multiboot.c: Likewise.
7987         * util/hostfs.c: Likewise.
7989 2008-02-08  Robert Millan  <rmh@aybabtu.com>
7991         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
7992         to a grub_disk_t array.
7993         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
7994         `device[x]'.
7995         (grub_raid_scan_device): Replace `device[x].name' accesses with
7996         `device[x]->name'.  Simplify initialization of `array->device[x]'.
7998 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8000         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8001         grub_dprintf() calls.
8002         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8003         error message.
8005 2008-02-07  Christian Franke  <franke@computer.org>
8007         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8008         instead of fseek and ftell to support large files.
8009         (grub_hostfs_read): Likewise.
8011 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8013         Patch from Jeroen Dekkers.
8014         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8015         failure, since successfully reading all array members might not be
8016         required.
8018 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8020         * util/grub-probe.c (probe): Simplify partmap probing (with the
8021         assumption that the first word up to the underscore equals to
8022         the module name).
8024 2008-02-06  Christian Franke  <franke@computer.org>
8026         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8027         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8028         last block of a cpio or tar stream.
8029         Check for "TRAILER!!!" instead of any empty data
8030         block to detect last block of a cpio stream.
8031         (grub_cpio_dir): Fix constness of variable np.
8032         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8033         cpio or tar trailer is detected.  This fixes a crash
8034         on open of a non existing file.
8036 2008-02-05  Bean  <bean123ch@gmail.com>
8038         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8039         address of entry.
8040         (grub_multiboot_load_elf64): Likewise.
8041         (grub_multiboot): Initialize mbi structure.
8043         * util/grub-fstest.c: Don't include unused header file script.h.
8045         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8046         of file.
8047         (grub_fstest_SOURCES): Likewise.
8049 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8051         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8052         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8053         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8054         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8056         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8057         (translation_table): Replace hardcoded values with macros
8058         provided by `<grub/term.h>'.
8060         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8061         (keyboard_map): Correct/add a few values, with macros provided
8062         by `<grub/term.h>'.
8063         (keyboard_map_shift): Zero values that don't differ from their
8064         `keyboard_map' equivalents.
8065         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8066         Discard the second scan code that is always sent by Caps lock.
8067         Only use `keyboard_map_shift' when it provides a non-zero value,
8068         otherwise fallback to `keyboard_map'.
8070 2008-02-04  Bean  <bean123ch@gmail.com>
8072         * Makefile.in (enable_grub_fstest): New variable.
8074         * conf/common.rmk (grub_fstest_init.lst): New rule.
8075         (grub_fstest_init.h): Likewise.
8076         (grub_fstest_init.c): Likewise.
8077         (util/grub-fstest.c_DEPENDENCIES): New variable.
8078         (grub_fstest_SOURCES): Likewise.
8080         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8082         * util/grub-fstest.c: New file.
8084 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8086         Make grub-setup handle a separate root device.
8088         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8089         so that the root device can be compared with the destination
8090         device.
8091         When embedding the core image, if the root and destination devices
8092         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8093         0xFF.
8094         When not embedding, set ROOT_DRIVE to 0xFF.
8096 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8098         Add support for having a grub directory in a different drive. This
8099         is still only the data handling part.
8101         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8102         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8103         (grub_root_drive): New variable.
8105         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8106         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8107         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8108         as it was.
8110         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8112         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8113         macro.
8114         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8116         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8117         is bogus, because PXE booting does not specify any drive
8118         correctly.
8120         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8121         am not sure if this is really correct.
8123         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8124         is always identical to the boot drive when booting from a CD.
8126         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8127         longer.
8128         (root_drive): New variable.
8129         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8130         (setup_sectors): Push %dx right after popping it, because %dh will
8131         be modified later.
8132         (copy_buffer): Restore %dx.
8134 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8136         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8137         use `cdboot.img' for cdrom images.
8139 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8141         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8142         only setup gfxterm when `font' command has succeeded.
8144 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8146         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8147         (grub_rescue_cmd_multiboot_loader)
8148         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8150 2008-02-03  Pavel Roskin  <proski@gnu.org>
8152         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8153         %edx and %esi from stack only after grub_gate_a20() is called.
8154         grub_gate_a20() clobbers %edx.
8156 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8158         * configure.ac (AC_INIT): Bumped to 1.96.
8160         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8161         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8162         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8163         video/readers/png.c.
8165 2008-02-03  Bean  <bean123ch@gmail.com>
8167         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8168         (cdboot_img_SOURCES): New variable.
8169         (cdboot_img_ASFLAGS): New variable.
8170         (cdboot_img_LDFLAGS): New variable.
8172         * boot/i386/pc/cdboot.S: New file.
8174         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8175         (cd_count): Likewise.
8176         (grub_biosdisk_get_drive): Add support for cd device.
8177         (grub_biosdisk_call_hook): Likewise.
8178         (grub_biosdisk_iterate): Likewise.
8179         (grub_biosdisk_open): Likewise.
8180         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8181         (grub_biosdisk_rw): Support reading from cd device.
8182         (GRUB_MOD_INIT): Iterate cd devices.
8184         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8185         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8186         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8188         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8190 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8192         * commands/read.c: New file.
8193         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8194         (read_mod_SOURCES): New variable.
8195         (read_mod_CFLAGS): Likewise.
8196         (read_mod_LDFLAGS): Likewise.
8198 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8200         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8201         determining whether menu has to be displayed.
8203 2008-02-02  Marco Gerards  <marco@gnu.org>
8205         * bus/pci.c: New file.
8207         * include/grub/pci.h: Likewise.
8209         * include/grub/i386/pc/pci.h: Likewise.
8211         * commands/lspci.c: Likewise.
8213         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8214         `lspci.mod'.
8215         (pci_mod_SOURCES): New variable.
8216         (pci_mod_CFLAGS): Likewise.
8217         (pci_mod_LDFLAGS): Likewise.
8218         (lspci_mod_SOURCES): Likewise.
8219         (lspci_mod_CFLAGS): Likewise.
8220         (lspci_mod_LDFLAGS): Likewise.
8222 2008-02-02  Bean  <bean123ch@gmail.com>
8224         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8225         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8227         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8228         (grub_xfs_btree_node): New structure.
8229         (grub_xfs_btree_root): New structure.
8230         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8231         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8232         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8233         (GRUB_XFS_EXTENT_SIZE): Likewise.
8234         (grub_xfs_read_block): Support btree format type.
8235         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8236         Use directory block as basic unit.
8238         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8240         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8241         __attribute__ ((__regparm__ (1))).
8243 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8245         Correct a mistake in previous commit.
8247         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8248         top.
8249         (normal/command.c_DEPENDENCIES): New variable.
8251 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8253         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8254         top.
8255         (normal/command.c_DEPENDENCIES): New variable.
8256         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8257         * conf/i386-ieee1275.rmk: Likewise.
8258         * conf/i386-linuxbios.rmk: Likewise.
8259         * conf/i386-pc.rmk: Likewise.
8260         * conf/sparc64-ieee1275.rmk: Likewise.
8261         * conf/powerpc-ieee1275.rmk: Likewise.
8262         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8264         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8266 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8268         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8269         call at beginning of function.
8271 2008-01-31  Pavel Roskin  <proski@gnu.org>
8273         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8274         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8275         (grub_mkrescue_SOURCES): Likewise.
8276         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8278 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8280         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8281         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8282         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8283         (grub_probe_SOURCES): ... to here.
8285         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8286         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8287         * conf/i386-ieee1275.rmk: Likewise.
8288         * conf/i386-linuxbios.rmk: Likewise.
8289         * conf/powerpc-ieee1275.rmk: Likewise.
8291 2008-01-30  Tristan Gingold  <gingold@free.fr>
8293         * kern/rescue.c: Silently accept empty lines.
8295 2008-01-29  Bean  <bean123ch@gmail.com>
8297         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8298         (real_code_2): Code cleanup and change comment style.
8299         (move_memory): Avoid using 32-bit address mode.
8301 2008-01-29  Bean  <bean123ch@gmail.com>
8303         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8304         (png_mod_SOURCES): New variable.
8305         (png_mod_CFLAGS): Likewise.
8306         (png_mod_LDFLAGS): Likewise.
8308         * video/readers/png.c: New file.
8310 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8312         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8313         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8314         `ifndef GRUB_MOD_GAP' hack.
8315         * util/elf/grub-mkimage.c (add_segments): Likewise.
8317 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8319         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8320         `GRUB_MOD_GAP' for platforms in which it's not defined.
8321         * util/elf/grub-mkimage.c (add_segments): Likewise.
8323 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8325         Get grub-emu to build again (including parallel builds).
8327         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8328         Split into ...
8329         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8330         (normal/execute.c_DEPENDENCIES): ... this, ...
8331         (grub-emu_DEPENDENCIES): ... and this.
8333         * conf/i386-efi.rmk: Likewise.
8334         * conf/i386-linuxbios.rmk: Likewise.
8335         * conf/i386-ieee1275.rmk: Likewise.
8336         * conf/powerpc-ieee1275.rmk: Likewise.
8337         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8339 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8341         * NEWS: Add a few items.
8343 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8345         Fix parallel builds with grub-emu.  Based on earlier commit for
8346         grub-probe and grub-setup.
8348         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8349         (util/grub-emu.c_DEPENDENCIES): ... this.
8350         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8351         (util/grub-emu.c_DEPENDENCIES): ... this.
8352         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8353         (util/grub-emu.c_DEPENDENCIES): ... this.
8354         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8355         (util/grub-emu.c_DEPENDENCIES): ... this.
8356         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8357         (util/grub-emu.c_DEPENDENCIES): ... this.
8359 2008-01-27  Pavel Roskin  <proski@gnu.org>
8361         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8362         to create a gap between _end and the modules added to the image
8363         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8364         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8365         * util/elf/grub-mkimage.c (add_segments): Likewise.
8367 2008-01-26  Pavel Roskin  <proski@gnu.org>
8369         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8370         just return an error.
8372 2008-01-26  Bean  <bean123ch@gmail.com>
8374         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8375         (grub_reiserfs_get_item): Save offset of the next item.
8376         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8378 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8380         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8381         make all filesystem sources appear together (possibly fixing omissions
8382         while at it).
8383         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8384         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8385         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8386         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8388         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8389         add `kern/file.c'.
8390         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8391         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8392         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8393         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8395         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8396         (probe): Add a sanity check to make sure of our ability to read
8397         requested files when probing for filesystem type.
8399         * genmk.rb: Update copyright year (2007).
8401         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8402         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8403         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8404         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8405         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8406         : Remove function prototypes.
8408 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8410         Revert my previous commits (based on wrong assumption of how grub_errno
8411         works).
8413         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8414         * kern/file.c (grub_file_open): Likewise.
8416 2008-01-24  Pavel Roskin  <proski@gnu.org>
8418         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8419         that hang if GRUB tries to setup colors.
8420         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8421         colors for firmwares that don't support it.
8422         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8423         Recognize Open Hack'Ware, set flags to work around its
8424         limitations.
8426 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8428         * kern/file.c (grub_file_open): Do not account previous failures of
8429         unrelated functions when grub_errno is checked for.
8430         Reported by Oleg Strikov.
8432 2008-01-24  Bean  <bean123ch@gmail.com>
8434         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8435         (grub_ufs_sblock): New member volume name.
8436         (grub_ufs_find_file): Fix string copy bug.
8437         (grub_ufs_label): Implement this function properly.
8439         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8440         (grub_hfs_iterate_records): Use the correct file number for extents
8441         and catalog file. Fix problem in next index calculation.
8442         (grub_hfs_find_node): Replace recursive function call with loop.
8443         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8445 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8447         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8448         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8449         (grub_multiboot2_real_boot): New function prototype.
8451         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8452         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8454         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8455         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8457 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8459         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8460         #ifdef'ed out grub_printf().
8462 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8464         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8465         grub_dprintf calls, since they make "debug=all" mode unusable.
8466         (grub_console_checkkey): Likewise.
8468 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8470         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8471         `term/i386/pc/at_keyboard.c'.
8472         (pkglib_MODULES): Add `serial.mod'.
8473         (serial_mod_SOURCES): New variable.
8474         (serial_mod_CFLAGS): Likewise.
8475         (serial_mod_LDFLAGS): Likewise.
8477         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8478         `<grub/powerpc/ieee1275/console.h>'.
8479         (grub_keyboard_controller_init): New function prototype.
8480         (grub_console_checkkey): Likewise.
8481         (grub_console_getkey): Likewise.
8483         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8484         keyboard on i386.
8486         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8487         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8489 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8491         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8492         present, "(memdisk)/boot/grub" becomes the default prefix.
8494         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8495         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8496         allows users to overlay additional files into the image.
8498 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8500         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8501         and `machine/memory.h'.
8502         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8503         (_multiboot_mod_SOURCES): New variable.
8504         (_multiboot_mod_CFLAGS): Likewise.
8505         (_multiboot_mod_LDFLAGS): Likewise.
8506         (multiboot_mod_SOURCES): Likewise.
8507         (multiboot_mod_CFLAGS): Likewise.
8508         (multiboot_mod_LDFLAGS): Likewise.
8510         * include/grub/i386/ieee1275/loader.h: New file.
8512         * include/grub/i386/ieee1275/machine.h: Likewise.
8514         * include/grub/i386/ieee1275/memory.h: Likewise.
8516         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8517         variable declaration.
8518         (grub_os_area_size): Likewise.
8520         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8521         (grub_lower_mem, grub_upper_mem): New variables.
8522         (grub_stop_floppy): New function (just to make
8523         grub_multiboot2_real_boot() happy).
8525         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8526         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8527         (grub_stop): New function.
8528         Include `"../realmode.S"' and `"../loader.S"'.
8530         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8531         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8533         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8534         rely on grub_multiboot2_real_boot() for final boot.
8536 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8538         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8539         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8540         device that doesn't look like an SD card.
8541         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8542         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8543         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8544         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8545         found.
8547 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8549         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8550         avoid claiming over our own code.
8552 2008-01-22  Bean  <bean123ch@gmail.com>
8554         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8555         (jpeg_mod_SOURCES): New variable.
8556         (jpeg_mod_CFLAGS): Likewise.
8557         (jpeg_mod_LDFLAGS): Likewise.
8559         * video/readers/jpeg.c : New file.
8561 2008-01-22  Bean  <bean123ch@gmail.com>
8563         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8564         there are no more items.
8566 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8568         * kern/mm.c (grub_mm_init_region): Improve debug message.
8570 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8572         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8573         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8574         address.
8575         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8576         a C macro.
8577         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8578         Indicates start of upper memory.
8579         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8580         (generate_image): Abort when image size is big enough to corrupt
8581         upper memory.
8583         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8584         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8585         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8586         instead of hardcoding 0xA0000.
8587         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8588         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8589         instead of hardcoding 0xA0000.
8591 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8593         * disk/memdisk.c (memdisk_size): New variable.
8594         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8595         `memdisk_size'.
8596         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8597         image to dynamic memory.
8598         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8599         `memdisk_size'.  Free memdisk block.
8601 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8603         Fix detection of very small filesystems (like tar).
8605         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8606         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8607         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8608         a problem with this disk).
8610 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8612         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8613         on grub_biosdisk_rw_standard() error.
8615 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8617         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8618         recent changes.
8619         * kern/elf.c: Likewise.
8620         * kern/ieee1275/ieee1275.c: Likewise.
8621         * kern/powerpc/ieee1275/openfw.c: Likewise.
8622         * term/ieee1275/ofconsole.c: Likewise.
8624 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8626         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8628         * include/grub/kernel.h (grub_arch_memdisk_addr)
8629         (grub_arch_memdisk_size): Moved from here ...
8631         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8632         (grub_arch_memdisk_size): ... to here.
8634 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8636         Mostly based on bugfix from Bean.
8638         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8639         attribute with hook() parameter.
8640         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8641         declaration.
8642         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8643         attribute with hook() parameter.
8644         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8645         declaration.
8647 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8649         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8650         (pkglib_MODULES): Add `memdisk.mod'.
8651         (memdisk_mod_SOURCES): New variable.
8652         (memdisk_mod_CFLAGS): Likewise.
8653         (memdisk_mod_LDFLAGS): Likewise.
8655         * disk/memdisk.c: New file.
8657         * include/grub/disk.h (grub_disk_dev_id): Add
8658         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8660         * include/grub/i386/pc/kernel.h
8661         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8662         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8663         (grub_kernel_image_size): New variable declaration.
8664         (grub_total_module_size): Likewise.
8665         (grub_memdisk_image_size): Likewise.
8667         * include/grub/i386/pc/memory.h
8668         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8670         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8671         (grub_arch_memdisk_addr): New variable declaration.
8672         (grub_arch_memdisk_size): Likewise.
8674         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8675         (grub_arch_memdisk_size): Likewise.
8677         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8678         (codestart): Replace hardcoded `0x100000' with
8679         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8681         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8682         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8683         not NULL, append the contents of the file it refers to, at the end of
8684         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8685         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8686         (options): Add "memdisk"|'m' option.
8687         (main): Parse --memdisk|-m option, and pass user-provided path as
8688         parameter to generate_image().
8690 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8692         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8693         grub_dprintf() calls from here ...
8694         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8696 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8698         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8700         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8701         declaration.
8702         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8703         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8704         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8705         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8706         property).
8707         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8708         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8710 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8712         Get rid of confusing function (superseded by
8713         `grub_ieee1275_get_integer_property')
8714         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8715         prototype.
8716         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8717         function.
8718         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8719         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8720         in native endianness from grub_ieee1275_get_integer_property().
8722 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8724         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8725         command after "shut-down", since implementations differ on which
8726         the command for halt is.
8728 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8730         * include/grub/i386/linuxbios/console.h: Add header protection.
8731         (grub_keyboard_controller_init): New function prototype.
8732         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8733         (KEYBOARD_COMMAND_READ): Likewise.
8734         (KEYBOARD_COMMAND_WRITE): Likewise.
8735         (KEYBOARD_SCANCODE_SET1): Likewise.
8736         (grub_keyboard_controller_write): New function.
8737         (grub_keyboard_controller_read): Likewise.
8738         (grub_keyboard_controller_init): Likewise.
8740         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8741         (grub_console_init): On coreboot/LinuxBIOS, call
8742         grub_keyboard_controller_init().
8744 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8746         PowerPC changes provided by Pavel Roskin.
8748         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8749         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8750         don't rely on cmain() doing it.
8751         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8752         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8754 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8756         * include/grub/i386/linuxbios/memory.h
8757         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8758         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8759         receive `table_header' as argument.  Instead, probe for it in the
8760         known memory ranges where it can be present.
8761         (grub_available_iterate): Do not pass a fixed `table_header' address
8762         to grub_linuxbios_table_iterate().
8764 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8766         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8767         * conf/i386-ieee1275.rmk: New file.
8768         * include/grub/i386/ieee1275/console.h: Likewise.
8769         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8770         * include/grub/i386/ieee1275/kernel.h: Likewise.
8771         * include/grub/i386/ieee1275/time.h: Likewise.
8772         * kern/i386/ieee1275/init.c: Likewise.
8773         * kern/i386/ieee1275/startup.S: Likewise.
8775 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8777         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8778         when pointers are 32-bit (but still do set it to one when they are
8779         64-bit).
8781 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8783         * include/grub/ieee1275/ieee1275.h
8784         (grub_ieee1275_get_integer_property): New function prototype.
8786         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8787         (grub_ieee1275_get_integer_property): New function.  Wraps around
8788         grub_ieee1275_get_property() to handle endianness.
8790         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8791         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8792         where appropriate.
8793         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8794         (grub_map): Likewise.
8795         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8797 2008-01-15  Bean  <bean123ch@gmail.com>
8799         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8800         (grub_script_execute_cmdline): Reset grub_errno.
8802         * normal/main.c (read_config_file): Reset grub_errno.
8804         * normal/parse.y (script_init): New.
8805         (script): Move function and menuentry here.
8806         (delimiter): New.
8807         (command): Add delimiter at the end of command.
8808         (commands): Adjust to match the new command.
8809         (commandblock): Remove grub_script_lexer_record_start.
8810         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8811         (if): Use the new commands.
8813         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8815 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8817         * normal/menu.c (run_menu): Move timeout message from here ...
8818         (print_timeout): ... to here.
8819         (run_menu): Use print_timeout() once during initial draw to print
8820         the whole message, and again in every clock tick to update only
8821         the number of seconds.
8823 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8825         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8826         actual size of `available' from grub_ieee1275_get_property(), and
8827         restrict parsing to that bound.
8829 2008-01-15  Christian Franke  <franke@computer.org>
8831         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8832         (argp_program_version): Remove variable.
8833         (argp_program_bug_address): Likewise.
8834         (options): Convert from struct argp_option to struct option.
8835         (struct arguments): Remove.
8836         (parse_opt): Remove.
8837         (usage): New function.
8838         (main): Replace struct args members by simple variables.
8839         Replace argp_parse() by getopt_long().
8840         Add switch to evaluate options.
8841         Add missing "(...)" around root_dev in prefix string.
8843 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8845         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8846         for grub_ieee1275_exit(), in order to improve portability.
8848 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8850         * util/grub.d/10_linux.in (prefix): Define.
8851         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8853 2008-01-13  Pavel Roskin  <proski@gnu.org>
8855         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8856         grub_errno if no errors have been detected.
8858 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8860         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8861         (grub_util_get_dev_abstraction): New function prototype.
8863         * util/getroot.c: Include `<grub/util/getroot.h>'
8864         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8865         (grub_util_get_dev_abstraction): ... here (new function).
8867         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8868         `PRINT_ABSTRACTION'.
8869         (probe): Probe for abstraction type when requested.
8870         (main): Understand `--target=abstraction'.
8872         * util/i386/efi/grub-install.in: Add abstraction module to core
8873         image when it is found to be necessary.
8874         * util/i386/pc/grub-install.in: Likewise.
8875         * util/powerpc/ieee1275/grub-install.in: Likewise.
8877         * util/update-grub_lib.in (font_path): Return system path without
8878         converting to GRUB path.
8879         * util/update-grub.in: Convert system path returned by font_path()
8880         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8881         abstraction module is needed for loading fonts (if any).  Export
8882         that as `GRUB_PRELOAD_MODULES'.
8883         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8884         insmod commands).
8886 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8888         Remove some unused code from reiserfs.
8890         * fs/reiserfs.c (struct grub_reiserfs_key)
8891         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8892         (struct grub_reiserfs_node_body): Removed.
8893         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8894         Likewise.
8895         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8896         Likewise.
8897         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8898         Likewise.
8899         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8900         Likewise.
8901         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8902         Likewise.
8903         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8904         Likewise.
8905         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8906         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8907         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8909 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8911         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8912         Determines if a file is garbage left by packaging systems, etc.
8913         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8914         for processing /etc/grub.d scripts.
8915         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
8916         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
8917         as a condition for processing Linux images.
8919 2008-01-10  Pavel Roskin  <proski@gnu.org>
8921         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
8922         to compile reiserfs.c on PowerPC.
8924 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8926         * kern/device.c (grub_device_iterate): Do not abort device iteration
8927         when one of the devices cannot be opened.
8928         * kern/disk.c (grub_disk_open): Do not account previous failures of
8929         unrelated functions when grub_errno is checked for.
8931 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8933         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
8934         `! grub_linux_is_bzimage', change order of address comparison to make
8935         it more intuitive, and improve "too big zImage" error message.
8937 2008-01-08  Robert Millan  <rmh@aybabtu.com>
8939         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
8940         `$(update-grub_DATA)'.
8941         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
8942         targets.
8944 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8946         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
8947         which instruction is modified by grub-setup during installation
8948         (since it wasn't obvious by only looking at this file).
8950 2008-01-07  Robert Millan  <rmh@aybabtu.com>
8952         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
8953         listing actual TODO items.
8955 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8957         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
8958         correctly.
8959         (grub_reiserfs_get_key_offset): Likewise.
8960         (grub_reiserfs_set_key_offset): Likewise.
8961         (grub_reiserfs_set_key_type): Likewise.
8962         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
8964         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
8965         better to remove the bitfield version completely.
8967 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8969         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
8970         allocated from the heap, due to the fshelp implementation.
8971         (grub_reiserfs_dir): Free NODE, due to the same reason.
8973 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
8975         Mostly from Vincent Pelletier:
8977         * fs/reiserfs.c: New file.
8979         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
8980         (reiserfs_mod_SOURCES): New variable.
8981         (reiserfs_mod_CFLAGS): Likewise.
8982         (reiserfs_mod_LDFLAGS): Likewise.
8984         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
8985         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
8986         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
8987         normal/color.c.
8989 2008-01-06  Robert Millan  <rmh@aybabtu.com>
8991         * normal/color.c: Remove `<grub/env.h>'.
8993 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
8995         * include/grub/normal.h: Include <grub/env.h>.
8997 2008-01-05  Robert Millan  <rmh@aybabtu.com>
8999         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9000         usage example with `(hd0,1)'.
9001         Reported by Samuel Thibault.
9003 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9005         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9006         (grub_linux_boot_zimage): Rename to ...
9007         (grub_linux_boot): ... this.
9008         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9009         (grub_linux_boot_zimage): Conditionalize zImage copy.
9011         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9012         (grub_linux_boot_bzimage): Remove prototype.
9013         (grub_linux_boot_zimage): Rename to ...
9014         (grub_linux_boot): ... this.
9016         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9017         (grub_linux_boot): Remove function.
9019 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9021         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9022         (grub_env_write_color_highlight): Likewise.
9023         (grub_wait_after_message): Likewise.
9025         * normal/color.c: New file.
9027         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9028         (normal_mod_DEPENDENCIES): Likewise.
9030         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9031         (normal_mod_DEPENDENCIES): Likewise.
9033         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9034         (normal_mod_DEPENDENCIES): Likewise.
9036         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9037         (normal_mod_DEPENDENCIES): Likewise.
9039         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9040         for waiting after a message is printed.
9041         * normal/main.c (read_config_file): Likewise.
9042         (grub_normal_init): Register grub_env_write_color_normal() and
9043         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9044         `color_highlight' variables as global.
9046         * normal/menu.c (grub_wait_after_message): New function.
9047         (grub_color_menu_normal): New variable.  Replaces ...
9048         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9049         (grub_color_menu_highlight): New variable.  Replaces ...
9050         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9051         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9052         `GRUB_TERM_COLOR_STANDARD'.
9053         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9054         `normal_code' and `highlight_code' to `old_color_normal' and
9055         `old_color_highlight', respectively.
9056         (grub_menu_init_page): Update colors when drawing the menu, based on
9057         `menu_color_normal' and `menu_color_highlight' variables.
9058         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9059         a message is printed.
9061 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9063         * kern/env.c (grub_env_context_open): Propagate hooks for global
9064         variables to new context.
9066         * kern/main.c (grub_set_root_dev): Export `root' variable.
9068 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9070         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9071         discs unconditionally, since udev and others have options to provide
9072         them.
9074 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9076         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9078 2008-01-04  Christian Franke  <franke@computer.org>
9080         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9081         of eisa_mmap.
9083 2008-01-03  Pavel Roskin  <proski@gnu.org>
9085         * kern/i386/linuxbios/init.c: Put "void" to all function
9086         declarations with no arguments.
9087         * kern/powerpc/ieee1275/init.c: Likewise.
9088         * term/i386/pc/at_keyboard.c: Likewise.
9089         * term/i386/pc/vga_text.c: Likewise.
9090         * util/grub-mkdevicemap.c: Likewise.
9092 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9094         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9095         message when loaded image is out of bounds.
9096         (grub_multiboot_load_elf64): Likewise.
9098 2008-01-02  Pavel Roskin  <proski@gnu.org>
9100         * util/grub.d/10_linux.in: Try version without ".old" when
9101         looking for initrd.  It's better to use initrd from the newer
9102         kernel of the same version than no initrd at all.
9104 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9106         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9108 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9110         * include/grub/video.h: Added grub_video_unmap_color and
9111         grub_video_get_active_render_target.
9112         (grub_video_adapter): Added unmap_color and get_active_render_target.
9114         * video/video.c: Added grub_video_unmap_color and
9115         grub_video_get_active_render_target.
9116         (grub_video_get_info): Changed method to accept NULL pointer as an
9117         argument to allow detection of active video adapter.
9119         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9120         grub_video_vbe_unmap_color_int.
9121         Added grub_video_vbe_unmap_color and
9122         grub_video_vbe_get_active_render_target.
9123         (grub_video_vbe_adapter): Added unmap_color and
9124         get_active_render_target.
9126         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9127         with grub_video_vbe_unmap_color_int.
9129         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9130         (DEFAULT_NORMAL_COLOR): Likewise.
9131         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9132         (DEFAULT_FG_COLOR): Removed.
9133         (DEFAULT_BG_COLOR): Likewise.
9134         (DEFAULT_CURSOR_COLOR): Changed value.
9135         (grub_virtual_screen): Added standard_color_setting,
9136         normal_color_setting, highlight_color_setting and term_color.
9137         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9138         (bitmap_width): Added.
9139         (bitmap_height): Likewise.
9140         (bitmap): Likewise.
9141         (set_term_color): Likewise.
9142         (grub_virtual_screen_setup): Changed to use new terminal coloring
9143         settings.
9144         (grub_gfxterm_init): Added init for bitmap.
9145         (grub_gfxterm_fini): Added destroy for bitmap.
9146         (redraw_screen_rect): Updated to use background bitmap and new
9147         terminal coloring.
9148         (scroll_up): Added optimization for case when there is no bitmap.
9149         (grub_gfxterm_cls): Fixed to use correct background color.
9150         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9151         coloring.
9152         (grub_virtual_screen_setcolor): Likewise.
9153         (grub_virtual_screen_getcolor): Added.
9154         (grub_gfxterm_background_image_cmd): Likewise.
9155         (grub_video_term): Added setcolor and getcolor.
9156         (MOD_INIT): Added registration of background_image command.
9157         (MOD_TERM): Added unregistration for background_image command.
9159 2007-12-30  Pavel Roskin  <proski@gnu.org>
9161         * loader/multiboot_loader.c: Fix multiboot command
9162         unregistration.  Fix all typos in the word "multiboot".
9164 2007-12-29  Pavel Roskin  <proski@gnu.org>
9166         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9167         support for initrd names used in Fedora.
9169 2007-12-26  Bean  <bean123ch@gmail.com>
9171         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9172         (cpio_mod_SOURCES): New variable.
9173         (cpio_mod_CFLAGS): Likewise.
9174         (cpio_mod_LDFLAGS): Likewise.
9176         * fs/cpio.c: New file.
9178         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9180         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9182         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9184         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9186 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9188         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9189         (grub_getcolor): New function.
9191         * kern/term.c (grub_getcolor): New function.
9192         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9193         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9194         (print_entry): Set normal and highlight colors to
9195         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9196         respectively, before printing and restore them to old
9197         values afterwards.
9198         (grub_menu_init_page): Likewise.  Fill an additional colored space
9199         that would otherwise be left blank.
9201         * term/efi/console.c (grub_console_getcolor): New function.
9202         (struct grub_console_term.getcolor): New variable.
9203         * term/i386/pc/console.c (grub_console_getcolor): New function.
9204         (struct grub_console_term.getcolor): New variable.
9205         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9206         (struct grub_console_term.getcolor): New variable.
9208         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9209         (struct grub_console_term.setcolor): Remove variable.
9210         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9211         (struct grub_console_term.setcolor): Remove variable.
9212         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9213         (struct grub_console_term.setcolor): Remove variable.
9214         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9215         (struct grub_console_term.setcolor): Remove variable.
9217 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9219         * configure.ac: Search for possible unifont.hex locations, and
9220         define UNIFONT_HEX if found.
9222         * Makefile.in (UNIFONT_HEX): Define variable.
9223         (DATA): Rename to ...
9224         (PKGLIB): ... this.  Update all users.
9225         (PKGDATA): New variable.
9226         (pkgdata_IMAGES): Rename to ...
9227         (pkglib_IMAGES): ... this. Update all users.
9228         (pkgdata_MODULES): Rename to ...
9229         (pkglib_MODULES): ... this. Update all users.
9230         (pkgdata_PROGRAMS): Rename to ...
9231         (pkglib_PROGRAMS): ... this. Update all users.
9232         (pkgdata_DATA): Rename to ...
9233         (pkglib_DATA): ... this. Update all users.
9234         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9235         (unicode.pff, ascii.pff): New rules.
9236         (all-local): Add `$(PKGDATA)' dependency.
9237         (install-local): Process `$(PKGDATA)'.
9239         * util/update-grub_lib.in (font_path): Search for *.pff files in
9240         a few more locations, including `${pkgdata}'.
9242 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9244         Patch from Bean  <bean123ch@gmail.com>:
9245         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9246         `size'.
9248 2007-12-21  Bean  <bean123ch@gmail.com>
9250         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9251         (ntfscomp_mod_SOURCES): New variable.
9252         (ntfscomp_mod_CFLAGS): Likewise.
9253         (ntfscomp_mod_LDFLAGS): Likewise.
9255         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9256         (grub_probe_SOURCES): Likewise.
9257         (grub_emu_SOURCES): Likewise.
9259         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9260         (grub_emu_SOURCES): Likewise.
9262         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9263         (grub_emu_SOURCES): Likewise.
9265         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9266         (grub_emu_SOURCES): Likewise.
9268         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9269         (read_run_list): Renamed to grub_ntfs_read_run_list.
9270         (decomp_nextvcn): Moved to ntfscomp.c.
9271         (decomp_getch): Likewise.
9272         (decomp_get16): Likewise.
9273         (decomp_block): Likewise.
9274         (read_block): Likewise.
9275         (read_data): Partially moved to ntfscomp.c.
9276         (fixup): Change unsigned to grub_uint16_t.
9277         (read_mft): Change unsigned long to grub_uint32_t.
9278         (read_attr): Likewise.
9279         (read_data): Likewise.
9280         (read_run_data): Likewise.
9281         (read_run_list): Likewise.
9282         (read_mft): Likewise.
9284         * fs/ntfscomp.c: New file.
9286         * include/grub/ntfs.h: New file.
9288 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9290         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9291         IDE disk check, since Linux is known to support 20 IDE disks.
9292         Reported by Colin Watson.
9294 2007-12-15  Bean  <bean123ch@gmail.com>
9296         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9297         (lnxboot_img_SOURCES): New variable.
9298         (lnxboot_img_ASFLAGS): Likewise.
9299         (lnxboot_img_LDFLAGS): Likewise.
9301         * boot/i386/pc/lnxboot.S: New file.
9303 2007-11-24  Pavel Roskin  <proski@gnu.org>
9305         * configure.ac: Test if '--build-id=none' is supported by the
9306         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9307         objcopy to generate incorrect binary files (binutils
9308         2.17.50.0.18-1 as shipped by Fedora 8).
9309         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9310         linking, so that build ID doesn't break the test.
9312 2007-11-24  Pavel Roskin  <proski@gnu.org>
9314         * include/grub/i386/time.h: use "void" in the argument list
9315         of grub_cpu_idle().
9316         * include/grub/powerpc/time.h: Likewise.
9317         * include/grub/sparc64/time.h: Likewise.
9319 2007-11-18  Christian Franke  <franke@computer.org>
9321         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9322         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9323         This fixes the problem that function keys did not work in grub-emu.
9325 2007-11-18  Christian Franke  <franke@computer.org>
9327         * disk/host.c (grub_host_open): Remove attribute unused from
9328         name parameter. Add check for "host". This fixes the problem
9329         that grub-emu does not find partitions.
9331 2007-11-18  Christian Franke  <franke@computer.org>
9333         * util/hostfs.c (is_dir): New function.
9334         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9335         (grub_hostfs_read): Add missing fseek().
9336         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9337         of grub-emu on "ls (host)".
9339 2007-11-18  Christian Franke  <franke@computer.org>
9341         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9342         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9343         to 64 bit boundary by default.
9345 2007-11-18  Bean  <bean123ch@gmail.com>
9347         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9348         (hexdump_mod_SOURCES): New variable.
9349         (hexdump_mod_CFLAGS): Likewise.
9350         (hexdump_mod_LDFLAGS): Likewise.
9352         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9354         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9356         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9358         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9360         * include/grub/hexdump.h: New file.
9362         * commands/hexdump.c: New file.
9364 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9366         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9367         in grub_outb() calls.
9368         (beep_on): Likewise.
9370 2007-11-10  Christian Franke  <franke@computer.org>
9372         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9373         (grub_menu_run): Likewise.
9375 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9377         * include/grub/i386/efi/machine.h: New file.
9378         * include/grub/i386/linuxbios/machine.h: Likewise.
9379         * include/grub/i386/pc/machine.h: Likewise.
9380         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9381         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9383         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9384         (serial_hw_io_addr): New variable.
9385         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9386         instead of `(unsigned short *) 0x400'.
9388 2007-11-10  Bean  <bean123ch@gmail.com>
9390         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9392 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9394         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9395         (vga_mod_SOURCES): Added.
9396         (vga_mod_CFLAGS): Likewise.
9397         (vga_mod_LDFLAGS): Likewise.
9399         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9400         grub_outb() calls.
9401         (set_map_mask): Likewise.
9402         (set_read_map): Likewise.
9403         (set_read_address): Likewise.
9404         (vga_font): Removed variable.
9405         (get_vga_glyph): Removed function.
9406         (invalidate_char): Likewise.
9407         (write_char): Changed to use grub_font_get_glyph() for font
9408         information.
9409         (grub_vga_putchar): Likewise.
9410         (grub_vga_getcharwidth): Likewise.
9412 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9414         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9415         flags.
9416         (pxeboot_img_LDFLAGS): Likewise.
9417         (diskboot_img_LDFLAGS): Likewise.
9418         (kernel_img_LDFLAGS): Likewise.
9420 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9422         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9423         in grub_outb() calls.
9424         (serial_hw_init): Likewise.
9426 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9428         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9429         spaces.  Skip non-regular files.
9431 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9433         * kern/disk.c (grub_disk_firmware_fini)
9434         (grub_disk_firmware_is_tainted): New variables.
9436         * include/grub/disk.h (grub_disk_firmware_fini)
9437         (grub_disk_firmware_is_tainted): Likewise.
9439         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9440         (grub_disk_biosdisk_fini): ... to here.
9441         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9442         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9443         is set.  Register grub_disk_biosdisk_fini() in
9444         `grub_disk_firmware_fini'.
9446         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9447         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9448         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9449         to finish existing firmware disk interface.
9451         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9452         (ata_mod_SOURCES): New variable.
9453         (ata_mod_CFLAGS): Likewise.
9454         (ata_mod_LDFLAGS): Likewise.
9456 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9458         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9459         (grub_ata_wait): Reimplement using grub_millisleep().
9461         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9462         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9464 2007-11-03  Marco Gerards  <marco@gnu.org>
9466         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9467         (CRTC_ADDR_PORT): New macro.
9468         (CRTC_DATA_PORT): Likewise.
9469         (CRTC_CURSOR): Likewise.
9470         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9471         (CRTC_CURSOR_ADDR_LOW): Likewise.
9472         (update_cursor): New function.
9473         (grub_console_real_putchar): Call `update_cursor'.
9474         (grub_console_gotoxy): Likewise.
9475         (grub_console_cls): Set the default color when clearing the
9476         screen.
9477         (grub_console_setcursor): Implemented.
9479 2007-11-03  Marco Gerards  <marco@gnu.org>
9481         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9482         become activate.
9483         (grub_ata_pio_write): Likewise.
9485         (grub_atapi_identify): Wait after issuing an ATA command.
9486         (grub_atapi_packet): Likewise.
9487         (grub_ata_identify): Likewise.
9488         (grub_ata_readwrite): Likewise.
9490 2007-11-03  Marco Gerards  <marco@gnu.org>
9492         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9493         (grub_ata_pio_write): Likewise.
9494         (grub_ata_readwrite): Use `grub_error', instead of
9495         returning `grub_errno'.
9497 2007-11-03  Marco Gerards  <marco@gnu.org>
9499         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9500         grub_ata_pio_write once for every single sector, instead of for
9501         multiple sectors.
9503 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9505         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9507         * conf/i386-linuxbios.rmk: New file.
9509         * kern/i386/pc/hardware.c: Likewise.
9510         * term/i386/pc/at_keyboard.c: Likewise.
9511         * term/i386/pc/vga_text.c: Likewise.
9513         * include/grub/i386/linuxbios/boot.h: Likewise.
9514         * include/grub/i386/linuxbios/console.h: Likewise.
9515         * include/grub/i386/linuxbios/init.h: Likewise.
9516         * include/grub/i386/linuxbios/kernel.h: Likewise.
9517         * include/grub/i386/linuxbios/loader.h: Likewise.
9518         * include/grub/i386/linuxbios/memory.h: Likewise.
9519         * include/grub/i386/linuxbios/serial.h: Likewise.
9520         * include/grub/i386/linuxbios/time.h: Likewise.
9522         * kern/i386/linuxbios/init.c: Likewise.
9523         * kern/i386/linuxbios/startup.S: Likewise.
9524         * kern/i386/linuxbios/table.c: Likewise.
9526 2007-10-31  Marco Gerards  <marco@gnu.org>
9528         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9529         (ata_mod_SOURCES): New variable.
9530         (ata_mod_CFLAGS): Likewise.
9531         (ata_mod_LDFLAGS): Likewise.
9533         * disk/ata.c: New file.
9535         * include/grub/disk.h (grub_disk_dev_id): Add
9536         `GRUB_DISK_DEV_ATA_ID'.
9538 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9540         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9541         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9543         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9544         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9546         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9547         `<grub/types.h>'.
9549         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9551 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9553         * include/grub/types.h (ULONG_MAX): Define macro.
9555 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9557         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9558         `"../realmode.S"'.
9559         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9561 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9563         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9564         (pkgdata_MODULES): Add `biosdisk.mod'.
9565         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9566         variables.
9568         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9569         (grub_biosdisk_init): Replace with ...
9570         (GRUB_MOD_INIT(biosdisk)): ... this.
9571         (grub_biosdisk_fini): Replace with ...
9572         (GRUB_MOD_FINI(biosdisk)): ... this.
9574         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9575         (grub_machine_init): Remove call to grub_biosdisk_init().
9576         (grub_machine_fini): Remove call to grub_machine_fini().
9578         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9580 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9582         * include/grub/time.h: New file.
9583         * include/grub/i386/time.h: Likewise.
9584         * include/grub/powerpc/time.h: Likewise.
9585         * include/grub/sparc64/time.h: Likewise.
9587         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9588         instances to ...
9589         (KERNEL_MACHINE_TIME_HEADER): ... this.
9590         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9591         instances to ...
9592         (KERNEL_MACHINE_TIME_HEADER): ... this.
9593         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9594         instances to ...
9595         (KERNEL_MACHINE_TIME_HEADER): ... this.
9597         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9598         (grub_millisleep): New function.
9599         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9600         (grub_millisleep): New function.
9601         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9602         Remove `grub/machine/time.h' include.
9603         (grub_millisleep): New function.
9604         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9605         Remove `grub/machine/time.h' include.
9606         (grub_millisleep): New function.
9608         * include/grub/misc.h (grub_div_roundup): New function.
9610         * kern/misc.c: Include `<grub/time.h>'.
9611         (grub_millisleep_generic): New function.
9613         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9614         Add `time.h'.
9615         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9616         Add `time.h'.
9617         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9618         `machine/time.h'.  Add `time.h'.
9619         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9621 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9623         * include/grub/misc.h (grub_max): New function.
9625 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9627         * util/misc.c (grub_util_info): Call fflush() before returning.
9629 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9631         * genmk.rb (Image): Copy `extra_flags' from here ...
9632         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9634         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9635         to `argc' and `args' arguments.
9637 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9639         * kern/i386/loader.S: New file.
9641         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9642         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9643         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9644         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9645         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9646         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9647         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9648         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9649         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9650         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9651         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9652         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9653         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9654         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9656         * kern/i386/realmode.S: New file.
9658         * kern/i386/pc/startup.S (protstack): Moved from here ...
9659         * kern/i386/realmode.S (protstack)... to here.
9660         * kern/i386/pc/startup.S (gdt): Moved from here ...
9661         * kern/i386/realmode.S (gdt)... to here.
9662         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9663         * kern/i386/realmode.S (prot_to_real)... to here.
9665         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9666         `kern/i386/realmode.S'.
9668 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9670         * include/grub/i386/loader.h: New file.
9672         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9673         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9674         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9675         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9676         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9677         * include/grub/i386/loader.h (grub_linux_prot_size)
9678         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9679         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9680         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9681         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9683         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9685 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9687         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9688         filesystem when dev->disk is unset.
9689         Do probe for filesystem even when dev->disk->has_partitions is set.
9690         In case a filesystem is found, always report it.
9691         In case it isn't, if dev->disk->has_partitions is set, report that
9692         a partition table was found instead of reporting that no filesystem
9693         could be identified.
9695 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9697         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9698         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9700         * include/grub/types.h (grub_host_to_target16): New macro.
9701         (grub_host_to_target32): Likewise.
9702         (grub_host_to_target64): Likewise.
9703         (grub_target_to_host16): Likewise.
9704         (grub_target_to_host32): Likewise.
9705         (grub_target_to_host64): Likewise.
9707         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9708         Renamed from to ...
9709         (GRUB_MOD_ALIGN): ...this.  Update all users.
9711         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9712         grub_host_to_target32.
9713         Replace grub_be_to_cpu32 with grub_target_to_host32.
9714         (load_modules): Likewise.
9715         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9716         Replace grub_be_to_cpu32 with grub_target_to_host32.
9717         Replace grub_cpu_to_be16 with grub_host_to_target16.
9718         Replace grub_cpu_to_be32 grub_host_to_target32.
9720 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9722         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9723         * util/elf/grub-mkimage.c: ... here.
9725         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9726         `util/powerpc/ieee1275/grub-mkimage.c'.
9728 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9730         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9731         and make it easier to figure out.
9732         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9733         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9734         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9735         leave us with less than HEAP_MIN_SIZE total heap.
9736         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9738 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9740         * include/grub/i386/io.h: New file.
9741         * commands/i386/pc/play.c (inb): Removed.
9742         (outb): Removed.
9743         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9744         with grub_outb().
9745         * term/i386/pc/serial.c  (inb): Removed.
9746         (outb): Removed.
9747         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9748         with grub_outb().
9749         * term/i386/pc/vga.c  (inb): Removed.
9750         (outb): Removed.
9751         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9752         with grub_outb().
9754 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9756         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9757         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9758         Reported by Marcin Kurek.
9760 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9762         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9763         SmartFirmware version updates (as released by Sven Luther), and avoid
9764         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9765         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9766         known broken.
9768 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9770         From Hitoshi Ozeki:
9771         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9772         when merging two regions.
9774 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9776         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9777         * normal/completion.c (grub_normal_do_completion): Likewise.
9778         Reported by Hitoshi Ozeki.
9780 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9782         Do not use devices at boot in chainloading.
9784         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9785         (boot_part_addr): Likewise.
9786         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9787         with BOOT_DRIVE and BOOT_PART_ADDR.
9788         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9789         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9791 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9793         Patch from Simon Peter <dn.tlp@gmx.net>:
9794         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9795         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9796         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9797         util/i386/pc/grub-setup.c_DEPENDENCIES.
9798         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9799         util/grub-probe.c_DEPENDENCIES.
9800         * conf/powerpc-ieee1275.rmk: Likewise.
9802 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9804         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9805         to tell grub-mkdevicemap how to name devices.
9806         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9807         feature).
9809         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9810         util/i386/get_disk_name.c.
9811         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9812         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9813         util/ieee1275/get_disk_name.c.
9815         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9817         * DISTLIST: Add util/i386/get_disk_name.c and
9818         util/ieee1275/get_disk_name.c.
9820         * util/grub-mkdevicemap.c: Replace device naming logic with
9821         grub_util_get_disk_name() calls.
9823 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9825         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9826         (so that it works for both plural and singular quantities).
9828 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9830         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9831         so that [xz] isn't taken into account when determining order.
9833 2007-08-02  Marco Gerards  <marco@gnu.org>
9835         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9836         `include/multiboot2.h', `include/grub/elfload.h',
9837         `include/multiboot.h', `include/grub/multiboot.h',
9838         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9839         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9840         `kern/elf.c', `loader/multiboot_loader.c',
9841         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9842         `loader/i386/pc/multiboot2.c',
9843         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9844         `util/i386/pc/grub-mkrescue.in'.  Remove
9845         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9846         `include/grub/i386/pc/util/biosdisk.h' and
9847         `include/grub/powerpc/ieee1275/multiboot.h'.
9849 2007-08-02  Bean  <bean123ch@gmail.com>
9851         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9852         (ntfs_mod_SOURCES): New variable.
9853         (ntfs_mod_CFLAGS): Likewise.
9854         (ntfs_mod_LDFLAGS): Likewise.
9856         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9857         (grub_probe_SOURCES): Likewise.
9858         (grub_emu_SOURCES): Likewise.
9860         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9861         (grub_emu_SOURCES): Likewise.
9863         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9864         (grub_emu_SOURCES): Likewise.
9866         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9868         * fs/ntfs.c: New file.
9870 2007-08-02  Bean  <bean123ch@gmail.com>
9872         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9874         * file.h (grub_file): Likewise.
9876         * fshelp.h (grub_fshelp_read_file): Likewise.
9878         * util/i386/pc/grub-setup.c (setup): Likewise.
9879         (save_first_sector): Likewise.
9880         (save_blocklists): Likewise.
9882         * fs/affs.c (grub_affs_read_file): Likewise.
9884         * fs/ext2.c (grub_ext2_read_file): Likewise.
9886         * fs/fat.c (grub_fat_read_data): Likewise.
9888         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9890         * fs/hfs.c (grub_hfs_read_file): Likewise.
9892         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9894         * fs/jfs.c (grub_jfs_read_file): Likewise.
9896         * fs/minix.c (grub_minix_read_file): Likewise.
9898         * fs/sfs.c (grub_sfs_read_file): Likewise.
9900         * fs/ufs.c (grub_ufs_read_file): Likewise.
9902         * fs/xfs.c (grub_xfs_read_file): Likewise.
9904         * command/blocklist.c (read_blocklist): Likewise.
9905         (print_blocklist): Likewise.
9907 2007-08-02  Marco Gerards  <marco@gnu.org>
9909         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9910         `util/hostfs.c'.
9912         * disk/host.c: New file.
9914         * util/hostfs.c: Likewise.
9916         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
9917         return `GRUB_ERR_BAD_FS'.
9918         * fs/sfs.c (grub_sfs_mount): Likewise.
9919         * fs/xfs.c (grub_xfs_mount): Likewise.
9921         * include/grub/disk.h (enum grub_disk_dev_id): Add
9922         `GRUB_DISK_DEVICE_HOST_ID'.
9924         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
9926 2007-07-24  Jerone Young  <jerone@gmail.com>
9928         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
9929         modules for compilation.
9930         * conf/powerpc-ieee1275.rmk: Likewise.
9932         * include/multiboot.h: Move multiboot definitions to one file. Rename
9933         many definitions to not get grub specific.
9934         * include/multiboot2.h: Create header with multiboot 2 definitions.
9935         * include/grub/multiboot.h: Header for grub specific function
9936         prototypes and definitions.
9937         * include/grub/multiboot2.h: Likewise.
9938         * include/grub/multiboot_loader.h: Likewise.
9939         * include/grub/i386/pc/multiboot.h: Removed.
9940         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
9942         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
9943         and 2 to allow for one multiboot and module commands.
9944         * loader/multiboot2.c: Add multiboot2 functionality.
9945         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
9946         and definition names.
9947         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
9948         2 functions.
9949         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
9950         ieee1275 specific multiboot2 code.
9952         * kern/i386/pc/startup.S: Change headers and definition names for
9953         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
9955 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9957         * geninitheader.sh: Process file specified in first parameter rather
9958         than hardcoding grub_modules_init.lst.
9959         * geninit.sh: Likewise.  Also, construct header name dynamically rather
9960         than hardcoding grub_modules_init.h.
9962         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
9963         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
9964         grub_probe_init.[ch] and grub_setup_init.[ch].
9966         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
9967         grub_modules_init.h with grub_emu_init.h.
9968         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
9969         grub_probe_init.[ch] files.
9970         * conf/i386-efi.rmk: Likewise.
9971         * conf/i386-pc.rmk: Likewise.
9972         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
9973         grub_setup_init.[ch] files.
9975         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
9976         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
9977         to initialize modules rather than a list of hardcoded functions.
9978         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
9979         grub_init_all() to initialize modules rather than a list of hardcoded
9980         functions.
9982 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9984         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
9985         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
9987 2007-07-22  Robert Millan  <rmh@aybabtu.com>
9989         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9990         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
9991         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
9992         flag when running on SmartFirmware.
9993         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
9994         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
9995         was set.
9997         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
9998         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
9999         rather than decreasing it.
10001         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10002         there's not enough space to do it, fail in the same way as when it
10003         can't be done because there are no partitions.
10005         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10006         when nvsetenv failed.
10008 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10010         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10011         because this rule is automatically generated.
10012         (grub-mkrescue): Removed for the same reason as above.
10014 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10016         Migrate to GNU General Public License Version 3.
10018         * COPYING: Replaced with the plain text version of GPLv3.
10020         * config.guess: Updated from gnulib.
10021         * config.sub: Likewise.
10023         * geninit.sh: Output a GPLv3 copyright notice.
10024         * geninitheader.sh: Likewise.
10025         * genmodsrc.sh: Likewise.
10026         * gensymlist.sh.in: Likewise.
10028         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10029         * boot/i386/pc/diskboot.S: Likewise.
10030         * boot/i386/pc/pxeboot.S: Likewise.
10031         * commands/blocklist.c: Likewise.
10032         * commands/boot.c: Likewise.
10033         * commands/cat.c: Likewise.
10034         * commands/cmp.c: Likewise.
10035         * commands/configfile.c: Likewise.
10036         * commands/echo.c: Likewise.
10037         * commands/help.c: Likewise.
10038         * commands/ls.c: Likewise.
10039         * commands/search.c: Likewise.
10040         * commands/terminal.c: Likewise.
10041         * commands/test.c: Likewise.
10042         * commands/videotest.c: Likewise.
10043         * commands/i386/cpuid.c: Likewise.
10044         * commands/i386/pc/halt.c: Likewise.
10045         * commands/i386/pc/play.c: Likewise.
10046         * commands/i386/pc/reboot.c: Likewise.
10047         * commands/i386/pc/vbeinfo.c: Likewise.
10048         * commands/i386/pc/vbetest.c: Likewise.
10049         * commands/ieee1275/halt.c: Likewise.
10050         * commands/ieee1275/reboot.c: Likewise.
10051         * commands/ieee1275/suspend.c: Likewise.
10052         * disk/loopback.c: Likewise.
10053         * disk/lvm.c: Likewise.
10054         * disk/raid.c: Likewise.
10055         * disk/efi/efidisk.c: Likewise.
10056         * disk/i386/pc/biosdisk.c: Likewise.
10057         * disk/ieee1275/ofdisk.c: Likewise.
10058         * font/manager.c: Likewise.
10059         * fs/affs.c: Likewise.
10060         * fs/ext2.c: Likewise.
10061         * fs/fat.c: Likewise.
10062         * fs/fshelp.c: Likewise.
10063         * fs/hfs.c: Likewise.
10064         * fs/hfsplus.c: Likewise.
10065         * fs/iso9660.c: Likewise.
10066         * fs/jfs.c: Likewise.
10067         * fs/minix.c: Likewise.
10068         * fs/sfs.c: Likewise.
10069         * fs/ufs.c: Likewise.
10070         * fs/xfs.c: Likewise.
10071         * hello/hello.c: Likewise.
10072         * include/grub/acorn_filecore.h: Likewise.
10073         * include/grub/arg.h: Likewise.
10074         * include/grub/bitmap.h: Likewise.
10075         * include/grub/boot.h: Likewise.
10076         * include/grub/cache.h: Likewise.
10077         * include/grub/device.h: Likewise.
10078         * include/grub/disk.h: Likewise.
10079         * include/grub/dl.h: Likewise.
10080         * include/grub/elfload.h: Likewise.
10081         * include/grub/env.h: Likewise.
10082         * include/grub/err.h: Likewise.
10083         * include/grub/file.h: Likewise.
10084         * include/grub/font.h: Likewise.
10085         * include/grub/fs.h: Likewise.
10086         * include/grub/fshelp.h: Likewise.
10087         * include/grub/gzio.h: Likewise.
10088         * include/grub/hfs.h: Likewise.
10089         * include/grub/kernel.h: Likewise.
10090         * include/grub/loader.h: Likewise.
10091         * include/grub/lvm.h: Likewise.
10092         * include/grub/misc.h: Likewise.
10093         * include/grub/mm.h: Likewise.
10094         * include/grub/net.h: Likewise.
10095         * include/grub/normal.h: Likewise.
10096         * include/grub/parser.h: Likewise.
10097         * include/grub/partition.h: Likewise.
10098         * include/grub/pc_partition.h: Likewise.
10099         * include/grub/raid.h: Likewise.
10100         * include/grub/rescue.h: Likewise.
10101         * include/grub/script.h: Likewise.
10102         * include/grub/setjmp.h: Likewise.
10103         * include/grub/symbol.h: Likewise.
10104         * include/grub/term.h: Likewise.
10105         * include/grub/terminfo.h: Likewise.
10106         * include/grub/tparm.h: Likewise.
10107         * include/grub/types.h: Likewise.
10108         * include/grub/video.h: Likewise.
10109         * include/grub/efi/api.h: Likewise.
10110         * include/grub/efi/chainloader.h: Likewise.
10111         * include/grub/efi/console.h: Likewise.
10112         * include/grub/efi/console_control.h: Likewise.
10113         * include/grub/efi/disk.h: Likewise.
10114         * include/grub/efi/efi.h: Likewise.
10115         * include/grub/efi/pe32.h: Likewise.
10116         * include/grub/efi/time.h: Likewise.
10117         * include/grub/i386/linux.h: Likewise.
10118         * include/grub/i386/setjmp.h: Likewise.
10119         * include/grub/i386/types.h: Likewise.
10120         * include/grub/i386/efi/kernel.h: Likewise.
10121         * include/grub/i386/efi/loader.h: Likewise.
10122         * include/grub/i386/efi/time.h: Likewise.
10123         * include/grub/i386/pc/biosdisk.h: Likewise.
10124         * include/grub/i386/pc/boot.h: Likewise.
10125         * include/grub/i386/pc/chainloader.h: Likewise.
10126         * include/grub/i386/pc/console.h: Likewise.
10127         * include/grub/i386/pc/init.h: Likewise.
10128         * include/grub/i386/pc/kernel.h: Likewise.
10129         * include/grub/i386/pc/loader.h: Likewise.
10130         * include/grub/i386/pc/memory.h: Likewise.
10131         * include/grub/i386/pc/multiboot.h: Likewise.
10132         * include/grub/i386/pc/serial.h: Likewise.
10133         * include/grub/i386/pc/time.h: Likewise.
10134         * include/grub/i386/pc/vbe.h: Likewise.
10135         * include/grub/i386/pc/vbeblit.h: Likewise.
10136         * include/grub/i386/pc/vbefill.h: Likewise.
10137         * include/grub/i386/pc/vbeutil.h: Likewise.
10138         * include/grub/i386/pc/vga.h: Likewise.
10139         * include/grub/ieee1275/ieee1275.h: Likewise.
10140         * include/grub/ieee1275/ofdisk.h: Likewise.
10141         * include/grub/powerpc/libgcc.h: Likewise.
10142         * include/grub/powerpc/setjmp.h: Likewise.
10143         * include/grub/powerpc/types.h: Likewise.
10144         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10145         * include/grub/powerpc/ieee1275/console.h: Likewise.
10146         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10147         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10148         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10149         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10150         * include/grub/powerpc/ieee1275/time.h: Likewise.
10151         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10152         * include/grub/sparc64/libgcc.h: Likewise.
10153         * include/grub/sparc64/setjmp.h: Likewise.
10154         * include/grub/sparc64/types.h: Likewise.
10155         * include/grub/sparc64/ieee1275/console.h: Likewise.
10156         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10157         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10158         * include/grub/sparc64/ieee1275/time.h: Likewise.
10159         * include/grub/util/biosdisk.h: Likewise.
10160         * include/grub/util/getroot.h: Likewise.
10161         * include/grub/util/lvm.h: Likewise.
10162         * include/grub/util/misc.h: Likewise.
10163         * include/grub/util/raid.h: Likewise.
10164         * include/grub/util/resolve.h: Likewise.
10165         * io/gzio.c: Likewise.
10166         * kern/device.c: Likewise.
10167         * kern/disk.c: Likewise.
10168         * kern/dl.c: Likewise.
10169         * kern/elf.c: Likewise.
10170         * kern/env.c: Likewise.
10171         * kern/err.c: Likewise.
10172         * kern/file.c: Likewise.
10173         * kern/fs.c: Likewise.
10174         * kern/loader.c: Likewise.
10175         * kern/main.c: Likewise.
10176         * kern/misc.c: Likewise.
10177         * kern/mm.c: Likewise.
10178         * kern/parser.c: Likewise.
10179         * kern/partition.c: Likewise.
10180         * kern/rescue.c: Likewise.
10181         * kern/term.c: Likewise.
10182         * kern/efi/efi.c: Likewise.
10183         * kern/efi/init.c: Likewise.
10184         * kern/efi/mm.c: Likewise.
10185         * kern/i386/dl.c: Likewise.
10186         * kern/i386/efi/init.c: Likewise.
10187         * kern/i386/efi/startup.S: Likewise.
10188         * kern/i386/pc/init.c: Likewise.
10189         * kern/i386/pc/lzo1x.S: Likewise.
10190         * kern/i386/pc/startup.S: Likewise.
10191         * kern/ieee1275/ieee1275.c: Likewise.
10192         * kern/powerpc/cache.S: Likewise.
10193         * kern/powerpc/dl.c: Likewise.
10194         * kern/powerpc/ieee1275/cmain.c: Likewise.
10195         * kern/powerpc/ieee1275/crt0.S: Likewise.
10196         * kern/powerpc/ieee1275/init.c: Likewise.
10197         * kern/powerpc/ieee1275/openfw.c: Likewise.
10198         * kern/sparc64/cache.S: Likewise.
10199         * kern/sparc64/dl.c: Likewise.
10200         * kern/sparc64/ieee1275/init.c: Likewise.
10201         * kern/sparc64/ieee1275/openfw.c: Likewise.
10202         * loader/efi/chainloader.c: Likewise.
10203         * loader/efi/chainloader_normal.c: Likewise.
10204         * loader/i386/efi/linux.c: Likewise.
10205         * loader/i386/efi/linux_normal.c: Likewise.
10206         * loader/i386/pc/chainloader.c: Likewise.
10207         * loader/i386/pc/chainloader_normal.c: Likewise.
10208         * loader/i386/pc/linux.c: Likewise.
10209         * loader/i386/pc/linux_normal.c: Likewise.
10210         * loader/i386/pc/multiboot.c: Likewise.
10211         * loader/i386/pc/multiboot_normal.c: Likewise.
10212         * loader/powerpc/ieee1275/linux.c: Likewise.
10213         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10214         * normal/arg.c: Likewise.
10215         * normal/cmdline.c: Likewise.
10216         * normal/command.c: Likewise.
10217         * normal/completion.c: Likewise.
10218         * normal/execute.c: Likewise.
10219         * normal/function.c: Likewise.
10220         * normal/lexer.c: Likewise.
10221         * normal/main.c: Likewise.
10222         * normal/menu.c: Likewise.
10223         * normal/menu_entry.c: Likewise.
10224         * normal/misc.c: Likewise.
10225         * normal/parser.y: Likewise.
10226         * normal/script.c: Likewise.
10227         * normal/i386/setjmp.S: Likewise.
10228         * normal/powerpc/setjmp.S: Likewise.
10229         * normal/sparc64/setjmp.S: Likewise.
10230         * partmap/acorn.c: Likewise.
10231         * partmap/amiga.c: Likewise.
10232         * partmap/apple.c: Likewise.
10233         * partmap/gpt.c: Likewise.
10234         * partmap/pc.c: Likewise.
10235         * partmap/sun.c: Likewise.
10236         * term/gfxterm.c: Likewise.
10237         * term/terminfo.c: Likewise.
10238         * term/efi/console.c: Likewise.
10239         * term/i386/pc/console.c: Likewise.
10240         * term/i386/pc/serial.c: Likewise.
10241         * term/i386/pc/vesafb.c: Likewise.
10242         * term/i386/pc/vga.c: Likewise.
10243         * term/ieee1275/ofconsole.c: Likewise.
10244         * util/biosdisk.c: Likewise.
10245         * util/console.c: Likewise.
10246         * util/genmoddep.c: Likewise.
10247         * util/getroot.c: Likewise.
10248         * util/grub-emu.c: Likewise.
10249         * util/grub-mkdevicemap.c: Likewise.
10250         * util/grub-probe.c: Likewise.
10251         * util/lvm.c: Likewise.
10252         * util/misc.c: Likewise.
10253         * util/raid.c: Likewise.
10254         * util/resolve.c: Likewise.
10255         * util/update-grub.in: Likewise.
10256         * util/update-grub_lib.in: Likewise.
10257         * util/grub.d/00_header.in: Likewise.
10258         * util/grub.d/10_hurd.in: Likewise.
10259         * util/grub.d/10_linux.in: Likewise.
10260         * util/i386/efi/grub-install.in: Likewise.
10261         * util/i386/efi/grub-mkimage.c: Likewise.
10262         * util/i386/pc/grub-install.in: Likewise.
10263         * util/i386/pc/grub-mkimage.c: Likewise.
10264         * util/i386/pc/grub-mkrescue.in: Likewise.
10265         * util/i386/pc/grub-setup.c: Likewise.
10266         * util/i386/pc/misc.c: Likewise.
10267         * util/powerpc/ieee1275/grub-install.in: Likewise.
10268         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10269         * util/powerpc/ieee1275/misc.c: Likewise.
10270         * video/bitmap.c: Likewise.
10271         * video/video.c: Likewise.
10272         * video/i386/pc/vbe.c: Likewise.
10273         * video/i386/pc/vbeblit.c: Likewise.
10274         * video/i386/pc/vbefill.c: Likewise.
10275         * video/i386/pc/vbeutil.c: Likewise.
10276         * video/readers/tga.c: Likewise.
10278 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10280         * conf/i386-efi.rmk: Replace obsolete reference to
10281         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10282         with util/getroot.c.
10283         * conf/powerpc-ieee1275.rmk: Likewise.
10284         * conf/sparc64-ieee1275.rmk: Likewise.
10286         * util/grub-emu.c (main): Fix unchecked pointer handling.
10288 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10290         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10291         invocation to fail, in order to support partition-less media.
10293         * util/i386/pc/grub-install.in: Likewise.
10295         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10296         which fs or partmap modules are needed (akin to its sister scripts).
10298         Also use grub-probe to get rid of unportable /proc/mounts check.
10300         Print the same informational message that the other scripts do, before
10301         exiting.
10303 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10305         * util/update-grub_lib.in (font_path): New function.  Determine whether
10306         a font file can be found and, if so, echo the GRUB path to it.
10308         * util/update-grub.in: Handle multiple terminals depending on user
10309         input, platform availability and font file presence.  Propagate
10310         variables of our findings to /etc/grub.d/ children.
10312         * util/grub.d/00_header.in: Handle multiple terminals, based on
10313         environment setup by update-grub.
10315 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10317         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10319 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10321         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10322         indicate end of data section in kernel image.
10323         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10324         GRUB_KERNEL_MACHINE_DATA_END.
10326         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10327         space for it.
10328         * kern/i386/efi/startup.S: Likewise.
10330         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10331         during image generation.  Implement --prefix option to override this
10332         patch.
10333         * util/i386/efi/grub-mkimage.c: Likewise.
10335         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10336         code to make path relative to its root into a separate function.
10338         * util/i386/pc/grub-install.in: Use newly provided
10339         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10340         pass the result to grub-install --prefix.
10342 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10344         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10345         DEFAULT_DEVICE_MAP.
10346         * util/grub-emu.c: Use above definitions from misc.h instead of
10347         defining them.
10348         * util/grub-mkdevicemap.c: Likewise.
10349         * util/i386/pc/grub-setup.c: Likewise.
10350         * util/grub-probe.c: Likewise.
10351         (probe): Abort with grub_util_error() when either
10352         grub_guess_root_device or grub_util_get_grub_dev fails.
10354 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10356         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10357         "pager" assignment.
10358         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10359         "pcdata".
10360         * util/grub-probe.c (probe): Likewise for "drive_name".
10362 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10364         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10365         not just the cdrom one.
10367 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10369         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10370         Add --pkglibdir=DIR option to override pkglibdir.
10371         Mention --image-type=TYPE in help output.
10372         Fix --grub-mkimage (it was a no-op).
10373         Abort gracefully when no parameter is given.
10375 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10377         * util/i386/pc/grub-mkrescue.in: New file.
10378         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10379         * Makefile.in: Handle bin_SCRIPTS.
10381 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10383         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10384         list of video modes.
10386 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10388         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10389         file doesn't exist, or if it is in a filesystem grub can't read.
10391         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10392         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10393         header comment to fit in 80 columns when the variables are resolved.
10395         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10396         could be identified by update-grub.  Remove redundant check for
10397         unifont.pff existence (since convert_system_path_to_grub_path now
10398         handles that).
10400 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10402         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10404         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10406         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10408 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10410         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10412         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10413         grub_apple_partition_map_fini.
10415         * util/biosdisk.c
10416         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10417         to access >2 TiB disks).
10419         Print disk->total_sectors with %llu instead of %lu, since this
10420         variable is always 64-bit (prevents wrong disk size from being displayed
10421         on either >2 TiB disk or big-endian CPU).
10423         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10424         into a generic case that supports all (sane) partition maps.
10426         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10427         breaks big-endian.
10429         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10430         and grub_apple_partition_map_fini() after that.
10432 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10434         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10436         * util/grub.d/00_header.in: Only enable gfxterm when
10437         convert_system_path_to_grub_path() succeeds.
10439 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10441         * util/update-grub_lib.in: New file.
10442         * DISTLIST: Add update-grub_lib.in.
10443         * conf/common.rmk: Generate update-grub_lib and install it in
10444         $(lib_DATA).
10445         * Makefile.in: Add install routine for $(lib_DATA).
10447         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10448         function provided by update-grub_lib to support arbitrary paths of
10449         unifont.pff.
10450         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10451         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10453 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10455         * commands/i386/cpuid.c: New module.
10456         * DISTLIST: Add it.
10457         * conf/i386-efi.rmk: Enable cpuid.mod.
10458         * conf/i386-pc.rmk: Likewise.
10460 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10462         * kern/disk.c (grub_disk_read): Check return value of
10463         grub_realloc().
10465 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10467         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10468         arrays.
10469         * disk/raid.c (grub_raid_open): Likewise.
10471 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10473         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10474         stack instead of on the heap.
10476         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10477         before doing a read on it.
10479         * configure.ac: Only use -fno-stack-protector for the target
10480         environment.
10482 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10484         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10485         __attribute_ ((unused)) to mode_type argument.
10487         * util/getroot.c (grub_guess_root_device): Fix #endif.
10489         * kern/misc.c (memcmp): Fix prototype.
10491         * include/grub/partition.h [GRUB_UTIL]
10492         (grub_gpt_partition_map_init): Add prototype.
10493         (grub_gpt_partition_map_fini): Likewise.
10495         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10496         at the right place.
10498         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10499         (grub_fat_read_data): Likewise.
10500         (grub_fat_find_dir): Likewise.
10502         * font/manager.c (find_glyph): Make table a const.
10503         (grub_font_get_glyph): Remove bitmap from if statement.
10505 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10507         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10508         code, first search for device in /dev/mapper, then in /dev.
10509         (grub_util_get_grub_dev): New function.
10510         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10511         prototype.
10512         * util/grub-probe.c (probe): Remove check for RAID, call
10513         grub_util_get_grub_dev() instead of
10514         grub_util_biosdisk_get_grub_dev().
10515         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10516         grub_util_biosdisk_get_grub_dev().
10517         * util/i386/pc/grub-setup.c (main): Likewise.
10519 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10521         * DISTLIST: Update for the latest changes.
10522         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10523         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10524         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10525         grub/util/biosdisk.h.
10526         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10527         grub/util/biosdisk.h.
10529 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10531         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10533 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10535         * util/i386/efi/grub-install.in: New.
10536         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10537         newly added grub-install.
10538         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10539         include.
10540         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10541         grub/util/biosdisk.h.
10542         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10543         grub/util/biosdisk.h.
10545 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10547         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10548         * include/grub/util/biosdisk.h: ... here.
10549         * util/i386/pc/biosdisk.c: Moved to ...
10550         * util/biosdisk.c: ... here.
10551         * util/i386/pc/getroot.c: Moved to ...
10552         * util/getroot.c: ... here.
10553         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10554         * util/grub-mkdevicemap.c: ... here.
10555         * util/i386/pc/grub-probe.c: Moved to ...
10556         * util/grub-probe.c: ... here.
10558 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10560         * util/update-grub.in: Remove duplicated line in grub.cfg header
10561         message.
10563 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10565         * util/update-grub.in: Fix a few assumptions about the devices holding
10566         /, /boot and /boot/grub being the same.
10567         * util/grub.d/00_header.in: Likewise.
10568         * util/grub.d/10_hurd.in: Likewise.
10569         * util/grub.d/10_linux.in: Likewise.
10571         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10572         patterns.  Use that to define the `.old' suffix as older than `'.
10574         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10576         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10577         the grub.cfg header message.
10579 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10581         * util/update-grub.in: Create device.map if it doesn't already exist,
10582         before attempting to run grub-probe.
10583         Check for grub-probe and grub-mkdevicemap with the same code
10584         grub-install is using.
10585         Remove test mode.
10587 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10589         * Makefile.in: Add the datarootdir autoconf variable.
10591 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10593         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10594         fail gracefully if dev->disk->partition == NULL.
10596 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10598         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10599         determine partition map module.
10600         * util/i386/pc/grub-install.in: Use this feature to decide which
10601         partition module to load, instead of hardcoding pc and gpt.
10603 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10605         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10606         source directory differs from build directory.
10608 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10610         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10611         initialisation.
10613 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10615         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10617 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10619         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10620         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10622 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10624         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10625         (grub_probe_SOURCES): Likewise.
10626         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10627         GPT and initialize dos_part and bsd_part accordingly.
10628         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10629         install_bsd_part.
10630         (main): Activate gpt module for use during partition identification,
10631         and deactivate it afterwards.
10632         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10633         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10634         partition identification, and deactivate it afterwards.
10636 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10638         * term/i386/pc/console.c (grub_console_fini): Call
10639         grub_term_set_current() before grub_term_unregister().
10641 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10643         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10644         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10645         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10646         and update-grub_DATA.
10647         * conf/common.rmk: Build and install update-grub components.
10648         * conf/common.mk: Regenerate.
10649         * util/update-grub.in: New.  Core of update-grub.
10650         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10651         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10652         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10653         * util/grub.d/README: New.  Document grub.d directory layout.
10655 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10657         * util/grub-emu.c: Move initialization functions
10658         grub_util_biosdisk_init() and grub_init_all() before
10659         grub_util_biosdisk_get_grub_dev(), which relies on them.
10661 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10663         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10664         it is used later.
10666 2007-04-18  Jerone Young  <jerone@gmail.com>
10668         * kernel/elf.c: Add missing parenthesis for conditional statement
10669         stanza.
10671 2007-04-10  Jerone Young  <jerone@gmail.com>
10673         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10674         continue on and look for device node with real device name.
10676 2007-04-10  Jerone Young  <jerone@gmail.com>
10678         * configure.ac: Add argument for autoconf to use transformation
10679         ability.
10680         * Makefile.in: Add autoconf package transformation code.
10681         * util/i386/pc/grub-install.in: Likewise.
10682         * util/powerpc/ieee1275/grub-install.in: Likewise.
10684 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10686         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10687         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10688         (EXT2_REVISION): Likewise.
10689         (EXT2_INODE_SIZE): Likewise.
10690         (struct grub_ext2_block_group): Added a missing member
10691         "used_dirs".
10692         (grub_ext2_read_inode): Divide by the inode size in a superblock
10693         instead of 128 to obtain INODES_PER_BLOCK.
10694         Use the macro EXT2_INODE_SIZE instead of directly using
10695         SBLOCK->INODE_SIZE.
10697 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10699         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10700         superblock instead of the structure size to compute an
10701         offset. This fixes the problem that GRUB could not read a
10702         filesystem when inode size is different from 128-byte.
10704 2007-03-05  Marco Gerards  <marco@gnu.org>
10706         * normal/main.c (read_config_file): When "menu" is not set, create
10707         an initial context.
10709 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10711         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10712         (HEAP_LIMIT): New macro.
10713         (grub_claim_heap): Claim memory up to `heaplimit'.
10715 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10717         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10718         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10719         (_start): Likewise.
10720         (grub_arch_modules_addr): Return address after `_end'.
10721         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10722         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10723         (add_segments): Calculate `_end' from phdr size and location.
10724         (ALIGN_UP): Moved to ...
10725         * include/grub/misc.h: here.
10726         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10727         New macro.
10728         (GRUB_IEEE1275_MODULE_BASE): Removed.
10730 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10732         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10733         loop boundary.
10735 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10737         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10738         All users updated.
10739         (grub_elf64_load_hook_t): Likewise.
10740         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10741         debug output.
10743 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10745         * kern/mm.c: Update copyright.
10746         (grub_mm_debug): Correct syntax error.
10747         (grub_mm_dump_free): New function.
10748         (grub_debug_free): Call `grub_free'.
10749         * include/grub/mm.h: Update copyright.
10750         (grub_mm_dump_free): Add declaration.
10752 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10754         * include/grub/ieee1275/ieee1275.h: Update copyright.
10755         * kern/powerpc/ieee1275/init.c: Likewise.
10756         * kern/powerpc/ieee1275/openfw.c: Likewise.
10758         * loader/powerpc/ieee1275/linux.c: Likewise.
10759         * include/grub/elfload.h: Likewise.
10760         * kern/elf.c: Likewise.
10761         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10762         callers.
10763         (grub_elf64_load): Likewise.
10764         (grub_elf32_load_segment): Move to a nested function.
10765         (grub_elf64_load_segment): Likewise.
10767 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10769         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10770         prototype.
10771         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10772         (grub_heap_len): Likewise.
10773         (HEAP_SIZE): New macro.
10774         (grub_claim_heap): New function.
10775         (grub_machine_init): Don't claim heap directly.  Call
10776         `grub_claim_heap'.
10777         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10778         (grub_available_iterate): New function.
10780 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10782         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10783         * configure.ac: Use it for testing the HOST and TARGET compilers.
10785 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10787         * Makefile.in (enable_grub_emu): New variable.
10788         * configure.ac (--enable-grub-emu): New option.
10789         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10790         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10791         * conf/i386-pc.rmk: Likewise.
10792         * conf/powerpc-ieee1275.rmk: Likewise.
10793         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10795 2006-12-12  Marco Gerards  <marco@gnu.org>
10797         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10799         * kern/env.c (grub_env_unset): Don't free the member `value' when
10800         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10801         pointer.
10803         * normal/main.c (current_menu): Removed.
10804         (free_menu): Unset the `menu' environment variable.
10805         (grub_normal_menu_addentry): Make use of the environment variable
10806         `menu', instead of using the global `current_menu'.  Allocate
10807         memory for the sourcecode of this entry.
10808         (read_config_file): New argument `nested', changed all callers.
10809         Only in the case of a new context, initialize a new menu.  Set the
10810         `menu' environment variable.
10811         (grub_normal_execute): Don't set and unset the environment
10812         variable `menu' here anymore.  Only free the menu when leaving the
10813         context.
10815         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10816         leak.
10818 2006-12-11  Marco Gerards  <marco@gnu.org>
10820         * normal/menu_entry.c (run): Fix off by one bug so the last line
10821         is executed.  Move the loader check to outside the loop.
10823 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10825         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10827 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10829         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10830         the number of sectors.  Reported by Andrey Shuvikov
10831         <mr_hyro@yahoo.com>.
10833 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10835         * kern/disk.c (grub_disk_read): When there is a read error, always
10836         try to read only the necessary data.
10838         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10839         disk/raid.c.
10840         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10841         prototype.
10842         [GRUB_UTIL] (grub_raid_fini): Likewise.
10843         [GRUB_UTIL] (grub_lvm_init): Likewise.
10844         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10845         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10846         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10847         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10848         and grub_raid_fini().
10850 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10852         * include/grub/types.h (__unused): Rename to UNUSED.
10853         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10854         (grub_elf64_size): Likewise.
10856 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10858         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10859         grub_error_push and grub_error_pop in the error-handling path.
10860         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10861         length.
10863 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10865         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10866         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10867         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10868         (kernel_elf_SOURCES): Likewise.
10869         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10870         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10871         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10872         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10873         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10874         (elf_mod_SOURCES): New variable.
10875         (elf_mod_CFLAGS): Likewise.
10876         (elf_mod_LDFLAGS): Likewise.
10877         * include/grub/types.h (__unused): New macro.
10878         * include/grub/elfload.h: New file.
10879         * kern/elf.c: Likewise.
10880         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10881         (ELF32_LOADMASK): New macro.
10882         (ELF64_LOADMASK): Likewise.
10883         (vmlinux): Removed.
10884         (grub_linux_load32): New function.
10885         (grub_linux_load64): Likewise.
10886         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10887         Use grub_elf_t instead of grub_file_t.
10889 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10891         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10892         `catch_result' to struct set_color_args.
10894 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10896         * normal/menu.c: Include grub/script.h.
10897         * normal/menu_entry.c: Likewise.
10898         * include/grub/normal.h: Do not include grub/script.h.
10900 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10902         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10904 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10906         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10907         disk.
10908         (grub_disk_close): Print debug messages when closing a disk.
10909         (grub_disk_read): Print debug messages when disk read fails.
10910         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10911         filesystem type.
10912         * kern/partition.c: Include misc.h.
10913         (grub_partition_iterate): Print debug messages when detecting
10914         partition type.
10916 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10918         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
10919         is negative.
10920         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
10922 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
10924         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10925         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
10927 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
10929         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
10930         instead of sizeof(lv). Patch by Michael Guntsche.
10932 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10934         * disk/lvm.c: Rename VGS to VG_LIST.
10935         (grub_lvm_iterate): Change VGS->LV to VG-LV.
10936         (grub_lvm_open): Likewise.
10937         Thanks to Michael Guntsche for finding this bug.
10939 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
10941         * configure.ac (AC_INIT): Bumped to 1.95.
10943 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10945         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
10946         with "/dev/.static/dev/md".
10948 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10950         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
10951         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
10952         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
10953         DRIVE_NAME are always freed.
10955         * util/i386/pc/biosdisk.c (make_device_name): Add one into
10956         DOS_PART, as a DOS partition is counted from one instead of zero
10957         now. Reported by Robert Millan.
10959 2006-10-14  Robert Millan  <rmh@aybabtu.com>
10961         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
10962         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
10963         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
10964         string returned by grub_guess_root_device.
10965         * util/i386/pc/grub-setup.c: Likewise.
10966         * util/i386/pc/grub-probefs.c: Likewise.
10968         * util/i386/pc/grub-probefs.c: Rename to ...
10969         * util/i386/pc/grub-probe.c: ... this.
10970         * DISTLIST: Remove grub-probefs, add grub-probe.
10971         * conf/i386-efi.rmk: Likewise.
10972         * conf/i386-pc.rmk: Likewise.
10973         * util/i386/pc/grub-install.in: Likewise.
10975         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
10976         choose which information we want to print.
10978 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
10980         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
10981         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
10982         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
10983         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
10984         video/readers/tga.c and video/i386/pc/vbeutil.c.
10986 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
10988         Added support for RAID and LVM.
10990         * disk/lvm.c: New file.
10991         * disk/raid.c: Likewise.
10992         * include/grub/lvm.h: Likewise.
10993         * include/grub/raid.h: Likewise.
10994         * include/grub/util/lvm.h: Likewise.
10995         * include/grub/util/raid.h: Likewise.
10996         * util/lvm.c: Likewise.
10997         * util/raid.c: Likewise.
10999         * include/grub/disk.h (grub_disk_dev_id): Add
11000         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11001         (grub_disk_get_size): New prototype.
11002         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11003         returns a partition.
11004         (grub_disk_get_size): New function.
11006         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11007         verbatim if grub_install_dos_part is -2.
11009         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11010         and LVM devices.
11012         * util/i386/pc/grub-setup.c (setup): New argument
11013         MUST_EMBED. Force embedding of GRUB when the argument is
11014         true. Close FILE before returning.
11015         (main): Add support for RAID and LVM.
11017         * conf/common.rmk: Add RAID and LVM modules.
11018         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11019         util/lvm.c.
11020         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11022         * kern/misc.c (grub_strstr): New function.
11023         * include/grub/misc.h (grub_strstr): New prototype.
11025 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11027         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11029 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11031         * kern/misc.c (grub_strtoull): Guess the base only if not
11032         specified.
11034 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11036         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11037         PowerMac support.
11039 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11041         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11043         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11044         Remove `flags' argument.  All callers changed.
11045         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11046         (IEEE1275_IHANDLE_INVALID): New variable.
11047         (IEEE1275_CELL_INVALID): New variable.
11048         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11049         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11050         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11051         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11052         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11053         codes from Open Firmware.  All callers updated.
11054         (grub_ieee1275_next_property): Directly return Open Firmware return
11055         code.
11056         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11057         Standardize error checking from `grub_ieee1275_get_property'.
11058         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11059         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11061 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11063         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11064         `instance_to_package_args' to `instance_to_path_args'.
11066         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11067         `grub_ieee1275_chosen'.
11069         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11070         `grub_ieee1275_interpret'.
11072 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11074         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11076 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11078         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11079         (__cmpdi): Likewise.
11081         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11082         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11083         `grub_ssize_t'.
11085         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11087         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11088         to type `grub_ssize_t'.
11089         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11091 2006-09-22  Marco Gerards  <marco@gnu.org>
11093         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11094         newlines.
11096 2006-09-22  Marco Gerards  <marco@gnu.org>
11098         * commands/echo.c: New file.
11100         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11102         * conf/common.rmk (echo_mod_SOURCES): New variable.
11103         (echo_mod_CFLAGS): Likewise.
11104         (echo_mod_LDFLAGS): Likewise.
11106 2006-09-22  Marco Gerards  <marco@gnu.org>
11108         * normal/main.c (get_line): Malloc memory instead of using
11109         preallocated memory.  Removed the arguments `cmdline' and
11110         `max_len'.  Updated all callers.
11112 2006-09-22  Marco Gerards  <marco@gnu.org>
11114         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11115         (normal_mod_DEPENDENCIES): Likewise.
11117         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11118         (normal_mod_DEPENDENCIES): Likewise.
11120         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11122 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11124         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11125         programs.
11126         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11127         (normal_mod_DEPENDENCIES): Likewise.
11128         * conf/i386-pc.mk: Regenerate.
11129         * conf/i386-efi.mk: Likewise
11130         * conf/common.mk: Likewise.
11131         * conf/powerpc-ieee1275.mk: Likewise.
11132         * conf/sparc64-ieee1275.mk: Likewise.
11134 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11136         Sync with i386 version.
11137         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11138         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11140 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11142         Import from GRUB Legacy (lib/device.c):
11143         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11144         (init_device_map) [__linux__]: Add support for I2O devices.
11146 2006-09-14  Marco Gerards  <marco@gnu.org>
11148         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11149         `-melf_i386'.
11151 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11153         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11154         /boot/grub/*.lst.
11156         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11158         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11159         before adding it to device.map.
11161 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11163         * genmk.rb: Let GCC generate dependencies the first time it
11164         compiles a file; using the -MD option.
11165         * conf/common.mk: Regenerate.
11166         * conf/i386-pc.mk: Likewise.
11167         * conf/i386-efi.mk: Likewise.
11168         * conf/powerpc-ieee1275.mk: Likewise.
11169         * conf/sparc64-ieee1275.mk: Likewise.
11171 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11173         Move the prototypes of grub_setjmp and grub_longjmp to
11174         cpu/setjmp.h, so that each architecture may specify different
11175         attributes.
11177         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11178         (grub_longjmp): Likewise.
11179         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11180         (grub_longjmp): Likewise.
11181         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11182         (grub_longjmp): Likewise.
11184         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11185         [!GRUB_UTIL] (grub_longjmp): Removed.
11187 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11189         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11190         "color!" method does not return any value.
11192 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11194         * include/grub/bitmap.h: New file.
11196         * include/grub/i386/pc/vbeutil.h: Likewise.
11198         * video/bitmap.c: Likewise.
11200         * video/readers/tga.c: Likewise.
11202         * video/i386/pc/vbeutil.c: Likewise.
11204         * commands/videotest.c: Code cleanup and updated to reflect to new
11205         video API.
11207         * term/gfxterm.c: Likewise.
11209         * video/video.c: Likewise.
11211         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11212         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11213         (bitmap_mod_SOURCES): New entry.
11214         (bitmap_mod_CFLAGS): Likewise.
11215         (bitmap_mod_LDFLAGS): Likewise.
11216         (tga_mod_SOURCES): Likewise.
11217         (tga_mod_CFLAGS): Likewise.
11218         (tga_mod_LDFLAGS): Likewise.
11220         * include/grub/video.h (grub_video_blit_operators): New enum type.
11221         (grub_video_render_target): Changed as forward declaration and moved
11222         actual definition to be video driver specific.
11223         (grub_video_adapter.blit_bitmap): Added blitting operator.
11224         (grub_video_adapter.blit_render_target): Likewise.
11225         (grub_video_blit_bitmap): Likewise.
11226         (grub_video_blit_render_target): Likewise.
11228         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11229         driver specific render target definition.
11230         (grub_video_vbe_map_rgba): Added driver internal helper.
11231         (grub_video_vbe_unmap_color): Updated to use
11232         grub_video_i386_vbeblit_info.
11233         (grub_video_vbe_get_video_ptr): Likewise.
11235         * include/grub/i386/pc/vbeblit.h
11236         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11237         grub_video_i386_vbeblit_info.
11238         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11239         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11240         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11241         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11242         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11243         (grub_video_i386_vbeblit_index_index): Likewise.
11244         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11245         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11246         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11247         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11248         operator.
11249         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11250         operator.
11252         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11253         include/grub/i386/pc/vbeblit.h.
11255         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11256         Updated to use grub_video_i386_vbeblit_info.
11257         (grub_video_i386_vbefill_R8G8B8): Likewise.
11258         (grub_video_i386_vbefill_index): Likewise.
11259         (grub_video_i386_vbefill): Added generic filler.
11261         * video/i386/pc/vbefill.c: Updated to reflect changes on
11262         include/grub/i386/pc/vbefill.h.
11264         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11265         grub_video_i386_vbeblit_info.
11266         (grub_video_vbe_unmap_color): Likewise.
11267         (grub_video_vbe_blit_glyph): Likewise.
11268         (grub_video_vbe_scroll): Likewise.
11269         (grub_video_vbe_draw_pixel): Removed function.
11270         (grub_video_vbe_get_pixel): Likewise.
11271         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11272         updated code to use it.
11273         (common_blitter): Added common blitter for render target and bitmap.
11274         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11275         (grub_video_vbe_blit_render_target): Likewise.
11277 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11279         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11280         is in text mode if there is no console control protocol instance
11281         available.
11283 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11285         * include/grub/video.h: Code cleanup.
11287         * include/grub/i386/pc/vbe.h: Likewise.
11289         * video/i386/pc/vbe.c: Likewise.
11291         * video/i386/pc/vbeblit.c: Likewise.
11293         * video/i386/pc/vbefill.c: Likewise.
11295         * video/video.c: Likewise.  Also added more comments.
11297 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11299         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11300         (struct grub_biosdisk_dap): Likewise.
11302         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11303         linkage settings for all functions.
11305 2006-07-12  Marco Gerards  <marco@gnu.org>
11307         * configure.ac (--enable-mm-debug): Fix typo.
11309         * genkernsyms.sh.in: Use proper quoting for `CC'.
11311 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11313         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11314         (normal_mod_ASFLAGS): Remove "-m32".
11316 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11318         * util/misc.c: Include config.h.
11319         [!HAVE_MEMALIGN]: Do not include malloc.h.
11320         (grub_memalign): Use posix_memalign, if present. Then, use
11321         memalign, if present. Otherwise, emit an error.
11323         * util/grub-emu.c: Do not include malloc.h.
11325         * include/grub/util/misc.h: Include unistd.h. This is required for
11326         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11327         D. Eades III <hde@foobar-qux.org>.
11329         * configure.ac (AC_GNU_SOURCE): Added.
11330         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11331         type.
11333 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11335         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11336         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11338 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11340         * include/grub/types.h (grub_host_addr_t): Rename to
11341         grub_target_addr_t.
11342         (grub_host_off_t): Rename to grub_target_off_t.
11343         (grub_host_size_t): Rename to grub_target_size_t.
11344         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11345         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11347         * include/grub/kernel.h (struct grub_module_header): Change type
11348         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11349         (grub_module_info): Likewise.
11351 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11353         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11354         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11355         Velazquez <jesus.velazquez@gmail.com>.
11357 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11359         Count partitions from 1 instead of 0 in the string representation
11360         of partitions. Still use 0-based internally.
11362         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11363         (sun_partition_map_iterate): Use grub_partition_t instead of
11364         struct grub_partition *. Cast DESC->START_CYLINDER to
11365         grub_uint64_t after converting the endian.
11366         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11367         (sun_partition_map_get_name): Add 1 to P->INDEX.
11369         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11370         PCDATA->DOS_PART.
11371         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11373         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11374         zero instead of one.
11375         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11376         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11378         * partmap/apple.c (apple_partition_map_iterate): Change the type
11379         of POS to unsigned.
11380         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11381         (apple_partition_map_get_name): Add 1 into P->INDEX.
11383         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11384         of POS to unsigned.
11385         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11386         calculate the offset of a partition.
11387         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11388         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11390         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11391         SECTOR to grub_disk_addr_t.
11392         (acorn_partition_map_iterate): Likewise.
11393         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11394         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11395         top.
11396         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11398         * kern/i386/pc/init.c (make_install_device): Add 1 into
11399         GRUB_INSTALL_DOS_PART.
11401         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11402         conditional.
11404 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11406         Clean up the code to support 64-bit addressing in disks and
11407         files. This change is not enough for filesystems yet.
11409         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11410         type of "start" to grub_uint64_t.
11411         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11412         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11413         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11414         convert addresses.
11416         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11417         to grub_disk_addr_t.
11419         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11420         string.
11422         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11424         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11425         to char *.
11427         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11429         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11431         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11433         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11434         to grub_off_t, to detect an error from grub_file_seek.
11435         (grub_multiboot_load_elf32): Likewise.
11437         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11438         maximum unsigned long value when an overflow is detected.
11439         (grub_strtoull): New function.
11440         (grub_divmod64): Likewise.
11441         (grub_lltoa): use grub_divmod64.
11443         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11444         grub_disk_addr_t.
11445         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11446         the pointer to next character. Use grub_strtoull instead of
11447         grub_strtoul.
11448         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11449         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11450         respectively.
11452         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11453         return value is signed.
11454         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11455         test if OFFSET is less than zero, as OFFSET is unsigned now.
11457         * kern/disk.c (struct grub_disk_cache): Change the type of
11458         "sector" to grub_disk_addr_t.
11459         (grub_disk_cache_get_index): Change the type of SECTOR to
11460         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11461         unsigned after shifting.
11462         (grub_disk_cache_invalidate): Change the type of SECTOR to
11463         grub_disk_addr_t.
11464         (grub_disk_cache_unlock): Likewise.
11465         (grub_disk_cache_store): Likewise.
11466         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11467         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11468         grub_disk_addr_t and grub_uint64_t, respectively.
11469         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11470         body, as the value of OFFSET is tweaked by
11471         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11472         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11473         respectively.
11474         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11475         body, as the value of OFFSET is tweaked by
11476         grub_disk_check_range. Change the types of LEN and N to
11477         grub_size_t.
11479         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11480         and "saved_offset" to grub_off_t.
11481         (test_header): Cast BUF to char *.
11482         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11483         to char *.
11484         (grub_gzio_read): Change the types of OFFSET and SIZE to
11485         grub_off_t and grub_size_t, respectively.
11487         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11488         Removed.
11489         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11490         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11491         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11492         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11493         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11495         * include/grub/types.h (grub_off_t): Unconditionally set to
11496         grub_uint64_t.
11497         (grub_disk_addr_t): Changed to grub_uint64_t.
11499         * include/grub/partition.h (struct grub_partition): Change the
11500         types of "start", "len" and "offset" to grub_disk_addr_t,
11501         grub_uint64_t and grub_disk_addr_t, respectively.
11502         (grub_partition_get_start): Return grub_disk_addr_t.
11503         (grub_partition_get_len): Return grub_uint64_t.
11505         * include/grub/misc.h (grub_strtoull): New prototype.
11506         (grub_divmod64): Likewise.
11508         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11509         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11510         grub_off_t, respectively.
11511         All callers and references changed.
11513         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11514         grub_size_t in "read".
11515         All callers and references changed.
11517         * include/grub/file.h (struct grub_file): Change the types of
11518         "offset" and "size" to grub_off_t and grub_off_t,
11519         respectively. Change the type of SECTOR to grub_disk_addr_t in
11520         "read_hook".
11521         (grub_file_read): Change the type of LEN to grub_size_t.
11522         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11523         grub_off_t.
11524         (grub_file_size): Return grub_off_t.
11525         (grub_file_tell): Likewise.
11526         All callers and references changed.
11528         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11529         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11530         "write".
11531         (struct grub_disk): Change the type of "total_sectors" to
11532         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11533         "read_hook".
11534         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11535         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11536         (grub_disk_write): Likewise.
11537         All callers and references changed.
11539         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11540         char * for grub_strncmp to silence gcc.
11541         (grub_iso9660_mount): Likewise.
11542         (grub_iso9660_mount): Likewise.
11543         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11544         return statement.
11545         (grub_iso9660_iterate_dir): Likewise.
11546         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11548         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11549         LEN to grub_disk_addr_t and grub_size_t, respectively.
11551         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11553         * fs/jfs.c (grub_jfs_read_file): Likewise.
11555         * fs/minix.c (grub_jfs_read_file): Likewise.
11557         * fs/sfs.c (grub_jfs_read_file): Likewise.
11559         * fs/ufs.c (grub_jfs_read_file): Likewise.
11561         * fs/xfs.c (grub_jfs_read_file): Likewise.
11563         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11564         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11565         respectively.
11567         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11568         BLKNR to -1 instead of returning GRUB_ERRNO.
11569         (grub_ext2_read_file): Change the types of SECTOR and
11570         LEN to grub_disk_addr_t and grub_size_t, respectively.
11572         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11573         LEN to grub_disk_addr_t and grub_size_t, respectively.
11575         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11576         grub_file_read.
11578         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11579         string. Do not cast SECTOR explicitly.
11581         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11582         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11583         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11584         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11585         over 2TB and LBA mode is not supported, raise an error.
11586         (get_safe_sectors): New function.
11587         (grub_biosdisk_read): Use get_safe_sectors.
11588         (grub_biosdisk_write): Likewise.
11590         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11591         (grub_efidisk_write): Likewise.
11593         * disk/loopback.c (delete_loopback): Cosmetic changes.
11594         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11595         correctly.
11596         (grub_loopback_open): Likewise.
11597         (grub_loopback_read): Likewise. Also, change the type of POS to
11598         grub_off_t, and fix the usage of grub_memset.
11600         * commands/i386/pc/play.c: Include grub/machine/time.h.
11602         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11603         print FILE->SIZE.
11605         * commands/configfile.c: Include grub/env.h.
11607         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11608         GRUB_ERRNO directly instead. Change the type of POS to
11609         grub_off_t. Follow the coding standard.
11611         * commands/blocklist.c: Include grub/partition.h.
11612         (grub_cmd_blocklist): Return an error if the underlying device is
11613         not a disk. Take the starting sector of a partition into account,
11614         if a partition is used.
11616         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11617         a length field.
11618         (lba_mode): Support 64-bit addresses.
11619         (chs_mode): Likewise.
11620         (copy_buffer): Adapted to the new offsets of a length field and a
11621         segment field.
11622         (blocklist_default_start): Allocate 64-bit space.
11624         * boot/i386/pc/boot.S (force_lba): Removed.
11625         (boot_drive): Moved to under KERNEL_SECTOR.
11626         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11627         space.
11628         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11629         is useless.
11630         (lba_mode): Refactored to support a 64-bit address. More size
11631         optimization.
11632         (setup_sectors): Likewise.
11634 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11636         * DISTLIST: Added include/grub/i386/linux.h. Removed
11637         include/grub/i386/pc/linux.h
11639         * configure.ac (AC_INIT): Bumped to 1.94.
11641         * config.guess: Updated from gnulib.
11642         * config.sub: Likewise.
11643         * install-sh: Likewise.
11644         * mkinstalldirs: Likewise.
11646 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11648         * conf/common.rmk (grub_modules_init.lst): Depended on
11649         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11650         MODSRCFILES.
11652         * genmk.rb (PModule::rule): Reverted the previous change.
11654 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11656         * conf/common.rmk (grub_modules_init.lst): Depends on
11657         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11658         that the target does not exist before producing.
11659         (grub_modules_init.h): Remove the target before generating.
11660         (grub_emu_init.c): Likewise.
11662         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11664 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11666         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11667         for the target-specific tests. Make sure that we also have the
11668         up-to-date target variables for those tests.
11670 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11672         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11673         (PModule::rule): Likewise.
11675 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11677         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11678         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11679         target-specific flags should be prefixed.
11680         (PModule::rule): Likewise.
11682 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11684         * configure.ac (CMP): Check if cmp is available explicitly.
11686 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11688         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11689         (target_cpu): New variable.
11690         (pkglibdir): Use target_cpu instead of host_cpu.
11692         * util/i386/pc/grub-install.in (host_cpu): Removed.
11693         (target_cpu): New variable.
11694         (pkglibdir): Use target_cpu instead of host_cpu.
11696         * util/genmoddep.c: Removed.
11698         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11699         instead of GRUB_HOST_SIZEOF_VOID_P.
11700         * kern/dl.c: Likewise.
11702         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11703         ...
11704         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11705         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11706         (GRUB_TARGET_SIZEOF_LONG): ... this.
11707         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11708         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11709         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11710         to ...
11711         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11712         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11713         (GRUB_TARGET_SIZEOF_LONG): ... this.
11714         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11715         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11716         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11717         to ...
11718         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11719         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11720         (GRUB_TARGET_SIZEOF_LONG): ... this.
11721         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11722         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11724         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11725         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11726         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11727         instead of GRUB_HOST_SIZEOF_LONG.
11728         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11729         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11730         GRUB_CPU_WORDS_BIGENDIAN.
11731         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11732         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11733         grub_host_ssize_t.
11735         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11736         (genmoddep_SOURCES): Likewise.
11737         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11738         (genmoddep_SOURCES): Likewise.
11739         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11740         (genmoddep_SOURCES): Likewise.
11741         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11742         Likewise.
11743         (genmoddep_SOURCES): Likewise.
11745         * genmoddep.awk: New file.
11747         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11748         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11749         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11750         (PModule::rule): Likewise.
11751         (Program::rule): Likewise.
11752         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11753         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11754         respectively.
11756         * configure.ac: Rewritten intensively to use host and target
11757         instead of build and host, respectively.
11759         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11760         (host_cpu): Removed.
11761         (target_cpu): New variable.
11762         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11763         (BUILD_CC): Removed.
11764         (BUILD_CFLAGS): Likewise.
11765         (BUILD_CPPFLAGS): Likewise.
11766         (TARGET_CC): New variable.
11767         (TARGET_CFLAGS): Likewise.
11768         (TARGET_CPPFLAGS): Likewise.
11769         (TARGET_LDFLAGS): Likewise.
11770         (AWK): Likewise.
11771         (include): Use target_cpu instead of host_cpu.
11772         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11774         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11776 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11778         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11779         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11780         field 'false' to 'exec_on_false'.
11781         (grub_script_create_cmdif): Renamed argument names to reflect above
11782         changes.
11784         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11786         * normal/script.c (grub_script_create_cmdif): Likewise.
11788 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11790         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11791         top.
11792         (grub_hfsplus_btree_recptr): Likewise.
11793         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11794         FILEBLOCK both to pass a block number and store next block
11795         number.
11796         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11797         overflow file correctly. Specify errors appropriately, because
11798         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11799         grub_hfsplus_btree_recptr to get the pointer to a found key.
11800         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11801         is found.
11803         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11804         linux.mod.
11805         (_linux_mod_SOURCES): New variable.
11806         (_linux_mod_CFLAGS): Likewise.
11807         (_linux_mod_LDFLAGS): Likewise.
11808         (linux_mod_SOURCES): Likewise.
11809         (linux_mod_CFLAGS): Likewise.
11810         (linux_mod_LDFLAGS): Likewise.
11812         * DISTLIST: Added loader/i386/efi/linux.c,
11813         loader/i386/efi/linux_normal.c and
11814         include/grub/i386/efi/loader.h.
11816         * loader/i386/efi/linux.c: New file.
11817         * loader/i386/efi/linux_normal.c: Likewise.
11818         * include/grub/i386/efi/loader.h: Likewise.
11820 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11822         * commands/blocklist.c: New file.
11824         * DISTLIST: Added commands/blocklist.c.
11826         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11827         color for the background, and a darker color for the foreground.
11828         (grub_console_checkkey): Return READ_KEY.
11829         (grub_console_cls): Set the background to
11830         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11832         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11834         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11835         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11837         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11838         prototype.
11840         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11841         BG. The spec is wrong again.
11843         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11844         prototype.
11845         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11847         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11848         commands/blocklist.c.
11849         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11851         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11852         (blocklist_mod_SOURCES): New variable.
11853         (blocklist_mod_CFLAGS): Likewise.
11854         (blocklist_mod_LDFLAGS): Likewise.
11856 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11858         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11859         duplication.
11860         (lba_mode): Use %eax more intensively to reduce the code size.
11862 2006-05-20  Marco Gerards  <marco@gnu.org>
11864         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11866         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11867         for `menuentry'.
11868         (script): Accept leading newlines.
11869         (newlines): New rule to describe 0 or more newlines.
11870         (commands): Accept `command' with trailing newline.  Fixed the
11871         order in which arguments were passed to `grub_script_add_cmd'.
11872         Accept commands separated by newlines.
11873         (function): Changed to accept newlines.
11874         (menuentry) Rewritten.
11876         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11877         front of the list, instead of to the end.
11879 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11881         * util/i386/pc/grub-install.in (bindir): New variable.
11882         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11883         Shaver <lbgwjl@gmail.com>.
11885 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11887         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11888         grub/machine/linux.h
11889         * loader/i386/pc/linux.c: Likewise.
11891         * include/grub/i386/pc/linux.h: Moved to ...
11892         * include/grub/i386/linux.h: ... here.
11894         * include/grub/i386/linux.h (struct linux_kernel_params): New
11895         struct.
11897 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11899         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11900         checking.
11901         (grub_video_vbe_blit_glyph): Likewise.
11902         (grub_video_vbe_blit_bitmap): Likewise.
11903         (grub_video_vbe_blit_render_target): Likewise.
11905 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11907         * configure.ac (--with-platform): Properly quote the square
11908         brackets.
11910 2006-05-08  Marco Gerards  <marco@gnu.org>
11912         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11913         this...
11914         (kernel_elf_HEADERS): ...to this.  Updated all users.
11915         (grubof_symlist.c): Renamed from this...
11916         (kernel_elf_symlist.c): ...to this.  Updated all users.
11917         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11918         (grubof_SOURCES): Renamed from this...
11919         (kernel_elf_SOURCES): ...to this.
11920         (grubof_HEADERS): Renamed from this...
11921         (kernel_elf_HEADERS): ...to this.
11922         (grubof_CFLAGS): Renamed from this...
11923         (kernel_elf_CFLAGS): ...to this.
11924         (grubof_ASFLAGS): Renamed from this...
11925         (kernel_elf_ASFLAGS): ...to this.
11926         (grubof_LDFLAGS): Renamed from this...
11927         (kernel_elf_LDFLAGS): ...to this.
11929         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
11930         this...
11931         (kernel_elf_HEADERS): ...to this.  Updated all users.
11932         (grubof_symlist.c): Renamed from this...
11933         (kernel_elf_symlist.c): ...to this.  Updated all users.
11934         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
11935         (grubof_SOURCES): Renamed from this...
11936         (kernel_elf_SOURCES): ...to this.
11937         (grubof_HEADERS): Renamed from this...
11938         (kernel_elf_HEADERS): ...to this.
11939         (grubof_CFLAGS): Renamed from this...
11940         (kernel_elf_CFLAGS): ...to this.
11941         (grubof_ASFLAGS): Renamed from this...
11942         (kernel_elf_ASFLAGS): ...to this.
11943         (grubof_LDFLAGS): Renamed from this...
11944         (kernel_elf_LDFLAGS): ...to this.
11946         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
11947         `kernel.elf' instead of `grubof'.
11949 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
11951         Add --with-platform to configure. Use pkglibdir instead of
11952         pkgdatadir. This is reported by Roger Leigh.
11954         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
11955         (host_vendor): Likewise.
11956         (host_os): Likewise.
11957         (pkgdatadir): Likewise.
11958         (platform): New variable.
11959         (pkglibdir): Likewise.
11960         Use PKGLIBDIR instead of PKGDATADIR.
11962         * util/i386/pc/grub-install.in (datadir): Removed.
11963         (host_vendor): Likewise.
11964         (host_os): Likewise.
11965         (pkgdatadir): Likewise.
11966         (platform): New variable.
11967         (pkglibdir): Likewise.
11968         Use PKGLIBDIR instead of PKGDATADIR.
11970         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
11971         instead of GRUB_DATADIR.
11972         (main): Likewise.
11973         * util/i386/pc/grub-mkimage.c (usage): Likewise.
11974         (main): Likewise.
11975         * util/i386/efi/grub-mkimage.c (usage): Likewise.
11976         (main): Likewise.
11978         * configure.ac (--with-platform): New option.
11979         Use PLATFORM instead of HOST_VENDOR to specify a platform.
11981         * Makefile.in: Include a makefile based on PLATFORM instead of
11982         HOST_VENDOR.
11983         (pkgdatadir): Not appended by the machine type.
11984         (pkglibdir): Appended by the machine type.
11985         (host_vendor): Removed.
11986         (platform): New variable.
11987         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
11988         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
11989         (uninstall): Likewise.
11991 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
11993         Use the environment context in the menu. Remove the commands
11994         "default" and "timeout", and use variables instead.
11996         * normal/menu.c: Include grub/env.h.
11997         (print_entry): Cast TITLE to silence gcc.
11998         (get_timeout): New function.
11999         (set_timeout): Likewise.
12000         (get_entry_number): Likewise.
12001         (run_menu): Use a default entry, a fallback entry and a timeout
12002         in the environment variables "default", "fallback" and
12003         "timeout". Also, tweak the default entry if it is not within the
12004         current menu entries.
12005         (grub_menu_run): Use a fallback entry in the environment variable
12006         "fallback".
12008         * normal/main.c (read_config_file): Do not initialize
12009         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12010         NEWMENU->TIMEOUT.
12011         (grub_normal_execute): Use a data slot to store the menu.
12013         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12014         fallback_entry and timeout.
12015         (struct grub_menu_list): Removed.
12016         (grub_menu_list_t): Likewise.
12017         (struct grub_context): Likewise.
12018         (grub_context_t): Likewise.
12019         (grub_context_get): Likewise.
12020         (grub_context_get_current_menu): Likewise.
12021         (grub_context_push_menu): Likewise.
12022         (grub_context_pop_menu): Likewise.
12023         (grub_default_init): Likewise.
12024         (grub_default_fini): Likewise.
12025         (grub_timeout_init): Likewise.
12026         (grub_timeout_fini): Likewise.
12028         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12029         and timeout.mod.
12030         (normal_mod_SOURCES): Removed normal/context.c.
12032         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12033         commands/default.c, commands/timeout.c and normal/context.c.
12034         (normal_mod_SOURCES): Removed normal/context.c.
12036         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12037         commands/timeout.c and normal/context.c.
12038         (normal_mod_SOURCES): Removed normal/context.c.
12040         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12041         commands/default.c, commands/timeout.c and normal/context.c.
12042         (normal_mod_SOURCES): Removed normal/context.c.
12044         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12045         timeout.mod.
12046         (default_mod_SOURCES): Removed.
12047         (default_mod_CFLAGS): Likewise.
12048         (default_mod_LDFLAGS): Likewise.
12049         (timeout_mod_SOURCES): Removed.
12050         (timeout_mod_CFLAGS): Likewise.
12051         (timeout_mod_LDFLAGS): Likewise.
12053         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12054         normal/context.c.
12056         * commands/default.c: Removed.
12057         * commands/timeout.c: Likewise.
12058         * normal/context.c: Likewise.
12060 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12062         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12064 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12066         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12067         "next" to "prev" for readability.
12068         (struct grub_env_sorted_var): New struct.
12069         (grub_env_context): Renamed to ...
12070         (initial_context): ... this.
12071         (grub_env_var_context): Renamed to ...
12072         (current_context): ... this.
12073         (grub_env_find): Look only at CURRENT_CONTEXT.
12074         (grub_env_context_open): Rewritten to copy exported variables from
12075         previous context.
12076         (grub_env_context_close): Rewritten according to the new
12077         scheme. Also, add an assertion to prevent the initial context from
12078         removed.
12079         (grub_env_insert): Removed the code for the sorted list.
12080         (grub_env_remove): Likewise.
12081         (grub_env_export): Simply mark the variable with
12082         GRUB_ENV_VAR_GLOBAL.
12083         (grub_env_set): A cosmetic change for naming consistency.
12084         (grub_env_get): Likewise.
12085         (grub_env_unset): Likewise.
12086         (grub_env_iterate): Rewritten to sort variables within this
12087         function.
12088         (grub_register_variable_hook): Fixed for naming consistency. Call
12089         grub_env_find again, only if NAME is not found at the first time.
12090         (mangle_data_slot_name): New function.
12091         (grub_env_set_data_slot): Likewise.
12092         (grub_env_get_data_slot): Likewise.
12093         (grub_env_unset_data_slot): Likewise.
12095         * include/grub/env.h (grub_env_var_type): New enum.
12096         (GRUB_ENV_VAR_LOCAL): New constant.
12097         (GRUB_ENV_VAR_GLOBAL): Likewise.
12098         (GRUB_ENV_VAR_DATA): Likewise.
12099         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12100         "type".
12101         (grub_env_set): Replace VAR with NAME for consistency.
12102         (grub_register_variable_hook): Likewise.
12103         (grub_env_export): Specify the name of the argument.
12104         (grub_env_set_data_slot): New prototype.
12105         (grub_env_get_data_slot): Likewise.
12106         (grub_env_unset_data_slot): Likewise.
12108 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12110         Extend the loader so that GRUB can accept a loader which comes
12111         back to GRUB when a loaded image exits. Also, this change adds
12112         support for a chainloader on EFI.
12114         * term/efi/console.c: Include grub/misc.h.
12115         (grub_console_checkkey): Display a scan code on the top for
12116         debugging. This will be removed once the EFI port gets stable.
12117         Correct the scan code mapping.
12119         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12120         allocate memory from larger regions, in order to reduce the number
12121         of allocated regions. Otherwise, the MacOSX loader panics.
12122         (filter_memory_map): Avoid less than 1MB for compatibility with
12123         other loaders.
12124         (add_memory_regions): Allocate from the tail of a region, if
12125         possible, to avoid allocating a region near to 1MB, for the MacOSX
12126         loader.
12128         * kern/efi/init.c (grub_efi_set_prefix): Specify
12129         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12131         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12132         argument IMAGE_HANDLE and specify it to get a loaded image.
12133         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12134         grub_efi_get_loaded_image.
12135         (grub_efi_get_filename): Divide the length by the size of
12136         grub_efi_char16_t.
12137         (grub_efi_get_device_path): New function.
12138         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12139         the length by the size of grub_efi_char16_t for a file path device
12140         path node.
12142         * kern/loader.c (grub_loader_noreturn): New variable.
12143         (grub_loader_set): Accept a new argument NORETURN. Set
12144         GRUB_LOADER_NORETURN to NORETURN.
12145         All callers changed.
12146         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12147         grub_machine_fini.
12149         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12150         prototype.
12151         (grub_efi_get_loaded_image): Take an argument to specify an image
12152         handle.
12154         * include/grub/loader.h (grub_loader_set): Added one more argument
12155         NORETURN.
12157         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12158         instead of grub_efi_open_protocol.
12159         (grub_efidisk_get_device_name): Likewise.
12160         (grub_efidisk_close): Print a newline.
12161         (grub_efidisk_get_device_handle): Fixed to use
12162         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12163         GRUB_EFI_DEVICE_PATH_TYPE.
12165         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12166         * kern/efi/efi.c (device_path_guid): ... here.
12168         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12169         chain.mod.
12170         (kernel_mod_HEADERS): Added efi/disk.h.
12171         (_chain_mod_SOURCES): New variable.
12172         (_chain_mod_CFLAGS): Likewise.
12173         (_chain_mod_LDFLAGS): Likewise.
12174         (chain_mod_SOURCES): Likewise.
12175         (chain_mod_CFLAGS): Likewise.
12176         (chain_mod_LDFLAGS): Likewise.
12178         * DISTLIST: Added include/grub/efi/chainloader.h,
12179         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12181         * include/grub/efi/chainloader.h: New file.
12182         * loader/efi/chainloader.c: Likewise.
12183         * loader/efi/chainloader_normal.c: Likewise.
12185 2006-04-30  Marco Gerards  <marco@gnu.org>
12187         * commands/configfile.c (grub_cmd_source): New function.
12188         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12189         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12191 2006-04-30  Marco Gerards  <marco@gnu.org>
12193         * normal/execute.c (grub_script_execute_cmd): Change the return
12194         type to `grub_err_t'.  Correctly return the error.
12195         (grub_script_execute_cmdline): In case a command line is not a
12196         command or a function, try to interpret it as an assignment.
12198 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12200         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12201         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12202         skip a node whose name is obviously invalid as UTF-16,
12203         i.e. contains a NUL character. Stop the iteration when the last
12204         directory entry is found. Instead of using the return value of
12205         grub_hfsplus_btree_iterate_node, store the value in RET and use
12206         it, because the iterator can be stopped by the last directory
12207         entry.
12209 2006-04-30  Marco Gerards  <marco@gnu.org>
12211         * include/grub/env.h (grub_env_export): New prototype.  Reported
12212         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12214 2006-04-30  Marco Gerards  <marco@gnu.org>
12216         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12217         size of the extents in a catalog file record.
12219 2006-04-29  Marco Gerards  <marco@gnu.org>
12221         * commands/configfile.c (grub_cmd_configfile): Execute the
12222         configfile within its own context.
12224         * include/grub/env.h (grub_env_context_open): New prototype.
12225         (grub_env_context_close): Likewise.
12227         * kern/env.c (grub_env): Removed.
12228         (grub_env_sorted): Likewise.
12229         (grub_env_context): New variable.
12230         (grub_env_var_context): Likewise.
12231         (grub_env_find): Search both the active context and the global
12232         context.
12233         (grub_env_context_open): New function.
12234         (grub_env_context_close): Likewise.
12235         (grub_env_insert): Likewise.
12236         (grub_env_remove): Likewise.
12237         (grub_env_export): Likewise.
12238         (grub_env_set): Changed to use helper functions to avoid code
12239         duplication.
12240         (grub_env_iterate): Rewritten so both the current context and the
12241         global context are being used.
12243         * normal/command.c (export_command): New function.
12244         (grub_command_init): Register the `export' function.
12246 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12248         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12249         explicitly to suppress gcc's warnings.
12250         * fs/fat.c (grub_fat_find_dir): Likewise.
12251         (grub_fat_label): Likewise.
12252         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12253         (grub_xfs_mount): Likewise.
12254         (grub_xfs_label): Likewise.
12255         * fs/affs.c (grub_affs_mount): Likewise.
12256         (grub_affs_label): Likewise.
12257         (grub_affs_iterate_dir): Likewise.
12258         * fs/sfs.c (grub_sfs_mount): Likewise.
12259         (grub_sfs_iterate_dir): Likewise.
12260         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12261         * fs/hfs.c (grub_hfs_mount): Likewise.
12262         (grub_hfs_cmp_catkeys): Likewise.
12263         (grub_hfs_find_dir): Likewise.
12264         (grub_hfs_dir): Likewise.
12265         (grub_hfs_label): Likewise.
12266         * fs/jfs.c (grub_jfs_mount): Likewise.
12267         (grub_jfs_opendir): Likewise.
12268         (grub_jfs_getent): Likewise.
12269         (grub_jfs_lookup_symlink): Likewise.
12270         (grub_jfs_label): Likewise.
12271         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12272         (grub_hfsplus_iterate_dir): Likewise.
12273         (grub_hfsplus_btree_iterate_node): Made static.
12275         * util/grub-emu.c (prefix): New variable.
12276         (grub_machine_set_prefix): New function.
12277         (main): Do not set the environment variable "prefix" here. Only
12278         set PREFIX, which is used later by grub_machine_set_prefix.
12280         * include/grub/video.h: Do not include grub/symbol.h.
12281         (grub_video_register): Not exported. This symbol is not defined in
12282         the kernel.
12283         (grub_video_unregister): Likewise.
12284         (grub_video_iterate): Likewise.
12285         (grub_video_setup): Likewise.
12286         (grub_video_restore): Likewise.
12287         (grub_video_get_info): Likewise.
12288         (grub_video_get_blit_format): Likewise.
12289         (grub_video_set_palette): Likewise.
12290         (grub_video_get_palette): Likewise.
12291         (grub_video_set_viewport): Likewise.
12292         (grub_video_get_viewport): Likewise.
12293         (grub_video_map_color): Likewise.
12294         (grub_video_map_rgb): Likewise.
12295         (grub_video_map_rgba): Likewise.
12296         (grub_video_fill_rect): Likewise.
12297         (grub_video_blit_glyph): Likewise.
12298         (grub_video_blit_bitmap): Likewise.
12299         (grub_video_blit_render_target): Likewise.
12300         (grub_video_scroll): Likewise.
12301         (grub_video_swap_buffers): Likewise.
12302         (grub_video_create_render_target): Likewise.
12303         (grub_video_delete_render_target): Likewise.
12304         (grub_video_set_active_render_target): Likewise.
12306         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12307         Undefined.
12308         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12310         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12311         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12312         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12313         instead of $(srcdir)/genkernsyms.sh.
12315         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12316         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12317         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12318         instead of $(srcdir)/genkernsyms.sh.
12320         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12321         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12322         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12323         instead of $(srcdir)/genkernsyms.sh.
12325         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12326         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         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12331         genkernsyms.sh.
12333         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12334         genkernsyms.sh.
12335         (gensymlist.sh): New target.
12336         (genkernsyms.sh): Likewise.
12338         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12339         genkernsyms.sh.in and gensymlist.sh.in.
12341         * genkernsyms.sh: Removed.
12342         * gensymlist.sh: Likewise.
12344         * genkernsyms.sh.in: New file.
12345         * gensymlist.sh.in: Likewise.
12347 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12349         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12350         clobber "prefix", since we may have already set it manually.
12352 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12354         * kern/misc.c (abort): New alias for grub_abort.
12356 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12358         A new machine-specific function "grub_machine_set_prefix" is
12359         defined. This is called after loading modules, so that a prefix
12360         initialization can use modules. Also, this change adds an
12361         intensive debugging feature for the memory manager via the
12362         configure option "--enable-mm-debug".
12364         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12365         PART.LEN.
12367         * kern/sparc64/ieee1275/init.c (abort): Removed.
12368         (grub_stop): Likewise.
12369         (grub_exit): New function.
12370         (grub_set_prefix): Renamed to ...
12371         (grub_machine_set_prefix): ... this.
12372         (grub_machine_init): Do not call grub_set_prefix.
12374         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12375         (grub_machine_set_prefix): ... this.
12376         (grub_machine_init): Do not call grub_set_prefix.
12378         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12379         (grub_machine_init): Do not set the prefix here.
12381         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12383         * kern/efi/init.c: Include grub/mm.h.
12384         (grub_efi_set_prefix): New function.
12386         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12387         (grub_efi_get_filename): New function.
12388         (grub_print_device_path): Renamed to ...
12389         (grub_efi_print_device_path): ... this.
12391         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12392         [MM_DEBUG] (grub_realloc): Likewise.
12393         [MM_DEBUG] (grub_free): Likewise.
12394         [MM_DEBUG] (grub_memalign): Likewise.
12395         [MM_DEBUG] (grub_mm_debug): New variable.
12396         [MM_DEBUG] (grub_debug_malloc): New function.
12397         [MM_DEBUG] (grub_debug_free): New function.
12398         [MM_DEBUG] (grub_debug_realloc): New function.
12399         [MM_DEBUG] (grub_debug_memalign): New function.
12401         * kern/misc.c (grub_abort): Print a newline to distinguish
12402         the message.
12404         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12405         grub_set_root_dev after loading modules. This is necessary when
12406         setting a prefix depends on modules.
12408         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12409         (grub_efi_print_device_path): ... this.
12410         (grub_efi_get_filename): New prototype.
12411         (grub_efi_set_prefix): Likewise.
12413         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12414         and grub/disk.h.
12415         (grub_efidisk_get_device_handle): New prototype.
12416         (grub_efidisk_get_device_name): Likewise.
12418         * include/grub/mm.h: Include config.h.
12419         (MM_DEBUG): Removed.
12420         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12421         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12422         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12423         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12424         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12425         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12426         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12427         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12428         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12430         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12432         * disk/efi/efidisk.c: Include grub/partition.h.
12433         (iterate_child_devices): New function.
12434         (add_device): First, compare only last device path nodes, so that
12435         devices are sorted by the types.
12436         (grub_efidisk_get_device_handle): New function.
12437         (grub_efidisk_get_device_name): Likewise.
12439         * configure.ac (--enable-mm-debug): New option to enable the
12440         memory manager debugging feature. This makes the binary much
12441         bigger, so is disabled by default.
12443 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12445         Use grub_abort instead of grub_stop, and grub_exit must be
12446         define in each architecture now. Also, this change adds support
12447         for EFI disks.
12449         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12450         (grub_getkey): New function.
12451         (grub_term_get_current): Likewise.
12453         * util/i386/pc/grub-setup.c: Include grub/term.h.
12454         (grub_getkey): New function.
12455         (grub_term_get_current): Likewise.
12457         * util/misc.c (grub_stop): Renamed to ...
12458         (grub_exit): ... this.
12460         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12461         (grub_exit): ... this.
12462         (grub_machine_init): Use grub_abort instead of abort.
12463         (grub_stop): Removed.
12465         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12466         abort.
12468         * kern/i386/pc/startup.S (grub_exit): New function.
12469         (cold_reboot): New label.
12471         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12472         (grub_efi_init): Call grub_efidisk_init.
12473         (grub_efi_fini): Call grub_efidisk_fini.
12475         * kern/efi/efi.c: Include grub/mm.h.
12476         (grub_efi_console_control_guid): Renamed to ...
12477         (console_control_guid): ... this.
12478         (grub_efi_loaded_image_guid): Renamed to ...
12479         (loaded_image_guid): ... this.
12480         (grub_efi_locate_handle): New function.
12481         (grub_efi_open_protocol): Likewise.
12482         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12483         GRUB_EFI_CONSOLE_CONTROL_GUID.
12484         (grub_efi_exit): Removed.
12485         (grub_stop): Likewise.
12486         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12487         (grub_exit): New function.
12488         (grub_print_device_path): Likewise.
12490         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12491         (grub_enter_rescue_mode): Register "exit".
12493         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12494         (grub_abort): New function.
12496         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12498         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12500         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12502         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12503         (grub_print_device_path): New prototype.
12504         (grub_efi_locate_handle): Likewise.
12505         (grub_efi_open_protocol): Likewise.
12507         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12508         * disk/efi/efidisk.c: Likewise.
12510         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12512         * include/grub/efi/console_control.h
12513         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12515         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12516         last 8 bytes as an array.
12517         (GRUB_EFI_DISK_IO_GUID): New macro.
12518         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12519         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12520         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12521         grub_uint8_t.
12522         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12523         (struct grub_efi_device_path): Rename the member "sub_type" to
12524         "subtype".
12525         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12526         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12527         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12528         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12529         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12530         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12531         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12532         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12533         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12534         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12535         (struct grub_efi_pci_device_path): New structure.
12536         (grub_efi_pci_device_path_t): New type.
12537         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12538         (struct grub_efi_pccard_device_path): New structure.
12539         (grub_efi_pccard_device_path_t): New type.
12540         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12541         (struct grub_efi_memory_mapped_device_path): New structure.
12542         (grub_efi_memory_mapped_device_path_t): New type.
12543         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12544         (struct grub_efi_vendor_device_path): New structure.
12545         (grub_efi_vendor_device_path_t): New type.
12546         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12547         (struct grub_efi_controller_device_path): New structure.
12548         (grub_efi_controller_device_path_t): New type.
12549         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12550         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12551         (struct grub_efi_acpi_device_path): New structure.
12552         (grub_efi_acpi_device_path_t): New type.
12553         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12554         (struct grub_efi_expanded_acpi_device_path): New structure.
12555         (grub_efi_expanded_acpi_device_path_t): New type.
12556         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12557         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12558         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12559         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12560         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12561         (struct grub_efi_atapi_device_path): New structure.
12562         (grub_efi_atapi_device_path_t): New type.
12563         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12564         (struct grub_efi_fibre_channel_device_path): New structure.
12565         (grub_efi_fibre_channel_device_path_t): New type.
12566         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12567         (struct grub_efi_1394_device_path): New structure.
12568         (grub_efi_1394_device_path_t): New type.
12569         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12570         (struct grub_efi_usb_device_path): New structure.
12571         (grub_efi_usb_device_path_t): New type.
12572         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12573         (struct grub_efi_usb_class_device_path): New structure.
12574         (grub_efi_usb_class_device_path_t): New type.
12575         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12576         (struct grub_efi_i2o_device_path): New structure.
12577         (grub_efi_i2o_device_path_t): New type.
12578         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12579         (struct grub_efi_mac_address_device_path): New structure.
12580         (grub_efi_mac_address_device_path_t): New type.
12581         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12582         (struct grub_efi_ipv4_device_path): New structure.
12583         (grub_efi_ipv4_device_path_t): New type.
12584         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12585         (struct grub_efi_ipv6_device_path): New structure.
12586         (grub_efi_ipv6_device_path_t): New type.
12587         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12588         (struct grub_efi_infiniband_device_path): New structure.
12589         (grub_efi_infiniband_device_path_t): New type.
12590         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12591         (struct grub_efi_uart_device_path): New structure.
12592         (grub_efi_uart_device_path_t): New type.
12593         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12594         (struct grub_efi_vendor_messaging_device_path): New structure.
12595         (grub_efi_vendor_messaging_device_path_t): New type.
12596         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12597         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12598         (struct grub_efi_hard_drive_device_path): New structure.
12599         (grub_efi_hard_drive_device_path_t): New type.
12600         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12601         (struct grub_efi_cdrom_device_path): New structure.
12602         (grub_efi_cdrom_device_path_t): New type.
12603         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12604         (struct grub_efi_vendor_media_device_path): New structure.
12605         (grub_efi_vendor_media_device_path_t): New type.
12606         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12607         (struct grub_efi_file_path_device_path): New structure.
12608         (grub_efi_file_path_device_path_t): New type.
12609         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12610         (struct grub_efi_protocol_device_path): New structure.
12611         (grub_efi_protocol_device_path_t): New type.
12612         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12613         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12614         (struct grub_efi_bios_device_path): New structure.
12615         (grub_efi_bios_device_path_t): New type.
12616         (struct grub_efi_disk_io): New structure.
12617         (grub_efi_disk_io_t): New type.
12618         (struct grub_efi_block_io_media): New structure.
12619         (grub_efi_block_io_media_t): New type.
12620         (struct grub_efi_block_io): New structure.
12621         (grub_efi_block_io_t): New type.
12623         * include/grub/misc.h (grub_stop): Removed.
12624         (grub_exit): New prototype.
12625         (grub_abort): Likewise.
12627         * include/grub/disk.h (enum grub_disk_dev_id): Added
12628         GRUB_DISK_DEVICE_EFIDISK_ID.
12630         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12631         disk/efi/efidisk.c.
12632         (kernel_syms.lst): Remove the target if an error occurs.
12634 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12636         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12637         as it was simply too buggy.
12639 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12641         * kern/misc.c (grub_lltoa): New function.
12642         (grub_vsprintf): Added support for the long long suffix,
12643         i.e. "ll".
12645 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12647         * Makefile.in (LDFLAGS): Add variable.
12648         (LD): Remove variable.
12649         * configure.ac: Add -m32 to LDFLAGS.
12650         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12651         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12652         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12653         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12654         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12655         variables.
12656         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12657         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12658         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12660 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12662         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12663         length for unknown glyph.
12665 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12667         Add support for pre-loaded modules into the EFI port.
12669         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12670         completely. Accept one more argument DIR. The caller has changed.
12672         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12674         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12675         (grub_efi_loaded_image_guid): New variable.
12676         (grub_efi_get_loaded_image): New function.
12677         (grub_arch_modules_addr): Likewise.
12679         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12680         prototype.
12682         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12683         (struct grub_efi_loaded_image): New structure.
12684         (grub_efi_loaded_image_t): New type.
12686 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12688         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12689         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12690         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12692 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12694         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12696 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12698         * DISTLIST: Added include/grub/efi/console.h,
12699         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12700         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12702         * include/grub/efi/console.h: New file.
12703         * include/grub/efi/time.h: Likewise.
12704         * include/grub/i386/efi/kernel.h: Likewise.
12705         * kern/efi/init.c: Likewise.
12706         * kern/efi/mm.c: Likewise.
12707         * term/efi/console.c: Likewise.
12709         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12710         (grub_stop): Removed.
12711         (grub_get_rtc): Likewise.
12712         (grub_machine_init): Simply call grub_efi_init.
12713         (grub_machine_fini): Call grub_efi_fini.
12715         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12716         (grub_efi_output_string): Removed.
12717         (grub_efi_stall): New function.
12718         (grub_stop): Likewise.
12719         (grub_get_rtc): Likewise.
12721         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12722         (grub_efi_stall): New prototype.
12723         (grub_efi_allocate_pages): Likewise.
12724         (grub_efi_free_pages): Likewise.
12725         (grub_efi_get_memory_map): Likewise.
12726         (grub_efi_mm_init): Likewise.
12727         (grub_efi_mm_fini): Likewise.
12728         (grub_efi_init): Likewise.
12729         (grub_efi_fini): Likewise.
12731         * include/grub/i386/efi/time.h: Do not include
12732         grub/symbol.h. Include grub/efi/time.h.
12733         (GRUB_TICKS_PER_SECOND): Removed.
12734         (grub_get_rtc): Likewise.
12736         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12737         Added padding. The EFI spec is buggy.
12738         (GRUB_EFI_BLACK): New macro.
12739         (GRUB_EFI_BLUE): Likewise.
12740         (GRUB_EFI_GREEN): Likewise.
12741         (GRUB_EFI_CYAN): Likewise.
12742         (GRUB_EFI_RED): Likewise.
12743         (GRUB_EFI_MAGENTA): Likewise.
12744         (GRUB_EFI_BROWN): Likewise.
12745         (GRUB_EFI_LIGHTGRAY): Likewise.
12746         (GRUB_EFI_BRIGHT): Likewise.
12747         (GRUB_EFI_DARKGRAY): Likewise.
12748         (GRUB_EFI_LIGHTBLUE): Likewise.
12749         (GRUB_EFI_LIGHTGREEN): Likewise.
12750         (GRUB_EFI_LIGHTCYAN): Likewise.
12751         (GRUB_EFI_LIGHTRED): Likewise.
12752         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12753         (GRUB_EFI_YELLOW): Likewise.
12754         (GRUB_EFI_WHITE): Likewise.
12755         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12756         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12757         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12758         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12759         (GRUB_EFI_BACKGROUND_RED): Likewise.
12760         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12761         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12762         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12763         (GRUB_EFI_TEXT_ATTR): Likewise.
12765         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12766         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12767         (kernel_mod_HEADERS): Added efi/time.h.
12769 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12771         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12772         include/grub/efi/api.h, include/grub/efi/console_control.h,
12773         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12774         include/grub/i386/efi/time.h, kern/efi/efi.c,
12775         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12776         and util/i386/efi/grub-mkimage.c.
12778         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12780         * genmk.rb (PModule#rule): Do not export symbols if
12781         #{prefix}_EXPORTS is set to "no".
12783         * conf/i386-efi.mk: New file.
12784         * conf/i386-efi.rmk: Likewise.
12785         * include/grub/efi/api.h: Likewise.
12786         * include/grub/efi/console_control.h: Likewise.
12787         * include/grub/efi/efi.h: Likewise.
12788         * include/grub/efi/pe32.h: Likewise.
12789         * include/grub/i386/efi/time.h: Likewise.
12790         * kern/efi/efi.c: Likewise.
12791         * kern/i386/efi/init.c: Likewise.
12792         * kern/i386/efi/startup.S: Likewise.
12793         * util/i386/efi/grub-mkimage.c: Likewise.
12795 2006-04-17  Marco Gerards  <marco@gnu.org>
12797         * include/grub/script.h: Include <grub/parser.h> and
12798         "grub_script.tab.h".
12799         (struct grub_lexer_param): New struct.
12800         (struct grub_parser_param): Likewise.
12801         (grub_script_create_arglist): Pass the state in an argument.
12802         (grub_script_add_arglist): Likewise.
12803         (grub_script_create_cmdline): Likewise.
12804         (grub_script_create_cmdblock): Likewise.
12805         (grub_script_create_cmdif): Likewise.
12806         (grub_script_create_cmdmenu): Likewise.
12807         (grub_script_add_cmd): Likewise.
12808         (grub_script_arg_add): Likewise.
12809         (grub_script_lexer_ref): Likewise.
12810         (grub_script_lexer_deref): Likewise.
12811         (grub_script_lexer_record_start): Likewise.
12812         (grub_script_lexer_record_stop): Likewise.
12813         (grub_script_mem_record): Likewise.
12814         (grub_script_mem_record_stop): Likewise.
12815         (grub_script_malloc): Likewise.
12816         (grub_script_yylex): Likewise.
12817         (grub_script_yyparse): Likewise.
12818         (grub_script_yyerror): Likewise.
12819         (grub_script_yylex): Likewise.
12820         (grub_script_lexer_init): Return the state.
12822         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12823         (grub_script_lexer_done): Likewise.
12824         (grub_script_lexer_getline): Likewise.
12825         (grub_script_lexer_refs): Likewise.
12826         (script): Likewise.
12827         (newscript): Likewise.
12828         (record): Likewise.
12829         (recording): Likewise.
12830         (recordpos): Likewise.
12831         (recordlen): Likewise.
12832         (grub_script_lexer_init): Return the state instead of setting
12833         global variables.
12834         (grub_script_lexer_ref): Use the newly added argument for state
12835         instead of globals.
12836         (grub_script_lexer_deref): Likewise.
12837         (grub_script_lexer_record_start): Likewise.
12838         (grub_script_lexer_record_stop): Likewise.
12839         (recordchar): Likewise.
12840         (nextchar): Likewise.
12841         (grub_script_yylex2): Likewise.
12842         (grub_script_yylex): Likewise.
12843         (grub_script_yyerror): Likewise.
12845         * normal/parser.y (func_mem): Removed variable.
12846         (menu_entry): Likewise.
12847         (err): Likewise.
12848         (%lex-param): New parser option.
12849         (%parse-param): Likewise.
12850         (script): Always return the AST.
12851         (argument): Pass the state around.
12852         (arguments): Likewise.
12853         (grubcmd): Likewise.
12854         (commands): Likewise.
12855         (function): Likewise.
12856         (menuentry): Likewise.
12857         (if_statement): Likewise.
12858         (if): Likewise.
12860         * normal/script.c (grub_script_memused): Removed variable.
12861         (grub_script_parsed): Likewise.
12862         (grub_script_malloc): Added a state argument.  Use that instead of
12863         global variables.
12864         (grub_script_mem_record): Likewise.
12865         (grub_script_mem_record_stop): Likewise.
12866         (grub_script_arg_add): Likewise.
12867         (grub_script_add_arglist): Likewise.
12868         (grub_script_create_cmdline): Likewise.
12869         (grub_script_create_cmdif): Likewise.
12870         (grub_script_create_cmdmenu): Likewise.
12871         (grub_script_add_cmd): Likewise.
12872         (grub_script_parse): Setup the state before calling the parser.
12874 2006-04-16  Marco Gerards  <marco@gnu.org>
12876         * normal/command.c (grub_command_init): Remove the title command.
12878         * normal/lexer.c (grub_script_yylex): Renamed from this...
12879         (grub_script_yylex2): ... to this.
12880         (grub_script_yylex): New function.  Temporary
12881         introduced to filter some tokens.
12882         (grub_script_yyerror): Print a newline.
12884         * normal/main.c (read_config_file): Output information about the
12885         lines that contain errors.  Wait for a key after all lines have
12886         been processed.  Don't return an empty menu.
12888         * normal/parser.y (func_mem): Don't initialize.
12889         (menu_entry): Likewise.
12890         (err): New variable.
12891         (script): Don't return anything when an error was encountered.
12892         (ws, returns): Removed rules.
12893         (argument): Disabled concatenated variable support.
12894         (arguments): Remove explicit separators.
12895         (grubcmd): Likewise.
12896         (function): Likewise.
12897         (menuentry): Likewise.
12898         (if): Likewise.
12899         (commands): Likewise.  Add error handling.
12901         * normal/script.c (grub_script_create_cmdline): If
12902         `grub_script_parsed' is 0, assume the parser encountered an error.
12904 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12906         * configure.ac: Add support for EFI. Fix the typo
12907         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12909 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12911         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12912         foreign multibyte characters should be shown correctly.
12914 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12916         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
12917         calculation.
12918         (read_config_file): Made it to close file before returning.
12920 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
12922         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
12923         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
12924         video/i386/pc/vbefill.c.
12926         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
12927         video/i386/pc/vbefill.c.
12929         * include/grub/video.h (grub_video_blit_format): New enum.
12930         (grub_video_mode_info): Added new member blit_format.
12931         (grub_video_get_blit_format): New function prototype.
12933         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
12934         function prototype.
12935         (grub_video_vbe_map_rgb): Likewise.
12936         (grub_video_vbe_unmap_color): Likewise.
12938         * include/grub/i386/pc/vbeblit.h: New file.
12940         * include/grub/i386/pc/vbefill.h: New file.
12942         * video/video.c (grub_video_get_blit_format): New function.
12943         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
12944         (grub_video_vbe_map_rgb): Likewise.
12945         (grub_video_vbe_unmap_color): Likewise.
12947         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
12948         optimized fills.
12949         (grub_video_vbe_blit_render_target): Changed to use more optimized
12950         blits.
12951         (grub_video_vbe_setup): Added detection for optimized settings.
12952         (grub_video_vbe_create_render_target): Likewise.
12954         * video/i386/pc/vbeblit.c: New file.
12956         * video/i386/pc/vbefill.c: New file.
12958 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
12960         * font/manager.c (grub_font_get_glyph): Removed font fixup from
12961         here...
12963         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
12964         parsing to support both hex and dec ranges.  If filename was missing
12965         show usage information.
12967 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
12969         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
12970         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
12972         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
12973         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
12974         (video_mod_SOURCES): Added.
12975         (video_mod_CFLAGS): Likewise.
12976         (video_mod_LDFLAGS): Likewise.
12977         (gfxterm_mod_SOURCES): Likewise.
12978         (gfxterm_mod_CFLAGS): Likewise.
12979         (gfxterm_mod_LDFLAGS): Likewise.
12980         (videotest_mod_SOURCES): Likewise.
12981         (videotest_mod_CFLAGS): Likewise.
12982         (videotest_mod_LDFLAGS): Likewise.
12983         (vesafb_mod_SOURCES): Removed.
12984         (vesafb_mod_CFLAGS): Likewise.
12985         (vesafb_mod_LDFLAGS): Likewise.
12986         (vga_mod_SOURCES): Likewise.
12987         (vga_mod_CFLAGS): Likewise.
12988         (vga_mod_LDFLAGS): Likewise.
12990         * commands/videotest.c: New file.
12992         * font/manager.c (fill_with_default_glyph): Modified to use
12993         grub_font_glyph.
12994         (grub_font_get_glyph): Likewise.
12995         (fontmanager): Renamed from this...
12996         (font_manager): ... to this.
12998         * include/grub/font.h (grub_font_glyph): Added new structure.
12999         (grub_font_get_glyph): Modified to use grub_font_glyph.
13001         * include/grub/misc.h (grub_abs): Added as inline function.
13003         * include/grub/video.h: New file.
13005         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13006         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13007         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13008         (grub_vbe_get_controller_info): Renamed from this...
13009         (grub_vbe_bios_get_controller_info): ... to this.
13010         (grub_vbe_get_mode_info): Renamed from this...
13011         (grub_vbe_bios_get_mode_info): ... to this.
13012         (grub_vbe_set_mode): Renamed from this...
13013         (grub_vbe_bios_set_mode): ... to this.
13014         (grub_vbe_get_mode): Renamed from this...
13015         (grub_vbe_bios_get_mode): ... to this.
13016         (grub_vbe_set_memory_window): Renamed from this...
13017         (grub_vbe_bios_set_memory_window): ... to this.
13018         (grub_vbe_get_memory_window): Renamed from this...
13019         (grub_vbe_bios_get_memory_window): ... to this.
13020         (grub_vbe_set_scanline_length): Renamed from this...
13021         (grub_vbe_set_scanline_length): ... to this.
13022         (grub_vbe_get_scanline_length): Renamed from this...
13023         (grub_vbe_bios_get_scanline_length): ... to this.
13024         (grub_vbe_set_display_start): Renamed from this...
13025         (grub_vbe_bios_set_display_start): ... to this.
13026         (grub_vbe_get_display_start): Renamed from this...
13027         (grub_vbe_bios_get_display_start): ... to this.
13028         (grub_vbe_set_palette_data): Renamed from this...
13029         (grub_vbe_bios_set_palette_data): ... to this.
13030         (grub_vbe_set_pixel_rgb): Removed.
13031         (grub_vbe_set_pixel_index): Likewise.
13033         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13034         from this...
13035         (grub_vbe_bios_get_controller_info): ... to this.
13036         (grub_vbe_get_mode_info): Renamed from this...
13037         (grub_vbe_bios_get_mode_info): ... to this.
13038         (grub_vbe_set_mode): Renamed from this...
13039         (grub_vbe_bios_set_mode): ... to this.
13040         (grub_vbe_get_mode): Renamed from this...
13041         (grub_vbe_bios_get_mode): ... to this.
13042         (grub_vbe_set_memory_window): Renamed from this...
13043         (grub_vbe_bios_set_memory_window): ... to this.
13044         (grub_vbe_get_memory_window): Renamed from this...
13045         (grub_vbe_bios_get_memory_window): ... to this.
13046         (grub_vbe_set_scanline_length): Renamed from this...
13047         (grub_vbe_set_scanline_length): ... to this.
13048         (grub_vbe_get_scanline_length): Renamed from this...
13049         (grub_vbe_bios_get_scanline_length): ... to this.
13050         (grub_vbe_set_display_start): Renamed from this...
13051         (grub_vbe_bios_set_display_start): ... to this.
13052         (grub_vbe_get_display_start): Renamed from this...
13053         (grub_vbe_bios_get_display_start): ... to this.
13054         (grub_vbe_set_palette_data): Renamed from this...
13055         (grub_vbe_bios_set_palette_data): ... to this.
13056         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13057         getting corrupted after calling it.  Added more pushes and pops.
13058         (grub_vbe_bios_set_mode): Likewise.
13059         (grub_vbe_bios_get_mode): Likewise.
13060         (grub_vbe_bios_get_memory_window): Likewise.
13061         (grub_vbe_bios_set_scanline_length): Likewise.
13062         (grub_vbe_bios_get_scanline_length): Likewise.
13063         (grub_vbe_bios_get_display_start): Likewise.
13064         (grub_vbe_bios_set_palette_data): Likewise.
13066         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13067         (cl_insert): Likewise.
13068         (cl_delete): Likewise.
13070         * term/gfxterm.c: New file.
13072         * term/i386/pc/vesafb.c: Removed file.
13074         * video/video.c: New file.
13076         * video/i386/pc/vbe.c (real2pm): Added new function.
13077         (grub_video_vbe_draw_pixel): Likewise.
13078         (grub_video_vbe_get_video_ptr): Likewise.
13079         (grub_video_vbe_get_pixel): Likewise
13080         (grub_video_vbe_init): Likewise.
13081         (grub_video_vbe_fini): Likewise.
13082         (grub_video_vbe_setup): Likewise.
13083         (grub_video_vbe_get_info): Likewise.
13084         (grub_video_vbe_set_palette): Likewise.
13085         (grub_video_vbe_get_palette): Likewise.
13086         (grub_video_vbe_set_viewport): Likewise.
13087         (grub_video_vbe_get_viewport): Likewise.
13088         (grub_video_vbe_map_color): Likewise.
13089         (grub_video_vbe_map_rgb): Likewise.
13090         (grub_video_vbe_map_rgba): Likewise.
13091         (grub_video_vbe_unmap_color): Likewise.
13092         (grub_video_vbe_fill_rect): Likewise.
13093         (grub_video_vbe_blit_glyph): Likewise.
13094         (grub_video_vbe_blit_bitmap): Likewise.
13095         (grub_video_vbe_blit_render_target): Likewise.
13096         (grub_video_vbe_scroll): Likewise.
13097         (grub_video_vbe_swap_buffers): Likewise.
13098         (grub_video_vbe_create_render_target): Likewise.
13099         (grub_video_vbe_delete_render_target): Likewise.
13100         (grub_video_vbe_set_active_render_target): Likewise.
13101         (grub_vbe_set_pixel_rgb): Remove function.
13102         (grub_vbe_set_pixel_index): Likewise.
13103         (index_color_mode): Remove static variable.
13104         (active_mode): Likewise.
13105         (framebuffer): Likewise.
13106         (bytes_per_scan_line): Likewise.
13107         (grub_video_vbe_adapter): Added new static variable.
13108         (framebuffer): Likewise.
13109         (render_target): Likewise.
13110         (initial_mode): Likewise.
13111         (mode_in_use): Likewise.
13112         (mode_list): Likewise.
13114 2006-03-10  Marco Gerards  <marco@gnu.org>
13116         * configure.ac (AC_INIT): Bumped to 1.93.
13118         * DISTLIST: Added `include/grub/hfs.h'.
13120 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13122         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13123         18H, which might help the BIOS falling back to next boot media.
13125 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13127         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13128         Poe Chen <poe.poechen@gmail.com>.
13130 2006-01-17  Marco Gerards  <marco@gnu.org>
13132         * include/grub/normal.h: Include <grub/script.h>.
13133         (grub_command_list): Removed struct.
13134         (grub_command_list_t): Removed type.
13135         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13136         members `commands' and `sourcecode'.
13137         * include/grub/script.h: Add inclusion guards.
13138         (grub_script_cmd_menuentry): New struct.
13139         (grub_script_execute_menuentry): New prototype.
13140         (grub_script_lexer_record_start): Likewise.
13141         (grub_script_lexer_record_stop): Likewise.
13142         * normal/execute.c (grub_script_execute_menuentry): New function.
13143         * normal/lexer.c (record, recording, recordpos, recordlen): New
13144         variables.
13145         (grub_script_lexer_record_start): New function.
13146         (grub_script_lexer_record_stop): Likewise.
13147         (recordchar): Likewise.
13148         (nextchar): Likewise.
13149         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13150         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13151         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13152         (current_menu): New variable.
13153         (free_menu): Mainly rewritten.
13154         (grub_normal_menu_addentry): New function.
13155         (read_config_file): Rewritten.
13156         * normal/menu.c (run_menu_entry): Mainly rewritten.
13157         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13158         the menu entry.
13159         (run): Mainly rewritten.
13160         * normal/parser.y (menu_entry): New variable.
13161         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13162         (menuentry): New rule.
13163         (command): Add `menuentry'.
13164         (if_statement): Allow additional returns before `fi'.
13165         * normal/script.c (grub_script_create_cmdmenu): New function.
13167 2006-01-03  Marco Gerards  <marco@gnu.org>
13169         * INSTALL: GNU Bison is required.
13170         * configure.ac: Rewritten the test to detect Bison.
13171         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13172         <xun.sun.cn@gmail.com>.
13174 2006-01-03  Marco Gerards  <marco@gnu.org>
13176         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13177         the HFS+ filesystem to filesystem blocks.
13178         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13179         GCC warning is silenced.
13181 2006-01-03  Marco Gerards  <marco@gnu.org>
13183         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13184         read from disk from big endian to host byte order.
13186 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13188         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13189         documentation.
13190         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13191         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13192         embedded HFS+ filesystem.
13193         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13194         (grub_hfs_sblock): Move from here...
13195         * include/grub/hfs.h: To here...  New file.
13196         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13197         documentation.
13198         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13199         New macros.
13200         (grub_hfsplus_volheader): Change type of member `magic' to
13201         `grub_uint16_t'.
13202         (grub_hfsplus_data): Add new member `embedded_offset'.
13203         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13204         returned block.
13205         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13206         Calculate the offset.
13208 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13210         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13211         Removed.
13212         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13214 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13216         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13217         ENV->NAME is NULL after allocating ENV->VALUE.
13219 2005-12-25  Marco Gerards  <marco@gnu.org>
13221         * kern/env.c (grub_env_set): Rewritten the error handling code.
13223 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13225         * geninit.sh: Made more robust, and more portable.
13227 2005-12-25  Marco Gerards  <marco@gnu.org>
13229         Add support for Apple HFS+ filesystems.
13231         * fs/hfsplus.c: New file.
13233         * DISTLIST: Added `fs/hfsplus.c'.
13235         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13236         (hfsplus_mod_SOURCES): New variable.
13237         (hfsplus_mod_CFLAGS): Likewise.
13238         (hfsplus_mod_LDFLAGS): Likewise.
13239         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13240         (grub_setup_SOURCES): Likewise.
13241         (grub_mkdevicemap_SOURCES): Likewise.
13242         (grub_emu_SOURCES): Likewise.
13243         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13245         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13247         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13249 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13251         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13252         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13253         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13254         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13255         normal/lexer.c, normal/parser.y, normal/script.c, and
13256         partmap/gpt.c.
13257         Removed kern/sparc64/cache.c.
13259         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13260         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13261         grub_emu_init.c.
13263         * configure.ac (AC_INIT): Bumped to 1.92.
13265 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13267         * kern/err.c (grub_error_push): Added new function to support error
13268         stacks.
13269         (grub_error_pop): Likewise.
13270         (grub_error_stack_items): New local variable to support error stacks.
13271         (grub_error_stack_pos): Likewise.
13272         (grub_error_stack_assert): Likewise.
13273         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13274         stack depth.
13275         (grub_print_error): Added support to print errors from error stack.
13277         * include/grub/err.h (grub_error_push): Added function prototype.
13278         (grub_error_pop): Likewise.
13280 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13282         * configure.ac: Accept `powerpc64' as host_cpu.
13283         (amd64): Rename to `biarch32'.
13285         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13286         non-cacheline-aligned addresses.
13288         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13289         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13290         if `size' is non-zero.
13292 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13294         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13295         and `cd' to make sure the filename is not prefixed with a
13296         directory name.
13297         (pkgdata_MODULES): Add `gpt.mod'.
13298         (gpt_mod_SOURCES): New variable.
13299         (gpt_mod_CFLAGS): Likewise.
13300         (gpt_mod_LDFLAGS): Likewise.
13302         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13304         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13305         New macro.
13307         * partmap/gpt.c: New file.
13309         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13310         GPT partition map is detected.
13312 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13314         * commands/i386/pc/play.c: New file.
13315         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13316         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13317         macros.
13319 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13321         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13322         ((unused))' to silence gcc warning.
13324 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13326         * configure.ac: Correct `AC_PROG_YACC' test.
13328 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13330         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13331         check before installing files.
13333 2005-11-22  Mike Small  <smallm@panix.com>
13335         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13336         number regex so multidigit numbers are recognized correctly.
13338 2005-11-22  Mike Small  <smallm@panix.com>
13340         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13341         debugging message before attempting to claim memory.
13342         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13343         multiple addresses in case of failure.
13345 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13347         * term/tparm.c (get_space): Remove empty `if' statement.
13349         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13351         * kern/parser.c (check_varstate): Rename `state' to 's'.
13353 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13355         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13356         variable definitions to the beginning of each function.  Sort stack
13357         variables by size.
13358         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13359         `buf' argument to `char *'.
13361 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13363         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13364         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13365         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13366         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13367         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13368         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13369         configfile.mod, search.mod, gzio.mod and test.mod.
13370         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13371         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13372         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13373         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13374         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13375         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13376         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13377         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13378         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13379         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13380         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13381         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13382         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13383         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13384         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13385         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13386         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13387         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13388         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13389         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13390         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13391         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13392         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13394         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13395         `grep --include'.
13396         (pkgdata_MODULES): Add test.mod.
13398 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13400         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13401         appending to variables with "+=".
13402         (PModule): Use full pathname to generate *.lst filenames.
13404         * Makefile.in: Fixed list rules moved from genmk.rb.
13405         (.DELETE_ON_ERROR): New special target.
13406         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13408         * conf/i386-pc.rmk: Include conf/common.mk.
13409         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13410         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13411         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13412         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13413         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13414         configfile.mod, search.mod, gzio.mod and test.mod.
13415         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13416         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13417         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13418         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13419         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13420         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13421         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13422         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13423         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13424         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13425         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13426         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13427         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13428         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13429         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13430         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13431         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13432         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13433         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13434         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13435         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13436         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13437         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13438         here...
13439         * conf/common.rmk: ... to here.  New file.
13441         * conf/common.mk: New file.
13443 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13445         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13446         (grub_script.tab.c): ... here.
13448         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13449         (grub_script.tab.c): ... here.
13451         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13452         (grub_script.tab.c): ... here.
13454         * normal/command.c (grub_command_find): Fixed a memory leak of
13455         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13457 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13459         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13460         "@" which marks the start of a comment on ARM.
13461         (VARIABLE): Likewise.
13463 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13465         Add support for Linux/ADFS partition tables.
13467         * partmap/acorn.c: New file.
13469         * include/grub/acorn_filecore.h: Likewise.
13471         * DISTLIST: Added `partmap/acorn.c' and
13472         `include/grub/acorn_filecore.h'.
13474         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13475         `partmap/acorn.c'.
13476         (pkgdata_MODULES): Add `acorn.mod'.
13477         (acorn_mod_SOURCES): New variable.
13478         (acorn_mod_CFLAGS): Likewise.
13480         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13481         `partmap/acorn.c'.
13482         (pkgdata_MODULES): Add `acorn.mod'.
13483         (acorn_mod_SOURCES): New variable.
13484         (acorn_mod_CFLAGS): Likewise.
13486         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13487         (pkgdata_MODULES): Add `acorn.mod'.
13488         (acorn_mod_SOURCES): New variable.
13489         (acorn_mod_CFLAGS): Likewise.
13490         (acorn_mod_LDFLAGS): Likewise.
13492         * include/types.h (grub_disk_addr_t): New typedef.
13494 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13496         * geninit.sh: New file.
13498         * geninitheader.sh: Likewise.
13500         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13501         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13502         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13503         * commands/configfile.c (grub_configfile_init)
13504         (grub_configfile_fini): Likewise.
13505         * commands/default.c (grub_default_init, grub_default_fini):
13506         Likewise.
13507         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13508         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13509         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13510         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13511         Likewise.
13512         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13513         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13514         Likewise.
13515         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13516         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13517         Likewise.
13518         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13519         Likewise.
13520         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13521         Likewise.
13522         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13523         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13524         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13525         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13526         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13527         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13528         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13529         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13530         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13531         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13532         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13533         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13534         * partmap/amiga.c (grub_amiga_partition_map_init)
13535         (grub_amiga_partition_map_fini): Likewise.
13536         * partmap/apple.c (grub_apple_partition_map_init)
13537         (grub_apple_partition_map_fini): Likewise.
13538         * partmap/pc.c (grub_pc_partition_map_init)
13539         (grub_pc_partition_map_fini): Likewise.
13540         * partmap/sun.c (grub_sun_partition_map_init,
13541         grub_sun_partition_map_fini): Likewise.
13542         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13543         Likewise.
13545         * util/grub-emu.c: Include <grub_modules_init.h>.
13546         (main): Don't initialize and de-initialize any modules directly,
13547         use `grub_init_all' and `grub_fini_all' instead.
13549         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13550         `grub_vesafb_mod_init'.
13551         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13552         all users.
13553         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13554         `grub_vga_mod_init'.  Updated all users.
13555         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13557         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13558         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13559         rules.
13561         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13562         Generate a function to initialize the module in utilities.
13563         Updated all callers.
13564         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13565         initialize the module in utilities.  Updated all callers.
13567 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13569         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13570         escape sequence and a literal ^L to clear the screen.
13572         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13573         when returning from Open Firmware.
13575 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13577         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13578         (grub_ofconsole_height): Likewise.
13579         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13580         manually insert a '\n'.
13581         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13582         `grub_ofconsole_height'.  Return early if these are already set.
13584 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13586         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13587         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13588         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13589         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13590         and `normal/script.c'.
13591         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13592         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13593         (test_mod_SOURCES): New variable.
13594         (test_mod_CFLAGS): Likewise.
13595         (test_mod_LDFLAGS): Likewise.
13596         (pkgdata_MODULES): Add `test.mod'.
13597         (grub_script.tab.c): New rule.
13598         (grub_script.tab.h): Likewise.
13600 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13602         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13603         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13604         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13605         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13606         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13607         (test_mod_SOURCES): New variable.
13608         (test_mod_CFLAGS): Likewise.
13609         (pkgdata_MODULES): Add `test.mod'.
13610         (grub_script.tab.c): New rule.
13611         (grub_script.tab.h): Likewise.
13613 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13615         Add initial scripting support.
13617         * commands/test.c: New file.
13618         * include/grub/script.h: Likewise.
13619         * normal/execute.c: Likewise.
13620         * normal/function.c: Likewise.
13621         * normal/lexer.c: Likewise.
13622         * normal/parser.y: Likewise.
13623         * normal/script.c: Likewise.
13625         * configure.ac: Add `AC_PROG_YACC' test.
13627         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13628         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13629         `normal/function.c' and `normal/script.c'.
13630         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13631         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13632         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13633         variables.
13634         (pkgdata_MODULES): Add `test.mod'.
13635         (grub_script.tab.c): New rule.
13636         (grub_script.tab.h): Likewise.
13638         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13640         * include/grub/normal.h (grub_test_init): New prototype.
13641         (grub_test_fini): Likewise.
13643         * normal/command.c: Include <grub/script.h>.
13644         (grub_command_execute): Rewritten.
13646         * util/grub-emu.c (main): Call `grub_test_init' and
13647         `grub_test_fini'.
13649 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13651         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13652         to 0.
13653         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13654         there are no pending characters.
13656 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13658         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13659         `grub_strndup' to drop device arguments. Replace unnecessary
13660         `grub_strndup' with `grub_strdup'.
13662 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13664         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13665         `debug' environment variable has been set.
13667 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13669         * Makefile.in (install-local): Use $(DATA).
13670         (uninstall): Likewise.
13671         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13672         (sbin_UTILITIES): ... to here.
13673         (sbin_SCRIPTS): New variable.
13674         (grub_install_SOURCES): New variable.
13675         * util/powerpc/ieee1275/grub-install.in: New file.
13676         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13677         variable.
13678         (add_segments): Call `grub_util_get_path'.
13680 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13682         From Timothy Baldwin:
13683         * commands/ls.c (grub_ls_list_files): Close FILE with
13684         grub_file_close.
13685         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13687 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13689         * include/grub/parser.h: New file.
13691         * kern/parser.c: Likewise.
13693         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13694         (grub_setup_SOURCES): Likewise.
13695         (grub_probefs_SOURCES): Likewise.
13696         (grub_emu_SOURCES): Likewise.
13697         (kernel_img_HEADERS): Add `parser.h'.
13699         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13700         (grub_emu_SOURCES): Add `kern/parser.c'.
13701         (grubof_SOURCES): Likewise.
13703         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13704         (grubof_SOURCES): Add `kern/parser.c'.
13706         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13708         * kern/misc.c (grub_split_cmdline): Removed function.
13710         * kern/rescue.c: Include <grub/parser.h>.
13711         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13712         of `grub_split_cmdline'.
13714         * normal/command.c: Include <grub/parser.h>.
13715         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13716         of `grub_split_cmdline'.
13718         * normal/completion.c: Include <grub/parser.h>.
13719         (cmdline_state): New variable.
13720         (iterate_dir): End the filename with a quote depending on the
13721         command line state.
13722         (get_state): new function.
13723         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13724         split the arguments and determine the current argument.  When the
13725         argument string is not quoted, escape all spaces.
13727 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13729         * normal/sparc64/setjmp.S: New file.
13731 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13733         * include/grub/sparc64/libgcc.h: New file.
13734         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13735         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13736         normal/sparc64/setjmp.c.
13738 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13740         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13741         * kern/sparc64/cache.S: New file.
13742         * kern/sparc64/cache.c: Removed.
13743         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13744         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13745         -mtune=ultrasparc.
13746         (COMMON_LDFLAGS): Add -melf64_sparc.
13747         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13748         (grubof_SOURCES): Use cache.S instead of cache.c.
13749         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13750         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13751         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13752         commented though.
13753         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13754         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13755         (linux_mod_CFLAGS): Commented out.
13756         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13757         out because module isn't built.
13758         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13759         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13760         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13761         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13762         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13763         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13764         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13765         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13766         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13767         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13768         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13769         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13770         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13771         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13773 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13775         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13776         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13777         longer, because HFS should not be used on PC.
13779 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13781         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13782         consistently within the loop.
13784 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13786         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13787         directory can not be read.
13789 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13791         * configure.ac (AC_INIT): Increase the version number to 1.91.
13793         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13794         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13795         term/i386/pc/serial.c.
13797 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13799         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13800         file size must be permitted.
13802         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13803         between %ah and %al.
13805 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13807         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13808         grub_uint64_t.
13809         Call the hook with a NUL-terminated filename.
13810         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13811         grub_cpu_to_be32.
13813         * kern/term.c (cursor_state): New variable.
13814         (grub_term_set_current): Reset the cursor state on a new
13815         terminal.
13816         (grub_setcursor): Rewritten to use CURSOR_STATE.
13817         (grub_getcursor): New function.
13819         * include/grub/term.h (grub_getcursor): New prototype.
13821         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13822         integers on ARM. Reported by Timothy Baldwin
13823         <T.E.Baldwin99@members.leeds.ac.uk>.
13825 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13827         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13828         allocated.
13829         (grub_sfs_dir): Likewise.
13831 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13833         Add support for the SFS filesystem.
13835         * fs/sfs.c: New file.
13837         * DISTLIST: Added `fs/sfs.c'.
13839         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13840         (grub_probefs_SOURCES): Likewise.
13841         (grub_emu_SOURCES): Likewise.
13842         (pkgdata_MODULES): Add `sfs.mod'.
13843         (sfs_mod_SOURCES): New variable.
13844         (sfs_mod_CFLAGS): Likewise.
13845         (sfs_mod_LDFLAGS): Likewise.
13847         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13848         (pkgdata_MODULES): Add `sfs.mod'.
13849         (sfs_mod_SOURCES): New variable.
13850         (sfs_mod_CFLAGS): Likewise.
13852         * util/grub-emu.c (main): Call `grub_sfs_init' and
13853         `grub_sfs_fini'.
13855         * include/grub/fs.h (grub_sfs_init): New prototype.
13856         (grub_sfs_fini): Likewise.
13858 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13860         Add support for the AFFS filesystem.
13862         * fs/affs.c: New file.
13864         * DISTLIST: Added `fs/affs.c'.
13866         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13867         (grub_probefs_SOURCES): Likewise.
13868         (grub_emu_SOURCES): Likewise.
13869         (pkgdata_MODULES): Add `affs.mod'.
13870         (affs_mod_SOURCES): New variable.
13871         (affs_mod_CFLAGS): Likewise.
13872         (affs_mod_LDFLAGS): Likewise.
13874         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13875         (pkgdata_MODULES): Add `affs.mod'.
13876         (affs_mod_SOURCES): New variable.
13877         (affs_mod_CFLAGS): Likewise.
13879         * util/grub-emu.c (main): Call `grub_affs_init' and
13880         `grub_affs_fini'.
13882         * include/grub/fs.h (grub_affs_init): New prototype.
13883         (grub_affs_fini): Likewise.
13885 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13887         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13889 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13891         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13892         `-m32' to CFLAGS.
13894         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13895         linking.
13897         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13898         (COMMON_LDFLAGS): New variable.
13899         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13900         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13901         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13902         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13903         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13904         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13905         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13906         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13907         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13908         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13909         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13910         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13911         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13912         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13913         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13914         variables.
13915         (normal_mod_ASFLAGS): Add `-m32'.
13917         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
13918         (grub_host_size_t, grub_host_ssize_t): New types.
13919         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
13920         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
13921         `GRUB_HOST_SIZEOF_VOID_P'.
13923         * include/grub/kernel.h (struct grub_module_header): Type of
13924         member offset changed to `grub_host_off_t'.  Type of member size
13925         changed to `grub_host_size_t'.
13926         (struct grub_module_info): Type of member offset changed to
13927         `grub_host_off_t'.  Type of member size changed to
13928         `grub_host_size_t'.
13930 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
13932         Make GRUB's kernel compliant to Multiboot Specification.
13934         * kern/i386/pc/startup.S (multiboot_header): New label.
13935         (multiboot_entry): Likewise.
13936         (multiboot_trampoline): Likewise.
13938         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
13939         Increased to 0x4A0.
13941         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
13942         put parentheses after a question mark.
13943         [!GRUB_UTIL] (my_mod): New variable.
13945         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
13947 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
13949         Adds support for the XFS filesystem.  Btrees are not supported
13950         yet.
13952         * fs/xfs.c: New file.
13954         * DISTLIST: Added `fs/xfs.c'.
13956         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
13957         (grub_probefs_SOURCES): Likewise.
13958         (grub_emu_SOURCES): Likewise.
13959         (pkgdata_MODULES): Add `xfs.mod'.
13960         (xfs_mod_SOURCES): New variable.
13961         (xfs_mod_CFLAGS): Likewise.
13963         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
13964         (pkgdata_MODULES): Add `xfs.mod'.
13965         (xfs_mod_SOURCES): New variable.
13966         (xfs_mod_CFLAGS): Likewise.
13968         * util/grub-emu.c (main): Call `grub_xfs_init' and
13969         `grub_xfs_fini'.
13971         * include/grub/fs.h (grub_xfs_init): New prototype.
13972         (grub_xfs_fini): Likewise.
13975 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
13977         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
13978         color modes, allow greater than 16 colors to be configured as
13979         a default palette.
13981 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
13983         * normal/completion.c (complete_arguments): Add the qualifier
13984         const into OPTIONS.
13986         From Omniflux <omniflux+lists@omniflux.com>:
13987         * include/grub/terminfo.h: New file.
13988         * include/grub/tparm.h: Likewise.
13989         * include/grub/i386/pc/serial.h: Likewise.
13990         * term/terminfo.c: Likewise.
13991         * term/tparm.c: Likewise.
13992         * term/i386/pc/serial.c: Likewise.
13993         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
13994         serial.mod.
13995         (terminfo_mod_SOURCES): New variable.
13996         (terminfo_mod_CFLAGS): Likewise.
13997         (serial_mod_SOURCES): Likewise.
13998         (serial_mod_CFLAGS): Likewise.
14000 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14002         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14003         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14004         and kern/powerpc/ieee1275/cmain.c, respectively.
14006         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14007         * kern/powerpc/ieee1275/crt0.S: ... here.
14009         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14010         * kern/powerpc/ieee1275/cmain.c: ... here.
14012         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14013         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14014         instead of boot/powerpc/ieee1275/crt0.S and
14015         boot/powerpc/ieee1275/cmain.c, respectively.
14017         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14018         sectors. It was not used anyway.
14020 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14022         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14023         `unused parameter' warning.
14025 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14027         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14028         function.
14029         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14030         getcharwidth.
14032 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14034         * include/grub/normal.h (enum grub_completion_type): Added
14035         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14037         * normal/cmdline.c (print_completion): Handle
14038         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14039         * normal/menu_entry.c (store_completion): Likewise.
14041         * normal/completion.c (complete_arguments): New function.
14042         (grub_normal_do_completion): Call `complete_arguments' when the
14043         current words start with a dash.
14045 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14047         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14048         `gzio.mod' instead of `io.mod').
14050 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14052         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14053         (DISTDIRS): Added io and video.
14054         Rewrite the search routine to make an output consistently.
14056         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14057         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14058         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14059         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14060         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14061         util/powerpc/ieee1275/misc.c.
14063         * include/grub/gzio.h: New file.
14064         * io/gzio.c: Likewise.
14066         * kern/file.c (grub_file_close): Call grub_device_close only if
14067         FILE->DEVICE is not NULL.
14069         * include/grub/mm.h [!NULL] (NULL): New macro.
14071         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14073         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14074         (pkgdata_MODULES): Added gzio.mod.
14075         (gzio_mod_SOURCES): New variable.
14076         (gzio_mod_CFLAGS): Likewise.
14078         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14079         (pkgdata_MODULES): Added gzio.mod.
14080         (gzio_mod_SOURCES): New variable.
14081         (gzio_mod_CFLAGS): Likewise.
14083         * commands/cat.c: Include grub/gzio.h.
14084         (grub_cmd_cat): Use grub_gzfile_open instead of
14085         grub_file_open.
14087         * commands/cmp.c: Include grub/gzio.h.
14088         (grub_cmd_cmp): Use grub_gzfile_open instead of
14089         grub_file_open.
14091         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14092         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14093         grub_file_open.
14094         (grub_rescue_cmd_module): Likewise.
14096 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14098         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14099         kern/sparc64/ieee1275/init.c because it contains _start.
14100         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14102 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14104         * configure.ac: Add support for sparc64 host with ieee1275
14105         firmware.
14106         * configure: Generated from configure.ac.
14107         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14108         instead of int.
14109         (grub_ofdisk_read): Likewise.
14110         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14111         pointers as (void *) to remove a warning.
14112         (grub_ofdisk_close): Likewise.
14113         (grub_ofdisk_read): Likewise.
14114         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14115         returns, so make it return void to remove a warning.
14116         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14117         Corresponding prototype change.
14118         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14119         values, and cast the pointers as (void *) to remove a warning.
14120         (grub_mm_dump): Likewise.
14121         * conf/sparc64-ieee1275.mk: New file.
14122         * conf/sparc64-ieee1275.rmk: Likewise.
14123         * include/grub/sparc64/setjmp.h: Likewise.
14124         * include/grub/sparc64/types.h: Likewise.
14125         * include/grub/sparc64/ieee1275/console.h: Likewise.
14126         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14127         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14128         * include/grub/sparc64/ieee1275/time.h: Likewise.
14129         * kern/sparc64/cache.c: Likewise.
14130         * kern/sparc64/dl.c: Likewise.
14131         * kern/sparc64/ieee1275/init.c: Likewise.
14132         * kern/sparc64/ieee1275/openfw.c: Likewise.
14134 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14136         * util/console.c (grub_ncurses_putchar): If C is greater than
14137         0x7f, set C to a question mark.
14138         (grub_ncurses_getcharwidth): New function.
14139         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14140         getcharwidth.
14142         * normal/menu.c (print_entry): Made aware of Unicode. First,
14143         convert TITLE to UCS-4, and predict the cursor position by
14144         grub_getcharwidth.
14146         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14147         const to SRC.
14148         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14150 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14152         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14153         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14154         grub_strcat.
14156         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14157         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14158         grub_strcpy and grub_strlen. Take it into account that a space
14159         character is inserted as a delimiter.
14161 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14163         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14164         invalid magic in the error.
14166         * commands/search.c: New file.
14168         * util/grub-emu.c (main): Call grub_search_init and
14169         grub_search_fini.
14171         * kern/rescue.c (grub_rescue_print_disks): Removed.
14172         (grub_rescue_print_devices): New function.
14173         (grub_rescue_cmd_ls): Use grub_device_iterate with
14174         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14175         grub_rescue_print_disks.
14177         * kern/partition.c (grub_partition_iterate): Return the result of
14178         PARTMAP->ITERATE instead of GRUB_ERRNO.
14180         * kern/device.c: Include grub/partition.h.
14181         (grub_device_iterate): New function.
14183         * include/grub/partition.h (grub_partition_iterate): Return int
14184         instead of grub_err_t.
14186         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14187         prototype.
14188         [GRUB_UTIL] (grub_search_fini): Likewise.
14190         * include/grub/device.h (grub_device_iterate): New prototype.
14192         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14193         commands/search.c.
14194         (pkgdata_MODULES): Added search.mod.
14195         (search_mod_SOURCES): New variable.
14196         (search_mod_CFLAGS): Likewise.
14198         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14199         (pkgdata_MODULES): Added search.mod.
14200         (search_mod_SOURCES): New variable.
14201         (search_mod_CFLAGS): Likewise.
14203         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14204         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14205         All callers changed.
14207         * DISTLIST: Added commands/search.c.
14209 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14211         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14212         conversion.
14213         (grub_getcharwidth): New function.
14215         * kern/misc.c (grub_utf8_to_ucs4): New function.
14217         * include/grub/term.h (struct grub_term): Added a new member
14218         "getcharwidth".
14219         (grub_getcharwidth): New prototype.
14221         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14223         * term/i386/pc/console.c (map_char): New function. Segregated from
14224         grub_console_putchar.
14225         (grub_console_putchar): Use map_char.
14226         (grub_console_getcharwidth): New function.
14227         (grub_console_term): Specified grub_console_getcharwidth as
14228         getcharwidth.
14230         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14231         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14233         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14234         GRUB_ERRNO.
14235         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14236         on grub_strtoul completely.
14237         (write_char): Declare local variables in the beginning of the
14238         function.
14239         (grub_vesafb_getcharwidth): New function.
14240         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14241         getcharwidth.
14243 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14245         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14246         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14247         commands/i386/pc/vbetest.c.
14249         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14250         call grub_vbe_get_controller_info again, because the returned
14251         information is volatile.
14252         (grub_vbe_set_video_mode): Mostly rewritten.
14253         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14254         grub_vbe_status_t correctly.
14255         (grub_vbe_get_video_mode_info): Likewise.
14256         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14257         several if statements.
14259         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14260         * commands/i386/pc/vbeinfo.c: ... this.
14262         * commands/i386/pc/vbe_test.c: Renamed to ...
14263         * commands/i386/pc/vbetest.c: ... this.
14265         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14266         ...
14267         (grub_cmd_vbeinfo): ... this. Save video modes before
14268         iterating. Skip a video mode, if it is not available, not enough
14269         information is given or it is monochrome. Show the memory
14270         model. Leave the interpretation of MODEVAR to grub_strtoul
14271         completely.
14272         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14273         (GRUB_MOD_FINI): Likewise.
14275         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14276         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14277         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14278         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14279         grub_strtoul completely.
14280         (real2pm): Removed.
14281         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14282         (GRUB_MOD_FINI): Likewise.
14284         * normal/misc.c: Include grub/mm.h.
14286         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14287         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14288         (vbe_list_modes_mod_SOURCES): Removed.
14289         (vbe_list_modes_mod_CFLAGS): Likewise.
14290         (vbe_test_mod_SOURCES): Likewise.
14291         (vbe_test_mod_CFLAGS): Likewise.
14292         (vbeinfo_mod_SOURCES): New variable.
14293         (vbeinfo_mod_CFLAGS): Likewise.
14294         (vbetest_mod_SOURCES): Likewise.
14295         (vbetest_mod_CFLAGS): Likewise.
14297 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14299         * normal/misc.c: New file.
14301         * DISTLIST: Added normal/misc.c.
14303         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14304         DISK to HOOK. Call HOOK with DISK.
14305         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14306         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14307         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14309         * normal/menu_entry.c (struct screen): Added a new member
14310         "completion_shown".
14311         (completion_buffer): New global variable.
14312         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14313         (store_completion): New function.
14314         (complete): Likewise.
14315         (clear_completions): Likewise.
14316         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14317         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14318         a tab, call complete.
14320         * normal/completion.c (disk_dev): Removed.
14321         (print_simple_completion): Likewise.
14322         (print_partition_completion): Likewise.
14323         (print_func): New global variable.
14324         (add_completion): Do not take the arguments WHAT or PRINT any
14325         longer. Added a new argument TYPE. Instead of printing directly,
14326         call PRINT_FUNC if not NULL.
14327         All callers changed.
14328         (complete_device): Use a local variable DEV instead of
14329         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14330         (grub_normal_do_completion): Take a new argument HOOK. Do not
14331         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14332         empty string, return NULL instead.
14333         All callers changed.
14335         * normal/cmdline.c (print_completion): New function.
14337         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14338         to HOOK.
14339         All callers changed.
14341         * kern/disk.c (grub_print_partinfo): Removed.
14343         * include/grub/partition.h (struct grub_partition_map): Add a new
14344         argument DISK into HOOK of ITERATE.
14345         (grub_partition_iterate): Add a new argument DISK to HOOK.
14347         * include/grub/normal.h (enum grub_completion_type): New enum.
14348         (grub_completion_type_t): New type.
14349         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14350         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14351         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14352         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14353         (grub_normal_do_completion): Added a new argument HOOK.
14354         (grub_normal_print_device_info): New prototype.
14356         * include/grub/disk.h (grub_print_partinfo): Removed.
14358         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14359         (normal_mod_SOURCES): Likewise.
14360         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14361         (normal_mod_SOURCES): Likewise.
14363         * commands/ls.c (grub_ls_list_disks): Use
14364         grub_normal_print_device_info instead of grub_print_partinfo. Free
14365         PNAME.
14366         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14367         duplicating the code.
14369 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14371         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14372         follow GCS more precisely.
14373         * commands/i386/pc/vbe_test.c: Likewise.
14374         * include/grub/i386/pc/vbe.h: Likewise.
14375         * term/i386/pc/vesafb.c: Likewise.
14376         * video/i386/pc/vbe.c: Likewise.
14378 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14380         * DISTLIST: Added term/i386/pc/vesafb.c
14381         DISTLIST: Added video/i386/pc/vbe.c
14382         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14383         DISTLIST: Added commands/i386/pc/vbe_test.c.
14384         * commands/i386/pc/vbe_list_modes.c: New file.
14385         * commands/i386/pc/vbe_test.c: Likewise.
14386         * term/i386/pc/vesafb.c: Likewise.
14387         * video/i386/pc/vbe.c: Likewise.
14388         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14389         (grub_vbe_probe) Added prototype.
14390         (grub_vbe_set_video_mode) Likewise.
14391         (grub_vbe_get_video_mode) Likewise.
14392         (grub_vbe_get_video_mode_info) Likewise.
14393         (grub_vbe_set_pixel_rgb) Likewise.
14394         (grub_vbe_set_pixel_index) Likewise.
14395         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14396         (pkgdata_MODULES): Added vesafb.mod.
14397         (pkgdata_MODULES): Added vbe_list_modes.mod.
14398         (pkgdata_MODULES): Added vbe_test.mod.
14399         (vbe_mod_SOURCES): Added.
14400         (vbe_mod_CFLAGS): Likewise.
14401         (vesafb_mod_SOURCES): Likewise.
14402         (vesafb_mod_CFLAGS): Likewise.
14403         (vbe_list_modes_mod_SOURCES): Likewise.
14404         (vbe_list_modes_mod_CFLAGS): Likewise.
14405         (vbe_test_mod_SOURCES): Likewise.
14406         (vbe_test_mod_CFLAGS): Likewise.
14408 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14410         * normal/command.c (grub_command_execute): If INTERACTIVE is
14411         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14412         CMDLINE. Disable the pager if INTERACTIVE is true.
14413         All callers are changed.
14415         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14416         before reading a config file.
14417         * normal/main.c (read_config_file): Even if a command is not
14418         found, register it if it is within an entry.
14420         * util/grub-emu.c: Include sys/types.h and unistd.h.
14421         (options): Added --hold.
14422         (struct arguments): Added a new member "hold".
14423         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14424         missing.
14425         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14426         cleared by a debugger, if it is not zero.
14428         * include/grub/normal.h (grub_command_execute): Add an argument
14429         INTERACTIVE.
14431 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14433         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14435 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14437         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14438         program with another one, because the old one didn't detect a bug
14439         in gcc-3.4. Always use regparm 2, because the new test is still
14440         not enough for gcc-4.0. Someone must investigate a simple test
14441         case which detects a bug in gcc-4.0.
14443 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14445         * DISTLIST: Added normal/completion.c.
14447         * normal/completion.c: New file.
14449         * term/i386/pc/console.c (grub_console_getwh): New function.
14450         (grub_console_term): Assign grub_console_getwh to getwh.
14452         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14453         function is defined in normal/completion.c as
14454         grub_normal_do_completion.
14455         (grub_cmdline_get): Use grub_normal_do_completion instead of
14456         grub_tab_complete.
14458         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14459         returns non-zero, otherwise return 0.
14460         (grub_partition_iterate): First, probe the partition map. Then,
14461         call ITERATE only for this partition map.
14463         * kern/misc.c (grub_strncmp): Rewritten.
14465         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14466         returns non-zero. Otherwise return 0.
14468         * include/grub/partition.h (grub_partition_map_iterate): Return
14469         int instead of void.
14471         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14473         * include/grub/misc.h (grub_strncmp): Change the type of N to
14474         grub_size_t.
14476         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14477         of void.
14479         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14480         unsigned explicitly before comparing it with I.
14482         * kern/main.c (grub_env_write_root): Add the attribute unused into
14483         VAR.
14485         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14486         normal/completion.c.
14487         (normal_mod_SOURCES): Likewise.
14488         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14489         (normal_mod_SOURCES): Likewise.
14491         * normal/command.c (grub_iterate_commands): If ITERATE returns
14492         non-zero, return one immediately.
14494 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14496         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14497         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14498         descriptions.
14499         (grub_vbe_get_controller_info): New function.
14500         (grub_vbe_get_mode_info): Likewise.
14501         (grub_vbe_set_mode): Likewise.
14502         (grub_vbe_get_mode): Likewise.
14503         (grub_vbe_set_memory_window): Likewise.
14504         (grub_vbe_get_memory_window): Likewise.
14505         (grub_vbe_set_scanline_length): Likewise.
14506         (grub_vbe_get_scanline_length): Likewise.
14507         (grub_vbe_set_display_start): Likewise.
14508         (grub_vbe_get_display_start): Likewise.
14509         (grub_vbe_set_palette_data): Likewise.
14510         * include/grub/i386/pc/vbe.h: New file.
14512 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14514         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14515         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14516         * DISTLIST: Likewise.
14517         * kern/ieee1275/of.c: Moved to ...
14518         * kern/ieee1275/ieee1275.c: ... here.
14520 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14522         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14523         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14524         Pass 0 as `end' parameter to grub_strtoul().
14526 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14528         * include/grub/powerpc/ieee1275/console.h: Do not include
14529         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14530         ifdef.
14531         (grub_console_cur_color): Remove i386-specific prototype.
14532         (grub_console_real_putchar): Likewise.
14533         (grub_console_checkkey): Likewise.
14534         (grub_console_getkey): Likewise.
14535         (grub_console_getxy): Likewise.
14536         (grub_console_gotoxy): Likewise.
14537         (grub_console_cls): Likewise.
14538         (grub_console_setcursor): Likewise.
14539         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14540         Include <grub/machine/console.h>.
14541         * term/ieee1275/ofconsole.c: Likewise.
14543 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14545         * Makefile.in (LIBLZO): New variable.
14547         * configure.ac: Check for LZO version 2.
14549         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14550         lzo/lzo1x.h instead of lzo1x.h.
14552         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14553         of -llzo.
14555         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14556         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14558         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14559         copying the data from PARTITION to P.
14561 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14563         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14564         negative, unload the module.
14566         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14567         map is "pc_partition_map" but not "pc".
14568         (usage): Fix the description. The options are --boot-image and
14569         --core-image but not --boot-file or --core-file.
14570         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14571         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14572         DEFAULT_DIRECTORY.
14574         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14575         --core-file. Specify INSTALL_DEVICE as an argument.
14577         * util/console.c: Include config.h.
14578         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14579         [HAVE_NCURSES_H]: Include ncurses.h.
14580         [HAVE_CURSES_H]: Include curses.h.
14581         [!A_NORMAL] (A_NORMAL): Defined as zero.
14582         [!A_STANDOUT] (A_STANDOUT): Likewise.
14584         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14585         -lncurses.
14586         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14588         * configure.ac: Check for curses libraries and headers.
14590         * Makefile.in (LIBCURSES): New variable.
14592         * genmk.rb (Script::rule): Set the executable bits.
14594         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14595         name of the PC partition map is "pc_partition_map" but not "pc".
14597 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14599         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14600         (modules): Likewise.
14601         (usage): Added descriptions for --modules and --grub-probefs.
14602         Handle --modules and --grub-probefs. Save the arguments in MODULES
14603         and GRUB_PROBEFS, respectively.
14604         Auto-detect a filesystem module against GRUBDIR. If the result is
14605         empty and modules are not specified explicitly, abort the
14606         installation. Add the result to MODULES.
14608         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14609         disk/powerpc/ieee1275/ofdisk.c,
14610         include/grub/powerpc/ieee1275/init.h and
14611         term/powerpc/ieee1275/ofconsole.c.
14612         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14613         term/ieee1275/ofconsole.c.
14615         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14617         * COPYING: Upgraded to the latest version. Only the address of the
14618         FSF office has changed.
14620 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14622         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14623         kern/ieee1275.c with kern/ieee1275/of.c.
14625         * kern/ieee1275.c: Moved to ...
14626         * kern/ieee1275/of.c: ... here.
14628 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14630         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14631         readability.
14633         * config.guess: Updated to the latest version from gnulib.
14634         * config.sub: Likewise.
14635         * install.sh: Likewise.
14636         * mkinstalldirs: Likewise.
14638         * include/grub/console.h: Removed. This file is arch-specific. Do
14639         not put this in include/grub.
14641         * include/grub/i386/pc/console.h: Resurrected.
14643         * util/console.c: Include grub/machine/console.h instead of
14644         grub/console.h.
14645         * util/grub-emu.c: Likewise.
14647 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14649         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14650         hardcoded value.
14652         From Vincent Pelletier  <subdino2004@yahoo.fr>
14653         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14654         Redefined to use grub_getwh.
14655         (grub_term): New member named getwh.
14656         (grub_getwh): New prototype.
14657         * kern/term.c (grub_getwh): New function.
14658         * term/i386/pc/console.c (grub_console_getwh): New function.
14659         (grub_console_term): New member `getwh'.
14660         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14661         (grub_vga_term): New member `getwh'.
14662         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14663         grub_ssize_t.
14664         (grub_ofconsole_getw): New function.
14665         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14666         (grub_ofconsole_term): New field named getwh and new initial
14667         value.
14669 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14671         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14672         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14673         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14674         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14675         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14676         of <grub/machine/ieee1275.h>.
14677         * commands/ieee1275/reboot.c: Likewise.
14678         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14679         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14680         parameter structs to use new type `grub_ieee1275_cell_t'.
14681         * term/powerpc/ieee1275/ofconsole.c: Move ...
14682         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14683         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14684         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14685         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14686         to return int.
14687         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14688         Remove unused prototypes.  All users updated.
14689         * include/grub/powerpc/ieee1275/console.h: Removed.
14690         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14691         `grub_ieee1275_cell_t'.
14692         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14693         Cast comparisons with -1 to the correct type.
14694         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14695         type to match `grub_ieee1275_entry_fn'.
14697 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14699         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14701         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14702         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14703         partmap/sun.c.
14704         (grub_probefs_SOURCES): New variable.
14706         * util/i386/pc/grub-probefs.c: New file.
14708         * util/i386/pc/grub-setup.c (main): Call
14709         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14710         grub_hfs_init and grub_jfs_init to initialize the system. Call
14711         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14712         grub_pc_partition_map_fini to finish the system.
14714 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14716         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14717         function.
14718         (grub_multiboot_load_elf32): Likewise.
14719         (grub_multiboot_is_elf64): Likewise.
14720         (grub_multiboot_load_elf64): Likewise.
14721         (grub_multiboot_load_elf): Likewise.
14722         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14723         an ELF32 or ELF64 file.
14724         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14726         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14727         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14728         NULL before calling FS->LABEL.
14729         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14730         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14731         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14732         before calling FS->LABEL.
14734 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14736         * util/i386/pc/grub-install.in (datadir): New variable.
14737         (libdir): Removed.
14738         (pkgdatadir): New variable.
14739         (pkglibdir): Removed.
14741 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14743         * DISTLIST: Added util/i386/pc/grub-install.in.
14745         * util/i386/pc/grub-install.in: New file.
14747         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14748         (grub_install_SOURCES): Likewise.
14750         * genmk.rb: Added support for scripts.
14751         (Script): New class.
14752         (scripts): New variable.
14754         * Makefile.in (install-local): Install sbin_SCRIPTS by
14755         INSTALL_SCRIPT.
14756         (uninstall): Remove sbin_SCRIPTS.
14758         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14759         device, try to get a GRUB device by
14760         grub_util_biosdisk_get_grub_dev.
14761         Free DEST_DEV.
14763         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14764         description for --device-map.
14766 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14768         Change the semantics of variable hooks. They now return strings
14769         instead of error values.
14771         * util/i386/pc/grub-setup.c: Include grub/env.h.
14772         (setup): Use grub_device_set_root instead of grub_env_set.
14774         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14775         grub_env_get instead of grub_device_set_root and
14776         grub_device_get_root, respectively.
14778         * kern/main.c (grub_env_write_root): New function.
14779         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14780         grub_env_set instead of grub_device_set_root.
14782         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14783         many variables.
14784         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14785         rather than calling ENV->WRITE_HOOK afterwards.
14786         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14787         passing a pointer of a pointer.
14788         (grub_register_variable_hook): Change the types of "read_hook" and
14789         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14790         respectively.
14791         Allocate the default empty string on the heap, because this string
14792         may be freed later.
14794         * kern/device.c: Include grub/env.h.
14795         (grub_device_set_root): Removed.
14796         (grub_device_get_root): Likewise.
14797         (grub_device_open): Use grub_env_get instead of
14798         grub_device_get_root.
14800         * include/grub/env.h (grub_env_read_hook_t): New type.
14801         (grub_env_write_hook_t): Likewise.
14802         (grub_env_var): Change the types of "read_hook" and "write_hook"
14803         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14804         (grub_register_variable_hook): Likewise.
14806         * include/grub/device.h (grub_device_set_root): Removed.
14807         (grub_device_set_root): Likewise.
14809         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14810         make sure that DIRNAME terminates with '/', so that
14811         grub_fat_find_dir will fail if PATH is not a directory.
14813         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14814         from DIRNAME.
14815         Use the qualifier auto for print_files and print_files_long.
14816         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14817         as a regular file.
14818         Put a newline only if there is no error.
14819         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14820         used.
14822 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14824         * kern/partition.c (grub_partition_probe): Initialize PART to
14825         NULL. Otherwise, when no partition map is registered, this returns
14826         a garbage.
14828 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14830         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14831         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14832         valid.
14834 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14836         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14837         information on each device, if it does not have partitions. Print
14838         "Device" instead of "Disk", because this function is not specific
14839         to disk devices.
14841         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14842         static to ensure that it is put on the memory rather than a
14843         register.
14845 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14847         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14848         (grub_cat_init): Likewise.
14849         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14850         (options): Likewise.
14851         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14852         (grub_configfile_init): Likewise.
14853         * font/manager.c (GRUB_MOD_INIT): Likewise.
14854         * commands/help.c (GRUB_MOD_INIT): Likewise.
14855         (grub_help_init): Likewise.
14856         * normal/command.c (grub_command_init): Likewise.
14857         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14858         * disk/loopback.c (grub_loop_init): Likewise.
14859         (GRUB_MOD_INIT): Likewise.
14860         * commands/ls.c (grub_ls_init): Likewise.
14861         (GRUB_MOD_INIT): Likewise.
14862         (options): Likewise.
14863         * commands/boot.c (grub_boot_init): Likewise.
14864         (GRUB_MOD_INIT): Likewise.
14865         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14866         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14867         (GRUB_MOD_INIT): Likewise.
14868         * commands/cmp.c (grub_cmp_init): Likewise.
14869         (GRUB_MOD_INIT): Likewise.
14871         * normal/arg.c: Use <> instead of "" to include header files.
14872         (SHORT_ARG_HELP): New macro.
14873         (SHORT_ARG_USAGE): Likewise.
14874         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14875         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14876         descriptions.
14877         (find_short): Check if C is 'h' or 'u' explicitly.
14878         (grub_arg_show_help): Use space characters instead of tabs. Treat
14879         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14880         are shown with --help and --usage only if they are not used for
14881         the command itself.
14882         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14883         'h' and 'u'.
14885         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14886         const into "longarg". Change the type of "shortarg" to int.
14888 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14890         * boot/i386/pc/boot.S (boot_drive_check): New label.
14892         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14893         macro.
14895         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14896         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14898 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14900         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14901         When turning off Gate A20, skip the check and return immediately,
14902         because this is not fatal usually.
14904 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14906         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14907         be 0x7C00 instead of 0x8000.
14909         * boot/i386/pc/pxeboot.S: Rewritten.
14911         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14912         EXT_C.
14913         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14914         result.
14916 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
14918         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
14919         robustness. This routine now supports a BIOS call and System
14920         Control Port A to modify the gate A20.
14922         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14923         Increased to 0x440.
14925 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
14927         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
14928         device path and resulting ihandle.
14929         (grub_ofdisk_close): dprintf the ihandle being closed.
14930         (grub_ofdisk_read): dprintf function parameters.
14931         * kern/mm.c (grub_mm_init_region): Likewise.
14932         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
14933         (grub_linux_boot): dprintf the Linux entry point, initrd address and
14934         size, and boot arguments.
14935         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
14936         before loading into memory.
14937         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
14938         before loading into memory.
14940 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
14942         * kern/mm.c: Added much documentation.
14943         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
14944         8, set to 5 instead of 8.
14946 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14948         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
14950         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
14951         (grub_mkdevicemap_SOURCES): New variable.
14953         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
14954         lib/device.c of GRUB Legacy.
14956 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
14958         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
14959         instead of PATH is NULL.
14961 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
14963         * commands/cmp.c (BUFFER_SIZE): New macro.
14964         (grub_cmd_cmp): Close the right file at the right time.  Compare
14965         only data just read.  Don't report files of different  size as
14966         identical.  Dynamically allocate buffers.  Move variable
14967         declarations at the beginning of function.
14969 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
14971         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
14972         reverse.
14974 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
14976         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
14977         when backspace is pressed at beginning of line.
14979 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
14981         * DISTLIST: Added genfslist.sh.
14983         * normal/main.c (fs_module_list): New variable.
14984         (autoload_fs_module): New function.
14985         (read_fs_list): Likewise.
14986         (grub_normal_execute): Call read_fs_list.
14988         * kern/fs.c (grub_fs_autoload_hook): New variable.
14989         (grub_fs_probe): Added support for auto-loading.
14991         * include/grub/normal.h (struct grub_fs_module_list): New struct.
14992         (grub_fs_module_list_t): New type.
14994         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
14995         (grub_fs_autoload_hook): New prototype.
14997         * genfslist.sh: New file.
14999         * genmk.rb: Added a rule to generate a filesystem list.
15001 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15003         * configure.ac: Fix the test for cross-compiling.
15005         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15006         define GRUB_UTIL anymore.
15008         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15009         so this function works on other systems than just big endian.
15010         (load_modules): Likewise.
15011         (add_segments): Likewise.
15013 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15015         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15016         contains `l' modifier, get a long from va_arg().
15018 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15020         * kern/mm.c (grub_free): If the next free block which is being
15021         merged is the first free block, set the first block to the block
15022         being freed.
15023         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15025 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15027         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15028         `grub_ieee1275_chosen'.
15030 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15032         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15033         (grub_ieee1275_chosen): New variable.
15034         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15035         `chosen'.
15036         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15037         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15038         Rename first argument to `phandle' for consistency.
15039         (grub_ieee1275_get_property_length): Likewise.
15040         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15041         to grub_ieee1275_phandle_t.
15042         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15043         Move export next to declaration.
15044         (grub_ieee1275_chosen): New variable.
15045         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15046         Correct cosmetic typo.
15047         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15048         `grub_ieee1275_chosen'.
15049         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15050         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15051         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15052         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15053         `grub_ieee1275_chosen'.
15055 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15057         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15058         /chosen/bootargs.
15059         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15060         /chosen/bootargs as "variable=value" pairs.
15062 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15064         * include/grub/misc.h (grub_dprintf): New macro.
15065         (grub_real_dprintf): New prototype.
15066         (grub_strword): Likewise.
15067         (grub_iswordseparator): Likewise.
15068         * kern/misc.c (grub_real_dprintf): New function.
15069         (grub_strword): Likewise.
15070         (grub_iswordseparator): Likewise.
15072 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15074         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15075         (roundup): Remove macro.
15076         (grub_ieee1275_flags): Make static.
15077         (grub_ieee1275_realmode): Remove.
15078         (grub_ieee1275_test_flag): New function.
15079         (grub_ieee1275_set_flag): Likewise.
15080         (find_options): Rename to `grub_ieee1275_find_options'; update
15081         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15082         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15083         (cmain): New prototype.
15084         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15085         `grub_ieee1275_flags' directly.
15086         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15087         machine/biosdisk.h.
15088         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15089         Don't include grub/machine/init.h.
15090         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15091         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15092         Remove prototype.
15093         (grub_ieee1275_realmode): Likewise.
15094         (grub_ieee1275_flag): New enum.
15095         (grub_ieee1275_test_flag): New prototype.
15096         (grub_ieee1275_set_flag): New prototype.
15097         * include/grub/powerpc/ieee1275/init.h: Remove file.
15098         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15099         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15100         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15101         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15102         comment.
15103         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15104         `grub_ieee1275_test_flag'.
15105         (grub_ieee1275_encode_devname): Likewise.
15107 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15109         * include/grub/powerpc/ieee1275/ieee1275.h
15110         (grub_ieee1275_encode_devname): New prototype.
15111         (grub_ieee1275_get_filename): Likewise.
15112         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15113         function.
15114         (grub_set_prefix): Likewise.
15115         (grub_machine_init): Call grub_set_prefix.
15116         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15117         (grub_parse_type): New enum.
15118         (grub_ieee1275_get_devargs): New function.
15119         (grub_ieee1275_get_devname): Likewise.
15120         (grub_ieee1275_parse_args): Likewise.
15121         (grub_ieee1275_get_filename): Likewise.
15122         (grub_ieee1275_encode_devname): Likewise.
15124 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15126         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15127         `grub_loader_unset'.
15129 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15131         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15132         instead of grub_ieee1275_interpret.
15133         (grub_halt_init): New function.
15134         (grub_halt_fini): Likewise.
15135         (GRUB_MOD_INIT): Correct message grammar.
15136         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15137         instead of grub_ieee1275_interpret.
15138         (grub_reboot_init): New function.
15139         (grub_reboot_fini): Likewise.
15140         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15141         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15142         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15143         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15144         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15145         function.
15146         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15147         Add prototype.
15148         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15149         prototype.
15150         (grub_halt): Likewise.
15151         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15152         (cmain): Remove __attribute__((unused)).
15153         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15154         (grub_heap_len): Likewise.
15155         (grub_machine_fini): New function.
15156         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15157         (grub_halt): Likewise.
15158         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15159         function.
15160         * util/powerpc/ieee1275/misc.c: New file.
15162 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15164         * DISTLIST: New file.
15165         * gendistlist.sh: Likewise.
15167         * Makefile.in (COMMON_DISTFILES): Removed.
15168         (BOOT_DISTFILES): Likewise.
15169         (CONF_DISTFILES): Likewise.
15170         (DISK_DISTFILES): Likewise.
15171         (FS_DISTFILES): Likewise.
15172         (INCLUDE_DISTFILES): Likewise.
15173         (KERN_DISTFILES): Likewise.
15174         (LOADER_DISTFILES): Likewise.
15175         (TERM_DISTFILES): Likewise.
15176         (UTIL_DISTFILES): Likewise.
15177         (DISTFILES): Likewise.
15178         (uninstall): Uninstall files in $(pkgdata_DATA).
15179         (DISTLIST): New target.
15180         (distdir): Use the contents of the file DISTLIST to get a list of
15181         distributed files.
15183 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15185         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15186         descriptor. This is ported from GRUB Legacy.
15188         * gencmdlist.sh: Added an extra semicolon to make it work with
15189         old sed versions. Reported by Robert Bihlmeyer
15190         <robbe@orcus.priv.at>.
15192 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15194         Automatic loading of commands is supported.
15196         * normal/main.c (read_command_list): New function.
15197         (grub_normal_execute): Call read_command_list.
15199         * normal/command.c (grub_register_command): Return zero or CMD.
15200         Allocate CMD->NAME from the heap.
15201         Initialize CMD->MODULE_NAME to zero.
15202         Find the same name as well. If the same command is found and it is
15203         a dummy command, overwrite members. If it is not a dummy command,
15204         return zero.
15205         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15206         (grub_command_find): If a dummy command is found, load a module
15207         and retry to find a command only once.
15209         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15210         make sure that each command is loaded.
15212         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15213         macro.
15214         (struct grub_command): Remove const from the member `name'.
15215         Add a new member `module_name'.
15216         (grub_register_command): Return grub_command_t.
15218         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15219         sure that each command is loaded.
15221         * genmk.rb (PModule::rule): Specify a module name without the
15222         suffix ".mod" to gencmdlist.sh.
15224 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15226         * gencmdlist.sh: New file.
15228         * genmk.rb (PModule::rule): Generate a rule for a command list.
15229         Clean command.lst.
15230         Generate command.lst from $(COMMANDFILES).
15232         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15233         (DATA): Added $(pkgdata_DATA).
15234         (install-local): Install files in $(pkgdata_DATA).
15236 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15238         * term/i386/pc/vga.c (debug_command): Removed.
15239         (GRUB_MOD_INIT): Do not register the command "debug".
15241         From Hollis Blanchard:
15242         * commands/configfile.c: New file.
15243         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15244         commands/configfile.c.
15245         (pkgdata_MODULES): Added configfile.mod.
15246         (configfile_mod_SOURCES): New variable.
15247         (configfile_mod_CFLAGS): Likewise.
15248         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15249         commands/configfile.c.
15250         (pkgdata_MODULES): Added configfile.mod.
15251         (configfile_mod_SOURCES): New variable.
15252         (configfile_mod_CFLAGS): Likewise.
15253         * util/grub-emu.c (main): Call grub_configfile_init and
15254         grub_configfile_fini.
15255         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15256         prototype.
15257         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15259 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15261         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15262         address.
15264         * commands/help.c (grub_cmd_help): Do not print newlines after
15265         the last command in print_command_help.
15267 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15269         * commands/default.h: New file.
15270         * commands/timeout.h: Likewise.
15271         * normal/context.c: Likewise.
15273         * util/misc.c: Do not include sys/times.h.
15274         Include sys/time.h and grub/machine/time.h.
15275         (grub_get_rtc): Rewritten with gettimeofday.
15277         * util/grub-emu.c (main): Call grub_default_init and
15278         grub_timeout_init before grub_normal_init, and call
15279         grub_timeout_fini and grub_default_fini after grub_main.
15281         * util/console.c (grub_ncurses_checkkey): Return the read
15282         character or -1.
15284         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15285         timeouts.
15287         * normal/main.c (read_config_file): Push MENU. If this fails,
15288         print an error and wait for a user input.
15289         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15290         If a menu is empty or an error occurs, pop MENU.
15291         (grub_normal_execute): Pop and free MENU after grub_menu_run
15292         returns.
15294         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15296         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15297         include time.h.
15298         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15299         without GRUB_UTIL.
15300         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15301         time.h.
15302         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15303         without GRUB_UTIL.
15305         * include/grub/normal.h (struct grub_menu_list): New struct.
15306         (grub_menu_list_t): New type.
15307         (struct grub_context): New struct.
15308         (grub_context_t): New type.
15309         (grub_register_command): Got rid of EXPORT_FUNC.
15310         (grub_unregister_command): Likewise.
15311         (grub_context_get): New prototype.
15312         (grub_context_get_current_menu): Likewise.
15313         (grub_context_push_menu): Likewise.
15314         (grub_context_pop_menu): Likewise.
15315         [GRUB_UTIL] (grub_default_init): Likewise.
15316         [GRUB_UTIL] (grub_default_fini): Likewise.
15317         [GRUB_UTIL] (grub_timeout_init): Likewise.
15318         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15320         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15321         commands/timeout.c and normal/context.c.
15322         (pkgdata_MODULES): Added default.mod and timeout.mod.
15323         (normal_mod_SOURCES): Added normal/context.c.
15324         (default_mod_SOURCES): New variable.
15325         (default_mod_CFLAGS): Likewise.
15326         (timeout_mod_SOURCES): Likewise.
15327         (timeout_mod_CFLAGS): Likewise.
15328         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15329         conf/i386-pc.rmk.
15330         (pkgdata_MODULES): Added default.mod and timeout.mod.
15331         (normal_mod_SOURCES): Added normal/context.c.
15332         (default_mod_SOURCES): New variable.
15333         (default_mod_CFLAGS): Likewise.
15334         (timeout_mod_SOURCES): Likewise.
15335         (timeout_mod_CFLAGS): Likewise.
15337         * Makefile.in (all-local): Added $(MKFILES).
15339 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15341         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15342         (grub_emu_SOURCES): Likewise.
15343         (pkgdata_MODULES): Add `sun.mod'.
15344         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15346         `partmap/sun.c'.
15347         (pkgdata_MODULES): Add `sun.mod'.
15348         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15349         * include/grub/partition.h (grub_sun_partition_map_init): New
15350         prototype.
15351         (grub_sun_partition_map_fini): Likewise.
15352         * partmap/sun.c: New file.
15353         * util/grub-emu.c (main): Initialize and de-initialize the sun
15354         partitionmap support.
15356 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15358         This implements an Emacs-like menu entry editor.
15360         * normal/menu_entry.c: New file.
15362         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15363         characters to ASCII.
15364         (saved_char): New variable.
15365         (grub_ncurses_checkkey): Rewritten completely.
15366         (grub_ncurses_getkey): Likewise.
15367         (grub_ncurses_init): Call raw instead of cbreak.
15369         * normal/menu.c (print_entry): Do not put a space.
15370         (init_page): Renamed to ...
15371         (grub_menu_init_page): ... this. All callers changed.
15372         (edit_menu_entry): Removed.
15373         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15375         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15377         * kern/misc.c (grub_vprintf): Call grub_refresh.
15379         * normal/menu.c (DISP_LEFT): Renamed to ...
15380         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15381         * normal/menu.c (DISP_UP): Renamed to ...
15382         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15383         * normal/menu.c (DISP_RIGHT): Renamed to ...
15384         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15385         * normal/menu.c (DISP_DOWN): Renamed to ...
15386         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15387         * normal/menu.c (DISP_HLINE): Renamed to ...
15388         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15389         * normal/menu.c (DISP_VLINE): Renamed to ...
15390         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15391         * normal/menu.c (DISP_UL): Renamed to ...
15392         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15393         * normal/menu.c (DISP_UR): Renamed to ...
15394         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15395         * normal/menu.c (DISP_LL): Renamed to ...
15396         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15397         * normal/menu.c (DISP_LR): Renamed to ...
15398         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15399         * normal/menu.c (TERM_WIDTH): Renamed to ...
15400         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15401         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15402         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15403         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15404         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15405         * normal/menu.c (TERM_MARGIN): Renamed to ...
15406         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15407         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15408         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15409         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15410         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15411         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15412         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15413         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15414         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15415         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15416         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15417         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15418         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15419         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15420         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15421         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15422         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15423         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15424         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15425         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15426         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15427         All callers changed.
15429         * include/grub/normal.h: New prototype.
15431         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15432         normal/menu_entry.c.
15433         (normal_mod_SOURCES): Likewise.
15434         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15435         (normal_mod_SOURCES): Likewise.
15437 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15439         * include/grub/normal.h (grub_halt_init): New prototype.
15440         (grub_halt_fini): Likewise.
15441         (grub_reboot_init): Likewise.
15442         (grub_reboot_fini): Likewise.
15444         * util/grub-emu.c: Include signal.h.
15445         (main_env): New global variable.
15446         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15447         catch C-c.
15448         (grub_machine_fini): New function.
15449         (main): Call grub_halt_init and grub_reboot_init before
15450         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15451         Call setjmp with MAIN_ENV to go back afterwards.
15452         Call grub_machine_fini right before return.
15454         * include/grub/util/misc.h: Include setjmp.h.
15455         (main_env): New prototype.
15457         * include/grub/kernel.h (grub_machine_fini): New prototype.
15458         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15459         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15461         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15462         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15463         * term/i386/pc/console.c (grub_console_fini): Likewise.
15465         * util/i386/pc/misc.c: New file.
15467         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15468         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15469         commands/i386/pc/reboot.c.
15471 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15473         * include/grub/dl.h (grub_dl_check_header): New prototype.
15474         (grub_arch_dl_check_header): Change return type to grub_err_t,
15475         remove size parameter and export function.  Update all callers.
15476         * kern/dl.c (grub_dl_check_header): New function.
15477         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15478         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15479         are inside the core.
15480         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15481         independent ELF header checks.
15482         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15483         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15484         `grub_dl_check_header' instead of explicit checks.  Check for the
15485         ELF type.
15486         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15487         `grub_dl_check_header' instead of explicit checks.  Remove arch
15488         specific ELF header checks.
15490         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15491         argument SIZE.
15493 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15495         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15496         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15498 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15500         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15501         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15502         (part_map_iterate): Clear `grub_errno' and return 0 if
15503         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15504         * partmap/amiga.c (amiga_partition_map_iterate): Return
15505         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15506         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15508 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15510         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15511         help info.
15513 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15515         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15516         Removed prototype.
15517         (grub_rescue_cmd_linux): New prototype.
15518         (grub_rescue_cmd_initrd): Likewise.
15519         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15520         `bi_rec'.
15521         (grub_linux_release_mem): Release the memory for the initrd.
15522         (grub_load_linux): Renamed from this...
15523         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15524         Changed `entry' not to be static.  Loop over memory regions to
15525         find another one when the default fails.
15526         (grub_rescue_cmd_initrd): New function.
15527         (grub_linux_init): Remove function.
15528         (grub_linux_fini): Likewise.
15529         (GRUB_MOD_INIT): Register `initrd'.
15530         (GRUB_MOD_FINI): Unregister `initrd'.
15531         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15532         Function removed.
15533         (grub_linux_normal_fini): Likewise.
15534         (GRUB_MOD_INIT): Register `initrd'.
15535         (GRUB_MOD_FINI): Unregister `initrd'.
15537 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15539         * commands/help.c: New file.
15540         * normal/arg.c (show_help): Renamed to...
15541         (grub_arg_show_help): ... this.
15542         * commands/i386/pc/halt.c: New file.
15543         * commands/i386/pc/reboot.c: Likewise.
15544         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15545         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15546         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15547         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15548         variables.
15549         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15550         `commands/help.c'.
15551         (pkgdata_MODULES): Add `help.mod'.
15552         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15553         * grub/i386/pc/init.h (grub_reboot): New prototype.
15554         (grub_halt): Likewise.
15555         * include/grub/normal.h (grub_arg_show_help): New prototype.
15556         (grub_help_init): Likewise.
15557         (grub_help_fini): Likewise.
15558         * util/grub-emu.c (main): Initialize and deinitialize the help
15559         command.
15561         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15563         * normal/command.c (grub_command_init): Fixed the description of
15564         the `set' and `unset' commands.
15566 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15568         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15569         function.
15570         * commands/ieee1275/halt.c: New file.
15571         * commands/ieee1275/reboot.c: Likewise.
15572         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15573         `__attribute__ ((unused))'.  Some GCS related fixed.
15574         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15575         (grub_suspend_fini): Likewise.
15576         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15577         and `halt.mod'.
15578         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15579         (halt_mod_CFLAGS): New variables.
15580         * include/grub/powerpc/ieee1275/ieee1275.h
15581         (grub_ieee1275_interpret): New prototype.
15583 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15585         * include/grub/misc.h (memmove): New prototype.
15586         (memcpy): Likewise.
15588 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15590         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15591         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15593 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15595         * kern/misc.c (grub_strndup): Function rewritten.
15597 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15599         * normal/menu.c (TERM_WIDTH): Macro redefined.
15600         (TERM_TOP_BORDER_Y): Likewise.
15601         (draw_border): Replaced while-loop by a for-loop.  Make the number
15602         of lines consistent with the number of lines displayed in
15603         print_entries.  Added a margin below the rectangle.
15604         (print_entry): Make the entry fit in the rectangle.
15605         (print_entries): Display the scroll arrows next to the right
15606         border.
15608 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15610         * fs/minix.c (grub_minix_find_file): Reserve more space for
15611         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15612         `grub_strncpy' to copy `path' into it.
15614 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15616         Add the loopback device, a device via which files can be accessed
15617         as devices.
15619         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15620         (pkgdata_MODULES): Add loopback.mod.
15621         (loopback_mod_SOURCES): New variable.
15622         (loopback_mod_CFLAGS): Likewise.
15623         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15624         `disk/loopback.c'.
15625         (pkgdata_MODULES): Add loopback.mod.
15626         (loopback_mod_SOURCES): New variable.
15627         (loopback_mod_CFLAGS): Likewise.
15628         * disk/loopback.c: new file.
15629         * include/grub/normal.h (grub_loop_init): New prototype.
15630         (grub_loop_fini): New prototype.
15631         * util/grub-emu.c (main): Initialize and de-initialize loopback
15632         support.
15633         * include/grub/disk.h (grub_disk_dev_id): Add
15634         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15636 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15638         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15639         function.
15640         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15641         (suspend_mod_SOURCES): New variable.
15642         (suspend_mod_CFLAGS): Likewise.
15643         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15644         New prototype.
15645         * commands/ieee1275/suspend.c: New file.
15647 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15649         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15650         ((unused))' to `__attribute__ ((used))'.
15651         (GRUB_MOD_FINI): Likewise.
15652         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15653         * genmk.rb (PModule): Assign space to common symbols when linking
15654         modules.
15656 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15658         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15659         `unsigned' arguments to `grub_size_t'.
15660         (grub_malloc): Likewise.
15661         (grub_realloc): Likewise.
15662         (grub_memalign): Likewise.
15663         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15664         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15665         * util/misc.c (grub_malloc): Likewise.
15666         (grub_realloc): Likewise.
15667         * kern/mm.c (get_header_from_pointer): Change the casts to
15668         `unsigned' into a cast to `grub_size_t'.
15670         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15671         point to `currnode' when `currnode' is changed.
15673         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15674         Schottelius <nico-linux@schottelius.org>.
15676 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15678         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15679         (note_path): Remove variable.
15680         (GRUB_IEEE1275_NOTE_NAME): New macro.
15681         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15682         (grub_ieee1275_note_hdr): New structure.
15683         (grub_ieee1275_note_desc): Likewise.
15684         (grub_ieee1275_note): Likewise.
15685         (load_note): Remove `dir' argument.  All callers updated.  Remove
15686         `note_img' and `path'.  Do not load a file from `note_path'.
15687         Initialize a struct grub_ieee1275_note and write that to `out'.
15688         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15690 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15692         * util/misc.c (grub_util_read_image): Revert last change.  It
15693         called `grub_util_read_at', which seeks from the beginning of the
15694         file.
15696 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15698         * TODO: Add note about endianness in grub-mkimage.
15699         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15700         section.
15701         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15702         (grub_mkimage_SOURCES): New target.
15703         * include/grub/kernel.h (grub_start_addr): Remove variable.
15704         (grub_end_addr): Likewise.
15705         (grub_total_module_size): Likewise.
15706         (grub_kernel_image_size): Likewise.
15707         (GRUB_MODULE_MAGIC): New constant.
15708         (grub_module_info): New structure.
15709         (grub_arch_modules_addr): New prototype.
15710         (grub_get_end_addr): Remove prototype.
15711         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15712         * include/grub/powerpc/ieee1275/kernel.h: New file.
15713         * include/grub/util/misc.h (grub_util_get_fp_size): New
15714         prototype.
15715         (grub_util_read_at): Likewise.
15716         (grub_util_write_image_at): Likewise.
15717         * kern/main.c (grub_get_end_addr): Remove function.
15718         (grub_load_modules): Call grub_arch_modules_addr instead of using
15719         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15720         the grub_module_info fields instead of calling grub_get_end_addr
15721         as loop conditions.  Move grub_add_unused_region code here.
15722         (grub_add_unused_region): Remove function.
15723         * kern/i386/pc/init.c: Include grub/cache.h.
15724         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15725         one call to add_mem_region.
15726         (grub_arch_modules_addr): New function.
15727         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15728         (grub_total_module_size): Likewise.
15729         Include grub/machine/kernel.h.
15730         (grub_arch_modules_addr): New function.
15731         * util/grub-emu.c (grub_end_addr): Remove variable.
15732         (grub_total_module_size): Likewise.
15733         (grub_arch_modules_addr): New function.
15734         * util/misc.c: Include unistd.h.
15735         (grub_util_get_fp_size): New function.
15736         (grub_util_read_at): Likewise.
15737         (grub_util_write_image_at): Likewise.
15738         (grub_util_read_image): Call grub_util_read_at.
15739         (grub_util_write_image): Call grub_util_write_image_at.
15740         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15741         additional memory in kernel_img for a struct grub_module_info.
15742         Fill in that grub_module_info.
15743         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15745 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15747         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15748         New function.
15749         * include/grub/powerpc/ieee1275/ieee1275.h
15750         (grub_ieee1275_milliseconds): New prototype.
15751         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15752         Change to 1000.
15753         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15754         grub_ieee1275_milliseconds.
15756 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15758         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15759         variable.
15760         (find_options): New function.
15761         (cmain): Call find_options.
15762         * include/grub/powerpc/ieee1275/ieee1275.h
15763         (grub_ieee1275_realmode): New extern variable.
15764         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15765         grub_map if grub_ieee1275_realmode is false.
15767 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15769         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15770         lines are inserted and make it work like readline.  Reported by
15771         Vincent Pelletier <subdino2004@yahoo.fr>.
15773 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15775         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15777         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15778         `kern/powerpc/cache.S'.
15780 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15782         * genmk.rb: Handle the `Program' class in the main loop.  Written
15783         by Johan Rydberg <jrydberg@gnu.org>.
15784         (Program): New class.
15785         (programs): New variable.
15786         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15787         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15788         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15789         (help_arch): Function removed.
15790         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15791         `powerpc/libgcc.h' and `loader.h'.
15792         (pkgdata_PROGRAMS): New variable.
15793         (sbin_UTILITIES): Variable removed.
15794         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15795         (grubof_SOURCES): Variable re-defined so it only includes the
15796         core functionality.
15797         (grubof_CFLAGS): Remove `-DGRUBOF'.
15798         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15799         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15800         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15801         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15802         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15803         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15804         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15805         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15806         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15807         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15808         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15809         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15810         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15811         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15812         (pc_mod_CFLAGS): New variables.
15813         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15814         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15815         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15816         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15817         Moved from here...
15818         * include/grub/i386/pc/init.h (grub_os_area_addr)
15819         (rub_os_area_size): ... to here.
15820         * include/grub/powerpc/ieee1275/ieee1275.h
15821         (grub_ieee1275_entry_fn): Export symbol.
15822         * include/grub/powerpc/ieee1275/init.h: New file.
15823         * include/grub/powerpc/libgcc.h: Likewise.
15824         * include/grub/cache.h: Likewise.
15825         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15826         <hollis@penguinppc.org>.
15827         * kern/dl.c: Include <grub/cache.h>.
15828         (grub_dl_flush_cache): New function.
15829         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15830         for this module.
15831         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15832         (grub_console_init): Removed prototypes.
15833         (grub_machine_init): Don't initialize the modules anymore.
15834         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15835         static.
15836         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15837         Macro undef removed.
15838         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15839         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15840         relocation `R_PPC_REL32'.  Return an error when the relocation is
15841         unknown.
15842         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15843         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15844         * util/misc.c (grub_arch_sync_caches): Likewise.
15846 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15848         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15849         `symlist.c', add `grubof_symlist.c'.
15850         (symlist.c): Variable removed.
15851         (grubof_HEADERS): Variable added.
15852         (grubof_symlist.c): New target.
15853         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15854         `kernel_img_HEADERS'.
15855         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15856         * kern/powerpc/dl.c: New file.
15857         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15858         Function removed.
15859         (grub_arch_dl_relocate_symbols): Likewise.
15860         (grub_register_exported_symbols): Likewise.
15862 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15864         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15865         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15866         to fail instead.  Reported by Vincent Pelletier
15867         <subdino2004@yahoo.fr>.
15869         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15870         it is not allocated.  Reported by Vincent Pelletier
15871         <subdino2004@yahoo.fr>.
15873         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15874         output so the output looks better.
15876 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15878         Modulize the partition map support and add support for the amiga
15879         partition map.
15881         * commands/ls.c: Include <grub/partition.h> instead of
15882         <grub/machine/partition.h>.
15883         * kern/disk.c: Likewise.
15884         * kern/rescue.c: Likewise.
15885         * loader/i386/pc/chainloader.c: Likewise.
15886         * normal/cmdline.c: Likewise.
15887         * kern/powerpc/ieee1275/init.c: Likewise.
15888         (grub_machine_init): Call `grub_pc_partition_map_init',
15889         `grub_amiga_partition_map_init' and
15890         `grub_apple_partition_map_init'.
15891         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15892         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15893         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15894         `partition.h' and `pc_partition.h'.
15895         (grub_setup_SOURCES): Remove
15896         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15897         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15898         (grub_emu_SOURCES): Likewise.
15899         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15900         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15901         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15902         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15903         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15904         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15905         (grubof_SOURCES): Likewise.
15906         * disk/i386/pc/partition.c: File removed.
15907         * disk/powerpc/ieee1275/partition.c: Likewise.
15908         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15909         * include/grub/i386/pc/partition.h: Likewise.
15910         * kern/partition.c: New file.
15911         * partmap/amiga.c: Likewise.
15912         * partmap/apple.c: Likewise.
15913         * partmap/pc.c: Likewise.
15914         * include/grub/partition.h: Likewise..
15915         * include/grub/pc_partition.h: Likewise.
15916         * util/grub-emu.c: Include <grub/partition.h> instead of
15917         <grub/machine/partition.h>.
15918         (main): Call `grub_pc_partition_map_init',
15919         `grub_amiga_partition_map_init' and
15920         `grub_apple_partition_map_init' and deinitialize afterwards.
15921         * util/i386/pc/biosdisk.c: Include `#include
15922         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15923         `<grub/machine/partition.h>'.
15924         * util/i386/pc/grub-setup.c: Likewise.
15925         * util/i386/pc/biosdisk.c: Likewise.
15926         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
15927         partition information in case of a PC partition.
15928         * util/i386/pc/grub-setup.c: Include `#include
15929         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
15930         `<grub/machine/partition.h>'.
15931         (setup): Only access the PC specific partition information in case
15932         of a PC partition.
15934 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
15936         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
15937         (grub_longjmp): Likewise.
15938         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
15939         20.
15940         * normal/powerpc/setjmp.S: New file.
15941         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
15942         `normal/powerpc/setjmp.S'.
15943         (grubof_CFLAGS): Add `-DGRUBOF'.
15944         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
15945         [GRUB_UTIL && !GRUBOF].
15947 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
15949         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
15950         property named `name'.  Correctly handle the error returned by
15951         `grub_ieee1275_finddevice' if a device can not be opened.
15953 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
15955         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
15956         `actual' for negativity.
15957         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15958         kern/fshelp.c.
15960 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15962         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
15963         (PAGE_OFFSET): New macro.
15964         (CRTC_ADDR_PORT): Likewise.
15965         (CRTC_DATA_PORT): Likewise.
15966         (START_ADDR_HIGH_REGISTER): Likewise.
15967         (START_ADDR_LOW_REGISTER): Likewise.
15968         (GRAPHICS_ADDR_PORT): Likewise.
15969         (GRAPHICS_DATA_PORT): Likewise.
15970         (READ_MAP_REGISTER): Likewise.
15971         (INPUT_STATUS1_REGISTER): Likewise.
15972         (INPUT_STATUS1_VERTR_BIT): Likewise.
15973         (page): New variable.
15974         (wait_vretrace): New function.
15975         (set_read_map): Likewise.
15976         (set_start_address): Likewise.
15977         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
15978         the right page.
15979         (check_vga_mem): Take the page into account.
15980         (write_char): Likewise.
15981         (write_cursor): Likewise.
15982         (scroll_up): Likewise.  Copy the page to the page that is not
15983         shown and switch between both pages.
15984         (grub_vga_putchar): Fix off by one error.
15985         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
15986         account.
15988 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
15990         Add support for iso9660 (including rockridge).
15992         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15993         (iso9660_mod_SOURCES): New variable.
15994         (iso9660_mod_CFLAGS): Likewise.
15995         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
15996         * include/grub/fs.h (grub_iso9660_init): New prototype.
15997         * util/grub-emu.c (main): Call `grub_iso9660_init'.
15998         * fs/iso9660.c: New file.
16000         * include/grub/misc.h (grub_strncat): New prototype.
16001         * kern/misc.c (grub_strncat): New function.
16003         * fs/hfs.c (grub_hfs_mount): Translate the error
16004         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16005         * fs/jfs.c (grub_jfs_mount): Likewise.
16006         * fs/ufs.c (grub_ufs_mount): Likewise.
16008 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16010         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16011         which initialized BAT registers.
16012         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16013         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16014         Move from here...
16015         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16016         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16017         ... to here.
16018         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16019         (grub_mapclaim): Likewise.
16020         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16021         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16022         hand.
16024 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16026         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16027         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16028         -ffreestanding and -msoft-float.
16030 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16032         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16033         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16034         set in grub_ieee1275_flags.
16036 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16038         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16039         prototype.
16040         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16041         grub_console_init first.
16042         Change the memory range used for grub_ieee1275_claim and
16043         grub_mm_init_region.
16044         Print an error message if the claim fails.
16045         Include <grub/misc.h>.
16047 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16049         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16050         Call grub_children_iterate for device nodes of type `scsi',
16051         `ide', or `ata'.
16052         (grub_ofdisk_open): Remove manual device alias resolution.
16053         Fix memory leak when device cannot be opened.
16054         * include/grub/powerpc/ieee1275/ieee1275.h
16055         (grub_children_iterate): New prototype.
16056         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16057         New function.
16058         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16059         Return -1 if args.size was -1.
16061 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16063         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16064         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16065         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16066         Open Firmware's memory for it; claim memory from _start to _end.
16067         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16068         (_end): New extern.
16069         (_start): Zero BSS from __bss_start to _end.
16070         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16071         New extern.
16072         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16074 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16076         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16077         -1 if args.base was -1.
16079 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16081         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16082         escape sequence instead of a literal ^L. Also call
16083         grub_ofconsole_gotoxy.
16085 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16087         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16088         void *  arguments to grub_addr_t.  All callers updated.  Also make
16089         the `result' argument optional.
16090         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16091         All callers updated.
16093 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16095         * commands/ls.c (grub_ls_list_files): Use the string following the
16096         initial ')', if present, as the filesystem path.
16097         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16099         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16101 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16103         Make the source code of the menu interface more readable.
16105         * normal/menu.c: Include grub/mm.h.
16106         (TERM_WIDTH): New macro.
16107         (TERM_HEIGHT): Likewise.
16108         (TERM_INFO_HEIGHT): Likewise.
16109         (TERM_MARGIN): Likewise.
16110         (TERM_SCROLL_WIDTH): Likewise.
16111         (TERM_TOP_BORDER_Y): Likewise.
16112         (TERM_LEFT_BORDER_X): Likewise.
16113         (TERM_BORDER_WIDTH): Likewise.
16114         (TERM_MESSAGE_HEIGHT): Likewise.
16115         (TERM_BORDER_HEIGHT): Likewise.
16116         (TERM_NUM_ENTRIES): Likewise.
16117         (TERM_FIRST_ENTRY_Y): Likewise.
16118         (TERM_ENTRY_WIDTH): Likewise.
16119         (TERM_CURSOR_X): Likewise.
16120         (draw_border): Use macros instead of magic numbers.
16121         (print_entry): Likewise.
16122         (print_entries): Likewise.
16123         (run_menu): Likewise. Also, handle the key 'e'.
16124         (run_menu_entry): Ignore empty command lines.
16125         (print_message): Added a new argument EDIT. If EDIT is true,
16126         print a different message.
16127         (init_page): Likewise.
16128         (edit_menu_entry): New function. Not implemented yet.
16130 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16132         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16133         can be loaded from normal mode.
16135         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16136         `multiboot.mod'.
16137         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16138         (multiboot_mod_CFLAGS): New variables.
16139         * loader/i386/pc/linux_normal.c: New file.
16140         * loader/i386/pc/multiboot_normal.c: Likewise.
16142         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16143         attribute `unused'.
16145         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16146         `fdiro' to read the mode information from instead of `diro'.
16148         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16149         looking up a symlink.
16151         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16152         macro.
16153         * normal/command.c (grub_command_execute): Don't parse the
16154         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16155         flags of the command.
16157         * normal/menu.c (grub_menu_run): Fix typo.
16159 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16161         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16163         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16164         `y + 1' instead of `y - 1'.
16166         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16168 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16170         From Hollis Blanchard <hollis@penguinppc.org>:
16171         * kern/misc.c (memmove): New alias for grub_memmove.
16172         (memcmp): New alias for grub_memcmp.
16173         (memset): New alias for grub_memset.
16174         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16175         Change "int handle" to "grub_ieee1275_phandle_t handle".
16176         * include/grub/powerpc/ieee1275/ieee1275.h
16177         (grub_ieee1275_get_property): Likewise.
16179 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16181         Added normal mode command `chainloader' as module chain.mod, which
16182         depends on normal.mod and _chain.mod.
16184         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16185         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16186         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16187         Deleted prototype.
16188         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16189         but arguments parsing moved to ...
16190         (grub_chainloader_cmd): ... here.  New function.
16191         * include/grub/i386/pc/chainloader.h: New file.
16192         * loader/i386/pc/chainloader_normal.c: Likewise.
16194 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16196         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16197         (grub_mkimage_LDFLAGS): Likewise.
16198         (grub_emu_SOURCES): Likewise.
16199         (kernel_img_HEADERS): Added fshelp.h.
16200         * fs/ext2.c: Include <grub/fshelp.h>.
16201         (FILETYPE_REG): New macro.
16202         (FILETYPE_INO_REG): Likewise.
16203         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16204         Changed all users.
16205         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16206         all users.
16207         (grub_fshelp_node): New struct.
16208         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16209         to a pointer.
16210         (grub_ext2_get_file_block): Removed function.
16211         (grub_ext2_read_block): New function.
16212         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16213         This function was written.
16214         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16215         (grub_ext2_find_file): Removed function.
16216         (grub_ext2_read_symlink): New function.
16217         (grub_ext2_iterate_dir): Likewise.
16218         (grub_ext2_open): Rewritten.
16219         (grub_ext2_dir): Rewritten.
16220         * include/grub/fshelp.h: New file.
16221         * fs/fshelp.c: Likewise.
16223 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16225         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16226         (print_message): Add a missing newline.
16227         (run_menu): Added timeout support.
16228         (run_menu_entry): New local function.
16229         (grub_menu_run): Added support for booting.
16231         * kern/loader.c (grub_loader_is_loaded): New function.
16233         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16234         (grub_get_rtc): Exported.
16236         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16237         (grub_get_rtc): Exported.
16239         * include/grub/normal.h (struct grub_command_list): Remove
16240         constant from the member `command'.
16242         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16244         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16246         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16248 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16250         Add support for the JFS filesystem.
16252         * fs/jfs.c: New file.
16253         * include/grub/fs.h (grub_jfs_init): New prototype.
16254         (grub_jfs_fini): New prototype.
16255         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16256         (grub_emu_SOURCES): Likewise.
16257         (pkgdata_MODULES): Add jfs.mod.
16258         (jfs_mod_SOURCES): New variable.
16259         (jfs_mod_CFLAGS): Likewise.
16260         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16261         (grubof_SOURCES): Likewise.
16262         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16264         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16265         endian to the host endian.
16266         (grub_fat_utf16_to_utf8): Move function from there...
16267         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16268         the endianness of the source string anymore.
16269         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16271 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16273         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16274         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16275         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16276         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16278         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16279         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16280         for `node_found' and `it_dir'.
16281         (grub_hfs_dir): Add prototype for `dir_hook'.
16283         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16284         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16285         and `indir32' to silence a gcc warning.
16287         * include/grub/fs.h (grub_hfs_init): New prototype.
16288         (grub_hfs_fini): Likewise.
16291 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16293         Each disk device has its own id now. This is useful to make use
16294         of multiple disk devices.
16296         * include/grub/disk.h (grub_disk_dev_id): New enum.
16297         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16298         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16300         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16301         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16303         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16304         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16306         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16307         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16309         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16310         "id" which is used by the cache manager.
16312         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16313         of just "GRUB".
16315 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16317         * fs/hfs.c: New file.
16318         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16319         (grub_emu_SOURCES): Likewise.
16320         (pkgdata_MODULES): Add hfs.mod.
16321         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16322         (grubof_SOURCES): Likewise.
16323         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16325         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16326         * kern/misc.c (grub_strncasecmp): Add function.
16328 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16330         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16331         with parentheses.
16333         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16334         (grub_ext2_dir): In case the directory entry type is unknown, read
16335         it from the inode.
16337 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16339         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16340         grub_load_linux instead of grub_rescue_cmd_linux as second
16341         argument of grub_rescue_register_command.
16343         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16345 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16347         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16348         function.
16349         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16350         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16351         `loader/powerpc/ieee1275/linux.c',
16352         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16353         * include/grub/powerpc/ieee1275/ieee1275.h
16354         (grub_ieee1275_release): New prototype.
16355         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16356         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16357         normal, boot, linux and linux_normal.
16358         * loader/powerpc/ieee1275/linux.c: New file.
16359         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16361 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16363         * normal/arg.c (grub_arg_parse): Correct error handling after
16364         reallocating the argumentlist (check if `argl' is not null instead
16365         of checking if `args' is not null).
16366         * kern/mm.c (grub_realloc): Return the same pointer when using the
16367         same region, instead of returning the header address.
16369 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16371         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16372         one block instead of two when looking for the initial partition.
16373         (grub_partition_probe): Initialize the local variable `p' with 0.
16374         Use base 10 for the grub_strtoul call.
16375         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16376         need for one local variable.
16377         (grub_strtoul): Don't add the new value to `num', instead of that
16378         just assign it.
16380 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16382         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16383         (pxeboot_img_SOURCES): New variable.
16384         (pxeboot_img_ASFLAGS): Likewise.
16385         (pxeboot_img_LDFLAGS): Likewise.
16386         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16387         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16388         <lode_leroy@hotmail.com>.
16390 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16392         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16393         there was no input.
16395 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16397         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16398         the history buffer logic.
16400 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16402         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16403         (FILETYPE_INO_SYMLINK): New macros.
16404         (grub_ext2_find_file): Check if the node is a directory using the
16405         inode stat information instead of using the filetype in the
16406         dirent.  Exclude the first character of an absolute symlink.
16407         (grub_ext2_dir): Mask out the filetype part of the mode member of
16408         the inode.
16410 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16412         Add support for UFS version 1 and 2.  Add support for the minix
16413         filesystem version 1 and 2, both the variants with 14 and 30 long
16414         filenames.
16416         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16417         fs/minix.c.
16418         (grub_emu_SOURCES): Likewise.
16419         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16420         (ufs_mod_SOURCES): New variable.
16421         (ufs_mod_CFLAGS): Likewise.
16422         (minix_mod_SOURCES): Likewise.
16423         (minix_mod_CFLAGS): Likewise.
16424         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16425         fs/minix.c.
16426         (grubof_SOURCES): Likewise.
16427         * fs/ufs.c: New file.
16428         * fs/minix.c: New file.
16429         * include/grub/fs.h (grub_ufs_init): New prototype.
16430         (grub_ufs_fini): Likewise.
16431         (grub_minix_init): Likewise.
16432         (grub_minix_fini): Likewise.
16433         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16434         minix fs.
16436 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16438         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16439         commands/ls.c, commands/terminal.c, commands/boot.c,
16440         commands/cmp.c and commands/cat.c.
16441         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16443         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16444         "env.h"
16446 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16448         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16449         and grub_, respectively. Because the conversion is trivial and
16450         mechanical, I omit the details here. Please refer to the CVS
16451         if you need more information.
16453 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16455         * include/pupa: Renamed to ...
16456         * include/grub: ... this.
16457         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16458         * util/i386/pc/grub-mkimage.c: ... this.
16459         * util/i386/pc/pupa-setup.c: Renamed to ...
16460         * util/i386/pc/grub-setup.c: ... this.
16461         * util/pupa-emu.c: Renamed to ...
16462         * util/grub-emu.c: ... this.
16464 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16466         Add support for the newworld apple macintosh (PPC).  This has been
16467         tested on the powerbook 2000 only.  It only adds support for
16468         generic ieee1275 functions, console and disk support.  This should
16469         be easy to port to other architectures with support for Open
16470         Firmware.
16472         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16473         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16474         specific tests are only executed while building for the i386.
16475         Inverse test for crosscompile.
16476         * genmk.rb (Utility): Allow assembler files.
16477         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16478         * conf/powerpc-ieee1275.rmk: New file.
16479         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16480         * disk/powerpc/ieee1275/partition.c: Likewise.
16481         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16482         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16483         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16484         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16485         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16486         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16487         * include/pupa/powerpc/ieee1275/loader.h
16488         * include/pupa/powerpc/setjmp.h: Likewise.
16489         * include/pupa/powerpc/types.h: Likewise.
16490         * kern/powerpc/ieee1275/init.c: Likewise.
16491         * kern/powerpc/ieee1275/openfw.c: Likewise.
16492         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16494         These files were written by Johan Rydberg
16495         (jrydberg@night.trouble.net) and I only modified them slightly.
16497         * boot/powerpc/ieee1275/cmain.c: New file.
16498         * boot/powerpc/ieee1275/crt0.S: Likewise.
16499         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16500         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16502 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16504         * Makefile.in: Update copyright.
16505         * genmodsrc.sh: Likewise.
16506         * gensymlist.sh: Likewise.
16507         * term/i386/pc/vga.c: Indent correctly.
16509         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16510         bugreporting address.
16511         * util/i386/pc/pupa-setup.c (usage): Likewise,
16512         (main): Call pupa_ext2_init and pupa_ext2_fini.
16514         * fs/fat.c (log2): Renamed to ...
16515         (fat_log2): ... this.
16516         All callers changed.
16517         * kern/misc.c (memcpy): Alias to pupa_memmove.
16518         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16519         lvalue cast.
16520         * util/console.c (pupa_ncurses_fini): Return 0.
16522         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16523         Move fail label here.
16524         [__GNU__]: Don't warn when using stat.
16525         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16526         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16527         long int. Use strtol instead of strtoul.
16529 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16531         * commands/boot.c: New file.
16532         * commands/cat.c: Likewise.
16533         * commands/cmp.c: Likewise.
16534         * commands/ls.c: Likewise.
16535         * commands/terminal.c: Likewise.
16536         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16537         (pupa_register_command): Changed interface to match the new
16538         argument parser.
16539         (pupa_command_execute): Changed (almost rewritten) so it uses
16540         pupa_split_command.  Added support for setting variables using the
16541         syntax `foo=bar'.
16542         (rescue_command): Changed to work with the new argument parser.
16543         (terminal_command): Moved from here to commands/terminal.c.
16544         (set_command): New function.
16545         (unset_command): New function.
16546         (insmod_command): New function.
16547         (rmmod_command): New function.
16548         (lsmod_command): New function.
16549         (pupa_command_init): Don't initialize the command terminal
16550         anymore.  Initialize the commands set, unset, insmod, rmmod and
16551         lsmod.
16552         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16553         (kernel_img_HEADERS): Add arg.h and env.h.
16554         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16555         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16556         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16557         normal/arg.c.
16558         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16559         terminal.mod.
16560         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16561         (boot_mod_SOURCES): New variable.
16562         (terminal_mod_SOURCES): Likewise.
16563         (ls_mod_SOURCES): Likewise.
16564         (cmp_mod_SOURCES): Likewise.
16565         (cat_mod_SOURCES): Likewise.
16567         * normal/arg.c: New file.
16568         * kern/env.c: Likewise.
16569         * include/pupa/arg.h: Likewise.
16570         * include/pupa/env.h: Likewise.
16571         * font/manager.c (font_command): Changed to match argument parsing
16572         interface changes.
16573         (PUPA_MOD_INIT): Likewise.
16574         * hello/hello.c (pupa_cmd_hello): Likewise.
16575         (PUPA_MOD_INIT): Likewise.
16576         * include/pupa/disk.h: Include <pupa/device.h>.
16577         (pupa_print_partinfo): New prototype.
16578         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16579         (pupa_dl_get_prefix): Likewise.
16580         * include/pupa/misc.h: Include <pupa/err.h>.
16581         (pupa_isgraph): New prototype.
16582         (pupa_isdigit): Likewise.
16583         (pupa_split_cmdline): Likewise.
16584         * include/pupa/normal.h: Include <pupa/arg.h>.
16585         (pupa_command): Changed the prototype of the member `func' to
16586         match the argument parsing interface.  Added member `options'.
16587         (pupa_register_command): Updated to match function.
16588         (pupa_arg_parse): New prototype.
16589         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16590         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16591         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16592         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16593         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16594         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16595         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16596         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16597         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16598         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16599         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16600         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16601         * kern/disk.c: Include <pupa/file.h>.
16602         (pupa_print_partinfo): New function.
16603         * kern/dl.c: Include <pupa/env.h>.
16604         (pupa_dl_dir): Variable removed.
16605         (pupa_dl_load): Use the environment variable `prefix' instead of
16606         the variable pupa_dl_dir.
16607         (pupa_dl_set_prefix): Function removed.
16608         (pupa_dl_get_prefix): Likewise.
16609         * kern/i386/pc/init.c: Include <pupa/env.h>.
16610         (pupa_machine_init): Use the environment variable `prefix' instead of
16611         using pupa_dl_set_prefix to set the prefix.
16612         * kern/main.c: Include <pupa/env.h>.
16613         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16614         using pupa_dl_get_prefix to get the prefix.
16615         * kern/misc.c: Include <pupa/env.h>.
16616         (pupa_isdigit): New function.
16617         (pupa_isgraph): Likewise.
16618         (pupa_ftoa): Likewise.
16619         (pupa_vsprintf): Added support for printing values of the type
16620         `double'.  Make it possible to format variable output when using
16621         formatting like `%1.2%f'.
16622         (pupa_split_cmdline): New function.
16623         * kern/rescue.c: Include <pupa/env.h>.
16624         (next_word): Removed function.
16625         (pupa_rescue_cmd_prefix): Likewise.
16626         (pupa_rescue_cmd_set): New function.
16627         (pupa_rescue_cmd_unset): New function.
16628         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16629         split the command line instead of splitting it here.  Added
16630         support for setting variables using the syntax `foo=bar'.  Don't
16631         initialize the prefix command anymore.  Initialized the set and
16632         unset commands.
16633         * normal/cmdline.c: Include <pupa/env.h>.
16634         (pupa_tab_complete): Added prototypes for print_simple_completion,
16635         print_partition_completion, add_completion, iterate_commands,
16636         iterate_dev, iterate_part and iterate_dir. Moved code to print
16637         partition information from here to kern/disk.c.
16638         (pupa_cmdline_run): Don't check if the function exists anymore.
16639         * normal/main.c: Include <pupa/env.h>.
16640         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16641         instead of using pupa_dl_get_prefix to get the prefix.
16642         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16643         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16644         warning.
16645         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16646         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16647         ((unused))' to silence a gcc warning.
16648         (pupa_vga_setcolor): Likewise.
16649         (debug_command): Changed to match argument parsing
16650         interface changes.
16651         * util/pupa-emu.c: Include <pupa/env.h>.
16652         (options): Added 0's for unused fields to silence a gcc warning.
16653         (argp): Likewise.
16654         (main): Use the environment variable `prefix' instead of using
16655         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16656         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16657         and terminal.
16659         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16660         * util/misc.c: Include <malloc.h>.
16661         (pupa_malloc): Rewritten so errors are correctly reported.
16662         (pupa_realloc): Likewise.
16663         (pupa_memalign): Likewise.
16664         (pupa_mm_init_region): Declare unused variables with
16665         `__attribute__ ((unused))' to silence a gcc warning.
16666         * normal/i386/setjmp.S: Remove tab at the end of the file to
16667         silence a gcc warning.
16668         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16669         variables with `__attribute__ ((unused))' to silence a gcc
16670         warning.
16671         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16672         local variable i unsigned to silence a gcc warning.
16674         * kern/term.c: Include <pupa/misc.h>.
16675         (pupa_more_lines): New variable.
16676         (pupa_more): Likewise.
16677         (pupa_putcode): When the pager is active pause at the end of every
16678         screen.
16679         (pupa_set_more): New function.
16680         * include/pupa/term.h (pupa_set_more): New prototype.
16683 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16685         Now this project is GRUB 2 rather than PUPA. The location of
16686         the CVS repository was moved to GRUB's.
16688         * configure.ac: Use bug-grub as the reporting address.
16689         Use GRUB instead of PUPA.
16690         Change the version number to 1.90.
16692 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16694         * genkernsyms.sh: Updated copyright information.
16695         * genmk.rb: Likewise.
16696         * genmodsrc.sh: Likewise.
16697         * gensymlist.sh: Likewise.
16698         * boot/i386/pc/boot.S: Likewise.
16699         * boot/i386/pc/diskboot.S: Likewise.
16700         * disk/i386/pc/biosdisk.c: Likewise.
16701         * disk/i386/pc/partition.c: Likewise.
16702         * font/manager.c: Likewise.
16703         * fs/ext2.c: Likewise.
16704         * fs/fat.c: Likewise.
16705         * include/pupa/boot.h: Likewise.
16706         * include/pupa/device.h: Likewise.
16707         * include/pupa/disk.h: Likewise.
16708         * include/pupa/dl.h: Likewise.
16709         * include/pupa/elf.h: Likewise.
16710         * include/pupa/err.h: Likewise.
16711         * include/pupa/file.h: Likewise.
16712         * include/pupa/font.h: Likewise.
16713         * include/pupa/fs.h: Likewise.
16714         * include/pupa/kernel.h: Likewise.
16715         * include/pupa/loader.h: Likewise.
16716         * include/pupa/misc.h: Likewise.
16717         * include/pupa/mm.h: Likewise.
16718         * include/pupa/net.h: Likewise.
16719         * include/pupa/normal.h: Likewise.
16720         * include/pupa/rescue.h: Likewise.
16721         * include/pupa/setjmp.h: Likewise.
16722         * include/pupa/symbol.h: Likewise.
16723         * include/pupa/term.h: Likewise.
16724         * include/pupa/types.h: Likewise.
16725         * include/pupa/i386/setjmp.h: Likewise.
16726         * include/pupa/i386/types.h: Likewise.
16727         * include/pupa/i386/pc/biosdisk.h: Likewise.
16728         * include/pupa/i386/pc/boot.h: Likewise.
16729         * include/pupa/i386/pc/console.h: Likewise.
16730         * include/pupa/i386/pc/init.h: Likewise.
16731         * include/pupa/i386/pc/kernel.h: Likewise.
16732         * include/pupa/i386/pc/linux.h: Likewise.
16733         * include/pupa/i386/pc/loader.h: Likewise.
16734         * include/pupa/i386/pc/memory.h: Likewise.
16735         * include/pupa/i386/pc/multiboot.h: Likewise.
16736         * include/pupa/i386/pc/partition.h: Likewise.
16737         * include/pupa/i386/pc/time.h: Likewise.
16738         * include/pupa/i386/pc/vga.h: Likewise.
16739         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16740         * include/pupa/util/getroot.h: Likewise.
16741         * include/pupa/util/misc.h: Likewise.
16742         * include/pupa/util/resolve.h: Likewise.
16743         * kern/device.c: Likewise.
16744         * kern/disk.c: Likewise.
16745         * kern/dl.c: Likewise.
16746         * kern/err.c: Likewise.
16747         * kern/file.c: Likewise.
16748         * kern/fs.c: Likewise.
16749         * kern/loader.c: Likewise.
16750         * kern/main.c: Likewise.
16751         * kern/misc.c: Likewise.
16752         * kern/mm.c: Likewise.
16753         * kern/rescue.c: Likewise.
16754         * kern/term.c: Likewise.
16755         * kern/i386/dl.c: Likewise.
16756         * kern/i386/pc/init.c: Likewise.
16757         * kern/i386/pc/lzo1x.S: Likewise.
16758         * kern/i386/pc/startup.S: Likewise.
16759         * loader/i386/pc/chainloader.c: Likewise.
16760         * loader/i386/pc/linux.c: Likewise.
16761         * loader/i386/pc/multiboot.c: Likewise.
16762         * normal/cmdline.c: Likewise.
16763         * normal/command.c: Likewise.
16764         * normal/main.c: Likewise.
16765         * normal/menu.c: Likewise.
16766         * normal/i386/setjmp.S: Likewise.
16767         * term/i386/pc/console.c: Likewise.
16768         * term/i386/pc/vga.c: Likewise.
16769         * util/console.c: Likewise.
16770         * util/genmoddep.c: Likewise.
16771         * util/misc.c: Likewise.
16772         * util/pupa-emu.c: Likewise.
16773         * util/resolve.c: Likewise.
16774         * util/unifont2pff.rb: Likewise.
16775         * util/i386/pc/biosdisk.c: Likewise.
16776         * util/i386/pc/getroot.c: Likewise.
16777         * util/i386/pc/pupa-mkimage.c: Likewise.
16778         * util/i386/pc/pupa-setup.c: Likewise.
16780 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16782         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16783         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16784         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16785         reading and reset it after reading.
16786         (pupa_ext2_close): Return PUPA_ERR_NONE.
16788         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16789         Correct value.
16790         (struct linux_kernel_header): Add kernel_version and
16791         initrd_addr_max.
16792         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16793         pupa_file_read succeeds.
16794         (pupa_rescue_cmd_initrd): Implement.
16796 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16798         * fs/ext2.c (pupa_ext2_label): New function.
16799         (pupa_ext2_fs): Added label.
16800         * fs/fat.c (pupa_fat_label): New function.
16801         (pupa_fat_fs): Added label.
16802         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16804         * kern/misc.c (pupa_strndup): New function.
16805         * include/pupa/misc.h (pupa_strndup): New prototype.
16807         * include/pupa/normal.h: Include <pupa/err.h>.
16808         (pupa_set_history): New prototype.
16809         (pupa_iterate_commands): New prototype.
16810         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16811         <pupa/disk.h>, <pupa/file.h>.
16812         (hist_size): New variable.
16813         (hist_lines): Likewise.
16814         (hist_end): Likewise.
16815         (hist_used): Likewise.
16816         (pupa_set_history): New function.
16817         (pupa_history_get): Likewise.
16818         (pupa_history_add): Likewise.
16819         (pupa_history_replace): Likewise.
16820         (pupa_tab_complete): Likewise.
16821         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16822         completion shows partitionnames while completing partitions, this
16823         feature was suggested by Jeff Bailey.
16824         * normal/command.c (pupa_iterate_commands): New function.
16825         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16826         (pupa_normal_init): Initialize history buffer.
16827         (PUPA_MOD_INIT): Likewise.
16828         (pupa_normal_fini): Free the history buffer.
16829         (PUPA_MOD_FINI): Likewise.
16831         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16832         key.
16834         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16835         * configure.ac [i386]: Check for regparam bug.
16836         (NESTED_FUNC_ATTR) [! i386]: Defined.
16838 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16840         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16841         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16842         (pupa_emu_SOURCES): New variable.
16843         (pupa_emu_LDFLAGS): Likewise.
16844         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16845         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16846         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16847         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16848         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16849         (pupa_jmp_buf): New typedef.
16850         (pupa_setjmp) [PUPA_UTIL]: New macro.
16851         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16852         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16853         (pupa_refresh): New prototype.
16854         * include/pupa/util/getroot.h: New file.
16855         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16856         it.
16857         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16858         (pupa_rescue_cmd_cat): Likewise.
16859         (pupa_rescue_cmd_ls): Likewise.
16860         (pupa_rescue_cmd_testload): Likewise.
16861         (pupa_rescue_cmd_lsmod): Likewise.
16862         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16863         * normal/menu.c (run_menu): Likewise.
16864         * kern/term.c (pupa_cls): Likewise.
16865         (pupa_refresh): New function.
16866         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16867         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16868         * util/console.c: New file.
16870         * util/i386/pc/getroot.c: New file.
16871         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16872         (pupa_putchar): New function.
16873         (pupa_refresh): Likewise.
16874         (xgetcwd): Function moved to ...
16875         (strip_extra_slashes): Likewise.
16876         (get_prefix): Likewise.
16877         * util/i386/pc/getroot.c: ... here.
16878         (find_root_device): Function moved and renamed to...
16879         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16880         Changed all callers.
16881         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16882         and renamed to...
16883         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16884         Changed all callers.
16885         * util/misc.c (pupa_memalign): New function.
16886         (pupa_mm_init_region): Likewise.
16887         (pupa_register_exported_symbols): Likewise.
16888         (pupa_putchar): Function removed.
16889         * util/pupa-emu.c: New file.
16891 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16893         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16894         (_multiboot_mod_SOURCES): New variable.
16895         (_multiboot_mod_CFLAGS): Likewise.
16896         * loader/i386/pc/multiboot.c: New file.
16897         * include/pupa/i386/pc/multiboot.h: Likewise.
16898         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16899         (pupa_multiboot_real_boot): New function.
16900         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16901         (pupa_multiboot_real_boot): New prototype.
16902         (pupa_rescue_cmd_multiboot): Likewise
16903         (pupa_rescue_cmd_module): Likewise.
16905         * kern/loader.c (pupa_loader_set): Continue when
16906         pupa_loader_unload_func() fails.
16907         (pupa_loader_unset): New function.
16908         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16910         * kern/misc.c (pupa_stpcpy): New function.
16911         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16913 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
16915         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
16916         for available extensions.
16918         * include/pupa/i386/pc/time.h: New file.
16919         * kern/disk.c: Include <pupa/machine/time.h>.
16920         (PUPA_CACHE_TIMEOUT): New macro.
16921         (pupa_last_time): New variable.
16922         (pupa_disk_open): Flush the cache when there was a timeout.
16923         (pupa_disk_close): Reset the timer.
16924         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
16925         pupa_currticks.
16926         * util/misc.c: Include <sys/times.h>
16927         (pupa_get_rtc): New function.
16929 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
16931         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
16932         as blocks.
16933         (pupa_ext2_get_file_block): Use blocks member.
16935         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
16936         first block. Return -1 instead of pupa_errno on error.
16938 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
16940         * README: In the pupa-mkimage example use _chain instead of chain
16941         and ext2 instead of fat.
16942         * TODO: Replace ext2fs with jfs as an example.  Add an item for
16943         adding journal playback for ext2fs.
16944         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
16945         (pkgdata_MODULES): Added ext2.mod.
16946         (ext2_mod_SOURCES): New variable.
16947         (ext2_mod_CFLAGS): Likewise.
16948         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
16949         * include/pupa/misc.h (pupa_strncpy): New prototype.
16950         (pupa_strcat): Likewise.
16951         (pupa_strncmp): Likewise.
16952         * kern/misc.c (pupa_strcat): Enable function.
16953         (pupa_strncpy): New function.
16954         (pupa_strncmp): Likewise.
16955         * fs/ext2.c: New file.
16957         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
16958         when the read failed before retrying.
16959         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
16960         (_FILE_OFFSET_BITS): Likewise.
16961         * configure.ac: Added AC_SYS_LARGEFILE.
16963 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16965         * genmk.rb (PModule#rule): Make sure to get only symbol names
16966         from the output of nm.
16967         Reported by Robert Millan <zeratul2@wanadoo.es>.
16969 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
16971         I forgot to check in these changes for a long time. This adds
16972         incomplete support for VGA console, and this is still very
16973         buggy. Also, a lot of consideration is required for I18N,
16974         UNICODE, and VGA font issues. Therefore, assume that this is
16975         such that "better than nothing".
16977         * font/manager.c: New file.
16978         * include/pupa/font.h: Likewise.
16979         * include/pupa/i386/pc/vga.h: Likewise.
16980         * term/i386/pc/vga.c: Likewise.
16981         * util/unifont2pff.rb: Likewise.
16983         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
16984         (pkgdata_MODULES): Added vga.mod and font.mod.
16985         (vga_mod_SOURCES): New variables.
16986         (vga_mod_CFLAGS): Likewise.
16987         (font_mod_SOURCES): Likewise.
16988         (font_mod_CFLAGS): Likewise.
16990         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
16992         * include/pupa/term.h: Include pupa/err.h.
16993         (struct pupa_term): Added init and fini.
16994         Changed the argument of putchar to pupa_uint32_t.
16996         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
16997         (pupa_console_real_putchar): New prototype.
16998         (pupa_console_putchar): Removed.
16999         (pupa_console_checkkey): Exported.
17000         (pupa_console_getkey): Likewise.
17002         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17003         characters.
17005         * kern/term.c (pupa_term_set_current): Rewritten.
17006         (pupa_putchar): Likewise.
17007         (pupa_putcode): New function.
17009         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17010         (pupa_console_real_putchar): ... this.
17011         (pupa_vga_set_mode): New function.
17012         (pupa_vga_get_font): Likewise.
17014         * normal/command.c: Include pupa/term.h.
17015         (terminal_command): New function.
17016         (pupa_command_init): Register the command "terminal".
17018         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17019         (DISP_UP): Likewise.
17020         (DISP_RIGHT): Likewise.
17021         (DISP_DOWN): Likewise.
17022         (DISP_HLINE): Likewise.
17023         (DISP_VLINE): Likewise.
17024         (DISP_UL): Likewise.
17025         (DISP_UR): Likewise.
17026         (DISP_LL): Likewise.
17027         (DISP_LR): Likewise.
17029         * term/i386/pc/console.c (pupa_console_putchar): New function.
17031 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17033         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17034         FIX. Reverse the path_list.
17036         * include/pupa/normal.h: Export pupa_register_command and
17037         pupa_unregister_command.
17039         * hello/hello.c (pupa_cmd_hello): New module.
17040         * conf/i386-pc.rmk: Added hello.mod.
17042 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17044         * kern/i386/pc/lzo1x.S: New file.
17046         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17047         (compress_kernel): New variable.
17048         (generate_image): Heavily modified to support compressing a
17049         large part of the core image.
17051         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17052         leak.
17053         (pupa_util_load_image): New function.
17055         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17056         (pupa_compressed_size): New variable.
17057         (codestart): Enable Gate A20 here.
17058         Decompress the compressed part of the core image.
17059         Rearrange the code to put functions and variables which are
17060         required for initialization in the non-compressed part.
17061         Include lzo1x.S.
17063         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17064         here.
17066         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17068         * include/pupa/i386/pc/kernel.h
17069         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17070         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17071         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17072         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17073         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17075         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17077         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17078         (Utility#rule): Likewise.
17080         * configure.ac: Check if LZO is available.
17082 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17084         * include/pupa/normal.h: New file.
17085         * include/pupa/setjmp.h: Likewise.
17086         * include/pupa/i386/setjmp.h: Likewise.
17087         * normal/cmdline.c: Likewise.
17088         * normal/command.c: Likewise.
17089         * normal/main.c: Likewise.
17090         * normal/menu.c: Likewise.
17091         * normal/i386/setjmp.S: Likewise.
17093         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17094         (pupa_rescue_cmd_initrd): Likewise.
17096         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17097         Likewise.
17099         * kern/i386/pc/startup.S (translation_table): New variable.
17100         (translate_keycode): New function.
17101         (pupa_console_getkey): Call translate_keycode.
17103         * kern/rescue.c (attempt_normal_mode): New function.
17104         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17105         it failed, print a message.
17107         * kern/mm.c (pupa_real_malloc): Print more information when a
17108         free magic is broken.
17109         (pupa_free): If the first free header is not free actually, set
17110         it to P.
17112         * kern/main.c (pupa_load_normal_mode): Just load the module
17113         "normal".
17114         (pupa_main): Don't print the message
17115         "Entering into rescue mode..." here.
17117         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17118         Declared.
17119         (pupa_rescue_cmd_initrd): Likewise.
17120         (pupa_rescue_cmd_initrd): Likewise.
17122         * include/pupa/symbol.h (FUNCTION): Specify the type.
17123         (VARIABLE): Likewise.
17125         * include/pupa/err.h (pupa_err_t): Added
17126         PUPA_ERR_UNKNOWN_COMMAND.
17128         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17129         (pupa_dl_get_prefix): Likewise.
17131         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17132         Added _chain.mod and _linux.mod instead of chain.mod and
17133         linux.mod.
17134         (chain_mod_SOURCES): Renamed to ...
17135         (_chain_mod_SOURCES): ... this.
17136         (chain_mod_CFLAGS): Renamed to ...
17137         (_chain_mod_CFLAGS): ... this.
17138         (linux_mod_SOURCES): Renamed to ...
17139         (_linux_mod_SOURCES): ... this.
17140         (linux_mod_CFLAGS): Renamed to ...
17141         (_linux_mod_CFLAGS): ... this.
17142         (normal_mod_SOURCES): New variable.
17143         (normal_mod_CFLAGS): Likewise.
17144         (normal_mod_ASFLAGS): Likewise.
17146 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17148         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17149         possible.
17151         * kern/dl.c (pupa_dl_ref): Refer depending modules
17152         recursively.
17153         (pupa_dl_unref): Unrefer depending modules recursively.
17154         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17155         a module is unloaded before one depending on that module is
17156         unloaded.
17157         (pupa_dl_unload): Unload depending modules explicitly,
17158         if possible.
17160 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17162         * include/pupa/i386/pc/linux.h: New file.
17163         * loader/i386/pc/linux.c: Likewise.
17165         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17166         Removed.
17167         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17168         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17169         of PUPA_CHAINLOADER_BOOT_SECTOR.
17171         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17172         (pupa_linux_prot_size): New variable.
17173         (pupa_linux_tmp_addr): Likewise.
17174         (pupa_linux_real_addr): Likewise.
17175         (pupa_linux_boot_zimage): New function.
17176         (pupa_linux_boot_bzimage): Likewise.
17178         * kern/i386/pc/init.c (struct mem_region): New structure.
17179         (MAX_REGIONS): New macro.
17180         (mem_regions): New variable.
17181         (num_regions): Likewise.
17182         (pupa_os_area_addr): Likewise.
17183         (pupa_os_area_size): Likewise.
17184         (pupa_lower_mem): Likewise.
17185         (pupa_upper_mem): Likewise.
17186         (add_mem_region): New function.
17187         (compact_mem_regions): Likewise.
17188         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17189         the size of the conventional memory and that of so-called upper
17190         memory (before the first memory hole).
17191         Instead of adding each found region to free memory, use
17192         add_mem_region and add them after removing overlaps.
17193         Also, add only 1/4 of the upper memory to free memory. The rest
17194         is used for loading OS images. Maybe this is ad hoc, but this
17195         makes it much easier to relocate OS images when booting.
17197         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17198         (pupa_enter_rescue_mode): Don't register initrd and module.
17200         * kern/mm.c: Include pupa/dl.h.
17202         * kern/main.c: Include pupa/file.h and pupa/device.h.
17204         * kern/loader.c (pupa_loader_load_module_func): Removed.
17205         (pupa_loader_load_module): Likewise.
17207         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17208         ``.o''.
17210         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17211         (pupa_linux_tmp_addr): Likewise.
17212         (pupa_linux_real_addr): Likewise.
17213         (pupa_linux_boot_zimage): Likewise.
17214         (pupa_linux_boot_bzimage): Likewise.
17216         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17217         (pupa_upper_mem): Likewise.
17218         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17219         module is too dangerous.
17221         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17222         (pupa_os_area_size): Likewise.
17223         (pupa_loader_set): Remove the first argument. Loader doesn't
17224         manage modules or initrd any longer.
17225         (pupa_loader_load_module): Removed.
17227         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17228         (linux_mod_SOURCES): New variable.
17229         (linux_mod_CFLAGS): Likewise.
17231 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17233         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17234         the length of a blocklist correctly.
17236         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17237         Use ioctl only if the OS file is a block device.
17238         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17239         not very useful for normal files.
17241         * kern/main.c (pupa_set_root_dev): New function.
17242         (pupa_load_normal_mode): Likewise.
17243         (pupa_main): Call those above.
17245         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17246         pupa_uint16_t.
17248         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17250 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17252         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17253         (setup): Configure the installed partition information and the
17254         dl prefix.
17256         * loader/i386/pc/chainloader.c (my_mod): New variable.
17257         (pupa_chainloader_unload): New function.
17258         (pupa_rescue_cmd_chainloader): Refer itself.
17259         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17261         * kern/i386/pc/startup.S (install_partition): Removed.
17262         (version_string): Likewise.
17263         (config_file): Likewise.
17264         (pupa_install_dos_part): New variable.
17265         (pupa_install_bsd_part): Likewise.
17266         (pupa_prefix): Likewise.
17267         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17269         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17270         and pupa/misc.h.
17271         (make_install_device): New function.
17272         (pupa_machine_init): Set the dl prefix.
17274         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17275         (buf): Renamed to ...
17276         (linebuf): ... this.
17277         (pupa_rescue_cmd_prefix): New function.
17278         (pupa_rescue_cmd_insmod): Likewise.
17279         (pupa_rescue_cmd_rmmod): Likewise.
17280         (pupa_rescue_cmd_lsmod): Likewise.
17281         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17282         rmmod and lsmod.
17284         * kern/mm.c (pupa_memalign): If failed even after invalidating
17285         disk caches, unload unneeded modules and retry.
17287         * kern/misc.c (pupa_memmove): New function.
17288         (pupa_memcpy): Removed.
17289         (pupa_strcpy): New function.
17290         (pupa_itoa): Made static.
17292         * kern/dl.c (pupa_dl_iterate): New function.
17293         (pupa_dl_ref): Likewise.
17294         (pupa_dl_unref): Likewise.
17295         (pupa_dl_unload): Return if succeeded or not.
17296         (pupa_dl_unload_unneeded): New function.
17297         (pupa_dl_unload_all): Likewise.
17298         (pupa_dl_init): Renamed to ...
17299         (pupa_dl_set_prefix): ... this.
17300         (pupa_dl_get_prefix): New function.
17302         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17303         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17304         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17305         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17306         (pupa_install_dos_part): Declared.
17307         (pupa_install_bsd_part): Likewise.
17308         (pupa_prefix): Likewise.
17309         (pupa_boot_drive): Likewise.
17311         * include/pupa/types.h: Fix a typo.
17313         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17314         pupa_memmove.
17315         (pupa_memmove): Declared.
17316         (pupa_strcpy): Likewise.
17318         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17319         pupa_mod_init takes one argument, its own module.
17320         (pupa_dl_unload_unneeded): Declared.
17321         (pupa_dl_unload_all): Likewise.
17322         (pupa_dl_ref): Likewise.
17323         (pupa_dl_unref): Likewise.
17324         (pupa_dl_iterate): Likewise.
17325         (pupa_dl_init): Renamed to ...
17326         (pupa_dl_set_prefix): ... this.
17327         (pupa_dl_get_prefix): Declared.
17329         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17330         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17331         unloaded.
17332         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17333         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17335         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17336         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17338 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17340         * util/i386/pc/pupa-setup.c (setup): Define the internal
17341         function find_first_partition_start at the top level, because GCC
17342         3.0.x cannot compile internal functions in deeper scopes
17343         correctly.
17344         (find_root_device): Use lstat instead of stat.
17345         Don't follow symbolic links.
17346         Fix the path-constructing code.
17348         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17349         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17350         by a BLKGETSIZE ioctl first, because block devices don't fill
17351         the member st_mode of the structure stat on Linux.
17352         [__linux__] (linux_find_partition): Use a temporary buffer
17353         REAL_DEV for the working space. Copy it to DEV before returning.
17354         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17355         buffer cache consistent.
17356         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17357         strncmp. The previous value was merely wrong.
17358         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17360         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17361         FAT size is 12. The previous value was merely wrong.
17363         * kern/main.c (pupa_main): Don't split the starting message from
17364         newlines.
17366         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17367         LF, because BIOS goes crazy about character attributes in this
17368         case.
17370 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17372         * include/i386/pc/util/biosdisk.h: New file.
17373         * util/i386/pc/biosdisk.c: Likewise.
17374         * util/i386/pc/pupa-setup.c: Likewise.
17376         * Makefile.in (INCLUDE_DISTFILES): Added
17377         include/pupa/i386/pc/util/biosdisk.h.
17378         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17379         directory util/i386/pc.
17380         (install-local): Added a rule for sbin_UTILITIES.
17381         (uninstall): Likewise.
17383         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17385         * util/misc.c (xrealloc): New function.
17386         (pupa_malloc): Likewise.
17387         (pupa_free): Likewise.
17388         (pupa_realloc): Likewise.
17389         (pupa_stop): Likewise.
17390         (pupa_putchar): Likewise.
17392         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17394         * include/pupa/util/misc.h (xrealloc): Declared.
17396         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17397         macro.
17398         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17399         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17401         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17402         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17404         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17405         way should be implemented.
17406         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17408         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17409         the size of NAME for safety.
17410         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17411         0x88.
17413         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17414         (pupa_setup_SOURCES): Likewise.
17416         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17418 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17420         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17421         bunch of pushl's from pusha, because this destroys the return
17422         value.
17424 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17426         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17427         This means that any missing prototypes could be fatal. Also, you
17428         must take care when writing assembly code. See the comments at
17429         the beginning of startup.S, for more details.
17431         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17432         compilation mechanism.
17433         (pupa_chainloader_real_boot): Likewise.
17434         (pupa_biosdisk_rw_int13_extensions): Likewise.
17435         (pupa_biosdisk_rw_standard): Likewise.
17436         (pupa_biosdisk_check_int13_extensions): Likewise.
17437         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17438         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17439         (pupa_get_memsize): Likewise.
17440         (pupa_get_mmap_entry): Likewise.
17441         (pupa_console_putchar): Likewise.
17442         (pupa_console_setcursor): Likewise.
17443         (pupa_getrtsecs): Use pushl instead of push.
17445         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17446         memory instead of the stack for a mmap entry, because some
17447         BIOSes may ignore the maximum size and overflow.
17449         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17451         * genmk.rb (PModule#rule): Compile automatically generated
17452         sources with module-specific CFLAGS as well as other sources.
17454 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17456         * configure.ac: Check ld.
17457         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17458         respectively, before checking endianness and sizes.
17460         * Makefile.in (LD): New variable.
17462 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17464         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17466 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17468         * Changelog: New file.