2009-06-13 Jun Inoue <jun.lambda@gmail.com>
[grub2/phcoder.git] / ChangeLog
blob95c6ad2435a152189e2cd61cf3af9b8f1a4136fe
1 2009-06-13  Jun Inoue <jun.lambda@gmail.com>
3         * util/grub-mkconfig.in: Fix parsing of --output option.
5 2009-06-12  Pavel Roskin  <proski@gnu.org>
7         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
8         genmk.rb don't need to be generated or installed.
10 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
12         * commands/i386/pc/drivemap_int13h.S: add more comments
14 2009-06-11  Pavel Roskin  <proski@gnu.org>
16         * Makefile.in (uninstall): Uninstall manuals.
18         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
19         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
20         and update-grub_lib in two places.
21         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
23         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
24         a compiler warning.
26         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
27         `entry_lo' to fix variable shadowing.
29 2009-06-11  Christian Franke  <franke@computer.org>
31         * kern/misc.c (__enable_execute_stack): Add missing return type
32         to prevent gcc warning.
34 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
36         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
38 2009-06-11  Pavel Roskin  <proski@gnu.org>
40         * Makefile.in: Don't rely on any scripts being executable.
41         Always use $(SHELL) to run shell scripts.
43         * configure.ac: Always define ___main if using -nostdlib.  This
44         fixes tests on Cygwin.
46 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
48         UDF fix
50         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
51         is in bytes and not in blocks
53 2009-06-11  Pavel Roskin  <proski@gnu.org>
55         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
56         warning.
58 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
60         * util/grub.d/30_os-prober.in: Fix a comment. Source
61         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
62         to set the root device.  Place drivemap command in the generated
63         chain entry.
65 2009-06-11  Pavel Roskin  <proski@gnu.org>
67         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
68         have long been resolved.
70 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
72         * util/grub.d/10_linux.in: Capitalise "Linux".
74         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
76 2009-06-11  Pavel Roskin  <proski@gnu.org>
78         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
79         fix a gcc warning and ensure that the function won't ever exit.
81         * kern/i386/ieee1275/init.c: Add missing prototype for
82         grub_stop_floppy().
84         * loader/ieee1275/multiboot2.c [__i386__]: Include
85         grub/cpu/multiboot.h.
87         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
88         casts to short - they are not portable and cause warnings.  Fix
89         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
91 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
93         Drivemap fixes
95         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
96         new function
97         (grub_get_root_biosnumber_saved): new variable
98         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
99         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
100         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
101         %dx after the call if necessary
102         * conf/common.rmk (pkglib_MODULES): remove boot.mod
103         (boot_mod_SOURCES): remove
104         (boot_mod_CFLAGS): remove
105         (boot_mod_LDFLAGS): remove
106         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
107         (boot_mod_SOURCES): new variable
108         (boot_mod_CFLAGS): likewise
109         (boot_mod_LDFLAGS): likewise
110         * conf/i386-efi.rmk: likewise
111         * conf/i386-ieee1275.rmk: likewise
112         * conf/i386-pc.rmk: likewise
113         * conf/powerpc-ieee1275.rmk: likewise
114         * conf/sparc64-ieee1275.rmk: likewise
115         * conf/x86_64-efi.rmk: likewise
116         * include/grub/i386/pc/biosnum.h: new file
117         * lib/i386/pc/biosnum.c: likewise
118         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
119         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
120         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
122 >>>>>>> .r2306
123 2009-06-10  Pavel Roskin  <proski@gnu.org>
125         * io/gzio.c (test_header): Don't reuse one buffer for all data.
126         Use separate variables.  Read only the file size at the end, but
127         not the checksum that we don't use.
129         * kern/file.c (grub_file_read): Use void pointer for the buffer.
130         Adjust all callers.
132         * kern/ieee1275/openfw.c: Remove libc includes.
133         * kern/ieee1275/cmain.c: Likewise.
134         * include/grub/ieee1275/ieee1275.h: Likewise.
136         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
137         compiler warnings.
139 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
141         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
142         `genparttoollist.sh'.
143         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
144         Add `*.sh' to the list find searches for and change `mdate.sh'
145         to `mdate-sh'.
147 2009-06-10  Pavel Roskin  <proski@gnu.org>
149         * include/grub/multiboot2.h: Provide compatibility defines for
150         multiboot2.h.
151         * include/multiboot2.h: Include stdint.h only if needed, using
152         angle brackets.
153         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
154         grub/multiboot2.h.
155         * loader/ieee1275/multiboot2.c: Likewise.
156         * loader/multiboot2.c: Likewise.
157         * loader/multiboot_loader.c: Likewise.
159         * configure.ac: Use -nostdlib when probing for the target.  It
160         should not be required to have libc for the target.
162         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
163         they fail without libc headers for the target.
164         * include/grub/powerpc/libgcc.h: Use weak attribute for all
165         exports.
166         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
167         preprocessor conditionals.
169         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
170         build system doesn't need to be aware of the tar.c internals.
172 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
174         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
176 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
178         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
179         disk limit to 26 for IDE, Virtio, Xen and SCSI.
181 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
183         * util/i386/pc/grub-install.in: Change the error message if UUIDs
184         aren't available if ata.mod gets used.
186 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
188         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
189         initialising controller.
190         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
192 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
194         * util/i386/pc/grub-install.in: Add a parameter --disk-module
195         to choose between ata and biosdisk module on i386-pc.
197 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
199         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
200         Subclass and Programming Interface fields in terms of the 3 byte
201         Class Code register.
202         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
204         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
205         interface is OHCI.  Add grub_dprintf for symmetry with
206         bus/usb/uhci.c.
207         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
208         interface is UHCI.  Add interf variable for programming
209         interface.  Print interface with class/subclass.
211         * bus/usb/ohci.c: Set interf with correct field.
213         * bus/usb/uhci.c: Remove unneeded doubled lines.
214         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
215         Remove whitespace inside comment.
217 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
219         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
220         as fallback an equivalent option without depth.
222 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
224         Not fail if unable to retrieve C/H/S on LBA disks
226         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
227         if unable to retrieve C/H/S on LBA disks
229 2009-06-08  Pavel Roskin  <proski@gnu.org>
231         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
232         about aliasing.
234 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
236         * Makefile.in (uninstall): Remove all $lib_DATA files.
238 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
240         Bugfix: install on partitionless device
242         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
243         is a whole disk
245 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
247         * Makefile.in (uninstall): Remove all $include_DATA files.
249 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
251         * commands/true.c: New file.  Implement the true and false commands.
252         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
253         (true_mod_SOURCES): New variable.
254         (true_mod_CFLAGS): Likewise.
255         (true_mod_LDFLAGS): Likewise.
257 2009-06-05  Colin D Bennett  <colin@gibibit.com>
259         Optimized font character lookup using binary search instead of linear
260         search.  Fonts now are required to have the character index ordered by
261         code point.
263         * font/font.c (load_font_index): Verify that fonts have ordered
264         character indices.
265         (find_glyph): Use binary search instead of linear search to find a
266         character in a font.
268 2009-06-05  Michael Scherer  <misc@mandriva.org>
270         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
271         uses case sensitive btree.
272         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
273         only for case insensitive filesystems.
275 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
277         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
278         * conf/common.rmk (search_mod_CFLAGS): likewise
280 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
282         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
283         compensate a compiler bug
285 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
287         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
288         instead of '\b'
290 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
292         Definitions for creating asm symbols with Apple's CC
294         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
295         [APPLE_CC] (VARIABLE): likewise
297 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
299         Disable lnxboot.img when compiled
300         with Apple's CC
302         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
303         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
304         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
305         [! APPLE_CC] (CODE_LENG): skip
306         [! APPLE_CC] (setup_sects): likewise
307         [! APPLE_CC]: skip filling
309 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
311         Address in trampolines based on 32-bit registers when compiled
312         with Apple's CC
314         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
315         for addresses
316         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
318 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
320         Avoid aliases when compiling with Apple's CC for PCBIOS machine
322         * kern/misc.c [APPLE_CC] (memcpy): new function
323         [APPLE_CC] (memmove): likewise
324         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
325         (memcpy): define alias conditionally on !APPLE_CC
326         (memset): likewise
327         (abort): likewise
328         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
329         APPLE_CC are defined
330         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
331         (grub_assert_fail): make prototype conditional
333 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
335         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
337         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
338         grub-macho2img
339         (CLEANFILES): add grub-macho2img
340         (grub_macho2img_SOURCES): new variable
341         * kern/i386/pc/startup.S (bss_start): new variable
342         (bss_end): likewise
343         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
344         * util/grub-macho2img.c: new file
346 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
348         Use objconv when compiling with Apple's CC
350         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
351         (efiemu64.o): likewise
352         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
353         when compiling with Apple's CC
354         (efiemu64_s.o): likewise
355         * configure.ac: check for objconv when compiling with Apple's CC
356         * genmk.rb: use objconv for modules when compiled with Apple's CC
358 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
360         Define segment as well as section when compiling with
361         Apple's CC
363         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
364         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
365         (efiemu_convert_pointer): likewise
366         (efiemu_set_virtual_address_map): likewise
367         (efiemu_convert_pointer): likewise
368         (efiemu_getcrc32): likewise
369         (init_crc32_table): likewise
370         (reflect): likewise
371         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
372         (GRUB_MOD_DEP): likewise
374 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
376         Allow a compilation without -mcmodel=large
378         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
379         when compiled without -mcmodel=large
380         (filter_memory_map): remove memory post 4 GiB when compiled
381         without -mcmodel=large
382         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
383         TARGET_CFLAGS when -mcmodel=large isn't supported
385 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
387         Remove nested functions in efiemu core
389         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
391 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
393         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
395         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
396         temporary storage
397         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
398         using Apple's CC
399         (grub_cpu_is_tsc_supported): likewise
400         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
402 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
404         Absolute addressing through constant with Apple's cc
406         * kern/i386/pc/startup.S: Define necessary constants
407         and address through it when using ABS with Apple's CC
408         * boot/i386/pc/diskboot.S: likewise
409         * boot/i386/pc/boot.S: likewise
410         * boot/i386/pc/lnxboot.S: likewise
411         * boot/i386/pc/cdboot.S: likewise
412         * mmap/i386/pc/mmap_helper.S: likewise
413         * commands/i386/pc/drivemap_int13h.S: likewise
415 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
417         Check if compiler is apple cc
419         * Makefile.in (ASFLAGS): new variable
420         (TARGET_ASFLAGS): likewise
421         (TARGET_MODULE_FORMAT): likewise
422         (TARGET_APPLE_CC): likewise
423         (OBJCONV): likewise
424         (TARGET_IMG_CFLAGS): likewise
425         (TARGET_CPPFLAGS): add includedir
426         * configure.ac: call grub_apple_cc and grub_apple_target_cc
427         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
428         Check for linker script only if compiler isn't Apple's CC
429         (TARGET_MODULE_FORMAT): set
430         (TARGET_APPLE_CC): likewise
431         (TARGET_ASFLAGS): likewise
432         (ASFLAGS): likewise
433         Check for objcopy only if compiler isn't Apple's CC
434         Check for BSS symbol only if compiler isn't Apple's CC
435         * genmk.rb: adapt nm options if we use Apple's utils
436         * aclocal.m4 (grub_apple_cc): new test
437         (grub_apple_target_cc): likewise
439 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
441         Simplify sed expressions and improve awk
443         * Makefile.in (install-local): simplify sed expression
444         * gencmdlist.sh: likewise
445         * genmoddep.awk: avoid adding module as a dependency of itself
447 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
449         Add missing start symbols
451         * boot/i386/pc/boot.S: add start
452         * boot/i386/pc/pxeboot.S: likewise
454 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
456         Fix wrong assumptions with grub-mkimage on EFI
458         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
459         (relocate_addresses): consider both r_addend and value at offset
460         (make_mods_section): zerofill modinfo and header
461         (convert_elf): write prefix here
463 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
465         Use .asciz instead of .string
467         * i386/pc/diskboot.S: use .asciz instead of .string
468         * i386/pc/boot.S: likewise
469         * include/grub/dl.h (GRUB_MOD_DEP): likewise
470         (GRUB_MOD_NAME): likewise
472 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
474         gfxpayload support
476         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
477         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
478         (grub_video_setup): remove
479         (grub_video_set_mode): new prototype
480         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
481         (vid_mode): remove
482         (linux_vesafb_res): compile only on PCBIOS
483         (grub_linux_boot): support gfxpayload
484         * loader/i386/pc/xnu.c (video_hook): new function
485         (grub_xnu_set_video): support gfxpayload
486         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
487         (DEFAULT_VIDEO_HEIGHT): likewise
488         (DEFAULT_VIDEO_FLAGS): likewise
489         (DEFAULT_VIDEO_MODE): new definition
490         (video_hook): new function
491         (grub_gfxterm_init): use grub_video_set_mode
492         * util/grub.d/30_os-prober.in: remove explicit modesetting before
493         loading xnu
494         * video/video.c (grub_video_setup): removed
495         (grub_video_set_mode): new function based on grub_gfxterm_init and
496         grub_video_setup
498 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
500         Avoid calling biosdisk in drivemap
502         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
503         (revparse_biosdisk): likewise
504         (list_mappings): derive name from id directly
505         (grub_cmd_drivemap): use tryparse_diskstring
507 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
509         Script fixes
511         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
512         (grub_lexer_param): add tokenonhold
513         (grub_script_create_cmdline): remove cmdline. All callers updated
514         (grub_script_function_create): make functionname
515         grub_script_arg. All callers updated
516         (grub_script_execute_argument_to_string): new prototype
517         * kern/parser.c (state_transitions): reorder
518         (grub_parser_cmdline_state): fix a bug and make more compact
519         * script/sh/execute.c (grub_script_execute_argument_to_string):
520         make global
521         (grub_script_execute_cmdline): use new format
522         * script/sh/function.c (grub_script_function_create): make functionname
523         grub_script_arg. All callers updated
524         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
525         (grub_script_yylex): remove
526         (grub_script_yylex2): renamed to ...
527         (grub_script_yylex): ...renamed
528         parse the expressions like a${b}c
529         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
530         (GRUB_PARSER_TOKEN_VAR): remove
531         (GRUB_PARSER_TOKEN_NAME): likewise
532         ("if"): declare as typeless
533         ("while"): likewise
534         ("function"): likewise
535         ("else"): likewise
536         ("then"): likewise
537         ("fi"): likewise
538         (text): remove
539         (argument): likewise
540         (script): accept empty scripts and make exit on error
541         (arguments): use GRUB_PARSER_TOKEN_ARG
542         (function): likewise
543         (command): move error handling to script
544         (menuentry): move grub_script_lexer_ref before
545         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
546         argument. All callers updated
548 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
550         Prevent GRUB from probing floppies during boot.
552         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
553         * commands/search.c (options): Add --no-floppy.
554         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
555         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
556         --no-floppy when searching for UUIDs.
558 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
560         Simplify the code duplication in commands/search.c.
562         * commands/search.c (search_label, search_fs_uuid): Merge into ...
563         (search_fs): ... this.  Update all users.
565 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
567         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
569 2009-05-28  Pavel Roskin  <proski@gnu.org>
571         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
572         Remove the original symlink explicitly.
574         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
575         just one slash.  That's how grub_fshelp_find_file() does it.
577 2009-05-26  Pavel Roskin  <proski@gnu.org>
579         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
580         to `str'.
582         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
583         possibly unused.
585 2009-05-25  Christian Franke  <franke@computer.org>
587         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
588         register.
589         (grub_atapi_identify): Add wait after drive select.
590         (grub_ata_identify): Do more strict status register check before
591         calling grub_atapi_identify ().  Suppress error message if status
592         register is 0x00 after command failure.  Add status register
593         check after PIO read to avoid bogus identify due to stuck DRQ.
594         Thanks to Pavel Roskin for testing.
595         (grub_device_initialize): Remove unsafe status register check.
596         Thanks to 'phcoder' for problem report and patch.
597         Prevent sign extension in debug message.
599 2009-05-23  Colin D Bennett  <colin@gibibit.com>
601         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
602         definition file, and functions defined in `normal/menu.c' have had
603         their prototypes moved to `include/grub/menu.h' for consistency.
605         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
606         from normal.h.
607         (grub_menu_get_entry): Likewise.
608         (grub_menu_get_timeout): Likewise.
609         (grub_menu_set_timeout): Likewise.
610         (grub_menu_execute_entry): Likewise.
611         (grub_menu_execute_with_fallback): Likewise.
612         (grub_menu_entry_run): Likewise.
614         * include/grub/normal.h: Re-ordered and grouped function
615         prototypes by file that the function is defined in.
616         (grub_menu_execute_callback): Removed; moved to menu.h.
617         (grub_menu_get_entry): Likewise.
618         (grub_menu_get_timeout): Likewise.
619         (grub_menu_set_timeout): Likewise.
620         (grub_menu_execute_entry): Likewise.
621         (grub_menu_execute_with_fallback): Likewise.
622         (grub_menu_entry_run): Likewise.
623         (grub_menu_addentry): Renamed from this ...
624         (grub_normal_add_menu_entry): ... to this.
626         * normal/main.c (grub_menu_addentry): Renamed from this ...
627         (grub_normal_add_menu_entry): ... to this.
629         * script/sh/execute.c (grub_script_execute_menuentry): Update
630         reference to renamed grub_menu_addentry function.
632 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
634         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
636 2009-05-22  Pavel Roskin  <proski@gnu.org>
638         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
639         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
640         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
641         compiling for the i386 targets, but not for the utilities.
643         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
644         to grub_uint8_t.
645         (grub_root_drive): Likewise.
646         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
647         remove alignment.
648         (grub_root_drive): Change size to byte.
649         (grub_start_addr): Remove.
650         (grub_end_addr): Likewise.
651         (grub_apm_bios_info): Likewise.
653 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
655         * normal/i386: Remove.
656         * normal/powerpc: Likewise.
657         * normal/sparc64: Likewise.
658         * normal/x86_64: Likewise.
660 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
662         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
663         * loader/i386/linux_trampoline.S: Fix indentation
664         * loader/i386/xnu_helper.S: Likewise
666 2009-05-18  Colin D Bennett  <colin@gibibit.com>
668         Display error messages when parsing a Lua statement fails.
669         Previously, executing a syntactically invalid statement like
670         ")foo" or "bar;" would silently fail.
672         * script/lua/grub_main.c (handle_lua_error): New function.
673         (grub_lua_parse_line): Improved reporting of Lua parser and
674         execution errors.
676 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
678         Remove -Werror which causes build to fail on some systems
680         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
681         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
682         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
684 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
686         trampoline for linux on 64-bit platform
688         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
689         loader/i386/efi/linux_trampoline.S
690         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
691         declaration
692         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
693         here
694         * loader/i386/linux_trampoline.S: moved here
695         * loader/i386/efi/linux.c (allocate_pages): reserve space for
696         trampoline
697         (jumpvector): removed
698         (grub_linux_trampoline_start): new declaration
699         (grub_linux_trampoline_end): likewise
700         (grub_linux_boot): use trampoline when on 64-bit platform
701         * loader/i386/linux.c: likewise
703 2009-05-16  Pavel Roskin  <proski@gnu.org>
705         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
706         const to avoid a warning.
707         (grub_lua_setenv): Likewise.
708         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
709         lmsg to fix a warning.
711 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
713         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
714         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
715         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
716         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
717         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
718         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
719         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
720         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
722 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
724         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
726 2009-05-16  Bean  <bean123ch@gmail.com>
728         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
729         (lua_mod_SOURCES): New variable.
730         (lua_mod_CFLAGS): Likewise.
731         (lua_mod_LDFLAGS): Likewise.
733         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
734         (setjmp_mod_SOURCES): New variable.
735         (setjmp_mod_CFLAGS): Likewise.
736         (setjmp_LDFLAGS): Likewise.
738         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
739         (setjmp_mod_SOURCES): New variable.
740         (setjmp_mod_CFLAGS): Likewise.
741         (setjmp_LDFLAGS): Likewise.
743         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
744         (setjmp_mod_SOURCES): New variable.
745         (setjmp_mod_CFLAGS): Likewise.
746         (setjmp_LDFLAGS): Likewise.
748         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
749         (setjmp_mod_SOURCES): New variable.
750         (setjmp_mod_CFLAGS): Likewise.
751         (setjmp_LDFLAGS): Likewise.
753         * normal/i386/setjmp.S: Moved from here ...
754         * lib/i386/setjmp.S: ... Moved here
755         * normal/x86_64/setjmp.S: Moved from here ...
756         * lib/x86_64/setjmp.S: ... Moved here
757         * normal/powerpc/setjmp.S: Moved from here ...
758         * lib/powerpc/setjmp.S: ... Moved here
759         * normal/sparc64/setjmp.S: Moved from here ...
760         * lib/sparc64/setjmp.S: ... Moved here
762         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
763         returns_twice in mingw.
765         * script/lua/grub_lib.c: New file.
766         * script/lua/grub_lib.h: Likewise.
767         * script/lua/grub_lua.h: Likewise.
768         * script/lua/grub_main.c: Likewise.
769         * script/lua/lapi.c: Likewise.
770         * script/lua/lapi.h: Likewise.
771         * script/lua/lauxlib.c: Likewise.
772         * script/lua/lauxlib.h: Likewise.
773         * script/lua/lbaselib.c: Likewise.
774         * script/lua/lcode.c: Likewise.
775         * script/lua/lcode.h: Likewise.
776         * script/lua/ldblib.c: Likewise.
777         * script/lua/ldebug.c: Likewise.
778         * script/lua/ldebug.h: Likewise.
779         * script/lua/ldo.c: Likewise.
780         * script/lua/ldo.h: Likewise.
781         * script/lua/ldump.c: Likewise.
782         * script/lua/lfunc.c: Likewise.
783         * script/lua/lfunc.h: Likewise.
784         * script/lua/lgc.c: Likewise.
785         * script/lua/lgc.h: Likewise.
786         * script/lua/linit.c: Likewise.
787         * script/lua/liolib.c: Likewise.
788         * script/lua/llex.c: Likewise.
789         * script/lua/llex.h: Likewise.
790         * script/lua/llimits.h: Likewise.
791         * script/lua/lmathlib.c: Likewise.
792         * script/lua/lmem.c: Likewise.
793         * script/lua/lmem.h: Likewise.
794         * script/lua/loadlib.c: Likewise.
795         * script/lua/lobject.c: Likewise.
796         * script/lua/lobject.h: Likewise.
797         * script/lua/lopcodes.c: Likewise.
798         * script/lua/lopcodes.h: Likewise.
799         * script/lua/loslib.c: Likewise.
800         * script/lua/lparser.c: Likewise.
801         * script/lua/lparser.h: Likewise.
802         * script/lua/lstate.c: Likewise.
803         * script/lua/lstate.h: Likewise.
804         * script/lua/lstring.c: Likewise.
805         * script/lua/lstring.h: Likewise.
806         * script/lua/lstrlib.c: Likewise.
807         * script/lua/ltable.c: Likewise.
808         * script/lua/ltable.h: Likewise.
809         * script/lua/ltablib.c: Likewise.
810         * script/lua/ltm.c: Likewise.
811         * script/lua/ltm.h: Likewise.
812         * script/lua/lua.h: Likewise.
813         * script/lua/luaconf.h: Likewise.
814         * script/lua/lualib.h: Likewise.
815         * script/lua/lundump.c: Likewise.
816         * script/lua/lundump.h: Likewise.
817         * script/lua/lvm.c: Likewise.
818         * script/lua/lvm.h: Likewise.
819         * script/lua/lzio.c: Likewise.
820         * script/lua/lzio.h: Likewise.
822 2009-05-16  Bean  <bean123ch@gmail.com>
824         * include/grub/kernel.h (grub_module_header_types): Add type
825         OBJ_TYPE_CONFIG.
827         * kern/main.c (grub_load_config): New function.
828         (grub_main): Call grub_load_config to read boot config.
830         * grub-mkimage (generate_image): New parameter config_path.
831         (options): New option --config.
832         (main): Parse --config option, and pass it to generate_image.
834 2009-05-14  Christian Franke  <franke@computer.org>
836         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
837         This fixes build on Cygwin.
839 2009-05-14  Pavel Roskin  <proski@gnu.org>
841         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
842         jump.  This saves two bytes, so the typical case of 2 swapped
843         drives would fit 32 bytes.
845 2009-05-13  Pavel Roskin  <proski@gnu.org>
847         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
848         grub_uint32_t to avoid a warning.
850         * loader/i386/linux.c (allocate_pages): When assigning
851         real_mode_mem, cast through grub_size_t to fix a warning.  The
852         code already makes sure that the value would fit a pointer.
853         (grub_linux_setup_video): Cast render_target->data to
854         grub_size_t to fix a warning.
856 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
858         * commands/i386/pc/drivemap.c: New file - implement drivemap
859         command.
860         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
861         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
863 2009-05-13  Pavel Roskin  <proski@gnu.org>
865         * util/i386/pc/grub-setup.c (setup): Remove unused variable
866         embedding_area_exists.
868 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
870         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
871         it easier to understand / work with.
872         Improve warning messages for cases where there's no embedding area,
873         or when it is too small (or core.img too large).
875 2009-05-13  Pavel Roskin  <proski@gnu.org>
877         * loader/i386/pc/multiboot2.c: Add necessary includes for
878         grub_multiboot2_real_boot().
880         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
881         PX record is always little-endian.  We only need the lower 2
882         bytes of the mode.
884         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
885         facilitate code reuse.
886         (grub_cpio_mount): Use "struct head", not a char buffer.  This
887         fixes a warning reported by gcc 4.4.
889         * kernel/disk.c (grub_disk_read): Use void pointer for the
890         buffer.
891         (grub_disk_write): Use const void pointer for the buffer.
892         Adjust all callers.  Remove unnecessary casts.
894 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
896         * util/i386/pc/grub-install.in: Update copyright year.
898 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
900         gptsync
902         * commands/gptsync.c: new file
903         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
904         (gptsync_mod_SOURCES): new variable
905         (gptsync_mod_CFLAGS): likewise
906         (gptsync_mod_LDFLAGS): likewise
907         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
908         new definition
909         (GRUB_PC_PARTITION_TYPE_HFS): likewise
910         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
911         * conf/i386-ieee1275.rmk: likewise
912         * conf/i386-pc.rmk: likewise
913         * conf/powerpc-ieee1275.rmk: likewise
915 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
917         Fixed grub-emu
919         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
920         (grub_dl_ref): likewise
922 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
924         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
925         split in two functions (one for msdos and one for gpt).
927 2009-05-08  Pavel Roskin  <proski@gnu.org>
929         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
930         not modified.
932         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
933         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
934         Initialize them with -1.  Add sanity check for bad1.  Eliminate
935         nerr variable.
937 2009-05-08  David S. Miller  <davem@davemloft.net>
939         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
941 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
943         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
944         existence.
946 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
948         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
949         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
951 2009-05-05  David S. Miller  <davem@davemloft.net>
953         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
955 2009-05-05  Pavel Roskin  <proski@gnu.org>
957         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
958         of grub_dl_ref() and grub_dl_unref().
959         * commands/parttool.c: Remove preprocessor conditionals around
960         grub_dl_ref() and grub_dl_unref().
961         * fs/affs.c: Likewise.
962         * fs/afs.c: Likewise.
963         * fs/cpio.c: Likewise.
964         * fs/ext2.c: Likewise.
965         * fs/fat.c: Likewise.
966         * fs/hfs.c: Likewise.
967         * fs/hfsplus.c: Likewise.
968         * fs/iso9660.c: Likewise.
969         * fs/jfs.c: Likewise.
970         * fs/minix.c: Likewise.
971         * fs/ntfs.c: Likewise.
972         * fs/reiserfs.c: Likewise.
973         * fs/sfs.c: Likewise.
974         * fs/udf.c: Likewise.
975         * fs/ufs.c: Likewise.
976         * fs/xfs.c: Likewise.
977         * include/grub/dl.h: Likewise.
978         * loader/xnu.c: Likewise.
980 2009-05-04  Pavel Roskin  <proski@gnu.org>
982         * commands/acpi.c: Remove unused variable my_mod.
983         * partmap/amiga.c: Likewise.
984         * partmap/apple.c: Likewise.
985         * partmap/gpt.c: Likewise.
986         * partmap/pc.c: Likewise.
987         * partmap/sun.c: Likewise.
988         * term/gfxterm.c: Likewise.
989         * term/i386/pc/vesafb.c: Likewise.
990         * term/i386/pc/vga.c: Likewise.
992 2009-05-04  David S. Miller  <davem@davemloft.net>
994         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
995         pointer args to grub_ieee1275_get_property().
997         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
999         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1000         devices, and do not traverse down under controller nodes.
1002         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1003         (grub_ofdisk_open): Use it to un-escape "," characters.
1004         * kern/disk.c (find_part_sep): New.
1005         (grub_disk_open): Use it to find the first non-escaped ','
1006         character in the disk name.
1007         * util/ieee1275/devicemap.c (escape_of_path): New.
1008         (grub_util_emit_devicemap_entry): Use it.
1009         * util/sparc64/ieee1275/grub-install.in: Update script to
1010         strip partition specifiers properly by not triggering on
1011         '\' escaped ',' characters.
1013 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1015         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1016         to 0x300.
1017         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1018         resolutions.
1019         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1020         on documentation from Wikipedia).
1022 2009-05-04  Pavel Roskin  <proski@gnu.org>
1024         * disk/ata.c: Spelling fixes.
1025         * disk/raid.c: Likewise.
1026         * disk/usbms.c: Likewise.
1027         * disk/dmraid_nvidia.c: Likewise.
1028         * kern/ieee1275/openfw.c: Likewise.
1029         * kern/ieee1275/init.c: Likewise.
1030         * kern/ieee1275/cmain.c: Likewise.
1031         * boot/i386/pc/cdboot.S: Likewise.
1032         * video/readers/png.c: Likewise.
1033         * video/i386/pc/vbe.c: Likewise.
1034         * fs/udf.c: Likewise.
1035         * fs/hfs.c: Likewise.
1036         * fs/reiserfs.c: Likewise.
1037         * efiemu/runtime/efiemu.c: Likewise.
1038         * efiemu/main.c: Likewise.
1039         * efiemu/mm.c: Likewise.
1040         * include/grub/elf.h: Likewise.
1041         * include/grub/xnu.h: Likewise.
1042         * include/grub/usbdesc.h: Likewise.
1043         * include/grub/usb.h: Likewise.
1044         * include/grub/script_sh.h: Likewise.
1045         * include/grub/lib/LzmaEnc.h: Likewise.
1046         * include/grub/efiemu/efiemu.h: Likewise.
1047         * include/grub/command.h: Likewise.
1048         * normal/menu.c: Likewise.
1049         * normal/main.c: Likewise.
1050         * normal/datetime.c: Likewise.
1051         * bus/usb/uhci.c: Likewise.
1052         * mmap/i386/uppermem.c: Likewise.
1053         * mmap/mmap.c: Likewise.
1054         * commands/acpi.c: Likewise.
1055         * commands/test.c: Likewise.
1056         * partmap/apple.c: Likewise.
1057         * font/font.c: Likewise.
1058         * loader/sparc64/ieee1275/linux.c: Likewise.
1059         * loader/macho.c: Likewise.
1060         * loader/i386/bsd_trampoline.S: Likewise.
1061         * loader/i386/bsd.c: Likewise.
1062         * loader/xnu.c: Likewise.
1063         * term/i386/pc/vesafb.c: Likewise.
1064         * term/usb_keyboard.c: Likewise.
1065         * util/resolve.c: Likewise.
1066         * util/getroot.c: Likewise.
1068 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1070         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1072 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1074         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1075         build error.
1077 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1079         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1080         parameter only available on BIOS.
1082 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1084         Removed wrong semicolon in declaration
1086         * grub/misc.h (grub_dprintf): remove semicolon
1088 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1090         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1091         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1092         is done by grub_cmd_linux() now).
1093         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1094         restore video to text mode.
1095         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1096         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1097         `GRUB_LINUX_VID_MODE_NORMAL'.
1099 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1101         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1102         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1103         and `normal/script.c'.  Add `kern/rescue_reader.c',
1104         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1105         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1106         `grub_script.tab.c'.
1108         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1109         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1110         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1111         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1112         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1114         * Makefile.in: Remove duplicated 2008 in Copyright line.
1116 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1118         * util/misc.c (grub_util_warn): New function.  Emits a warning
1119         unconditionally.
1120         * include/grub/util/misc.h (grub_util_warn): New declaration.
1122         * util/i386/pc/grub-install.in: Understand --force and pass it down
1123         to grub-setup.
1125         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1126         down to setup().
1127         (setup): Improve error messages and add warnings when requested to
1128         install in odd layouts.  Refuse to install using blocklists unless
1129         --force was set.
1131 2009-05-04  martin f. krafft  <madduck@madduck.net>
1133         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1135 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1137         Updated copyright year
1139         * fs/hfsplus.c: updated copyright year
1141 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1143         HFS+ UUID
1145         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1146         in the space previously used by unused3
1147         (grub_hfsplus_uuid): new function
1148         (grub_hfsplus_fs): added uuid field
1150 2009-05-03  Pavel Roskin  <proski@gnu.org>
1152         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1153         suppress warnings.  It's no longer needed.
1154         * disk/host.c: Likewise.
1155         * disk/ata_pthru.c: Likewise.
1156         * disk/loopback.c: Likewise.
1157         * hook/datehook.c: Likewise.
1158         * parttool/pcpart.c: Likewise.
1159         * fs/i386/pc/pxe.c: Likewise.
1160         * fs/ntfscomp.c: Likewise.
1161         * efiemu/main.c: Likewise.
1162         * mmap/mmap.c: Likewise.
1163         * commands/crc.c: Likewise.
1164         * commands/hexdump.c: Likewise.
1165         * commands/hdparm.c: Likewise.
1166         * commands/acpi.c: Likewise.
1167         * commands/echo.c: Likewise.
1168         * commands/minicmd.c: Likewise.
1169         * commands/blocklist.c: Likewise.
1170         * commands/memrw.c: Likewise.
1171         * commands/loadenv.c: Likewise.
1172         * commands/usbtest.c: Likewise.
1173         * commands/lsmmap.c: Likewise.
1174         * commands/boot.c: Likewise.
1175         * commands/parttool.c: Likewise.
1176         * commands/configfile.c: Likewise.
1177         * commands/search.c: Likewise.
1178         * commands/ieee1275/suspend.c: Likewise.
1179         * commands/cat.c: Likewise.
1180         * commands/i386/pc/pxecmd.c: Likewise.
1181         * commands/i386/pc/play.c: Likewise.
1182         * commands/i386/pc/halt.c: Likewise.
1183         * commands/i386/pc/vbeinfo.c: Likewise.
1184         * commands/i386/pc/vbetest.c: Likewise.
1185         * commands/lspci.c: Likewise.
1186         * commands/date.c: Likewise.
1187         * commands/handler.c: Likewise.
1188         * commands/ls.c: Likewise.
1189         * commands/test.c: Likewise.
1190         * commands/cmp.c: Likewise.
1191         * commands/efi/loadbios.c: Likewise.
1192         * commands/efi/fixvideo.c: Likewise.
1193         * commands/halt.c: Likewise.
1194         * commands/help.c: Likewise.
1195         * commands/reboot.c: Likewise.
1196         * hello/hello.c: Likewise.
1197         * script/sh/main.c: Likewise.
1198         * loader/xnu.c: Likewise.
1199         * term/terminfo.c: Likewise.
1200         * term/i386/pc/serial.c: Likewise.
1201         * term/usb_keyboard.c: Likewise.
1203 2009-05-03  David S. Miller  <davem@davemloft.net>
1205         * normal/menu.c: Include grub/parser.h
1207 2009-05-03  Pavel Roskin  <proski@gnu.org>
1209         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1210         not char*.
1211         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1212         Suggested by Javier Martín <lordhabbit@gmail.com>
1214         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1215         efiemu??.o doesn't exist.
1216         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1217         copying.
1219 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1221         FreeBSD 64-bit support
1223         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1224         and loader/i386/bsd_trampoline.S
1225         (bsd_mod_ASFLAGS): new variable
1226         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1227         (FREEBSD_MODTYPE_KERNEL64): likewise
1228         (grub_bsd64_trampoline_start): likewise
1229         (grub_bsd64_trampoline_end): likewise
1230         (grub_bsd64_trampoline_selfjump): likewise
1231         (grub_bsd64_trampoline_gdt): likewise
1232         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1233         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1234         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1235         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1236         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1237         of "attrib" member
1238         * loader/i386/bsd_pagetable.c: new file
1239         * loader/i386/bsd_trampoline.S: likewise
1240         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1241         (ALIGN_VAR): likewise
1242         (entry_hi): new variable
1243         (kern_end_mdofs): likewise
1244         (is_64bit): likewise
1245         (grub_freebsd_add_meta): use ALIGN_VAR
1246         (grub_e820_mmap): new declaration
1247         (grub_freebsd_add_mmap): new function
1248         (grub_freebsd_add_meta_module): support 64 bit kernels
1249         (grub_freebsd_list_modules): use ALIGN_VAR
1250         (gdt_descriptor): new declaration
1251         (grub_freebsd_boot): support 64 bit kernels
1252         (grub_bsd_elf64_hook): new function
1253         (grub_bsd_load_elf): support elf64
1255 2009-05-03  Bean  <bean123ch@gmail.com>
1257         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1258         after we get the result of if statement.
1260 2009-05-03  Bean  <bean123ch@gmail.com>
1262         * Makefile.in (enable_efiemu): New variable.
1264         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1265         set.
1266         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1267         path.
1268         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1269         path, add -mno-red-zone option.
1270         (efiemu64_s.o): Likewise.
1271         (efiemu64.o): Use macro $^ for source file.
1273         * configure.ac (--enable-efiemu): New option.
1275 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1277         xnu support
1279         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1280         (pkglib_MODULES): add xnu.mod
1281         (xnu_mod_SOURCES): new variable
1282         (xnu_mod_CFLAGS): likewise
1283         (xnu_mod_LDFLAGS): likewise
1284         (xnu_mod_ASFLAGS): likewise
1285         * conf/i386-pc.rmk: likewise
1286         * conf/x86_64-efi.rmk: likewise
1287         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1288         new declaration
1289         * include/grub/i386/macho.h: new file
1290         * include/grub/i386/xnu.h: likewise
1291         * include/grub/macho.h: likewise
1292         * include/grub/machoload.h: likewise
1293         * include/grub/x86_64/macho.h: likewise
1294         * include/grub/x86_64/xnu.h: likewise
1295         * include/grub/xnu.h: likewise
1296         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1297         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1298         * loader/i386/efi/xnu.c: new file
1299         * loader/i386/pc/xnu.c: likewise
1300         * loader/i386/xnu.c: likewise
1301         * loader/i386/xnu_helper.S: likewise
1302         * loader/macho.c: likewise
1303         * loader/xnu.c: likewise
1304         * loader/xnu_resume.c: likewise
1305         * util/grub-dumpdevtree: likewise
1306         * include/grub/i386/pit.h: include grub/err.h
1307         (grub_pit_wait): export
1308         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1310 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1312         Efiemu
1314         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1315         _linux_efi, linux_efi.
1316         new files in grub-emu
1317         new targets efiemu32.o and efiemu64.o
1318         * loader/linux_normal_efiemu.c: likewise
1319         * loader/i386/efi/linux.c: added preliminary efiemu support
1320         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1321         files to copy
1322         * include/grub/autoefi.h: new file
1323         * include/grub/i386/efiemu.h: likewise
1324         * include/grub/i386/pc/efiemu.h: likewise
1325         * include/grub/efi/api.h: add LL suffix when necessary
1326         new definitions relating to tables
1327         * include/grub/efiemu/efiemu.h: new file
1328         * include/grub/efiemu/runtime.h: likewise
1329         * efiemu/prepare.c: likewise
1330         * efiemu/loadcore_common.c: likewise
1331         * efiemu/loadcore64.c: likewise
1332         * efiemu/runtime/efiemu.sh: likewise
1333         * efiemu/runtime/efiemu.S: likewise
1334         * efiemu/runtime/efiemu.c: likewise
1335         * efiemu/runtime/config.h: likewise
1336         * efiemu/prepare32.c: likewise
1337         * efiemu/main.c: likewise
1338         * efiemu/modules/pnvram.c: likewise
1339         * efiemu/modules/i386: likewise
1340         * efiemu/modules/i386/pc: likewise
1341         * efiemu/modules/acpi.c: likewise
1342         * efiemu/i386/pc/cfgtables.c: likewise
1343         * efiemu/i386/loadcore64.c: likewise
1344         * efiemu/i386/loadcore32.c: likewise
1345         * efiemu/prepare64.c: likewise
1346         * efiemu/loadcore.c: likewise
1347         * efiemu/symbols.c: likewise
1348         * efiemu/mm.c: likewise
1349         * efiemu/loadcore32.c: likewise
1351 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1353         ACPI spoofing
1355         * commands/acpi.c: new file
1356         * commands/i386/pc/acpi.c: likewise
1357         * commands/efi/acpi.c: likewise
1358         * include/grub/acpi.h: likewise
1359         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1360         (acpi_mod_SOURCES): new variable
1361         (acpi_mod_CFLAGS): likewise
1362         (acpi_mod_LDFLAGS): likewise
1363         * conf/i386-efi.rmk: likewise
1364         * conf/x86_64-efi.rmk: likewise
1366 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1368         Missing part from mmap patch
1370         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1371         (grub_mmap_unregister)
1372         (grub_mmap_free_and_unregister): use grub_mmap_register
1374 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1376         Mmap services
1378         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1379         * loader/i386/linux.c (find_mmap_size): likewise
1380         (allocate_pages): likewise
1381         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1382         (grub_fill_multiboot_mmap): likewise
1383         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1384         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1385         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1386         (OPENBSD_MMAP_RESERVED): likewise
1387         * include/grub/i386/pc/memory.h: include grub/memory.h
1388         (grub_lower_mem): removed
1389         (grub_upper_mem): likewise
1390         (GRUB_MACHINE_MEMORY_ACPI): new definition
1391         (GRUB_MACHINE_MEMORY_NVS): likewise
1392         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1393         (GRUB_MACHINE_MEMORY_HOLE): likewise
1394         (grub_machine_mmap_register): likewise
1395         (grub_machine_mmap_unregister): likewise
1396         (grub_machine_get_upper): likewise
1397         (grub_machine_get_lower): likewise
1398         (grub_machine_get_post64): likewise
1399         * include/grub/i386/efi/memory.h: new file
1400         * include/grub/x86_64/efi/memory.h: likewise
1401         * include/grub/efi/memory.h: likewise
1402         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1403         (mmap_mod_SOURCES): new variable
1404         (mmap_mod_LDFLAGS): likewise
1405         (mmap_mod_ASFLAGS): likewise
1406         * conf/i386-coreboot.rmk: likewise
1407         * conf/i386-ieee1275.rmk: likewise
1408         * conf/i386-efi.rmk: likewise
1409         * conf/x86_64-efi.rmk: likewise
1410         * include/grub/types.h (UINT_TO_PTR): new macro
1411         (PTR_TO_UINT32): likewise
1412         (PTR_TO_UINT64): likewise
1413         * include/grub/memory.h: new file
1414         * mmap/i386/pc/mmap.c: likewise
1415         * mmap/i386/pc/mmap_helper.S: likewise
1416         * mmap/i386/uppermem.c: likewise
1417         * mmap/mmap.c: likewise
1418         * mmap/efi/mmap.c: likewise
1419         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1420         grub_upper_mem
1421         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1422         (grub_upper_mem): likewise
1423         (grub_machine_init): don't use grub_upper_mem,
1424         make grub_lower_mem local
1425         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1426         grub_mmap_iterate and grub_mmap_get_upper
1427         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1429 2009-05-02  Bean  <bean123ch@gmail.com>
1431         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1432         script/sh/parser.y.
1433         (pkglib_MODULES): Add normal.mod and sh.mod.
1434         (normal_SOURCES): New variable.
1435         (normal_mod_CFLAGS): Likewise.
1436         (normal_mod_LDFLAGS): Likewise.
1437         (sh_mod_SOURCES): Likewise.
1438         (sh_mod_CFLAGS): Likewise.
1439         (sh_mod_LDFLAGS): Likewise.
1441         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1442         script/sh/lexer.c_DEPENDENCIES.
1443         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1444         kern/rescue_reader.c and kern/rescue_parser.c.
1445         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1446         (grub_emu_SOURCES): Change source files.
1447         (pkglib_MODULES): Remove normal.mod.
1448         (normal_SOURCES): Removed.
1449         (normal_mod_CFLAGS): Likewise.
1450         (normal_mod_LDFLAGS): Likewise.
1451         * conf/i386-coreboot.rmk: Likewise.
1452         * conf/i386-efi.rmk: Likewise.
1453         * conf/i386-ieee1276.rmk: Likewise.
1454         * conf/powerpc-ieee1275.rmk: Likewise.
1455         * conf/sparc64-ieee1275.rmk: Likewise.
1456         * conf/x86_64-efi.rmk: Likewise.
1458         * include/grub/command.h (grub_command_execute): New inline function.
1460         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1462         * include/grub/normal.h: Remove <grub/setjmp.h>.
1463         (grub_fs_module_list): Moved to normal/autofs.c.
1464         (grub_exit_env): Removed.
1465         (grub_command_execute): Likewise.
1466         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1467         parameter script.
1468         (read_command_list): New function declaration.
1469         (read_fs_list): Likewise.
1471         * include/parser.h: Include <grub/reader.h>.
1472         (grub_parser_split_cmdline): Change type of getline parameter.
1473         (grub_parser): New structure.
1474         (grub_parser_class): New variable.
1475         (grub_parser_execute): New function declaration.
1476         (grub_register_rescue_parser): Likewise.
1477         (grub_parser_register): New inline function.
1478         (grub_parser_unregister): Likewise.
1479         (grub_parser_get_current): Likewise.
1480         (grub_parser_set_current): Likewise.
1482         * include/grub/reader.h: New file.
1483         * kern/reader.c: Likewise.
1484         * kern/rescue_parser.c: Likewise.
1485         * kern/rescue_reader.c: Likewise.
1486         * normal/autofs.c: Likewise.
1487         * normal/dyncmd.c: Likewise.
1489         * include/grub/rescue.h: Removed.
1490         * normal/command.h: Likewise.
1492         * include/grub/script.h: Moved to ...
1493         * include/grub/script_sh.h: ... Moved here.
1494         * normal/execute.c: Moved to ...
1495         * script/sh/execute.c: ... Moved here.
1496         * normal/function.c: Moved to ...
1497         * script/sh/function.c: ... Moved here.
1498         * normal/lexer.c: Moved to ...
1499         * script/sh/lexer.c: ... Moved here.
1500         * normal/parser.y: Moved to ...
1501         * script/sh/parser.y: ... Moved here.
1502         * normal/script.c: Moved to ...
1503         * script/sh/script.c: ... Moved here.
1505         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1506         <grub/reader.h>.
1507         (grub_exit_env): Removed.
1508         (fs_module_list): Moved to normal/autofs.c.
1509         (grub_file_getline): Don't handle comment here.
1510         (free_menu): Skip removed field entry->commands.
1511         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1512         script parameter.
1513         (read_config_file): Removed nested parameter, change getline function.
1514         (grub_enter_normal_mode): Removed.
1515         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1516         (read_command_list): Likewise.
1517         (autoload_fs_module): Moved to normal/autofs.c.
1518         (read_fs_list): Likewise.
1519         (reader_nested): New variable.
1520         (grub_normal_execute): Run parser.sh to switch to sh parser.
1521         (grub_cmd_rescue): Removed.
1522         (cmd_normal): Removed.
1523         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1524         rescue command.
1525         (grub_cmdline_run): New function.
1526         (grub_normal_reader_init): Likewise.
1527         (grub_normal_read_line): Likewise.
1528         (grub_env_write_pager): Likewise.
1529         (cmdline): New variable.
1530         (grub_normal_reader): Likewise.
1531         (GRUB_MOD_INIT): Register normal reader and set as current, register
1532         pager hook, register normal command with grub_register_command_prio,
1533         so that it won't show up in command.lst.
1534         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1535         grub_fs_autoload_hook.
1537         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1538         (grub_menu_execute_entry): Replace grub_script_execute with
1539         grub_parser_execute, change parameter to grub_command_execute.
1541         * normal/menu_text.c: Remove <grub/script.h>.
1543         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1544         and <grub/parser.h>.
1545         (run): Change editor_getline to use new parser interface. Change
1546         parameter to grub_command_execute.
1548         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1549         <grub/reader.h> and <grub/parser.h>.
1550         (grub_load_normal_mode): Execute normal command.
1551         (grub_main): Call grub_register_core_commands,
1552         grub_register_rescue_parser and grub_register_rescue_reader, use
1553         grub_reader_loop to enter input loop.
1555         * kern/parser.c (grub_parser_split_cmdline): Change type of
1556         getline parameter.
1557         (grub_parser_class): New variable.
1558         (grub_parser_execute): New function.
1560         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1561         * loader/multiboot2.c: Likewise.
1562         * loader/sparc64/ieee1275/linux.c: Likewise.
1564         * util/grub-emu.c (read_command_list): New dummy function.
1566 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1568         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1569         count to 16 for CCISS and IDA.
1571 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1573         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1574         after waiting for user input.
1576         * loader/i386/linux.c: Include `<grub/normal.h>'.
1577         (grub_cmd_linux): Improve the error message about `ask' mode, by
1578         waiting for user input so it's not missed (we can do this, since
1579         user requested interaction).
1581 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1583         Added missing lst to grub-mkrescue
1585         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1586         and ${input_dir}/parttool.lst
1588 2009-04-30  David S. Miller  <davem@davemloft.net>
1590         * util/hostdisk.c (device_is_wholedisk): New function.
1591         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1592         zero only if device_is_wholedisk() returns true.
1594         * util/hostdisk.c (convert_system_partition_to_system_disk):
1595         Handle virtual disk devices named /dev/vdiskX as found on sparc
1596         and powerpc.
1598         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1599         lettered partition specifier is found, convert to numbered.
1601 2009-04-29  David S. Miller  <davem@davemloft.net>
1603         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1604         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1606         * normal/command.c: Add missing newline at end of file.
1608         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1609         warnings.
1610         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1611         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1612         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1613         ihandles have a 32-bit type but need to be stored in a "void *".
1615 2009-04-28  Pavel Roskin  <proski@gnu.org>
1617         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1618         not disk.  Adjust all dependencies.
1619         (grub_fs_uuid_close): Use grub_device_close(), not
1620         grub_disk_close().
1622         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1623         parent's partition, don't copy it by reference, as it gets freed
1624         on close.
1626 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1628         Preboot hooks support
1630         * commands/boot.c (struct grub_preboot_t): new declaration
1631         (preboots_head): new variable
1632         (preboots_tail): likewise
1633         (grub_loader_register_preboot_hook): new function
1634         (grub_loader_unregister_preboot_hook): likewise
1635         (grub_loader_set): launch preboot hooks
1636         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1637         (grub_loader_register_preboot_hook): new declaration
1638         (grub_loader_unregister_preboot_hook): likewise
1640 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1642         Warning fix
1644         * disk/scsi.c (grub_scsi_open): added missing cast when
1645         calling grub_dprintf
1647 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1649         Bug and warning fixes
1651         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1652         declaration
1653         * commands/test.c (test_parse): fixed bug with file tests and corrected
1654         declaration of find_file
1656 2009-04-26  Pavel Roskin  <proski@gnu.org>
1658         * Makefile.in: Don't install empty manual pages if help2man is
1659         missing.  Use help2man option for output, not shell redirection.
1661 2009-04-26  David S. Miller  <davem@davemloft.net>
1663         * util/grub-mkdevicemap.c (make_device_map): Add missing
1664         NESTED_FUNC_ATTR to process_device().
1666 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1668         Test command
1670         * commands/test.c: rewritten to use bash-like test
1672 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1674         Parttool autoloading and improvements
1676         * Makefile.in (pkglib_DATA): add parttool.lst
1677         (parttool.lst): new target
1678         * genmk.rb: generate parttool-*
1679         (CLEANFILES): add #{parttool}
1680         (PARTTOOLFILES): new variable
1681         * genparttoollist.sh: new file
1682         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1683         (grub_pcpart_type): likewise
1684         * commands/parttool.c (helpmsg): new variable
1685         (grub_cmd_parttool): output help if not enough arguments are supplied
1686         autoload modules
1687         (GRUB_MOD_INIT(parttool)): use helpmsg
1689 2009-04-24  David S. Miller  <davem@davemloft.net>
1691         Avoiding opening same device multiple times in device iterator.
1693         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1694         and use it to build a list of partitions in iterate_disk() and
1695         iterate_partition().
1697         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1698         on disk->data.
1700         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1701         grub_devalias_iterate() result instead of unconditional 0.
1702         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1703         Also, capture hook return value, either directly or via
1704         grub_children_iterate(), and propagate to caller.
1705         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1706         grub_children_iterate): Return value is now 'int' instead of
1707         'grub_err_t'.
1708         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1709         like a proper iterator, stopping when hooks return non-zero.
1710         (grub_devalias_iterate): Likewise.
1712 2009-04-23  David S. Miller  <davem@davemloft.net>
1714         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1716 2009-04-22  David S. Miller  <davem@davemloft.net>
1718         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1719         is larger than address_cells, use that value for address_cells too.
1721         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1722         IEEE1275_MAX_PATH_LEN): Define.
1723         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1724         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1725         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1726         'devtype'.  Explicitly NULL terminate devalias expansion.
1728         * util/sparc64/ieee1275/misc.c: New file.
1729         * util/sparc64/ieee1275/grub-setup.c: New file.
1730         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1731         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1732         * util/sparc64/ieee1275/grub-install.in: New file.
1733         * util/ieee1275/ofpath.c: New file.
1734         * util/ieee1275/devicemap.c: New file.
1735         * util/devicemap.c: New file.
1736         * util/deviceiter.c: New file.
1737         * kern/sparc64/ieee1275/init.c: New file.
1738         * include/grub/util/ofpath.h: New file.
1739         * include/grub/util/deviceiter.h: New file.
1740         * util/grub-mkdevicemap.c: Include deviceiter.h.
1741         Implement using grub_util_emit_devicemap_entry and
1742         grub_util_iterate_devices.
1743         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1744         util/devicemap.c into grub-mkdevicemap
1745         * conf/i386-efi.rmk: Likewise.
1746         * conf/i386-ieee1275.rmk: Likewise.
1747         * conf/i386-pc.rmk: Likewise.
1748         * conf/powerpc-ieee1275.rmk: Likewise.
1749         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1750         images and installation utilities.  Build kernel as image
1751         instead of as elf binary.  Use common rules as much as possible.
1753 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1755         Correct GPT definition
1757         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1758         of "attrib" member
1760 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1762         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1764 2009-04-19  David S. Miller  <davem@davemloft.net>
1766         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1767         (grub_rescue_cmd_linux): Rename to...
1768         (grub_cmd_linux): and fix prototype.
1769         (grub_rescue_cmd_initrd): Rename to...
1770         (grub_cmd_initrd): and fix prototype.
1771         (cmd_linux, cmd_initrd): New.
1772         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1773         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1775 2009-04-17  Pavel Roskin  <proski@gnu.org>
1777         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1778         format.
1779         (grub_ohci_transfer): Likewise.
1781         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1783         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1784         return without a value.  Fix inconsistent indentation.
1786         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1787         match struct grub_fs.
1789         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1790         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1791         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1792         * commands/lspci.c (grub_lspci_iter): Likewise.
1794 2009-04-16  Bean  <bean123ch@gmail.com>
1796         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1797         value.
1799 2009-04-15  Pavel Roskin  <proski@gnu.org>
1801         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1802         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1803         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1804         definitions.
1806 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1808         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1809         that no multiple data or metadata areas are supported and `Unknown
1810         metadata header'.
1812 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1814         Move loader out of the kernel
1816         * kern/loader.c: moved to ...
1817         * commands/boot.c: ... moved here
1818         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1819         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1820         * include/grub/kernel.h (grub_machine_fini): export
1821         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1822         (grub_loader_set): likewise
1823         (grub_loader_unset): likewise
1824         (grub_loader_boot): likewise
1825         * conf/common.rmk: new module boot.mod
1826         (pkglib_MODULES): add boot.mod
1827         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1828         (grub_emu_SOURCES): likewise
1829         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1830         (grub_emu_SOURCES): likewise
1831         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1832         (grub_emu_SOURCES): likewise
1833         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1834         (grub_emu_SOURCES): likewise
1835         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
1836         (grub_emu_SOURCES): likewise
1837         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
1838         (grub_emu_SOURCES): likewise
1839         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
1840         (grub_emu_SOURCES): likewise
1842 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1844         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
1846         * kern/misc.c (grub_itoa): Removed function
1847         (grub_ltoa): likewise
1848         (grub_vsprintf): use grub_lltoa
1850 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1852         Restore grub-emu
1854         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
1855         * conf/i386-coreboot.rmk: likewise
1856         * conf/i386-ieee1275.rmk: likewise
1857         * conf/powerpc-ieee1275.rmk: likewise
1859 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1861         * INSTALL: Add that `./autogen.sh' needs to be run before
1862         `./configure.'.
1864 2009-04-14  Bean  <bean123ch@gmail.com>
1866         * Makefile.in (pkglib_DATA): Add handler.lst.
1867         (handler.lst): New rule.
1869         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
1870         * conf/i386-coreboot.rmk: Likewise.
1871         * conf/i386-ieee1275.rmk: Likewise.
1872         * conf/i386-efi.rmk: Likewise.
1873         * conf/x86_64-efi.rmk: Likewise.
1874         * conf/powerpc-ieee1275.rmk: Likewise.
1875         * conf/sparc64-ieee1275.rmk: Likewise.
1877         * genhandlerlist.sh: New file.
1879         * genmk.rb: Add rules to generate handler.lst.
1881         * include/grub/normal.h (grub_file_getline): New function definition.
1882         (read_handler_list): Likewise.
1883         (free_handler_list): Likewise.
1885         * include/grub/term.h (grub_term_register_input): Add name parameter
1886         for auto generation of handler.lst.
1887         (grub_term_register_output): Likewise.
1889         * normal/handler.c: New file.
1891         * normal/main.c (get_line): Renamed to grub_file_getline.
1892         (read_config_file): Use the newly renamed grub_file_getline.
1893         (read_command_list): Likewise.
1894         (read_fs_list): Likewise.
1895         (grub_normal_execute): Call read_handler_list to parse handler.lst.
1896         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
1898         * term/efi/console.c (grub_console_init): Add name parameter for auto
1899         generation of handler.lst.
1900         * term/gfxterm.c: Likewise.
1901         * term/i386/pc/at_keyboard.c: Likewise.
1902         * term/i386/pc/console.c: Likewise.
1903         * term/i386/pc/serial.c: Likewise.
1904         * term/i386/pc/vesafb.c: Likewise.
1905         * term/i386/pc/vga.c: Likewise.
1906         * term/i386/pc/vga_text.c: Likewise.
1907         * term/ieee1275/ofconsole.c: Likewise.
1908         * term/usb_keyboard.c: Likewise.
1910 2009-04-14  Bean  <bean123ch@gmail.com>
1912         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
1913         properly with null character.
1915 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1917         * configure: Remove.
1918         * config.h.in: Likewise.
1919         * stamp-h.in: Likewise.
1920         * DISTLIST: Likewise.
1921         * conf/common.mk: Likewise.
1922         * conf/i386-coreboot.mk: Likewise.
1923         * conf/i386-efi.mk: Likewise.
1924         * conf/i386-ieee1275.mk: Likewise.
1925         * conf/i386.mk: Likewise.
1926         * conf/i386-pc.mk: Likewise.
1927         * conf/powerpc-ieee1275.mk: Likewise.
1928         * conf/sparc64-ieee1275.mk: Likewise.
1929         * conf/x86_64-efi.mk: Likewise.
1931         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
1932         develop on GRUB.
1934 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
1935             David S. Miller  <davem@davemloft.net>
1937         * util/hostdisk.c (make_device_name): Fix buffer length
1938         calculations.
1940 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
1942         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
1943         <sys/param.h> and <sys/sysctl.h>.
1944         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
1945         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
1946         opening the device and reset them afterwards.
1948 2009-04-13  Pavel Roskin  <proski@gnu.org>
1950         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
1951         Reported by John Stanley <jpsinthemix@verizon.net>
1953 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1955         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
1956         that name for menuentries when appropriate.
1958 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1960         * util/grub.d/10_freebsd.in: Add a missing `fi'.
1962 2009-04-13  Robert Millan  <rmh@aybabtu.com>
1964         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
1965         to Linux, simply abort telling the user it's no longer supported.
1967 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1969         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
1970         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
1971         `freebsd_loadenv' only when devices.hints exist.
1973 2009-04-13  Pavel Roskin  <proski@gnu.org>
1975         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
1977 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
1979         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
1980         partition number.
1981         (grub_drive): Likewise.
1983 2009-04-13  David S. Miller  <davem@davemloft.net>
1985         * kern/sparc64/ieee1275/ieee1275.c: New file.
1986         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
1987         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
1988         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
1989         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
1990         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
1991         grub_ieee1275_alloc_physmem): Declare new exported functions.
1993         * include/grub/sparc64/ieee1275/loader.h: New file.
1994         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1995         * include/grub/sparc64/kernel.h: Likewise.
1996         * loader/sparc64/ieee1275/linux.c: Likewise.
1998         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
1999         (grub_fstest_SOURCES): Likewise.
2001         * util/hostdisk.c (make_device_name): Do not make any assumptions
2002         about the length of drive names.
2004         * kern/dl.c (grub_dl_load_file): Close file immediately when
2005         we are done using it.
2007 2009-04-12  David S. Miller  <davem@davemloft.net>
2009         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2010         values.  Noticed by Pavel Roskin.
2012         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2013         target compiler.
2015         * genmk.rb: Add more flexible image type specification, also
2016         pass --strip-unneeded to objcopy.
2017         * conf/i386-pc.rmk: Use *_FORMAT.
2018         * conf/i386-pc.mk: Rebuilt.
2020         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2021         (OFDISK_HASH_SZ): Define.
2022         (ofdisk_hash): New hash table.
2023         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2024         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2025         instead of device phandle which is not unique.
2027         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2028         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2029         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2030         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2031         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2032         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2033         GRUB_KERNEL_MACHINE_DATA_END): Define.
2034         (grub_kernel_image_size, grub_total_module_size): Declare.
2036 2009-04-12  Pavel Roskin  <proski@gnu.org>
2038          * configure.ac: Change the logic when we check for target tools.
2039          Do it when the target is specified and it's different from the
2040          specified value of the host.
2042 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2044         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2045         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2046         GNU/kFreeBSD. Check if a device is a character device. Use
2047         DIOCGMEDIASIZE to get the size.
2048         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2049         support for GNU/kFreeBSD.
2050         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2051         is a character device instead of a block device. Add support for
2052         FreeBSD device names.
2054         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2055         is a character device instead of a block device.
2057         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2058         is a character device instead of a block device.
2060 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2062         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2063         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2064         FreeBSD. Check if a device is a character device. Use
2065         DIOCGMEDIASIZE to get the size.
2066         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2067         support for FreeBSD.
2068         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2069         is a character device instead of a block device. Add support for
2070         FreeBSD device names.
2072         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2073         a character device instead of a block device.
2074         (grub_util_check_char_device): New function.
2076         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2077         a character device instead of a block device.
2079         * include/grub/util/getroot.h (grub_util_check_char_device): New
2080         prototype.
2082 2009-04-11  David S. Miller  <davem@davemloft.net>
2084         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2085         static libgcc.
2086         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2087         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2088         function, if present.
2089         (__bswapdi2): Likewise.
2091         * include/grub/sparc64/ieee1275/boot.h: New file.
2092         * boot/sparc64/ieee1275/boot.S: Likewise.
2093         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2095         * kern/misc.c (grub_ltoa): New function.
2096         (grub_vsprintf): Use it to format 'long' integers.
2098 2009-04-10  David S. Miller  <davem@davemloft.net>
2100         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2101         slots are of type grub_ieee1275_cell_t.
2102         (grub_nand_read): Likewise.
2103         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2104         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2105         macros are used to compare values in arg/ret block of the call.
2106         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2107         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2108         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2109         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2110         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2111         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2112         grub_ieee1275_close, grub_ieee1275_set_property,
2113         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2114         grub_ieee1275_cell_t.
2115         * kern/ieee1275/openfw.c (grub_map): Likewise.
2116         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2117         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2119         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2120         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2121         (grub_devalias_iterate): Likewise.
2123 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2125         UFS improvements
2127         * fs/ufs.c (INODE_NBLOCKS): new definition
2128         (struct grub_ufs_dirent): added fields for non-BSD dirents
2129         (grub_ufs_get_file_block): fixed double indirect handling
2130         (grub_ufs_lookup_symlink): use more robust way to determine whether
2131         symlink is inline
2132         (grub_ufs_find_file): support for non-BSD dirents
2133         (grub_ufs_dir): support for non-BSD dirents
2135 2009-04-10  Bean  <bean123ch@gnail.com>
2137         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2138         attribute, otherwise the size would be wrong for i386 platform.
2140         * include/grub/pci.h (grub_pci_read_word): New inline function.
2141         (grub_pci_read_byte): Likewise.
2142         (grub_pci_write): Likewise.
2143         (grub_pci_write_word): Likewise.
2144         (grub_pci_write_byte): Likewise.
2146         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2148         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2149         (find_framebuf): Scan pci to locate the frame buffer address.
2151         * commands/efi/fixvideo.c: New file.
2153         * commands/efi/loadbios.c: Likewise.
2155         * commands/memrw.c: Likewise.
2157         * util/grub-dumpbios.in: Likewise.
2159         * conf/common.rmk (grub-dumpbios): New utility.
2160         (pkglib_MODULES): New module memrw.mod.
2161         (memrw_mod_SOURCE): New macro.
2162         (memrw_mod_CFLAGS): Likewise.
2163         (memrw_mod_LDFLAGS): Likewise.
2165         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2166         fixvideo.mod.
2167         (loadbios_mod_SOURCE): New macro.
2168         (loadbios_mod_CFLAGS): Likewise.
2169         (loadbios_mod_LDFLAGS): Likewise.
2170         (fixvideo_mod_SOURCE): Likewise.
2171         (fixvideo_mod_CFLAGS): Likewise.
2172         (fixvideo_mod_LDFLAGS): Likewise.
2174         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2175         fixvideo.mod.
2176         (loadbios_mod_SOURCE): New macro.
2177         (loadbios_mod_CFLAGS): Likewise.
2178         (loadbios_mod_LDFLAGS): Likewise.
2179         (fixvideo_mod_SOURCE): Likewise.
2180         (fixvideo_mod_CFLAGS): Likewise.
2181         (fixvideo_mod_LDFLAGS): Likewise.
2183 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2185         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2187 2009-04-07  David S. Miller  <davem@davemloft.net>
2189         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2190         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2191         R_SPARC_WDISP30 case.
2192         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2194 2009-04-06  Pavel Roskin  <proski@gnu.org>
2196         * include/grub/misc.h (ARRAY_SIZE): New macro.
2197         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2198         New macro.
2199         * loader/i386/linux.c (allocate_pages): Use free_pages().
2200         (grub_linux_unload): Don't use free_pages().
2201         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2202         wrong index.  Treat all other modes as text modes.
2203         (grub_cmd_linux): Initialize vid_mode unconditionally to
2204         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2206         * commands/help.c (print_command_help): Use cmd->prio, not
2207         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2209 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2211         Parttool
2213         * parttool/pcpart.c: new file
2214         * commands/parttool.c: likewise
2215         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2216         (parttool_mod_SOURCES): new variable
2217         (parttool_mod_CFLAGS): likewise
2218         (parttool_mod_LDFLAGS): likewise
2219         (pcpart_mod_SOURCES): likewise
2220         (pcpart_mod_CFLAGS): likewise
2221         (pcpart_mod_LDFLAGS): likewise
2222         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2223         and parttool/pcpart.c
2224         * conf/i386-efi.rmk: likewise
2225         * conf/i386-ieee1275.rmk: likewise
2226         * conf/i386-pc.rmk: likewise
2227         * conf/powerpc-ieee1275.rmk: likewise
2228         * conf/sparc64-ieee1275.rmk: likewise
2229         * conf/x86_64-ieee1275.rmk: likewise
2231 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2233         Support for mtime and further expandability of dir command
2235         * include/grub/lib/datetime.h: moved to ...
2236         * include/grub/datetime.h: ... moved here and added
2237         declaration of grub_unixtime2datetime. All users updated
2238         * include/grub/fs.h: new syntax for dir and mtime functions in
2239         struct grub_fs
2240         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2241         and GRUB_FSHELP_FLAGS_MASK
2242         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2243         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2244         (grub_ext2_mtime): new function
2245         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2246         (grub_hfsplus_mtime): new function
2247         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2248         (GRUB_UFS_ATTR_FILE): likewise
2249         (GRUB_UFS_ATTR_LNK): likewise
2250         (struct grub_ufs_sblock): new fields mtime
2251         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2252         all users updated
2253         (grub_ufs_dir): mtime support
2254         (grub_ufs_mtime): new function
2255         * fs/affs.c (grub_affs_dir): use new dir syntax
2256         * fs/afs.c (grub_afs_dir): likewise
2257         * fs/cpio.c (grub_cpio_dir): likewise
2258         * fs/fat.c (grub_fat_find_dir): likewise
2259         * fs/hfs.c (grub_hfs_dir): likewise
2260         * fs/iso9660.c (grub_iso9660_dir): likewise
2261         * fs/jfs.c (grub_jfs_dir): likewise
2262         * fs/minix.c (grub_minix_dir): likewise
2263         * fs/ntfs.c (grub_ntfs_dir): likewise
2264         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2265         * fs/sfs.c (grub_sfs_dir): likewise
2266         * fs/xfs.c (grub_xfs_dir): likewise
2267         * util/hostfs.c (grub_hostfs_dir): likewise
2268         * lib/datetime.c: moved to ...
2269         * normal/datetime.c: ... moved here
2270         (grub_unixtime2datetime): new function
2271         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2272         * normal/completion.c (iterate_dir): use new dir syntax
2273         * normal/misc.c (grub_normal_print_device_info): tell the
2274         last modification time of a volume
2275         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2276         * conf/common.rmk: added lib/datetime.c to ls.mod
2277         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2278         (normal_mod_SOURCES): likewise
2279         (datetime_mod_SOURCES): Removed lib/datetime.c
2280         * conf/i386-efi.rmk: likewise
2281         * conf/i386-ieee1275.rmk: likewise
2282         * conf/i386-pc.rmk: likewise
2283         * conf/powerpc-ieee1275.rmk: likewise
2284         * conf/sparc64-ieee1275.rmk: likewise
2285         * conf/x86_64-efi.rmk: likewise
2287 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2289         Trim trailing spaces in FAT label and support mtools-like labels
2291         * fs/fat.c (grub_fat_iterate_dir): New function based
2292         on grub_fat_find_dir
2293         (grub_fat_find_dir): use grub_fat_iterate_dir
2294         (grub_fat_label): likewise
2296 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2298         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2299         and command.h
2300         remove extraneous kernel_elf_HEADERS
2302 2009-04-04  Bean  <bean123ch@gnail.com>
2304         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2306         * util/misc.c: Likewise.
2308 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2310         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2311         instead of grub_printf.
2313 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2315         * loader/i386/linux.c (grub_linux_setup_video): Fill
2316         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2317         values from `mode info' structure instead of hardcoded
2318         values.
2320 2009-04-01  Pavel Roskin  <proski@gnu.org>
2322         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2323         unused now.
2324         * genmk.rb: Likewise.
2325         * configure.ac: Likewise.
2327 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2329         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2330         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2332 2009-04-01  David S. Miller  <davem@davemloft.net>
2334         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2335         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2336         (grub_setjmp): Mark with 'returns_twice' attribute.
2337         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2338         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2339         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2341 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2343         Reapply fix from 2008-07-28 which was accidentally reverted; also
2344         perform the same fix to a similar check in same function.
2346         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2347         with the same number are found, just use issue a warning with
2348         grub_dprintf(), as this error has been reported to be non-fatal.
2350 2009-03-31  Pavel Roskin  <proski@gnu.org>
2352         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2353         for cross-compilation.
2355 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2357         Fix i386-ieee1275 build.
2359         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2360         Remove declaration.
2362 2009-03-30  Pavel Roskin  <proski@gnu.org>
2364         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2365         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2366         zero-terminated, rely only on the strlen value.  Fix comparison
2367         of strings differing in length.
2369 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2371         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2372         checking for abi version.  Improve error messages on BIOS to notify
2373         user about `linux16' command.
2375 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2377         Leak fixes
2379         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2380         in case of collision
2381         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2383 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2385         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2386         set `vid_mode' accordingly.
2387         (grub_linux_boot): Process `vid_mode' and set video mode.
2389 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2391         * util/grub.d/10_linux.in (linux_entry): New function.
2392         Factorize generation of Linux boot entries.
2394 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2396         Make the format of Environment Block plain text. The boot loader
2397         part is not tested well yet.
2399         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2400         (buffer): Removed.
2401         (envblk): Likewise.
2402         (usage): Remove "info" and "clear". Add "unset". Update the
2403         description of "set", as this does not delete variables any
2404         longer.
2405         (create_envblk_file): Complete rewrite.
2406         (open_envblk_file): Likewise.
2407         (cmd_info): Removed.
2408         (cmd_list): Likewise.
2409         (cmd_set): Likewise.
2410         (cmd_clear): Likewise.
2411         (list_variables): New function.
2412         (write_envblk): Likewise.
2413         (set_variables): Likewise.
2414         (unset_variables): Likewise.
2415         (main): Complete rewrite.
2417         * commands/loadenv.c (buffer): Removed.
2418         (envblk): Likewise.
2419         (open_envblk_file): New function.
2420         (read_envblk_file): Complete rewrite.
2421         (grub_cmd_load_env): Likewise.
2422         (grub_cmd_list_env): Likewise.
2423         (struct blocklist): New struct.
2424         (free_blocklists): New function.
2425         (check_blocklists): Likewise.
2426         (write_blocklists): Likewise.
2427         (grub_cmd_save_env): Complete rewrite.
2429         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2430         a plain text signature.
2431         (GRUB_ENVBLK_MAXLEN): Removed.
2432         (struct grub_envblk): Complete rewrite.
2433         (grub_envblk_find): Removed.
2434         (grub_envblk_insert): Likewise.
2435         (grub_envblk_open): New prototype.
2436         (grub_envblk_set): Likewise.
2437         (grub_envblk_delete): Put const to VALUE.
2438         (grub_envblk_iterate): Put const to NAME and VALUE.
2439         (grub_envblk_close): New prototype.
2440         (grub_envblk_buffer): New inline function.
2441         (grub_envblk_size): Likewise.
2443         * lib/envblk.c: Include grub/mm.h.
2444         (grub_env_find): Removed.
2445         (grub_envblk_open): New function.
2446         (grub_envblk_close): Likewise.
2447         (escaped_value_len): Likewise.
2448         (find_next_line): Likewise.
2449         (grub_envblk_insert): Removed.
2450         (grub_envblk_set): New function.
2451         (grub_envblk_delete): Complete rewrite.
2452         (grub_envblk_iterate): Likewise.
2454 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2456         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2457         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2458         variables.  Use 16-bit loader.
2459         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2460         loader.
2461         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2462         (grub_linux16_boot): ... this.  Update all users.
2463         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2464         (grub_linux_boot): ... this.  Update all users.
2466         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2467         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2468         commands to `linux16' and `initrd16'.
2469         (GRUB_MOD_FINI(linux)): Rename to ...
2470         (GRUB_MOD_FINI(linux16)): ... this.
2472 2009-03-24  Pavel Roskin  <proski@gnu.org>
2474         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2475         not just for compilation.
2477 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2479         Move multiboot helper out of kernel
2481         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2482         `loader/i386/multiboot_helper.S'.
2483         * conf/i386-coreboot.rmk: Likewise
2484         * conf/i386-ieee1275.rmk: Likewise
2486         * kern/i386/loader.S: Move multiboot helpers from here...
2487         * loader/i386/multiboot_helper.S: ...moved here
2488         * include/grub/i386/loader.h: Move declarations of multiboot
2489         helpers from here...
2490         * include/grub/i386/multiboot.h: ...moved here
2491         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2493 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2495         * kern/env.c (grub_env_context_open): Added an argument to specify
2496         whether a new context inherits exported variables from current
2497         one. This is useful when making a sandbox to interpret a config
2498         file.
2499         All callers updated.
2501         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2503 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2505         * kern/env.c (grub_env_context_close): Fix memory leaks.
2507 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2509         * normal/main.c (grub_normal_execute): Added an argument
2510         BATCH to specify if an interactive interface should be provided
2511         after reading a config file.
2512         All callers updated.
2513         (read_command_list): Prevent being executed twice.
2514         (read_fs_list): Likewise.
2516         * include/grub/normal.h (grub_normal_execute): Updated the
2517         prototype.
2519 2009-03-22  Pavel Roskin  <proski@gno.org>
2521         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2522         _start.
2523         * kern/i386/pc/startup.S: Likewise.
2524         * kern/i386/efi/startup.S: Likewise.
2525         * kern/i386/ieee1275/startup.S: Likewise.
2526         * kern/i386/coreboot/startup.S: Likewise.
2527         * kern/x86_64/efi/startup.S: Likewise.
2529         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2530         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2531         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2533 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2535         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2537         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2538         limit detection.
2539         Use vaddr of correct segment for entry_point.
2541 2009-03-21  Bean  <bean123ch@gmail.com>
2543         * commands/blocklist.c: Add include file <grub/command.h>, remove
2544         <grub/normal.h> and <grub/arg.h>.
2545         (grub_cmd_blocklist): Use the new command interface.
2546         (GRUB_MOD_INIT): Likewise.
2547         (GRUB_MOD_FINI): Likewise.
2548         * commands/boot.c: Likewise.
2549         * commands/cat.c: Likewise.
2550         * commands/cmp.c: Likewise.
2551         * commands/configfile.c: Likewise.
2552         * commands/crc.c: Likewise.
2553         * commands/echo.c: Likewise.
2554         * commands/halt.c: Likewise.
2555         * commands/handler.c: Likewise.
2556         * commands/hdparm.c: Likewise.
2557         * commands/help.c: Likewise.
2558         * commands/hexdump.c: Likewise.
2559         * commands/loadenv.c: Likewise.
2560         * commands/ls.c: Likewise.
2561         * commands/lsmmap.c: Likewise.
2562         * commands/lspci.c: Likewise.
2563         * commands/loadenv.c: Likewise.
2564         * commands/read.c: Likewise.
2565         * commands/reboot.c: Likewise.
2566         * commands/search.c: Likewise.
2567         * commands/sleep.c: Likewise.
2568         * commands/test.c: Likewise.
2569         * commands/usbtest.c: Likewise.
2570         * commands/videotest.c: Likewise.
2571         * commands/i386/cpuid.c: Likewise.
2572         * commands/i386/pc/halt.c: Likewise.
2573         * commands/i386/pc/play.c: Likewise.
2574         * commands/i386/pc/pxecmd.c: Likewise.
2575         * commands/i386/pc/vbeinfo.c: Likewise.
2576         * commands/i386/pc/vbetest.c: Likewise.
2577         * commands/ieee1275/suspend.c: Likewise.
2578         * disk/loopback.c: Likewise.
2579         * font/font_cmd.c: Likewise.
2580         * hello/hello.c: Likewise.
2581         * loader/efi/appleloader.c: Likewise.
2582         * loader/efi/chainloader.c: Likewise.
2583         * loader/i386/bsd.c: Likewise.
2584         * loader/i386/efi/linux.c: Likewise.
2585         * loader/i386/ieee1275/linux.c: Likewise.
2586         * loader/i386/linux.c: Likewise.
2587         * loader/i386/pc/chainloader.c: Likewise.
2588         * loader/i386/pc/linux.c: Likewise.
2589         * loader/powerpc/ieee1275/linux.c: Likewise.
2590         * loader/multiboot_loader.c: Likewise.
2591         * term/gfxterm.c: Likewise.
2592         * term/i386/pc/serial.c: Likewise.
2593         * term/terminfo.c: Likewise.
2595         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2596         * term/i386/pc/vga.c: Likewise.
2597         * video/readers/jpeg.c: Likewise.
2598         * video/readers/png.c: Likewise.
2599         * video/readers/tga.c: Likewise.
2601         * util/grub-fstest (cmd_loopback): Removed.
2602         (cmd_blocklist): Likewise.
2603         (cmd_ls): Likewise.
2604         (grub_register_command): Likewise.
2605         (grub_unregister_command): Likewise.
2606         (execute_command): Use grub_command_find to locate command and execute
2607         it.
2609         * include/grub/efi/chainloader.h: Removed.
2610         * loader/efi/chainloader_normal.c: Likewise.
2611         * loader/i386/bsd_normal.c: Likewise.
2612         * loader/i386/pc/chainloader_normal.c: Likewise.
2613         * loader/i386/pc/multiboot_normal.c: Likewise.
2614         * loader/linux_normal.c: Likewise.
2615         * loader/multiboot_loader_normal.c: Likewise.
2616         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2618         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2619         and grub_register_command_p1.
2621         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2622         kern/command.c, lib/arg.c and commands/extcmd.c.
2623         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2624         (minicmd_mod_SOURCES): New variable.
2625         (minicmd_mod_CFLAGS): Likewise.
2626         (minicmd_mod_LDFLAGS): Likewise.
2627         (extcmd_mod_SOURCES): Likewise.
2628         (extcmd_mod_CFLAGS): Likewise.
2629         (extcmd_mod_LDFLAGS): Likewise.
2630         (boot_mod_SOURCES): Removed.
2631         (boot_mod_CFLAGS): Likewise.
2632         (boot_mod_LDFLAGS): Likewise.
2634         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2635         kern/corecmd.c.
2636         (kernel_img_HEADERS): Add command.h.
2637         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2638         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2639         and lib/arg.c.
2640         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2641         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2642         remove the corresponding normal mode command.
2643         (normal_mod_SOURCES): Remove normal/arg.c.
2644         * conf/i386-coreboot.rmk: Likewise.
2645         * conf/i386-efi.rmk: Likewise.
2646         * conf/i386-ieee1275.rmk: Likewise.
2647         * conf/powerpc-ieee1275.rmk: Likewise.
2648         * conf/x86_64-efi.rmk: Likewise.
2650         * include/grub/arg.h: Move from here ...
2651         * include/grub/lib/arg.h: ... to here.
2653         * normal/arg.c: Move from here ...
2654         * lib/arg.c: ... to here.
2656         * commands/extcmd.c: New file.
2657         * commands/minicmd.c: Likewise.
2658         * include/grub/command.h: Likewise.
2659         * include/grub/extcmd.h: Likewise.
2660         * kern/command.c: Likewise.
2661         * kern/corecmd.c: Likewise.
2663         * kern/list.c (grub_list_iterate): Return int instead of void.
2664         (grub_list_insert): New function.
2665         (grub_prio_list_insert): Likewise.
2667         * kern/rescue.c (grub_rescue_command): Removed.
2668         (grub_rescue_command_list): Likewise.
2669         (grub_rescue_register_command): Likewise.
2670         (grub_rescue_unregister_command): Likewise.
2671         (grub_rescue_cmd_boot): Move to minicmd.c
2672         (grub_rescue_cmd_help): Likewise.
2673         (grub_rescue_cmd_info): Likewise.
2674         (grub_rescue_cmd_boot): Likewise.
2675         (grub_rescue_cmd_testload): Likewise.
2676         (grub_rescue_cmd_dump): Likewise.
2677         (grub_rescue_cmd_rmmod): Likewise.
2678         (grub_rescue_cmd_lsmod): Likewise.
2679         (grub_rescue_cmd_exit): Likewise.
2680         (grub_rescue_print_devices): Moved to corecmd.c.
2681         (grub_rescue_print_files): Likewise.
2682         (grub_rescue_cmd_ls): Likewise.
2683         (grub_rescue_cmd_insmod): Likewise.
2684         (grub_rescue_cmd_set): Likewise.
2685         (grub_rescue_cmd_unset): Likewise.
2686         (attempt_normal_mode): Use grub_command_find to get normal module.
2687         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2688         commands, remove grub_rescue_register_command calls.
2690         * normal/command.c (grub_register_command): Removed.
2691         (grub_unregister_command): Likewise.
2692         (grub_command_find): Likewise.
2693         (grub_iterate_commands): Likewise.
2694         (rescue_command): Likewise.
2695         (export_command): Moved to corecmd.c.
2696         (set_command): Removed.
2697         (unset_command): Likewise.
2698         (insmod_command): Likewise.
2699         (rmmod_command): Likewise.
2700         (lsmod_command): Likewise.
2701         (grub_command_init): Likewise.
2703         * normal/completion.c (iterate_command): Use cmd->prio to check for
2704         active command.
2705         (complete_arguments): Use grub_extcmd_t structure to find options.
2706         (grub_normal_do_completion): Change function grub_iterate_commands to
2707         grub_command_iterate.
2709         * normal/execute.c (grub_script_execute_cmd): No need to parse
2710         argument here.
2712         * normal/main.c (grub_dyncmd_dispatcher): New function.
2713         (read_command_list): Register unload commands as dyncmd.
2714         (grub_cmd_normal): Use new command interface, register rescue,
2715         unregister normal at entry, register normal, unregister rescue at exit.
2717         * include/grub/list.h (grub_list_test_t): New type.
2718         (grub_list_iterate): Return int instead of void.
2719         (grub_list_insert): New function.
2720         (GRUB_AS_NAMED_LIST_P): New macro.
2721         (GRUB_AS_PRIO_LIST): Likewise.
2722         (GRUB_AS_PRIO_LIST_P): Likewise.
2723         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2724         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2725         (grub_prio_list): New structure.
2726         (grub_prio_list_insert): New function.
2727         (grub_prio_list_remove): New inline function.
2729         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2730         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2731         (GRUB_COMMAND_FLAG_MENU): Likewise.
2732         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2733         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2734         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2735         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2736         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2737         (grub_command): Likewise.
2738         (grub_register_command): Likewise.
2739         (grub_command_find): Likewise.
2740         (grub_iterate_commands): Likewise.
2741         (grub_command_init): Likewise.
2742         (grub_arg_parse): Likewise.
2743         (grub_arg_show_help): Likewise.
2745         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2746         (grub_rescue_unregister_command): Likewise.
2748         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2749         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2750         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2752         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2753         grub_rescue_cmd_initrd.
2754         * include/grub/i386/loader.h: Likewise.
2755         * include/grub/x86_64/loader.h: Likewise.
2757         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2759 2009-03-21  Bean  <bean123ch@gmail.com>
2761         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2762         instead of stat in mingw environment.
2764         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2766         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2768         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2769         AC_CONFIG_LINKS.
2771 2009-03-21  Bean  <bean123ch@gmail.com>
2773         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2774         out of range error.
2776 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2778         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2779         checking inode flags for EXT4_EXTENTS_FLAG.
2781 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2783         * loader/i386/linux.c: Include `<grub/video.h>' and
2784         `<grub/i386/pc/vbe.h>'..
2785         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2786         (grub_linux32_boot): Attempt to configure video settings with
2787         grub_linux_setup_video().
2788         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2789         to avoid grub_console_fini() which would step out of graphical mode
2790         unconditionally.
2792 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2794         Fix build on powerpc.
2795         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2797 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2799         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2800         background image command.
2802 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2804         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2805         (grub_gfxterm_putchar): Extract pairs of identical calls to
2806         draw_cursor out of conditional blocks.
2808 2009-03-11  Pavel Roskin  <proski@gnu.org>
2810         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2811         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2813 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2815         * loader/i386/multiboot_elfxx.c
2816         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2818 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2820         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2821         `kern/handler.c'.
2823 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2825         * loader/i386/multiboot.c (code_size): New variable.
2826         (grub_multiboot): Define offsets by adding to `code_size' rather
2827         than subtracting from `grub_multiboot_payload_size'.  Provide
2828         4-byte alignment to MBI and others by increasing
2829         `boot_loader_name_length' appropriately.
2831         * loader/i386/multiboot_elfxx.c
2832         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2834 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
2836         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
2837         `fs/ext2.c'.
2839 2009-03-08  Robert Millan  <rmh@aybabtu.com>
2841         Make loader/i386/linux.c usable on i386-pc again.
2843         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
2844         memory to heap.
2845         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
2846         `#error' stanza.
2848 2009-03-07  Bean  <bean123ch@gmail.com>
2850         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
2851         allocation.
2853 2009-03-06  Robert Millan  <rmh@aybabtu.com>
2855         Fix display issue on terminals with screen size other than 80x25
2856         (e.g. gfxterm with resolution higher than 640x480).
2858         * normal/main.c (grub_normal_init_page): Display title text in a
2859         position relative to the center of the terminal instead of relying
2860         on a hardcoded offset.
2862 2009-03-04  Robert Millan  <rmh@aybabtu.com>
2864         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
2865         installed.
2867         * Makefile.in (host_kernel): New variable.
2868         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
2869         scripts instead of just the windows one.
2870         * configure.ac: Initialize and AC_SUBST `host_kernel'.
2872 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2874         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
2875         `kern/handler.c'.
2876         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
2877         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2878         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
2879         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2880         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2881         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
2883 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2885         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
2886         or if there's no space for the disk label and print the partition number on a
2887         invalid magic.
2889 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
2891         * util/misc.c: Include <time.h>.
2892         (grub_millisleep): New function.
2894 2009-03-04  Bean  <bean123ch@gmail.com>
2896         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
2897         another option -mno-red-zone.
2899         * commands/handler.c: Change module description.
2901         * kern/handler.c: Add missing space at the end of description line.
2903         * kern/list.c: Likewise.
2905 2009-03-03  Robert Millan  <rmh@aybabtu.com>
2907         Move more components to the relocation area, and fix mbi pointer
2908         handling to use the destination rather than the origin (thanks to
2909         Vladimir Serbinenko for spotting).
2911         * loader/i386/multiboot.c (mbi_dest): New variable.
2912         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
2913         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
2914         relocation area.
2916 2009-03-01  Bean  <bean123ch@gmail.com>
2918         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
2919         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
2920         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
2921         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
2923         * loader/i386/efi/linux.c (acpi_guid): New variable.
2924         (acpi_guid): Likewise.
2925         (EBDA_SEG_ADDR): New constant.
2926         (LOW_MEM_ADDR): Likewise.
2927         (FAKE_EBDA_SEG): Likewise.
2928         (fake_bios_data): New function.
2929         (grub_linux_boot): Call fake_bios_data.
2931 2009-03-01  Bean  <bean123ch@gmail.com>
2933         * commands/terminal.c: Removed.
2935         * commands/handler.c: New file.
2937         * include/grub/list.h: Likewise.
2939         * include/grub/handler.h: Likewise.
2941         * kern/list.c: Likewise.
2943         * kern/handler.c: Likewise.
2945         * kern/term.h: Include header file <grub/handler.h>.
2946         (grub_term_input): Move next field to the beginning.
2947         (grub_term_output): Likewise.
2948         (grub_term_input_class): New variable.
2949         (grub_term_output_class): Likewise.
2950         (grub_term_register_input): Changed to inline function.
2951         (grub_term_register_output): Likewise.
2952         (grub_term_unregister_input): Likewise.
2953         (grub_term_unregister_output): Likewise.
2954         (grub_term_set_current_input): Likewise.
2955         (grub_term_set_current_output): Likewise.
2956         (grub_term_get_current_input): Likewise.
2957         (grub_term_get_current_output): Likewise.
2958         (grub_term_iterate_input): Removed.
2959         (grub_term_iterate_output): Likewise.
2961         * kern/term.c (grub_term_list_input): Removed.
2962         (grub_term_list_output): Likewise.
2963         (grub_term_input_class): New variable.
2964         (grub_term_output_class): Likewise.
2965         (grub_cur_term_input): Change variable as macro.
2966         (grub_cur_term_output): Likewise.
2967         (grub_term_register_input): Removed.
2968         (grub_term_register_output): Likewise.
2969         (grub_term_unregister_input): Likewise.
2970         (grub_term_unregister_output): Likewise.
2971         (grub_term_set_current_input): Likewise.
2972         (grub_term_set_current_output): Likewise.
2973         (grub_term_iterate_input): Likewise.
2974         (grub_term_iterate_output): Likewise.
2975         (grub_term_get_current_input): Likewise.
2976         (grub_term_get_current_output): Likewise.
2978         * util/grub-editenv.c: Include header file <grub/handler.h>.
2979         (grub_term_get_current_input): Removed.
2980         (grub_term_get_current_output): Likewise.
2981         (grub_term_input_class): New variable.
2982         (grub_term_output_class): Likewise.
2984         * util/grub-fstest.c (grub_term_get_current_input): Removed.
2985         (grub_term_get_current_output): Likewise.
2986         (grub_term_input_class): New variable.
2987         (grub_term_output_class): Likewise.
2989         * util/grub-probe.c (grub_term_get_current_input): Removed.
2990         (grub_term_get_current_output): Likewise.
2991         (grub_term_input_class): New variable.
2992         (grub_term_output_class): Likewise.
2994         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
2995         (grub_term_get_current_output): Likewise.
2996         (grub_term_input_class): New variable.
2997         (grub_term_output_class): Likewise.
2999         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3000         (terminal_mod_SOURCES): Likewise.
3001         (terminal_mod_CFLAGS): Likewise.
3002         (terminal_mod_LDFLAGS): Likewise.
3004         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3005         handler.c.
3006         (kernel_img_SOURCES): Add list.c and handler.c.
3007         (kernel_img_HEADERS): Add list.h and handler.h.
3009         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3010         handler.c.
3011         (kernel_mod_SOURCES): Add list.c and handler.c.
3012         (kernel_mod_HEADERS): Add list.h and handler.h.
3014         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3015         handler.c.
3016         (kernel_elf_SOURCES): Add list.c and handler.c.
3017         (kernel_elf_HEADERS): Add list.h and handler.h.
3019         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3020         handler.c.
3021         (kernel_elf_SOURCES): Add list.c and handler.c.
3022         (kernel_elf_HEADERS): Add list.h and handler.h.
3024         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3025         handler.c.
3026         (kernel_mod_SOURCES): Add list.c and handler.c.
3027         (kernel_mod_HEADERS): Add list.h and handler.h.
3029         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3030         handler.c.
3031         (kernel_elf_SOURCES): Add list.c and handler.c.
3032         (kernel_elf_HEADERS): Add list.h and handler.h.
3034 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3036         Factorize elf32 / elf64 code in Multiboot loader.  This will
3037         prevent it from getting out of sync again.
3039         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3040         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3041         grub_multiboot_load_elf64): Move from here ...
3042         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3043         grub_multiboot_load_elf): ... to here (new file).
3045 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3047         * util/grub.d/10_linux.in: Rename "single-user mode" to
3048         "recovery mode".
3050 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3052         Don't leak in SCSI code.
3053         * disk/scsi.c (grub_scsi_close): free `scsi'.
3055 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3057         * loader/i386/pc/multiboot.c: Move from here ...
3058         * loader/i386/multiboot.c: ... to here.  Update all users.
3060 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3062         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3063         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3065 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3067         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3068         b-tree.
3070 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3072         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3073         `0x' qualifier as 0 when base is specified as parameter).
3075 2009-02-24  Bean  <bean123ch@gmail.com>
3077         * configure.ac: Check for -mcmodel=large in x86_64 target.
3079         * include/grub/efi/api.h (efi_call_10): New macro.
3080         (efi_wrap_10): New function.
3082         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3083         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3084         (GRUB_PE32_REL_BASED_LOW): Likewise.
3085         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3086         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3087         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3088         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3089         (GRUB_PE32_REL_BASED_REL): Likewise.
3090         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3091         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3092         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3094         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3095         issue.
3097         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3098         (efi_wrap_10): New function.
3100         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3102         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3103         MB/MBP model (NV chipset).
3104         (devdata_devs): Add devpath_5 to the list.
3106         * load/i386/efi/linux.c (video_base): Remove variable.
3107         (RGB_MASK): New macro.
3108         (RGB_MAGIC): Likewise.
3109         (LINE_MIN): Likewise.
3110         (LINE_MAX): Likewise.
3111         (FBTEST_STEP): Likewise.
3112         (FBTEST_COUNT): Likewise.
3113         (fb_list): New variable.
3114         (grub_find_video_card): Remove function.
3115         (find_framebuf): New function.
3116         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3117         line length.
3119         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3120         problem for x86_64.
3122 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3124         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3126         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3127         coding tool name.
3129 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3131         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3132         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3133         in our relocation, instead of using it directly from heap.  Also
3134         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3136 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3138         Implement USB keyboard support (based on patch by Marco Gerards)
3140         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3141         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3142         (usb_keyboard_mod_LDFLAGS): New variables.
3144         * term/usb_keyboard.c: New file.
3146 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3148         Corrected wrong declaration
3150         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3152 2009-02-14  Christian Franke  <franke@computer.org>
3154         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3155         (grub_lspci_iter): Print class code and programming interface byte.
3157 2009-02-14  Christian Franke  <franke@computer.org>
3159         * gendistlist.sh: Ignore `.svn' directories.
3161 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3163         * fs/fat.c: Add 2009 to Copyright line.
3165 2009-02-14  Christian Franke  <franke@computer.org>
3167         * commands/hdparm.c: New file.  Provides `hdparm' command
3168         which sends ATA commands via grub_disk_ata_pass_through ().
3170         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3172         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3173         and <grub/cpu/io.h> to include/grub/ata.h.
3174         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3175         (GRUB_CDROM_SECTOR_SIZE): Remove.
3176         (GRUB_ATA_*): Move to include/grub/ata.h.
3177         (GRUB_ATAPI_*): Likewise.
3178         (enum grub_ata_commands): Likewise.
3179         (enum grub_ata_timeout_milliseconds): Likewise.
3180         (struct grub_ata_device): Likewise.
3181         (grub_ata_regset): Likewise.
3182         (grub_ata_regget): Likewise.
3183         (grub_ata_regset2): Likewise.
3184         (grub_ata_regget2): Likewise.
3185         (grub_ata_check_ready): Likewise.
3186         (grub_ata_wait_not_busy): Remove static, exported in
3187         include/grub/ata.h.
3188         (grub_ata_wait_drq): Likewise.
3189         (grub_ata_pio_read): Likewise.
3191         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3192         function for hdparm.mod.
3194         * include/grub/ata.h: New file, contains declarations from
3195         disk/ata.c.
3196         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3198         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3199         (grub_disk_ata_pass_through): New exported variable.
3201         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3203 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3205         Support multiple fallback entries, and provide an API to support
3206         executing default+fallback menu entries.  Renamed the `terminal' menu
3207         viewer to `text'.
3209         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3210         variable declaration.
3211         (grub_menu_execute_callback): New structure declaration.
3212         (grub_menu_execute_callback_t): New typedef.
3213         (grub_menu_execute_with_fallback): New function declaration.
3214         (grub_menu_get_entry): Likewise.
3215         (grub_menu_get_timeout): Likewise.
3216         (grub_menu_set_timeout): Likewise.
3218         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3220         * normal/menu.c (grub_wait_after_message): Moved to
3221         `normal/menu_text.c'.
3222         (draw_border): Likewise.
3223         (print_message): Likewise.
3224         (print_entry): Likewise.
3225         (print_entries): Likewise.
3226         (grub_menu_init_page): Likewise.
3227         (get_entry_number): Likewise.
3228         (print_timeout): Likewise.
3229         (run_menu): Likewise.
3230         (grub_menu_execute_entry): Likewise.
3231         (show_text_menu): Likewise.
3232         (get_and_remove_first_entry_number): New function.
3233         (grub_menu_execute_with_fallback): Likewise.
3234         (get_entry): Renamed to ...
3235         (grub_menu_get_entry): .. this and made it global.
3236         (get_timeout): Renamed to ...
3237         (grub_menu_get_timeout): ... this and made it global.
3238         (set_timeout): Renamed to ...
3239         (grub_menu_set_timeout): ... this and made it global.
3240         (grub_normal_terminal_menu_viewer): Renamed to ...
3241         (grub_normal_text_menu_viewer): ... this.
3243         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3244         from normal/menu.c.
3246         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3247         (normal_mod_SOURCES): Likewise.
3249         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3250         (normal_mod_SOURCES): Likewise.
3252         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3253         (normal_mod_SOURCES): Likewise.
3255         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3256         (normal_mod_SOURCES): Likewise.
3258         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3259         (normal_mod_SOURCES): Likewise.
3261         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3262         (normal_mod_SOURCES): Likewise.
3264         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3265         (normal_mod_SOURCES): Likewise.
3267 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3269         * util/grub.d/00_header.in: Update old reference to `font' command.
3271 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3273         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3275         Based on patch from Javier Martín.
3277 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3279         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3280         to avoid false positives with FAT.
3281         (grub_fstest_SOURCES): Likewise.
3282         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3283         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3284         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3285         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3286         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3287         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3289 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3291         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3292         bpb.version_specific.fat12_or_fat16.fstype and
3293         bpb.version_specific.fat32.fstype.
3295 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3297         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3299 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3301         * Makefile.in (host_os, host_cpu): New variables.
3302         (target_os): Remove.  Update all users.
3304 2009-02-08  Marco Gerards  <marco@gnu.org>
3306         * Makefile.in (enable_grub_emu_usb): New variable.
3307         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3308         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3309         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3310         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3311         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3312         `usbtest.mod' and `usbms.mod'.
3313         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3314         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3315         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3316         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3317         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3318         variables.
3320         * disk/usbms.c: New file.
3322         * include/grub/usb.h: Likewise.
3324         * include/grub/usbtrans.h: Likewise.
3326         * include/grub/usbdesc.h: Likewise.
3328         * bus/usb/usbtrans.c: Likewise.
3330         * bus/usb/ohci.c: Likewise.
3332         * bus/usb/uhci.c: Likewise.
3334         * bus/usb/usbhub.c: Likewise.
3336         * bus/usb/usb.c: Likewise.
3338         * commands/usbtest.c: Likewise.
3340         * util/usb.c: Likewise.
3342         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3344         * configure.ac: Test for libusb presence.
3346         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3348 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3350         * kern/mm.c: Add more comments.
3352 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3354         Patch from Javier Martín.
3355         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3356         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3358 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3360         * fs/cpio.c: Split tar functionality to ...
3361         * fs/tar.c: ... here (new file).  Update all users.
3363 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3365         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3366         backward-incompatible features.
3368         Based on patch from Javier Martín, with some adjustments.
3370 2009-02-07  Michael Scherer  <misc@mandriva.org>
3372         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3374 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3376         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3377         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3378         after the RAID stuff.
3380 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3382         Fixes problem when running vbetest command as reported by
3383         Vladimir Serbinenko <phcoder@gmail.com>.
3385         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3387 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3389         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3390         /dev/md/NpN style mdraid devices.
3392 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3394         * util/unifont2pff.rb: Remove.
3396 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3398         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3399         `#'.
3401 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3403         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3404         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3405         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3406         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3407         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3408         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3409         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3411 2009-02-02  Christian Franke  <franke@computer.org>
3413         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3415 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3417         * INSTALL: Note that we now require at least autoconf 2.59 and
3418         that LZO is optional.
3420 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3422         Base on patch on bug #24154 created by Tomas Tintera
3423         <trosos@seznam.cz>.
3425         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3427 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3429         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3430         <bero@arklinux.org>.
3432         * normal/parser.y (script_init): Add missing semicolon.
3434 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3436         * normal/main.c: Add include to grub/menu_viewer.h.
3437         (free_menu_entry_classes): Added.
3438         (grub_normal_menu_addentry): Added class property handling.
3439         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3440         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3442         * normal/menu_viewer.c: New file.
3444         * normal/menu.c (run_menu_entry): Renamed to ...
3445         (grub_menu_execute_entry): ... this and made it as global.
3446         (grub_menu_run): Renamed to ...
3447         (show_text_menu): ... this and made it local.
3448         (show_text_menu): Adapt to new function names.
3449         (grub_normal_terminal_menu_viewer): New global variable.
3451         * include/grub/menu.h: New file.
3453         * include/grub/menu_viewer.h: New file.
3455         * include/grub/normal.h: Added include to grub/menu.h.
3456         (grub_menu_entry): Moved to include/grub/menu.h.
3457         (grub_menu_entry_t): Likewise.
3458         (grub_menu): Likewise.
3459         (grub_menu_t): Likewise.
3460         (grub_normal_terminal_menu_viewer): Added.
3461         (grub_menu_execute_entry): Likewise.
3462         (grub_menu_run): Removed.
3464         * DISTLIST: Added include/grub/menu.h.
3465         Added include/grub/menu_viewer.h.
3466         Added normal/menu_viewer.c.
3468 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3470         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3471         arglist for menutitle arguments.
3473         * normal/main.c (grub_normal_menu_addentry): Likewise.
3475         * normal/parser.y (menuentry): Likewise.
3477         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3479         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3480         (grub_script_create_cmdmenu): Likewise.
3482         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3484         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3485         changes.
3487         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3489         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3491         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3493         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3495         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3497         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3499 2009-01-30  Christian Franke  <franke@computer.org>
3501         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3502         in option help text.
3504 2009-01-27  Pavel Roskin  <proski@gnu.org>
3506         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3508 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3510         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3512         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3514         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3515         unregister function.
3517 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3519         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3521         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3523         * util/grub-mkfont.c (usage): Fix typo.
3525         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3527 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3529         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3531         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3533         * kern/misc.c (grub_strcasecmp): New function.
3534         (grub_strcasecmp): Use grub_size_t instead of int for length.
3535         Fix return value.
3536         * include/grub/misc.h: Update function prototypes.
3538 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3540         * configure.ac: Fix cross-compilation check.
3542 2009-01-22  Christian Franke  <franke@computer.org>
3544         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3545         (precision) digit string.  Allow `.format2' without `format1' (width).
3546         Limit input chars for `%s' output to `format2' if specified.  This is
3547         compatible with standard printf ().
3549 2009-01-22  Christian Franke  <franke@computer.org>
3551         * disk/ata.c (grub_ata_wait_status): Replace by ...
3552         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3553         other status bits may be invalid while BSY is asserted.
3554         (grub_ata_check_ready): New function.
3555         (grub_ata_cmd): Removed.
3556         (grub_ata_wait_drq): New function.
3557         (grub_ata_strncpy): Remove inline.
3558         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3559         and error check now done by grub_ata_wait_drq ().
3560         (grub_ata_pio_write): Likewise.
3561         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3562         grub_ata_wait_drq () to wait for data.
3563         (grub_ata_device_initialize): Add status register check to
3564         detect missing SATA slave devices.  Add debug messages.
3565         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3566         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3567         transfer loop by grub_ata_pio_write ().
3568         (grub_ata_identify): Set DEV before check for !BSY. Use
3569         grub_ata_wait_drq () to wait for data.
3570         (grub_ata_setaddress): Set DEV before check for !BSY.
3571         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3572         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3573         command on (size % batch) == 0.  Add missing error check after write of
3574         last block.  Add debug messages.
3575         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3577 2009-01-19  Christian Franke  <franke@computer.org>
3579         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3580         (GRUB_ATAPI_IREASON_*): Likewise.
3581         (grub_ata_pio_write): Fix timeout error return.
3582         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3583         (grub_atapi_wait_drq): New function.
3584         (grub_atapi_packet): New parameter `size'.
3585         Use grub_atapi_wait_drq () and direct write instead of
3586         grub_ata_pio_write ().
3587         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3588         reads the number of bytes requested by the device for each DRQ
3589         assertion.
3590         (grub_atapi_write): Remove old implementation, return not
3591         implemented instead.
3593 2009-01-19  Christian Franke  <franke@computer.org>
3595         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3596         of 512 to calculate data size.
3597         (grub_scsi_read12): Likewise.
3598         (grub_scsi_write10): Likewise.
3599         (grub_scsi_write12): Likewise.
3600         (grub_scsi_read): Adjust size according to blocksize.
3601         Add checks for invalid blocksize and unaligned transfer.
3603 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3605         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3607         * term/gfxterm.c (write_char): Fix background rendering for wide
3608         width glyphs.
3610 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3612         * config.guess: Update to latest version from config git.
3613         * config.sub: Likewise.
3615 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3617         * Makefile.in: Change font compilation to use new grub-mkfont instead
3618         of java version.
3620         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3621         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3622         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3623         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3624         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3625         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3626         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3627         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3628         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3630 2009-01-16  Christian Franke  <franke@computer.org>
3632         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3633         (enum grub_ata_timeout_milliseconds): New enum.
3634         (grub_ata_wait_status): Add parameter milliseconds.
3635         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3636         recovery from timed-out commands.
3637         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3638         return grub_errno instead of REG_ERROR.
3639         (grub_ata_pio_write): Add parameter milliseconds.
3640         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3641         Pass milliseconds to grub_ata_wait_status () and
3642         grub_ata_pio_read ().
3643         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3644         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3645         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3646         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3647         It is not suitable for device detection, because DEV bit is ignored,
3648         the command may run too long, and not all devices set the signature
3649         properly.
3650         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3651         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3652         Fix device selection, DEV bit must be set first to address the registers
3653         of the correct device.
3654         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3655         grub_ata_pio_read/write ().
3656         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3657         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3659 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3661         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3663 2009-01-13  Bean  <bean123ch@gmail.com>
3665         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3667 2009-01-13  Bean  <bean123ch@gmail.com>
3669         * Makefile.in: (enable_grub_mkfont): New variable.
3670         (freetype_cflags): Likewise.
3671         (freetype_libs): Likewise.
3673         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3674         (grub_mkfont_SOURCES): New variable.
3675         (grub_mkfont_CFLAGS): Likewise.
3676         (grub_mkfont_LDFLAGS): Likewise.
3678         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3679         library if `--enable-grub-mkfont' is requested.
3680         (enable_grub_mkfont): New variable.
3681         (freetype_cflags): Likewise.
3682         (freetype_libs): Likewise.
3684         * util/grub-mkfont.c: New file.
3686 2009-01-12  Christian Franke  <franke@computer.org>
3688         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3689         mode check.  Fix setting of compat_use[].
3691 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3693         Update a few copyright years which we forgot to do in 2008 (only for
3694         files whose changes made in 2008 were copyright-significant)
3696         * Makefile.in: Add 2008 to Copyright line.
3697         * disk/ieee1275/ofdisk.c: Likewise.
3698         * disk/efi/efidisk.c: Likewise.
3699         * kern/dl.c: Likewise.
3700         * kern/sparc64/ieee1275/init.c: Likewise.
3701         * kern/mm.c: Likewise.
3702         * kern/efi/mm.c: Likewise.
3703         * boot/i386/pc/boot.S: Likewise.
3704         * genfslist.sh: Likewise.
3705         * fs/iso9660.c: Likewise.
3706         * fs/hfs.c: Likewise.
3707         * fs/jfs.c: Likewise.
3708         * fs/minix.c: Likewise.
3709         * fs/ufs.c: Likewise.
3710         * gensymlist.sh.in: Likewise.
3711         * genkernsyms.sh.in: Likewise.
3712         * include/grub/misc.h: Likewise.
3713         * include/grub/types.h: Likewise.
3714         * include/grub/symbol.h: Likewise.
3715         * include/grub/elf.h: Likewise.
3716         * include/grub/kernel.h: Likewise.
3717         * include/grub/disk.h: Likewise.
3718         * include/grub/dl.h: Likewise.
3719         * include/grub/i386/linux.h: Likewise.
3720         * include/grub/i386/pc/biosdisk.h: Likewise.
3721         * include/grub/efi/api.h: Likewise.
3722         * include/grub/efi/pe32.h: Likewise.
3723         * include/grub/util/misc.h: Likewise.
3724         * normal/execute.c: Likewise.
3725         * normal/arg.c: Likewise.
3726         * normal/completion.c: Likewise.
3727         * normal/lexer.c: Likewise.
3728         * normal/parser.y: Likewise.
3729         * normal/misc.c: Likewise.
3730         * commands/i386/pc/vbeinfo.c: Likewise.
3731         * commands/hexdump.c: Likewise.
3732         * commands/terminal.c: Likewise.
3733         * commands/ls.c: Likewise.
3734         * commands/help.c: Likewise.
3735         * partmap/pc.c: Likewise.
3736         * loader/efi/chainloader.c: Likewise.
3737         * loader/multiboot_loader.c: Likewise.
3738         * loader/i386/pc/multiboot2.c: Likewise.
3739         * term/efi/console.c: Likewise.
3740         * term/i386/pc/serial.c: Likewise.
3741         * util/lvm.c: Likewise.
3742         * util/console.c: Likewise.
3743         * util/i386/efi/grub-mkimage.c: Likewise.
3744         * util/raid.c: Likewise.
3746 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3748         * commands/videotest.c: Removed include to grub/machine/memory.h.
3750         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3751         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3752         (video_mod_SOURCES): Removed.
3753         (video_mod_CFLAGS): Likewise.
3754         (video_mod_LDFLAGS): Likewise.
3755         (gfxterm_mod_SOURCES): Likewise.
3756         (gfxterm_mod_CFLAGS): Likewise.
3757         (gfxterm_mod_LDFLAGS): Likewise.
3758         (videotest_mod_SOURCES): Likewise.
3759         (videotest_mod_CFLAGS): Likewise.
3760         (videotest_mod_LDFLAGS): Likewise.
3761         (bitmap_mod_SOURCES): Likewise.
3762         (bitmap_mod_CFLAGS): Likewise.
3763         (bitmap_mod_LDFLAGS): Likewise.
3764         (tga_mod_SOURCES): Likewise.
3765         (tga_mod_CFLAGS): Likewise.
3766         (tga_mod_LDFLAGS): Likewise.
3767         (jpeg_mod_SOURCES): Likewise.
3768         (jpeg_mod_CFLAGS): Likewise.
3769         (jpeg_mod_LDFLAGS): Likewise.
3770         (png_mod_SOURCES): Likewise.
3771         (png_mod_CFLAGS): Likewise.
3772         (png_mod_LDFLAGS): Likewise.
3774         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3775         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3776         (video_mod_SOURCES): Added.
3777         (video_mod_CFLAGS): Likewise.
3778         (video_mod_LDFLAGS): Likewise.
3779         (videotest_mod_SOURCES): Likewise.
3780         (videotest_mod_CFLAGS): Likewise.
3781         (videotest_mod_LDFLAGS): Likewise.
3782         (bitmap_mod_SOURCES): Likewise.
3783         (bitmap_mod_CFLAGS): Likewise.
3784         (bitmap_mod_LDFLAGS): Likewise.
3785         (tga_mod_SOURCES): Likewise.
3786         (tga_mod_CFLAGS): Likewise.
3787         (tga_mod_LDFLAGS): Likewise.
3788         (jpeg_mod_SOURCES): Likewise.
3789         (jpeg_mod_CFLAGS): Likewise.
3790         (jpeg_mod_LDFLAGS): Likewise.
3791         (png_mod_SOURCES): Likewise.
3792         (png_mod_CFLAGS): Likewise.
3793         (png_mod_LDFLAGS): Likewise.
3794         (gfxterm_mod_SOURCES): Likewise.
3795         (gfxterm_mod_CFLAGS): Likewise.
3796         (gfxterm_mod_LDFLAGS): Likewise.
3798         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3799         grub/machine/console.h.
3801 2009-01-04  Jerone Young  <jerone@gmail.com>
3803         Make on screen instructions clearer
3805         Based on patch created by Jidanni <jidanni@jidanni.org>
3807         * normal/menu.c: print clearer instructions on the screen
3809 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3811         New font engine.
3813         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3814         build system and fixed gfxterm.c to work with different sized fonts.
3816         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3818         * configure: Re-generated.
3820         * DISTLIST: Removed font/manager.c.
3821         Added font/font.c.
3822         Added font/font_cmd.c.
3824         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3825         compilation.
3827         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3829         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3831         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3833         * normal/menu.c: Likewise.
3835         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
3836         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
3838         * include/grub/font.h: Replaced with new file.
3840         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
3841         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
3842         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
3843         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
3844         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
3845         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
3846         fg_red, fg_green, fg_blue, fg_alpha.
3847         (grub_video_adapter): Removed blit_glyph.
3848         (grub_video_blit_glyph): Removed.
3850         * font/manager.c: Removed file.
3852         * font/font.c: New file.
3854         * font/font_cmd.c: Likewise.
3856         * video/video.c (grub_video_blit_glyph): Removed.
3858         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
3859         (grub_video_vbe_map_rgba): Likewise.
3860         (grub_video_vbe_unmap_color_int): Likewise.
3861         (grub_video_vbe_blit_glyph): Removed.
3862         (grub_video_vbe_adapter): Removed blit_glyph.
3864         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
3865         (get_pixel): Likewise.
3866         (set_pixel): Likewise.
3868         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
3870         * term/gfxterm.c: Adapted to new font engine.
3872         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
3874         * term/i386/pc/vga.c: Likewise.
3876         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
3878         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3880         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3882         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3884         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3886         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3888         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3890         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3892         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3894         * util/grub.d/00_header.in: Changed to use new loadfont command.
3896         * util/grub-mkconfig_lib.in: Changed font extension.
3898 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
3900         * util/getroot.c (grub_util_get_grub_dev): Add support for
3901         /dev/md/dNNpNN style partitionable mdraid devices.
3903 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
3905         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
3906         at a time limit of the PXE TFTP API correctly.
3907         (grub_pxefs_close): Likewise.
3909 2008-11-29  Robert Millan  <rmh@aybabtu.com>
3911         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
3912         grub_ata_device_initialize() calls.
3914 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
3916         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
3917         iteration failed.
3918         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
3920 2008-11-28  Robert Millan  <rmh@aybabtu.com>
3922         Fix build on powerpc-ieee1275.  Based on patch created by
3923         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
3924         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
3925         `kern/ieee1275/mmap.c'.
3926         * include/grub/powerpc/ieee1275/memory.h: New file.
3928         Provide grub-install on coreboot.
3929         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
3930         (grub_install_SOURCES): New variable.
3931         * util/i386/pc/grub-install.in: Add a few condition checks to make it
3932         usable on coreboot.
3934 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
3936         * util/grub-fstest.c (grub_term_get_current_input): Change return type
3937         to `grub_term_input_t'.
3938         (grub_term_get_current_output): Change return type to
3939         `grub_term_output_t'.
3941 2008-11-22  Robert Millan  <rmh@aybabtu.com>
3943         Fix breakage on coreboot due to declaration mismatch.
3944         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
3945         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
3946         grub_vga_text_cls().
3948         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
3949         comments.  Avoid copying one more byte than necessary (just in case).
3951         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
3952         to 0x200000 (avoids trouble with some OFW implementations, and matches
3953         with the one in Yaboot).
3954         Reported by Manoel Abranches
3956 2008-11-20  Robert Millan  <rmh@aybabtu.com>
3958         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
3959         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
3961         * util/grub-mkconfig_lib.in (grub_warn): New function.
3962         (convert_system_path_to_grub_path): Use grub_warn() when issuing
3963         warnings, to obtain consistent formatting.
3964         * util/grub.d/00_header.in: Likewise.
3965         * util/update-grub_lib.in: Likewise.
3967         * loader/i386/linux.c (allocate_pages): Fix a warning.
3968         Move comment text to `#error' stanza.
3970         Harmonize ieee1275's grub_available_iterate() with the generic
3971         grub_machine_mmap_iterate() interface (fixes a recently-introduced
3972         build problem on i386-ieee1275):
3973         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
3974         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
3975         parameter `type'.  Update all users of this function.
3976         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
3977         `kern/ieee1275/mmap.c'.
3978         * kern/ieee1275/init.c
3979         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
3980         with ...
3981         (grub_machine_mmap_iterate): ... this.
3982         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
3983         return type to `grub_err_t'.  Update all implementations of this
3984         function prototype.
3985         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
3986         Likewise.
3988         Add `lsmmap' command (lists firmware-provided memory map):
3989         * commands/lsmmap.c: New file.
3990         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
3991         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
3992         variables.
3993         * conf/powerpc-ieee1275.rmk: Likewise.
3994         * conf/i386-coreboot.rmk: Likewise.
3995         * conf/i386-ieee1275.rmk: Likewise.
3997 2008-11-19  Robert Millan  <rmh@aybabtu.com>
3999         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4000         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4001         constraints to initrd allocation (based on code from
4002         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4003         for Linux to find it.
4005 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4007         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4008         order to cope with duplicate slashes.
4010 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4012         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4013         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4014         don't want to mess with lower memory, because it is used in the Linux
4015         loader.
4017         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4018         an appropriate place in lower memory, between 0x10000 and 0x90000,
4019         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4020         is in our heap (probably as a result of it being corrupted during
4021         decompression).  Add #error instance with comment to explain why this
4022         loader isn't currently usable on PC/BIOS.
4024 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4026         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4027         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4029 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4031         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4033         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4034         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4035         from here ...
4036         * include/grub/i386/pc/memory.h: ... to here.
4038 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4040         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4041         split).
4043         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4044         (grub_console_cur_color, grub_console_real_putchar)
4045         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4046         (grub_console_setcolorstate, grub_console_setcolor)
4047         (grub_console_getcolor): Move from here ...
4048         * include/grub/i386/vga_common.h: ... to here (new file).
4050         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4051         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4052         `<grub/i386/io.h>'.
4053         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4054         `<grub/i386/vga_common.h>'.
4056 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4058         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4059         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4060         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4061         variables.
4062         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4063         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4065         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4066         grub_console_init() with call to grub_vga_text_init().
4067         (grub_machine_fini): Replace call to
4068         grub_console_fini() with call to grub_vga_text_fini() and
4069         grub_at_keyboard_fini().
4071         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4072         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4073         (grub_console_setcolorstate, grub_console_setcolor)
4074         (grub_console_getcolor): New function prototypes.
4076         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4077         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4078         (grub_vga_text_setcursor): Static-ize.
4079         (grub_vga_text_term): New structure.
4080         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4082         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4083         (grub_console_cur_color, grub_console_standard_color)
4084         (grub_console_normal_color, grub_console_highlight_color)
4085         (map_char, grub_console_putchar, grub_console_getcharwidth)
4086         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4087         (grub_console_getcolor): Move from here ...
4088         * term/i386/vga_common.c: ... to here (same function names).
4090 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4092         Use newly-added Multiboot support in coreboot.
4094         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4095         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4097         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4098         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4099         (codestart): Store the MBI in `startup_multiboot_info' when we're
4100         being loaded using Multiboot.
4102         * kern/i386/coreboot/init.c (grub_machine_init): Move
4103         grub_at_keyboard_init() call to beginning of function (useful for
4104         debugging).  Call grub_machine_mmap_init() before attempting to use
4105         grub_machine_mmap_iterate().
4106         (grub_lower_mem, grub_upper_mem): Move from here ...
4107         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4108         here (new file).
4110         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4111         function prototype.
4113 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4115         Fix a regression introduced by the at_keyboard.mod split.  Because
4116         some terminals are default on some platforms and non-default on
4117         others, the first terminal being registered determines which is
4118         going to be default.
4120         * kern/term.c (grub_term_register_input): If this is the first
4121         terminal being registered, set it as the current one.
4122         (grub_term_register_output): Likewise.
4124         * term/efi/console.c (grub_console_init): Do not call
4125         grub_term_set_current_output() or grub_term_set_current_input().
4126         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4127         * term/i386/pc/console.c (grub_console_init): Likewise.
4128         (grub_console_fini): Do not call grub_term_set_current_input()
4129         (but leave grub_term_set_current_output() to restore text mode).
4131 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4133         * util/grub.d/00_header.in: Add backward compatibility check for
4134         versions of terminal.mod that don't understand `terminal_input' or
4135         `terminal_output'.
4137 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4139         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4140         `terminal_input' / `terminal_output', not `terminal'.
4142 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4144         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4145         (DISTCLEANFILES): Add `build_env.mk'.
4147 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4149         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4150         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4151         members.  Update all users.
4152         * util/console.c (grub_ncurses_term): Split in ...
4153         (grub_ncurses_term_input): ... this, and ...
4154         (grub_ncurses_term_output): ... this.  Update all users.
4155         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4157 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4159         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4160         (PKGDATA): Add $(pkgdata_SRCDIR).
4161         (pkglib_BUILDDIR): New variable.
4162         (pkgdata_SRCDIR): New variable.
4163         (build_env.mk): New target.
4164         (include_DATA): New variable.
4165         (install-local): Install $(include_DATA) files in $(includedir).
4167 2008-11-07  Pavel Roskin  <proski@gnu.org>
4169         * gendistlist.sh: Use C locale for sorting to ensure consistent
4170         output on all systems.
4172         * util/grub.d/00_header.in: Remove incorrect space before
4173         "serial".
4175 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4177         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4178         per specification.
4179         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4180         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4181         (based on find_multi_boot1_header).
4182         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4183         using find_multi_boot2_header(), and abort if neither Multiboot or
4184         Multiboot headers were found.
4186 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4188         Modularize at_keyboard.mod:
4190         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4191         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4192         (at_keyboard_mod_LDFLAGS): New variables.
4194         Actual terminal split:
4196         * include/grub/term.h (struct grub_term): Split in ...
4197         (struct grub_term_input): ... this, and ...
4198         (struct grub_term_output): ... this.  Update all users.
4199         (grub_term_set_current): Split in ...
4200         (grub_term_set_current_input): ... this, and ...
4201         (grub_term_set_current_output): ... this.
4202         (grub_term_get_current): Split in ...
4203         (grub_term_get_current_input): ... this, and ...
4204         (grub_term_get_current_output): ... this.
4205         (grub_term_register): Split in ...
4206         (grub_term_register_input): ... this, and ...
4207         (grub_term_register_output): ... this.
4208         (grub_term_unregister): Split in ...
4209         (grub_term_unregister_input): ... this, and ...
4210         (grub_term_unregister_output): ... this.
4211         (grub_term_iterate): Split in ...
4212         (grub_term_iterate_input): ... this, and ...
4213         (grub_term_iterate_output): ... this.
4215         * kern/term.c (grub_term_list): Split in ...
4216         (grub_term_list_input): ... this, and ...
4217         (grub_term_list_output): ... this.  Update all users.
4218         (grub_cur_term): Split in ...
4219         (grub_cur_term_input): ... this, and ...
4220         (grub_cur_term_output): ... this.  Update all users.
4221         (grub_term_set_current): Split in ...
4222         (grub_term_set_current_input): ... this, and ...
4223         (grub_term_set_current_output): ... this.
4224         (grub_term_get_current): Split in ...
4225         (grub_term_get_current_input): ... this, and ...
4226         (grub_term_get_current_output): ... this.
4227         (grub_term_register): Split in ...
4228         (grub_term_register_input): ... this, and ...
4229         (grub_term_register_output): ... this.
4230         (grub_term_unregister): Split in ...
4231         (grub_term_unregister_input): ... this, and ...
4232         (grub_term_unregister_output): ... this.
4233         (grub_term_iterate): Split in ...
4234         (grub_term_iterate_input): ... this, and ...
4235         (grub_term_iterate_output): ... this.
4237         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4238         a check for input and one for output (and only attempt to get keys
4239         from user when input works).
4241         * util/grub-probe.c (grub_term_get_current): Split in ...
4242         (grub_term_get_current_input): ... this, and ...
4243         (grub_term_get_current_output): ... this.
4244         * util/grub-fstest.c: Likewise.
4245         * util/i386/pc/grub-setup.c: Likewise.
4246         * util/grub-editenv.c: Likewise.
4248         Portability adjustments:
4250         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4251         `term/i386/pc/at_keyboard.c'.
4252         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4253         grub_keyboard_controller_init() (now handled by terminal .init).
4254         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4255         grub_at_keyboard_init().
4256         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4257         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4258         at_keyboard.mod via input terminal interface).
4259         * include/grub/i386/coreboot/console.h: Convert into a stub for
4260         `<grub/i386/pc/console.h>'.
4262         Migrate full terminals to new API:
4264         * term/efi/console.c (grub_console_term): Split into ...
4265         (grub_console_term_input): ... this, and ...
4266         (grub_console_term_output): ... this.  Update all users.
4267         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4268         (grub_ofconsole_init): Split into ...
4269         (grub_ofconsole_init_input): ... this, and ...
4270         (grub_ofconsole_init_output): ... this.
4271         (grub_ofconsole_term): Split into ...
4272         (grub_ofconsole_term_input): ... this, and ...
4273         (grub_ofconsole_term_output): ... this.  Update all users.
4274         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4275         (grub_serial_term_input): ... this, and ...
4276         (grub_serial_term_output): ... this.  Update all users.
4277         * term/i386/pc/console.c (grub_console_term): Split into ...
4278         (grub_console_term_input): ... this, and ...
4279         (grub_console_term_output): ... this.  Update all users.
4280         (grub_console_term_input): Only enable it on PC/BIOS platform.
4281         (grub_console_init): Remove grub_keyboard_controller_init() call.
4283         Migrate input terminals to new API:
4285         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4286         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4287         i386-specific anyway).
4288         (grub_console_checkkey): Rename to ...
4289         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4290         users.
4291         (grub_keyboard_controller_orig): New variable.
4292         (grub_console_getkey): Rename to ...
4293         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4294         users.
4295         (grub_keyboard_controller_init): Static-ize.  Save original
4296         controller value so that it can be restored ...
4297         (grub_keyboard_controller_fini): ... here (new function).
4298         (grub_at_keyboard_term): New structure.
4299         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4300         functions.
4302         Migrate output terminals to new API:
4304         * term/i386/pc/vga.c (grub_vga_term): Change type to
4305         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4306         members.  Update all users.
4307         * term/gfxterm.c (grub_video_term): Change type to
4308         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4309         members.  Update all users.
4310         * include/grub/i386/pc/console.h (grub_console_checkkey)
4311         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4312         etc).
4314         Migrate `terminal' command and userland tools to new API:
4316         * commands/terminal.c (grub_cmd_terminal): Split into ...
4317         (grub_cmd_terminal_input): ... this, and ...
4318         (grub_cmd_terminal_output): ... this.
4319         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4320         `terminal_input' and `terminal_output'.
4321         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4322         `terminal_input' / `terminal_output' API.
4323         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4324         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4325         provided ${GRUB_TERMINAL}, convert it).
4327 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4329         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4330         for FreeBSD.
4331         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4333 2008-11-03  Bean  <bean123ch@gmail.com>
4335         * kern/elf.c (grub_elf32_load): Revert to previous code.
4336         (grub_elf64_load): Likewise.
4338         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4340 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4342         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4343         (TARGET_CPPFLAGS): Likewise.
4344         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4346 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4348         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4350 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4352         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4353         addition of objects until the code is not going to be able to fail.
4355 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4357         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4358         (add a missing NULL check, and correct them by moving the pointer
4359         operations after the actual check).
4361 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4363         * util/i386/pc/grub-install.in: Handle empty string as output from
4364         make_system_path_relative_to_its_root().
4366 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4368         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4369         circular metadata worst case scenario. If the metadata is circular
4370         then copy the wrap in place.
4371         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4372         project lib/format_text/layout.h
4373         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4375 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4377         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4379 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4381         * util/update-grub_lib.in: Mention filename in warning message.
4383 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4385         * NEWS: Update for rename of update-grub to grub-mkconfig.
4387 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4389         * util/update-grub_lib.in: Copy to ...
4390         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4391         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4392         * util/update-grub.in: Rename to ...
4393         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4394         option. Add `--output' option to allow users to specify the generated
4395         configuration file.  Default to stdout.
4396         (update_grub_dir): Rename to ...
4397         (grub_mkconfig_dir): ... this.
4398         (grub_cfg): Default to an empty string.
4399         * conf/common.rmk (update-grub): Rename to ...
4400         (grub-mkconfig): ... this.
4401         (update-grub_lib): Copy to ...
4402         (grub-mkconfig_lib): ... this.
4403         (update-grub_SCRIPTS): Copy to ...
4404         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4405         (update-grub_DATA): Rename to ...
4406         (grub-mkconfig_DATA): ... this.
4408 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4410         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4411         to `modified'.  Add the real `created' field.
4412         (grub_iso9660_uuid): Use `modified' rather than `created' for
4413         constructing the UUID.
4415 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4417         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4418         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4420 2008-09-28  Bean  <bean123ch@gmail.com>
4422         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4423         Thanks to Christian Franke for finding this bug.
4425 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4427         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4428         instances of grub_util_get_disk_name() (see previous commit).
4430 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4432         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4433         `util/i386/get_disk_name.c'.
4434         * conf/i386-efi.rmk: Likewise.
4435         * conf/x86_64-efi.rmk: Likewise.
4436         * conf/i386-coreboot.rmk: Likewise.
4437         * conf/i386-ieee1275.rmk: Likewise.
4438         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4439         `util/ieee1275/get_disk_name.c'.
4440         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4441         * util/ieee1275/get_disk_name.c: Remove file.
4442         * util/i386/get_disk_name.c: Remove file.
4443         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4444         "hd%d" for device.map entries, rather than using
4445         grub_util_get_disk_name().
4447 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4449         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4450         warning.
4451         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4453 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4455         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4456         Changed to 0x5100.
4457         (GRUB_TERM_PPAGE): Changed to 0x4900.
4459 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4461         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4462         macros (they were i386-pc specific).
4463         * include/grub/sparc64/ieee1275/console.h: Likewise.
4464         * include/grub/efi/console.h: Likewise.
4466 2008-09-22  Bean  <bean123ch@gmail.com>
4468         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4469         resident and in attribute list.
4471         * include/grub/ntfs.h (BMP_LEN): Removed.
4473 2008-09-22  Bean  <bean123ch@gmail.com>
4475         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4476         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4478         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4479         error occurs, as grub_disk_open will call grub_disk_close, which will
4480         call p->close (scsi).
4482 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4484         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4485         (AC_PREREQ): Bumped to 2.59.
4486         (AC_TRY_COMPILE): Replace obsolete macro with ...
4487         (AC_COMPILE_IFELSE): ... this.
4488         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4489         (AC_LINK_IFELSE): ... this.
4491 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4493         * autogen.sh: Add a call to `gendistlist.sh'.
4495 2008-09-19  Christian Franke  <franke@computer.org>
4497         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4498         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4499         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4500         Export __enable_execute_stack() to modules.
4501         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4502         New function.
4504 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4506         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4507         Sort the list.
4509 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4511         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4512         #include <grub/util/hostdisk.h>.
4514 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4516         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4517         segments when their filesz is zero (grub_file_read() interprets
4518         zero-size as "read until EOF", which results in memory corruption).
4519         Use `lowest_segment' rather than 0 for calculating the current
4520         segment load address.
4522 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4524         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4525         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4526         clobbered useful information.
4528 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4530         * include/grub/util/biosdisk.h: Move to ...
4531         * include/grub/util/hostdisk.h: ... here.  Update all users.
4532         * util/biosdisk.c: Move to ...
4533         * util/hostdisk.c: ... here.  Update all users.
4535 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4537         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4538         variables.
4539         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4540         and length can be stored directly in the `mbi->mmap_addr' and
4541         `mbi->mmap_length' struct fields.
4543 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4545         * conf/i386.rmk: New file.  Provides declaration for building
4546         `cpuid.mod'.
4547         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4548         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4549         variables.
4550         Include `conf/i386.mk'.
4551         * conf/i386-efi.rmk: Likewise.
4552         * conf/x86_64-efi.rmk: Likewise.
4553         * conf/i386-coreboot.rmk: Likewise.
4554         * conf/i386-ieee1275.rmk: Likewise.
4556 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4558         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4559         Adds optimization support for BGR based modes.
4561         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4562         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4563         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4564         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4565         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4566         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4567         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4568         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4569         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4570         (grub_video_i386_vbeblit_index_index): Likewise.
4571         (grub_video_i386_vbeblit_replace_directN): Added.
4572         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4573         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4574         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4575         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4576         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4577         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4578         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4579         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4580         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4581         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4582         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4583         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4584         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4586         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4587         (grub_video_i386_vbefill_R8G8B8): Likewise.
4588         (grub_video_i386_vbefill_index): Likewise.
4589         (grub_video_i386_vbefill_direct32): Added.
4590         (grub_video_i386_vbefill_direct24): Likewise.
4591         (grub_video_i386_vbefill_direct16): Likewise.
4592         (grub_video_i386_vbefill_direct8): Likewise.
4594         * include/grub/video.h (grub_video_blit_format): Removed
4595         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4596         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4597         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4598         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4599         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4601         * video/video.c (grub_video_get_blit_format): Updated to use new
4602         blit formats.  Added handling for 16 bit color modes.
4604         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4605         fillers.
4606         (common_blitter): Updated to use new blitters.
4608         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4609         Removed.
4610         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4611         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4612         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4613         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4614         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4615         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4616         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4617         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4618         (grub_video_i386_vbeblit_index_index): Likewise.
4619         (grub_video_i386_vbeblit_replace_directN): Added.
4620         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4621         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4622         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4623         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4624         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4625         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4626         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4627         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4628         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4629         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4630         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4631         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4632         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4634         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4635         (grub_video_i386_vbefill_R8G8B8): Likewise.
4636         (grub_video_i386_vbefill_index): Likewise.
4637         (grub_video_i386_vbefill_direct32): Added.
4638         (grub_video_i386_vbefill_direct24): Likewise.
4639         (grub_video_i386_vbefill_direct16): Likewise.
4640         (grub_video_i386_vbefill_direct8): Likewise.
4642         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4643         types.
4645         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4646         types.
4648         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4649         blitter types.
4651         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4652         types.
4654 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4656         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4657         RAID level 1.
4659 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4661         * fs/iso9660.c (grub_iso9660_date): New structure.
4662         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4663         (grub_iso9660_uuid): New function.
4665 2008-09-05  Bean  <bean123ch@gmail.com>
4667         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4669         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4670         insensitive bit for names in Win32 and Win32 & DOS namespace.
4672         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4674         * include/grub/types.h (LONG_MAX): Likewise.
4676 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4678         * util/getroot.c: Include <config.h>.
4679         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4680         add support for /dev/md/N devices and handle LVM double dash escaping.
4682 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4684         * config.guess: Update to latest version from config git.
4685         * config.sub: Likewise.
4687 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4689         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4690         `disk->total_sectors'.
4692 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4694         * include/grub/normal.h: Fixed incorrect comment for
4695         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4697 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4699         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4700         values with defines.
4702         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4703         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4704         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4705         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4706         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4707         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4708         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4709         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4710         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4711         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4712         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4713         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4714         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4715         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4716         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4717         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4718         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4719         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4720         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4722 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4724         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4725         declaration.
4726         (grub_multiboot): Fix a few warnings.
4728 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4730         * loader/i386/pc/multiboot.c: Update comment not to say that
4731         boot_device support is unimplemented.
4733 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4735         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4736         or memory map support are unimplemented.
4738 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4740         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4742 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4744         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4745         total video memory in 'vbeinfo' output; show color format details for
4746         each video mode.
4748 2008-08-30  Pavel Roskin  <proski@gnu.org>
4750         * util/genmoddep.c: Remove for real this time.
4751         * DISTLIST: Remove util/genmoddep.c.
4753 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4755         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4756         as required by Multiboot spec (it was already 4-byte aligned, but
4757         only by chance).
4759 2008-08-29  Pavel Roskin  <proski@gnu.org>
4761         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4762         * kern/powerpc/ieee1275/startup.S: ... this.
4763         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4764         * DISTLIST: Likewise.
4766         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4767         grub/cpu/kernel.h.  Add start label for consistency with other
4768         platforms.  Add grub_prefix immediately after start.  Add jump
4769         to the code after grub_prefix.
4770         * include/grub/powerpc/kernel.h: Provide valid values for
4771         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4773 2008-08-29  Bean  <bean123ch@gmail.com>
4775         * configure.ac: Change host_os to cygwin for mingw.
4776         (asprintf): New check for function.
4778         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4779         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4781         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4782         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4783         sync, sleep and grub_util_get_disk_size for mingw.
4785         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4786         to get size in mingw.
4787         (open_device): Use flag O_BINARY if it's defined.
4788         (find_root_device): Add dummy code for mingw.
4790         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4791         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4792         (get_scsi_disk_name): Return 0 for mingw.
4794         * util/hostfs.c: #include <grub/util/misc.h>.
4795         (grub_hostfs_open): Use "rb" flag to open file, use
4796         grub_util_get_disk_size to get disk size for mingw.
4798         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4799         (asprintf): New function if HAVE_ASPRINTF is not set.
4800         (sync): New function for mingw.
4801         (sleep): Likewise.
4802         (grub_util_get_disk_size): Likewise.
4804 2008-08-28  Pavel Roskin  <proski@gnu.org>
4806         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4807         kern/time.c.
4809 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4811         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4813 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4815         Change find_grub_drive() syntax so it doesn't prevent it from
4816         detecting NULL names as errors.
4818         * util/biosdisk.c (find_grub_drive): Move free slot search code
4819         from here ...
4820         (find_free_slot): ... to here.
4821         (read_device_map): Use find_free_slot() to search for free slots.
4823 2008-08-27  Marco Gerards  <marco@gnu.org>
4825         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4826         (scsi_mod_SOURCES): New variable.
4827         (scsi_mod_CFLAGS): Likewise
4828         (scsi_mod_LDFLAGS): Likewise.
4830         * disk/scsi.c: New file.
4832         * include/grub/scsi.h: Likewise.
4834         * include/grub/scsicmd.h: Likewise.
4836         * disk/ata.c: Include <grub/scsi.h>.
4837         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
4838         instead.
4839         (grub_ata_iterate): Skip ATAPI devices.
4840         (grub_ata_open): Only handle ATAPI devices.
4841         (struct grub_atapi_read): Removed.
4842         (grub_atapi_readsector): Likewise.
4843         (grub_ata_read): No longer handle ATAPI devices.
4844         (grub_ata_write): Likewise.
4845         (grub_atapi_iterate): New function.
4846         (grub_atapi_read): Likewise.
4847         (grub_atapi_write): Likewise.
4848         (grub_atapi_open): Likewise.
4849         (grub_atapi_close): Likewise.
4850         (grub_atapi_dev): New variable.
4851         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
4852         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
4854         * include/grub/disk.h (enum grub_disk_dev_id): Add
4855         `GRUB_DISK_DEVICE_SCSI_ID'.
4857 2008-08-26  Robert Millan  <rmh@aybabtu.com>
4859         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
4860         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
4861         descriptive.
4863 2008-08-23  Bean  <bean123ch@gmail.com>
4865         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
4866         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
4867         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
4868         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
4869         dm_nv.mod.
4870         (raid5rec_mod_SOURCES): New macro.
4871         (raid5rec_mod_CFLAGS): Likewise.
4872         (raid5rec_mod_LDFLAGS): Likewise.
4873         (raid6rec_mod_SOURCES): Likewise.
4874         (raid6rec_mod_CFLAGS): Likewise.
4875         (raid6rec_mod_LDFLAGS): Likewise.
4876         (mdraid_mod_SOURCES): Likewise.
4877         (mdraid_mod_CFLAGS): Likewise.
4878         (mdraid_mod_LDFLAGS): Likewise.
4879         (dm_nv_mod_SOURCES): Likewise.
4880         (dm_nv_mod_CFLAGS): Likewise.
4881         (dm_nv_mod_LDFLAGS): Likewise.
4883         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
4884         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
4885         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4887         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
4888         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
4890         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4892         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4894         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4896         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4898         * disk/raid5_recover.c: New file.
4900         * disk/raid6_recover.c: Likewise.
4902         * disk/mdraid_linux.c: Likewise.
4904         * disk/dmraid_nvidia.c: Likewise.
4906         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
4907         ULONG_MAX.
4909         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
4910         calculate the size of raid device.
4911         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
4912         different layout of raid5.
4913         (grub_raid_scan_device): Remove code specific to mdraid.
4914         (grub_raid_list): New variable.
4915         (free_array): New function.
4916         (grub_raid_register): Likewise.
4917         (grub_raid_unregister): Likewise.
4918         (grub_raid_rescan): Likewise.
4919         (GRUB_MOD_INIT): Don't iterate device here.
4920         (GRUB_MOD_FINI): Use free_array to release resource.
4922         * include/grub/raid.h: Remove macro and structure specific to mdraid.
4923         (grub_raid5_recover_func_t): New function variable type.
4924         (grub_raid6_recover_func_t): Likewise.
4925         (grub_raid5_recover_func): New variable.
4926         (grub_raid6_recover_func): Likewise.
4927         (grub_raid_register): New function.
4928         (grub_raid_unregister): Likewise.
4929         (grub_raid_rescan): Likewise.
4930         (grub_raid_block_xor): Likewise.
4932         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
4933         (CMD_CRC): New macro.
4934         (part): Removed.
4935         (read_file): Handle device as well as file.
4936         (cmd_crc): New function.
4937         (fstest): Handle multiple disks.
4938         (options): Remove part, raw and long, add root and diskcount.
4939         (usage): Add crc, remove -p, -r, -l, add -r and -c.
4940         (main): Find the first non option entry and ignore subsequent options,
4941         add handling for the new options, support multiple disks.
4943         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
4945 2008-08-23  Bean  <bean123ch@gmail.com>
4947         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
4949         * genfslist.sh: Ignore kernel.mod.
4951         * genpartmaplist.sh: Likewise.
4953 2008-08-23  Robert Millan  <rmh@aybabtu.com>
4955         * util/getroot.c (find_root_device): Skip anything that starts with
4956         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
4958 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
4960         * util/update-grub.in (GRUB_GFXMODE): Export variable.
4961         * util/grub.d/00_header.in: Allow the administrator to change default
4962         gfxmode via ${GRUB_GFXMODE}.
4964 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
4966         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
4968 2008-08-21  Robert Millan  <rmh@aybabtu.com>
4970         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
4971         loader.
4972         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
4973         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
4975 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
4977         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
4978         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
4980 2008-08-19  Robert Millan  <rmh@aybabtu.com>
4982         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
4983         (struct grub_virtual_screen): Remove `cursor_color'.
4984         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
4985         initialization.
4986         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
4988 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4990         Unify (identical) linux_normal.c files.
4991         * loader/i386/efi/linux_normal.c: Move from here ...
4992         * loader/linux_normal.c: ... to here.  Update all users.
4993         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
4994         * loader/i386/ieee1275/linux_normal.c: Likewise.
4996 2008-08-18  Robert Millan  <rmh@aybabtu.com>
4998         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
4999         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5000         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5001         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5002         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5003         New macros.
5004         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5005         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5006         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5007         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5008         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5009         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5010         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5011         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5012         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5013         portably using grub_getxy().
5014         Replace `-EFI' with `-bzImage' in boot message.
5016 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5018         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5020 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5022         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5024         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5025         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5026         (grub_machine_mmap_iterate): New function declaration.
5027         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5028         structure.
5029         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5030         macros.
5032         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5033         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5034         Move e820 parsing from here ...
5035         * kern/i386/pc/mmap.c: New file.
5036         (grub_machine_mmap_iterate): ... to here.
5038         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5039         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5040         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5041         (grub_available_iterate): Redeclare to return `void', and redeclare
5042         its hook to use grub_uint64_t as addr and size parameters, and rename
5043         to ...
5044         (grub_machine_mmap_iterate): ... this.  Update all users.
5046         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5047         to make it more readable.  Rename to ...
5048         (grub_machine_mmap_iterate): ... this.
5050         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5051         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5052         (grub_multiboot): Allocate an extra region after the payload, and fill
5053         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5054         with the extra space.
5055         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5056         with the extra space.
5058 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5060         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5062 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5064         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5065         mdate-sh to the list `find' searches for.
5066         * DISTLIST: Regenerated.
5068 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5070         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5071         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5072         genmoddep.awk, gensymlist.sh.in.
5073         (DISTDIRS): Add bus, docs, hook, lib.
5074         * DISTLIST: Regenerated.
5075         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5077 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5079         * disk/raid.c (grub_raid_init): Handle/report errors set by
5080         grub_device_iterate().
5081         * disk/lvm.c (grub_lvm_init): Likewise.
5083 2008-08-15  Bean  <bean123ch@gmail.com>
5085         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5086         and datehook.mod.
5087         (datetime_mod_SOURCES): New macro.
5088         (datetime_mod_CFLAGS): Likewise.
5089         (datetime_mod_LDFLAGS): Likewise.
5090         (date_mod_SOURCES): Likewise.
5091         (date_mod_CFLAGS): Likewise.
5092         (date_mod_LDFLAGS): Likewise.
5093         (datehook_mod_SOURCES): Likewise.
5094         (datehook_mod_CFLAGS): Likewise.
5095         (datehook_mod_LDFLAGS): Likewise.
5097         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5098         and datehook.mod.
5099         (datetime_mod_SOURCES): New macro.
5100         (datetime_mod_CFLAGS): Likewise.
5101         (datetime_mod_LDFLAGS): Likewise.
5102         (date_mod_SOURCES): Likewise.
5103         (date_mod_CFLAGS): Likewise.
5104         (date_mod_LDFLAGS): Likewise.
5105         (datehook_mod_SOURCES): Likewise.
5106         (datehook_mod_CFLAGS): Likewise.
5107         (datehook_mod_LDFLAGS): Likewise.
5109         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5110         and datehook.mod.
5111         (datetime_mod_SOURCES): New macro.
5112         (datetime_mod_CFLAGS): Likewise.
5113         (datetime_mod_LDFLAGS): Likewise.
5114         (date_mod_SOURCES): Likewise.
5115         (date_mod_CFLAGS): Likewise.
5116         (date_mod_LDFLAGS): Likewise.
5117         (datehook_mod_SOURCES): Likewise.
5118         (datehook_mod_CFLAGS): Likewise.
5119         (datehook_mod_LDFLAGS): Likewise.
5121         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5122         and datehook.mod.
5123         (datetime_mod_SOURCES): New macro.
5124         (datetime_mod_CFLAGS): Likewise.
5125         (datetime_mod_LDFLAGS): Likewise.
5126         (date_mod_SOURCES): Likewise.
5127         (date_mod_CFLAGS): Likewise.
5128         (date_mod_LDFLAGS): Likewise.
5129         (datehook_mod_SOURCES): Likewise.
5130         (datehook_mod_CFLAGS): Likewise.
5131         (datehook_mod_LDFLAGS): Likewise.
5133         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5134         and datehook.mod.
5135         (datetime_mod_SOURCES): New macro.
5136         (datetime_mod_CFLAGS): Likewise.
5137         (datetime_mod_LDFLAGS): Likewise.
5138         (date_mod_SOURCES): Likewise.
5139         (date_mod_CFLAGS): Likewise.
5140         (date_mod_LDFLAGS): Likewise.
5141         (datehook_mod_SOURCES): Likewise.
5142         (datehook_mod_CFLAGS): Likewise.
5143         (datehook_mod_LDFLAGS): Likewise.
5145         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5147         * commands/date.c: New file.
5149         * hook/datehook.c: Likewise.
5151         * include/grub/lib/datetime.h: Likewise.
5153         * include/grub/i386/cmos.h: Likewise.
5155         * lib/datetime.c: Likewise.
5157         * lib/i386/datetime.c: Likewise.
5159         * lib/efi/datetime.c: Likewise.
5161 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5163         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5164         (grub_mkelfimage_SOURCES): New variable.
5165         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5167         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5168         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5169         * conf/powerpc-ieee1275.rmk: Likewise.
5170         * conf/i386-ieee1275.rmk: Likewise.
5172         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5173         * kern/i386/coreboot/init.c: Likewise.
5175         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5176         with `<grub/cpu/kernel.h>'.
5177         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5178         to ...
5179         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5180         * kern/i386/coreboot/startup.S: Likewise.
5182         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5183         (GRUB_MOD_GAP): Remove.
5184         * include/grub/powerpc/kernel.h: New file.
5185         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5186         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5187         * include/grub/i386/kernel.h: New file.
5188         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5189         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5190         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5192         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5193         `grub-mkelfimage'.
5194         Use --directory when invoking grub_mkimage.
5196         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5197         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5198         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5199         and GRUB_KERNEL_CPU_PREFIX.
5201 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5203         * include/grub/err.h (grub_err_printf): New function prototype.
5204         * util/misc.c (grub_err_printf): New function.
5205         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5206         grub_printf.
5207         * kern/err.c (grub_print_error): Use grub_err_printf.
5209 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5211         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5213 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5215         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5216         boot entry.
5218 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5220         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5221         of the relocation code from here ...
5222         (grub_multiboot): ... to here.
5223         (forward_relocator, backward_relocator): Move from here ...
5224         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5225         (grub_multiboot_backward_relocator): ... to here.
5226         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5227         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5228         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5229         (grub_multiboot_forward_relocator_end)
5230         (grub_multiboot_backward_relocator)
5231         (grub_multiboot_backward_relocator_end): New variables.
5233 2008-08-12  Bean  <bean123ch@gmail.com>
5235         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5237 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5239         * kern/i386/linuxbios/startup.S: Move from here ...
5240         * kern/i386/coreboot/startup.S: ... to here.
5242         * kern/i386/linuxbios/init.c: Move from here ...
5243         * kern/i386/coreboot/init.c: ... to here.
5245         * kern/i386/linuxbios/table.c: Move from here ...
5246         * kern/i386/coreboot/mmap.c: ... to here.
5248         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5250 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5252         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5253         errors.  Leave it to the upper layer to handle them.
5255 2008-08-09  Christian Franke  <franke@computer.org>
5257         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5258         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5259         Install `grub.d/10_windows' only on Cygwin.
5260         * configure.ac: Add subst of `target_os'.
5261         Check `target_os' also before setting TARGET_OBJ2ELF.
5262         Add `--enable-grub-pe2elf'.
5264 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5266         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5267         (grub_last_time): Change type to grub_uint64_t.
5268         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5269         (grub_disk_close): Likewise.
5271         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5272         (run_menu): Migrate code from to using grub_get_time_ms().
5274         * util/misc.c (grub_get_time_ms): New function.
5276 2008-08-08  Marco Gerards  <marco@gnu.org>
5278         * disk/ata.c (grub_ata_regget): Change return type to
5279         `grub_uint8_t'.
5280         (grub_ata_regget2): Likewise.
5281         (grub_ata_wait_status): New function.
5282         (grub_ata_wait_busy): Removed function, updated all users to use
5283         `grub_ata_wait_status'.
5284         (grub_ata_wait_drq): Likewise.
5285         (grub_ata_cmd): New function.
5286         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5287         error handling.
5288         (grub_ata_pio_write): Add error handling.
5289         (grub_atapi_identify): Likewise.
5290         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5291         handling.
5292         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5293         handling.  Actually use the detected registers.  Reorder the
5294         detection logic such that it is easier to read.
5295         (grub_ata_pciinit): Do not assign the same ID to each controller.
5296         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5297         handling.
5298         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5300         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5302 2008-08-08  Marco Gerards  <marco@gnu.org>
5304         * NEWS: Update.
5306 2008-08-07  Bean  <bean123ch@gmail.com>
5308         * include/grub/x86_64/pci.h: New file.
5310 2008-08-07  Christian Franke  <franke@computer.org>
5312         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5313         (TIMER2_GATE): Likewise.
5314         (grub_pit_wait): Add enable/disable of the timer2 gate
5315         bit of port 0x61.  This fixes a possible infinite loop.
5317 2008-08-07  Bean  <bean123ch@gmail.com>
5319         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5320         kern/i386/tsc.c and kern/i386/pit.c.
5322         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5323         x86_64 platform.
5325         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5326         <grub/i386/tsc.h>.
5328         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5330 2008-08-07  Bean  <bean123ch@gmail.com>
5332         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5334         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5336         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5337         multiple inclusion. Add #include <grub/types.h>.
5339 2008-08-06  Christian Franke  <franke@computer.org>
5341         * conf/common.rmk: Build and install `10_windows'.
5342         * util/grub.d/10_windows.in: New script.
5344 2008-08-06  Pavel Roskin  <proski@gnu.org>
5346         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5348 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5350         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5351         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5353 2008-08-06  Bean  <bean123ch@gmail.com>
5355         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5356         (grub_pxefs_fs_int): Remove dummy definition.
5357         (grub_pxefs_open): Use data->block_size to store the current block
5358         size setting.
5359         (grub_pxefs_read): Use block size stored in data->block_size. As the
5360         value of grub_pxe_blksize can be changed after the file is opened.
5362 2008-08-06  Bean  <bean123ch@gmail.com>
5364         * fs/i386/pc/pxe.c (curr_file): new variable.
5365         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5366         require the dummy internal file system anymore.
5367         (grub_pxefs_read): Removed.
5368         (grub_pxefs_close): Likewise.
5369         (grub_pxefs_fs_int): Likewise.
5370         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5371         connection when we switch file.
5372         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5374 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5376         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5377         `halt.mod'.
5378         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5379         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5381         * kern/i386/halt.c: New file.
5382         * kern/i386/reboot.c: Likewise.
5383         * include/grub/i386/reboot.h: Likewise.
5384         * include/grub/i386/halt.h: Likewise.
5386         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5387         Include `<grub/cpu/halt.h>'.
5388         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5389         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5391         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5392         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5393         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5394         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5395         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5396         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5397         from here ...
5398         * include/grub/i386/at_keyboard.h: ... to here.
5400 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5402         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5403         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5404         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5405         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5406         `kern/generic/millisleep.c'.
5408         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5409         instead of grub_get_rtc().
5410         (grub_tsc_init): Initialize `tsc_boot_time'.
5412         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5413         (grub_machine_init): Use grub_tsc_init() rather than
5414         installing an RTC-based handler via grub_install_get_time_ms().
5416         * kern/i386/pit.c: New file.
5417         * include/grub/i386/pit.h: Likewise.
5419 2008-08-05  Bean  <bean123ch@gmail.com>
5421         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5423         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5424         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5425         (pxe_mod_SOURCES): New macro.
5426         (pxe_mod_CFLAGS): Likewise.
5427         (pxe_mod_LDFLAGS): Likewise.
5428         (pxecmd_mod_SOURCES): Likewise.
5429         (pxecmd_mod_CFLAGS): Likewise.
5430         (pxecmd_mod_LDFLAGS): Likewise.
5432         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5433         (grub_pxe_call): Likewise.
5435         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5437         * commands/i386/pc/pxecmd.c: New file.
5439         * fs/i386/pc/pxe.c: Likewise.
5441         * include/grub/i386/pc/pxe.h: Likewise.
5443 2008-08-05  Bean  <bean123ch@gmail.com>
5445         * util/console.c (grub_console_cur_color): New variable.
5446         (grub_console_standard_color): Likewise.
5447         (grub_console_normal_color): Likewise.
5448         (grub_console_highlight_color): Likewise.
5449         (color_map): Likewise.
5450         (use_color): Likewise.
5451         (NUM_COLORS): New macro.
5452         (grub_ncurses_setcolorstate): Handle color properly.
5453         (grub_ncurses_setcolor): Don't change color here, just remember the
5454         settings, color will be set in grub_ncurses_setcolorstate.
5455         (grub_ncurses_getcolor): New function.
5456         (grub_ncurses_init): Initialize color pairs.
5457         (grub_ncurses_term): New member grub_ncurses_getcolor.
5459 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5461         High resolution timer support.  Implemented for x86 CPUs using TSC.
5462         Extracted generic grub_millisleep() so it's linked in only as needed.
5463         This requires a Pentium compatible CPU; if the RDTSC instruction is
5464         not supported, then it falls back on the generic grub_get_time_ms()
5465         implementation that uses the machine's RTC.
5467         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5468         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5469         `kern/generic/millisleep.c'.
5471         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5472         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5474         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5475         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5477         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5479         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5480         `kern/generic/millisleep.c'.
5482         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5484         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5486         * kern/generic/rtc_get_time_ms.c: New file.
5488         * kern/generic/millisleep.c: New file.
5490         * kern/misc.c: Don't include
5491         <kern/time.h> anymore.
5492         (grub_millisleep_generic): Removed.
5494         * commands/sleep.c (grub_interruptible_millisleep): Uses
5495         grub_get_time_ms() instead of grub_get_rtc().
5497         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5498         function.
5499         (grub_cpu_is_cpuid_supported): New inline function.
5500         (grub_cpu_is_tsc_supported): New inline function.
5501         (grub_tsc_init): New function prototype.
5502         (grub_tsc_get_time_ms): New function prototype.
5504         * kern/i386/tsc.c (grub_get_time_ms): New file.
5506         * include/grub/time.h: Include <grub/types.h.
5507         (grub_millisleep_generic): Removed.
5508         (grub_get_time_ms): New prototype.
5509         (grub_install_get_time_ms): New prototype.
5510         (grub_rtc_get_time_ms): New prototype.
5512         * kern/time.c (grub_get_time_ms): New function.
5513         (grub_install_get_time_ms): New function.
5515         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5516         <grub/time.h> anymore.
5517         (grub_millisleep): Removed.
5518         (grub_machine_init): Call grub_tsc_init.
5520         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5521         get_time_ms() implementation.
5523         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5524         (ieee1275_get_time_ms): New function.
5525         (grub_machine_init): Install get_time_ms() implementation.
5527         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5528         (grub_machine_init): Call grub_tsc_init().
5529         (grub_millisleep): Removed.
5531         * kern/ieee1275/init.c (grub_millisleep): Removed.
5532         (grub_machine_init): Install ieee1275_get_time_ms()
5533         implementation.
5534         (ieee1275_get_time_ms): New function.
5535         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5536         real work.
5538 2008-08-05  Marco Gerards  <marco@gnu.org>
5540         * disk/ata.c: Include <grub/pci.h>.
5541         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5542         (grub_ata_initialize): Rewritten.
5543         (grub_ata_device_initialize): New function.
5545 2008-08-04  Pavel Roskin  <proski@gnu.org>
5547         * kern/main.c: Include grub/mm.h.
5549 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5551         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5552         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5553         corruption problem).
5555 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5557         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5558         warnings introduced in my last commit.
5560 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5562         Make PCI available on all i386 architectures.
5564         * include/grub/i386/pc/pci.h: Move from here ...
5565         * include/grub/i386/pci.h: ... to here.
5567         * include/grub/i386/pc/pci.h: Remove.
5568         * include/grub/i386/efi/pci.h: Remove.
5569         * include/grub/x86_64/efi/pci.h: Remove.
5571         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5572         `<grub/cpu/pci.h>'.
5574         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5575         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5576         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5578         * conf/i386-ieee1275.rmk: Likewise.
5580 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5582         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5583         (grub_console_setcursor): Make it possible to set cursor off.
5585 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5587         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5588         of modules instead of assuming which platform provides what.
5589         * util/update-grub.in: Likewise.
5591 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5593         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5594         instead of `grub_install_dos_part' to determine whether a drive needs
5595         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5596         because it can be overridden when loading GRUB via Multiboot).
5598 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5600         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5602 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5604         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5605         of informational grub_dprintf() calls.
5607 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5609         * disk/memdisk.c (memdisk_size): Don't initialize.
5610         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5612         * include/grub/i386/pc/kernel.h
5613         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5614         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5615         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5616         (grub_arch_memdisk_size): Remove.
5618         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5619         field (was only used to transfer a constant).  Add `type' field to
5620         support multiple module types.
5621         (grub_module_iterate): New function.
5623         * kern/device.c (grub_device_open): Do not hide error messages
5624         when grub_disk_open() fails.  Use grub_print_error() instead.
5626         * kern/i386/pc/init.c (grub_arch_modules_addr)
5627         (grub_arch_memdisk_size): Remove functions.
5628         (grub_arch_modules_addr): Return the module address in high memory
5629         (now that it isn't copied anymore).
5631         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5632         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5633         decompression routine (grub_total_module_size already includes that
5634         now).  Don't copy modules back to low memory.
5636         * kern/main.c: Include `<grub/mm.h>'.
5637         (grub_load_modules): Split out (and use) ...
5638         (grub_module_iterate): ... this function, which iterates through
5639         module objects and runs a hook.
5640         Comment out grub_mm_init_region() call, as it would cause non-ELF
5641         modules to be overwritten.
5643         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5644         the memdisk image in its own region, make it part of the module list.
5645         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5646         (main): Parse --memdisk|-m option, and pass user-provided path as
5647         parameter to generate_image().
5648         (add_segments): Pass `memdisk_path' down to load_modules().
5649         (load_modules): Embed memdisk image in module section when requested.
5650         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5651         `header.type' instead of `header.offset'.
5653         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5654         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5655         (memdisk_mod_LDFLAGS): New variables.
5656         * conf/i386-coreboot.rmk: Likewise.
5657         * conf/i386-ieee1275.rmk: Likewise.
5659 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5661         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5662         (backward_relocator): New variables.  Used to allocate and relocate
5663         the payload, respectively.
5664         (grub_multiboot_load_elf32): Load into heap instead of requested
5665         address, install the appropriate relocator code in each bound of
5666         the payload, and set the entry point such that
5667         grub_multiboot_real_boot() will jump to one of them.
5669         * kern/i386/loader.S (grub_multiboot_payload_size)
5670         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5671         (grub_multiboot_payload_entry_offset): New variables.
5672         (grub_multiboot_real_boot): Set cpu context to what the relocator
5673         expects, and jump to the relocator instead of the payload.
5675         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5676         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5677         (grub_multiboot_payload_entry_offset): Export.
5679 2008-08-01  Bean  <bean123ch@gmail.com>
5681         * normal/menu_entry.c (editor_getline): Don't return the original
5682         string as result, as it will be released by lexer once it has done
5683         using it.
5685 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5687         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5688         within menuentries, not before them.
5689         util/grub.d/10_hurd.in: Likewise.
5691 2008-08-01  Bean  <bean123ch@gmail.com>
5693         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5694         (bufio_mod_SOURCES): New macro.
5695         (bufio_mod_CFLAGS): Likewise.
5696         (bufio_mod_LDFLAGS): Likewise.
5698         * include/grub/bufio.h: New file.
5700         * io/bufio.c: Likewise.
5702         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5703         (grub_video_reader_png): Use grub_buffile_open to open file.
5705         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5706         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5708         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5709         (grub_video_reader_tga): Use grub_buffile_open to open file.
5711         * font/manager.c: Include <grub/bufio.h>.
5712         (add_font): Use grub_buffile_open to open file.
5714 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5716         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5717         ELF segments, use a macro for arbitrarily accessing any of them instead
5718         of preparing a pointer that allows access to one at a time.
5719         (grub_multiboot_load_elf64): Likewise.
5721 2008-07-31  Bean  <bean123ch@gmail.com>
5723         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5724         GRUB_KERNEL_MACHINE_DATA_END.
5726 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5728         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5729         Increase from 0x50 to 0x60.
5730         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5731         use UUIDs to identify the root drive for them.  If that's not
5732         possible, abort.
5733         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5734         check, for cross-disk installs.
5736 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5738         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5739         is non-empty, use it to set the `prefix' environment variable instead
5740         of the usual approach.
5741         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5742         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5743         environment variable instead of dummy make_install_device().
5745         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5746         (start): Insert a data section, with `grub_prefix' variable.
5747         * kern/i386/linuxbios/startup.S: Likewise.
5749         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5750         New variable reference.
5751         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5752         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5753         to `start').
5754         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5755         section within startup.S (relative to `start').
5756         * include/grub/i386/coreboot/kernel.h: Likewise.
5758         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5759         Overwrite grub_prefix with its contents, at the beginning of the
5760         first segment.
5761         (main): Understand -p|--prefix.
5763 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5765         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5767 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5769         * term/i386/pc/vga_text.c (grub_console_cls): Use
5770         grub_console_gotoxy() to go back to beginning of the screen.
5771         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5773 2008-07-29  Christian Franke  <franke@computer.org>
5775         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5776         Add conversion of emulated mount points on Cygwin.
5778 2008-07-29  Christian Franke  <franke@computer.org>
5780         * util/update-grub.in: Add a check for admin
5781         group on Cygwin.
5782         Remove old `grub.cfg.new' before creation.
5783         Add `-f' to `mv' to handle the different filesystem
5784         semantics of Windows.
5786 2008-07-29  Bean  <bean123ch@gmail.com>
5788         * normal/main.c (get_line): Fix buffer overflow bug.
5790 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5792         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5793         (struct grub_apple_header): New struct.  Describes the layout of
5794         the partmap header.
5795         (apple_partition_map_iterate): Check the header magic as well as the
5796         partition magic (which was already being checked).
5798 2008-07-28  Pavel Roskin  <proski@gnu.org>
5800         * genmk.rb: Add a warning to the beginning of the output that
5801         it's a generated file and should not be edited.
5803 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5805         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5806         with the same number are found, just use issue a warning with
5807         grub_dprintf(), as this error has been reported to be non-fatal.
5809 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5811         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5812         information.
5814 2008-07-27  Bean  <bean123ch@gmail.com>
5816         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5817         (grub_fat_find_dir): Ignore case when comparing filename.
5819 2008-07-27  Bean  <bean123ch@gmail.com>
5821         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5822         smallino, as it's more descriptive, and i8count can be confused with
5823         the other field count.
5824         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5825         inode type.
5827 2008-07-27  Bean  <bean123ch@gmail.com>
5829         * commands/crc.c: New file.
5831         * lib/crc.c: Likewise.
5833         * include/grub/lib/crc.h: Likewise.
5835         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
5837         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
5838         (hexdump): Move this function to ...
5840         * lib/hexdump.c: ... here.
5842         * include/grub/hexdump.h: Renamed to ...
5844         * include/grub/lib/hexdump.h: ... this.
5846         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
5848         * util/grub-editenv.c: Likewise.
5850         * include/envblk.h: Renamed to ...
5852         * include/lib/envblk.h: ... this.
5854         * util/envblk.c: Renamed to ...
5856         * lib/envblk.c: ... this.
5858         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
5859         lib/hexdump.c.
5860         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
5861         (pkglib_MODULES): Add crc.mod.
5862         (hexdump_mod_SOURCES): Add lib/hexdump.c.
5863         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
5864         (crc_mod_SOURCES): New macro.
5865         (crc_mod_CFLAGS): Likewise.
5866         (crc_mod_LDFLAGS): Likewise.
5868         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
5870         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5872         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
5874         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5876         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5878 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
5880         * commands/help.c: Include <grub/term.h>.
5881         (TERM_WIDTH): Removed.  Updated all users.
5883 2008-07-27  Pavel Roskin  <proski@gnu.org>
5885         * util/getroot.c (find_root_device): Rephrase a comment to avoid
5886         spurious warnings about a comment within a comment.
5888 2008-07-25  Robert Millan  <rmh@aybabtu.com>
5890         * util/getroot.c (find_root_device): Skip devices that match
5891         /dev/dm-[0-9].  This lets the real device be found for any type of
5892         abstraction (LVM, EVMS, RAID..).
5893         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
5894         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
5895         device is found first, find_root_device() will now skip it.
5897 2008-07-24  Pavel Roskin  <proski@gnu.org>
5899         * include/grub/types.h: Use __builtin_bswap32() and
5900         __builtin_bswap64() with gcc 4.3 and newer.
5902 2008-07-24  Christian Franke  <franke@computer.org>
5904         * util/i386/pc/grub-install.in: If `--debug' is specified,
5905         pass `--verbose' to grub-setup.
5906         Abort script if make_system_path_relative_to_its_root() fails.
5908 2008-07-24  Bean  <bean123ch@gmail.com>
5910         * configure.ac: Fixed a bug caused by the previous cygwin patch,
5911         variable `target_platform' should be `platform'.
5913 2008-07-24  Bean  <bean123ch@gmail.com>
5915         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
5916         (grub_png_init_fixed_block): New function.
5917         (grub_png_decode_image_data): Handle fixed huffman code compression.
5919 2008-07-24  Bean  <bean123ch@gmail.com>
5921         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
5922         (grub_pe2elf_SOURCES): New macro.
5923         (CLEANFILES): Add grub-pe2elf.
5925         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
5926         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
5927         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
5928         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
5929         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
5930         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
5931         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
5932         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
5933         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
5934         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
5935         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
5936         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
5937         (GRUB_PE32_DT_FUNCTION): Likewise.
5938         (GRUB_PE32_REL_I386_DIR32): Likewise.
5939         (GRUB_PE32_REL_I386_REL32): Likewise.
5940         (grub_pe32_symbol): New structure.
5941         (grub_pe32_reloc): Likewise.
5943         * util/grub-pe2elf.c: New file.
5945         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
5946         start symbol in non pc platform.
5948         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
5950         The following patches are from Christian Franke.
5952         * include/grub/dl.h: Remove .previous, gas supports this only
5953         for ELF format.
5955         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
5956         Remove .type, gas supports this only for ELF format.
5958         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
5959         nullbytes in symbol table. This fixes an infinite loop if table is
5960         zero filled.
5962         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
5963         TARGET_IMG_LDFLAGS and EXEEXT.
5965         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
5966         TARGET_IMG_LDFLAGS_AC.
5967         (grub_CHECK_STACK_ARG_PROBE): New function.
5969         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
5971         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
5973         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
5974         to set TARGET_IMG_LD* accordingly.
5975         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
5976         Add call to grub_CHECK_STACK_ARG_PROBE.
5977         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
5979         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
5981         * genmk.rb: Add EXEEXT to CLEANFILES.
5983 2008-07-23  Robert Millan  <rmh@aybabtu.com>
5985         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
5986         define the codes for arrows and lines used for the menu).
5987         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
5988         as well.
5990         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
5991         fonts, because the latter are too slow.
5993 2008-07-21  Bean  <bean123ch@gmail.com>
5995         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
5996         a20. Run keyboard test last, as it will cause macbook to halt.
5998 2008-07-18  Pavel Roskin  <proski@gnu.org>
6000         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6001         load foreign architecture modules correctly anyway.  Keep
6002         support for loading host architecture modules, whether we
6003         compile them or not.
6005 2008-07-17  Pavel Roskin  <proski@gnu.org>
6007         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6008         change target_cpu.  The compiler default can mismatch target_cpu
6009         in any case.
6011         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6012         * kern/efi/efi.c: Likewise.
6014         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6015         target compiler is functional.
6016         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6017         are set up.
6019         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6020         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6021         adjustments from the rest, only do them if target is not
6022         explicitly given.  Merge other adjustments with the final sanity
6023         check.  Remove an extraneous check for supported CPU.  Be
6024         specific which CPU and which platform is not supported.
6026         * configure.ac: Default to pc platform for x86_64.
6028 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6030         Partial LinuxBIOS -> Coreboot rename.
6032         * conf/i386-linuxbios.rmk: Renamed to ...
6033         * conf/i386-coreboot.rmk: ... this.
6034         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6035         * configure.ac: Accept "coreboot" as input platform (but maintain
6036         compatibility with "linuxbios").
6037         * include/grub/i386/linuxbios: Renamed to ...
6038         * include/grub/i386/coreboot: ... this.
6040 2008-07-17  Bean  <bean123ch@gmail.com>
6042         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6043         (appleldr_mod_SOURCE): New variable.
6044         (appleldr_mod_CFLAGS): Likewise.
6045         (appleldr_mod_LDFLAGS): Likewise.
6046         (pci_mod_SOURCES): Likewise.
6047         (pci_mod_CFLAGS): Likewise.
6048         (pci_mod_LDFLAGS): Likewise.
6049         (lspci_mod_SOURCES): Likewise.
6050         (lspci_mod_CFLAGS): Likewise.
6051         (lspci_mod_LDFLAGS): Likewise.
6053         * conf/x86_64-efi.rmk: New file.
6055         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6056         macro.
6057         (grub_efidisk_write): Likewise.
6059         * include/efi/api.h (efi_call_0): New macro.
6060         (efi_call_1): Likewise.
6061         (efi_call_2): Likewise.
6062         (efi_call_3): Likewise.
6063         (efi_call_4): Likewise.
6064         (efi_call_5): Likewise.
6065         (efi_call_6): Likewise.
6067         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6068         grub_rescue_cmd_chainloader.
6070         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6071         (grub_pe32_optional_header): Change some fields based on i386 or
6072         x86_64 platform.
6073         (GRUB_PE32_PE32_MAGIC): Likewise.
6075         * include/grub/efi/uga_draw.h: New file.
6077         * include/grub/elf.h (STN_ABS): New constant.
6078         (R_X86_64_NONE): Relocation constant for x86_64.
6079         (R_X86_64_64): Likewise.
6080         (R_X86_64_PC32): Likewise.
6081         (R_X86_64_GOT32): Likewise.
6082         (R_X86_64_PLT32): Likewise.
6083         (R_X86_64_COPY): Likewise.
6084         (R_X86_64_GLOB_DAT): Likewise.
6085         (R_X86_64_JUMP_SLOT): Likewise.
6086         (R_X86_64_RELATIVE): Likewise.
6087         (R_X86_64_GOTPCREL): Likewise.
6088         (R_X86_64_32): Likewise.
6089         (R_X86_64_32S): Likewise.
6090         (R_X86_64_16): Likewise.
6091         (R_X86_64_PC16): Likewise.
6092         (R_X86_64_8): Likewise.
6093         (R_X86_64_PC8): Likewise.
6095         * include/grub/i386/efi/pci.h: New file.
6097         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6098         Change it value based on platform.
6099         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6100         (GRUB_E820_RAM): Likewise.
6101         (GRUB_E820_RESERVED): Likewise.
6102         (GRUB_E820_ACPI): Likewise.
6103         (GRUB_E820_NVS): Likewise.
6104         (GRUB_E820_EXEC_CODE): Likewise.
6105         (GRUB_E820_MAX_ENTRY): Likewise.
6106         (grub_e820_mmap): New structure.
6107         (linux_kernel_header): Change the efi field according to different
6108         kernel version, also field from linux_kernel_header.
6110         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6112         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6113         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6114         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6115         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6116         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6117         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6118         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6119         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6120         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6121         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6123         * include/grub/x86_64/efi/kernel.h: New file.
6125         * include/grub/x86_64/efi/loader.h: Likewise.
6127         * include/grub/x86_64/efi/machine.h: Likewise.
6129         * include/grub/x86_64/efi/pci.h: Likewise.
6131         * include/grub/x86_64/efi/time.h: Likewise.
6133         * include/grub/x86_64/linux.h: Likewise.
6135         * include/grub/x86_64/setjmp.h: Likewise.
6137         * include/grub/x86_64/time.h: Likewise.
6139         * include/grub/x86_64/types.h: Likewise.
6141         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6142          GRUB_TARGET_SIZEOF_VOID_P.
6144         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6145         (grub_efi_locate_handle): Likewise.
6146         (grub_efi_open_protocol): Likewise.
6147         (grub_efi_set_text_mode): Likewise.
6148         (grub_efi_stall): Likewise.
6149         (grub_exit): Likewise.
6150         (grub_reboot): Likewise.
6151         (grub_halt): Likewise.
6152         (grub_efi_exit_boot_services): Likewise.
6153         (grub_get_rtc): Likewise.
6155         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6156         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6157         (grub_efi_allocate_pages): Wrap efi calls.
6158         (grub_efi_free_pages): Wrap efi calls.
6159         (grub_efi_get_memory_map): Wrap efi calls.
6161         * kern/x86_64/dl.c: New file.
6163         * kern/x86_64/efi/callwrap.S: Likewise.
6165         * kern/x86_64/efi/startup.S: Likewise.
6167         * loader/efi/appleloader.c: Likewise.
6169         * loader/efi/chainloader.c (cmdline): New variable.
6170         (grub_chainloader_unload): Wrap efi calls.
6171         (grub_chainloader_boot): Likewise.
6172         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6173         command line.
6175         * loader/efi/chainloader_normal.c (chainloader_command):
6176         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6177         command line.
6179         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6180         method.
6181         (grub_e820_add_region): New function.
6182         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6183         booting.
6184         (grub_find_video_card): New function.
6185         (grub_linux_setup_video): New function.
6186         (grub_rescue_cmd_linux): Probe for video information.
6188         * normal/x86_64/setjmp.S: New file.
6190         * term/efi/console.c (map_char): New function.
6191         (grub_console_putchar): Map unicode char.
6192         (grub_console_checkkey): Wrap efi calls.
6193         (grub_console_getkey): Likewise.
6194         (grub_console_getwh): Likewise.
6195         (grub_console_gotoxy): Likewise.
6196         (grub_console_cls): Likewise.
6197         (grub_console_setcolorstate): Likewise.
6198         (grub_console_setcursor): Likewise.
6200         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6202 2008-07-16  Pavel Roskin  <proski@gnu.org>
6204         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6205         format strings.
6207         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6208         pointer, not an integer.  This fixes a warning and prevents
6209         precision loss on 64-bit systems.
6210         (relocate_addresses): Remove unneeded cast.
6212 2008-07-15  Pavel Roskin  <proski@gnu.org>
6214         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6216         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6218         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6219         Fix comparison between signed and unsigned.
6221         * include/grub/i386/ieee1275/console.h: Declare
6222         grub_console_init() and grub_console_fini().
6224         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6225         It's empty and unused.
6227         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6228         beginning to avoid warnings with some compilers.
6230         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6231         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6233 2008-07-14  Pavel Roskin  <proski@gnu.org>
6235         * kern/env.c (grub_register_variable_hook): Don't copy empty
6236         string, it leaks memory.  Pass "" to grub_env_set(), it should
6237         handle constant strings.
6239         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6240         * commands/cmp.c (grub_cmd_cmp): Likewise.
6241         * kern/dl.c (grub_dl_flush_cache): Likewise.
6242         (grub_dl_load_core): Likewise.
6243         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6244         (grub_elf64_load_phdrs): Likewise.
6246 2008-07-13  Pavel Roskin  <proski@gnu.org>
6248         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6249         between signed and unsigned.
6250         (LzmaEnc_Finish): Fix warning about an unused parameter.
6252 2008-07-13  Bean  <bean123ch@gmail.com>
6254         * Makefile.in (enable_lzo): New rule.
6256         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6258         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6260         * boot/i386/pc/lnxboot.S: #include <config.h>.
6262         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6263         its value according to the compression algorithm used, lzo or lzma.
6265         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6266         compression algorithm according to configure macro.
6268         * kern/i386/pc/startup.S (codestart): Likewise.
6270         * kern/i386/pc/lzma_decode.S: New file.
6272         * include/grub/lib/LzFind.h: Likewise.
6274         * include/grub/lib/LzHash.h: Likewise.
6276         * include/grub/lib/LzmaDec.h: Likewise.
6278         * include/grub/lib/LzmaEnc.h: Likewise.
6280         * include/grub/lib/LzmaTypes.h: Likewise.
6282         * lib/LzFind.c: Likewise.
6284         * lib/LzmaDec.c: Likewise.
6286         * lib/LzmaEnc.c: Likewise.
6288 2008-07-13  Bean  <bean123ch@gmail.com>
6290         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6291         (grub_ext4_extent_header): New structure.
6292         (grub_ext4_extent): Likewise.
6293         (grub_ext4_extent_idx): Likewise.
6294         (grub_ext4_find_leaf): New function.
6295         (grub_ext2_read_block): Handle extents.
6297 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6299         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6301 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6303         * util/grub.d/40_custom.in: New file. Example on how to add custom
6304         entries to /etc/grub.d.
6305         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6306         40_custom (implicitly, by merging all the grub.d rules).
6308 2008-07-11  Pavel Roskin  <proski@gnu.org>
6310         * commands/read.c (grub_getline): Fix invalid memory access.
6311         Don't add newline to the variable value.
6313         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6314         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6315         (serial_hw_get_port): Check validity of the port number.
6316         (grub_cmd_serial): Check return value of serial_hw_get_port().
6318 2008-07-07  Pavel Roskin  <proski@gnu.org>
6320         * boot/i386/pc/diskboot.S (notification_string): Replace
6321         "Loading kernel" with just "loading".  This is shorter, less
6322         confusing and saves a few bytes for possible future changes.
6324 2008-07-05  Pavel Roskin  <proski@gnu.org>
6326         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6327         size for ATAPI devices, they are undefined.  Output sector
6328         number in decimal form.
6330         * disk/ata.c: Use named constants for status bits.
6332 2008-07-04  Pavel Roskin  <proski@gnu.org>
6334         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6335         grub_addr_t before casting it to the void pointer to fix a
6336         warning.  Non-addressable regions are discarded earlier.
6337         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6338         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6339         (check_signature): Don't shadow table_header.
6340         (grub_linuxbios_table_iterate): Cast numeric constants to
6341         grub_linuxbios_table_header_t.
6342         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6343         grub_stop().
6345         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6346         prevent warnings.
6348         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6349         pointer, which can cause warnings.  Support 64-bit addresses.
6351         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6352         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6354 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6356         This fixes a performance issue when pc & gpt partmap iterators
6357         didn't abort iteration even after our hook found what it was
6358         looking for (often causing expensive probes of non-existent drives).
6360         Some callers relied on previous buggy behaviour, since they would
6361         raise an error when their own hooks caused early abortion of its
6362         iteration.
6364         * kern/device.c (grub_device_open): Improve error message.
6365         * disk/lvm.c (grub_lvm_open): Likewise.
6366         * disk/raid.c (grub_raid_open): Likewise.
6368         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6369         when hook requests it, independently of grub_errno.
6370         (pc_partition_map_probe): Do not fail when find_func() caused
6371         early abortion of pc_partition_map_iterate().
6373         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6374         when hook requests it, independently of grub_errno.
6375         (gpt_partition_map_probe): Do not fail when find_func() caused
6376         early abortion of gpt_partition_map_iterate().
6378         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6379         when hook requests it, independently of grub_errno.  Do not fail when
6380         part_map_iterate_hook() caused early abortion of p->iterate().
6382         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6383         when grub_partition_iterate() returned with non-zero.
6385 2008-07-03  Pavel Roskin  <proski@gnu.org>
6387         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6388         like we do in grub_ata_pio_read().
6389         (grub_ata_readwrite): Always write individual sectors.  Fix the
6390         sector count for the remainder.
6391         (grub_ata_write): Enable writing to ATA devices.  Correctly
6392         report error for ATAPI devices.
6394 2008-07-02  Pavel Roskin  <proski@gnu.org>
6396         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6397         warning.
6399         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6400         for every read sector, we already increment it for the whole
6401         batch.  This fixes reading more than 256 sectors at once.
6403         * util/grub-editenv.c (cmd_info): Cast argument to long
6404         explicitly.  ptrdiff_t reduces to int on i386.
6406         * util/grub-editenv.c (main): Be specific which parameter is
6407         missing.
6409         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6410         (memdisk): Make memdisk_orig_addr a pointer.
6412         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6413         for file offsets, use grub_off_t instead.  Fix printf format
6414         warnings.
6416         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6417         there.  Real unexpected warnings should not drown in the noise
6418         about known problems.
6420         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6421         grub_disk_addr_t for memory addresses.
6423         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6424         explicitly to fix a warning.
6426         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6428         * Makefile.in (MODULE_LDFLAGS): New variable.
6429         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6430         the linker accepts --build-id=none.
6431         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6432         MODULE_LDFLAGS.
6433         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6435         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6436         those in Linux XFS code.  Provide a way to access 64-bit parent
6437         inode.
6438         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6439         the end of struct grub_xfs_dir_header.
6441 2008-07-02  Bean  <bean123ch@gmail.com>
6443         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6444         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6445         and GRUB_IEEE1275_FLAG_NO_ANSI.
6447         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6448         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6449         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6451         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6452         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6454         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6455         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6457         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6458         esc sequence on non ANSI terminal.
6459         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6461         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6462         beginning of file.
6464 2008-07-02  Bean  <bean123ch@gmail.com>
6466         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6467         (grub_editenv_SOURCES): New variable.
6468         (pkglib_MODULES): Add loadenv.mod.
6469         (loadenv_mod_SOURCES): New variable.
6470         (loadenv_mod_CFLAGS): Likewise.
6471         (loadenv_mod_LDFLAGS): Likewise.
6473         * include/grub/envblk.h: New file.
6475         * util/envblk.c: New file.
6477         * util/grub-editenv.c: New file.
6479         * commands/loadenv.c: New file.
6481 2008-07-01  Pavel Roskin  <proski@gnu.org>
6483         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6484         not unsigned char.  This fixes warnings and is consistent with
6485         other tags.
6487         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6489         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6491         * term/tparm.c (analyze): Always set *popcount.
6493         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6494         cast to fix a warning.
6496         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6497         cast to suppress a warning.
6499         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6500         grub_fshelp_read_file() expects.
6502         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6503         write uuid as a 32-bit value in CPU byte order, so declare and
6504         use it as such.
6506         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6507         long if the format specifier expects it.
6508         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6509         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6510         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6511         long to fix a warning.
6512         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6513         grub_dprintf() arguments to fix warnings.
6515 2008-06-30  Pavel Roskin  <proski@gnu.org>
6517         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6518         install_bsd_part immediately before core.img is embedded or
6519         modified on disk.  This fixes core.img verification if core.img
6520         cannot be embedded.
6522         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6523         core_path to calculate the blocklist.
6524         Patch from Javier Martín <lordhabbit@gmail.com>
6526 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6528         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6529         block to disk block.
6530         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6531         Patch from Niels Böhm <bitbucket@arcor.de>
6533 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6535         * util/update-grub_lib.in (font_path): Search for fonts in
6536         /boot/grub first, which is more likely to be readable (we aren't
6537         deciding where fonts live, just looking for them).
6539 2008-06-26  Pavel Roskin  <proski@gnu.org>
6541         * util/biosdisk.c (read_device_map): Don't leave dead map
6542         entries for devices failing stat() check.
6544         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6545         core_path_dev for the core.img path on the target device.
6547 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6549         * disk/fs_uuid.c: New file.
6550         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6551         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6552         (fs_uuid_mod_LDFLAGS): New variables.
6553         * include/grub/disk.h (grub_disk_dev_id): Add
6554         `GRUB_DISK_DEVICE_UUID_ID'.
6555         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6556         implement iterate().
6558 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6560         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6561         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6562         Linux image includes no initrd.
6564 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6566         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6567         call to resolve the core image location that effectively appended the
6568         name twice.
6570 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6572         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6573         call from here ...
6575         * util/grub.d/10_hurd.in: ... to here ...
6576         * util/grub.d/10_linux.in: ... and here.
6578 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6580         * kern/main.c (grub_main): Export `prefix' variable immediately
6581         after it has been set by grub_machine_set_prefix().
6583 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6585         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6586         search result when not saving to variable, not the other way around.
6587         When saving to variable, abort iteration as soon as a match is found.
6589 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6591         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6592         check for partition that provides /boot/grub.  Its logic is flawed,
6593         as it prevents prepare_grub_to_access_device() from being called
6594         multiple times.
6596 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6598         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6599         "insmod" command directly when abstraction modules are needed,
6600         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6601         since it had already been processed).
6603 2008-06-19  Pavel Roskin  <proski@gnu.org>
6605         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6606         changed.  This is needed in case GRUB_LIBDIR changes.
6607         * conf/i386-ieee1275.rmk: Likewise.
6608         * conf/i386-linuxbios.rmk: Likewise.
6609         * conf/i386-pc.rmk: Likewise.
6610         * conf/powerpc-ieee1275.rmk: Likewise.
6612 2008-06-18  Pavel Roskin  <proski@gnu.org>
6614         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6615         kernel_elf_symlist.c to symlist.c for consistency with other
6616         architectures.  Update all users.
6617         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6619 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6621         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6622         it in prefix.
6624         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6625         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6626         a RAID device, run setup() for all members independently on whether
6627         LVM abstraction is being used.
6628         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6629         If grub-mkimage has set `*install_dos_part == -2', don't override this
6630         value.
6631         Perform *install_dos_part adjustments independently on whether
6632         we're embedding or not.
6633         Clarify error message when image is too big for embedding.
6634         Remove duplicate *install_dos_part stanza.
6636 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6638         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6639         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6640         variables.
6641         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6642         values in grub_ofconsole_normal_color and
6643         grub_ofconsole_highlight_color (they're not directly related to
6644         background and foreground).
6645         (grub_ofconsole_setcolorstate): Extract background and foreground
6646         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6648 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6650         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6651         /boot/grub for the check in last commit, not /boot (they could be
6652         different partitions).
6654 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6656         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6657         asked to setup access for the same partition that provides /boot,
6658         don't bother using UUIDs since our root already has the value we
6659         want.
6661 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6663         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6664         I2O devices.
6665         Patch from Sven Mueller <sven@debian.org>.
6667 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6669         * util/update-grub.in: Check for $EUID instead of $UID.
6670         Reported by Vincent Zweije.
6672 2008-06-16  Bean  <bean123ch@gmail.com>
6674         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6675         (grub_ext2_read_block): Likewise.
6676         (grub_ext2_read_inode): Likewise.
6677         (grub_ext2_mount): Likewise.
6678         (grub_ext2_close): Likewise.
6679         (grub_ext3_get_journal): Removed.
6681         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6682         (grub_reiserfs_read_symlink): Likewise.
6683         (grub_reiserfs_mount): Likewise.
6684         (grub_reiserfs_open): Likewise.
6685         (grub_reiserfs_read): Likewise.
6686         (grub_reiserfs_close): Likewise.
6687         (grub_reiserfs_get_journal): Removed.
6689         * fs/fshelp.c (grub_fshelp_read): Removed.
6690         (grub_fshelp_map_block): Likewise.
6692         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6693         (grub_fshelp_journal): Likewise.
6694         (grub_fshelp_read): Likewise.
6695         (grub_fshelp_map_block): Likewise.
6697 2008-06-16  Pavel Roskin  <proski@gnu.org>
6699         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6700         floating point anymore.
6701         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6703 2008-06-15  Pavel Roskin  <proski@gnu.org>
6705         * commands/ls.c (grub_ls_list_files): Use integer calculations
6706         for human readable format, avoid floating point use.
6707         * kern/misc.c (grub_ftoa): Remove.
6708         (grub_vsprintf): Remove floating point support.
6710 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6712         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6713         devices.
6714         Reported by Max Vozeler.
6716 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6718         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6719         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6720         skipped later.
6721         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6722         the beginning of the prefix.
6724         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6725         It is assumed that if we have a memdisk, grub-mkimage has set
6726         grub_prefix to include the "(memdisk)" drive in it.
6728 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6730         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6731         Initialize keyboard controller after registering the terminal, so that
6732         grub_printf() can be called from grub_keyboard_controller_init().
6734 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6736         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6737         extent-btree which is written as big endian on disk.
6738         Reported by Alain Greppin  <al@chilibi.org>.
6740 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6742         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6743         * util/i386/pc/grub-install.in (modules): Likewise.
6745 2008-06-13  Pavel Roskin  <proski@gnu.org>
6747         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6749 2008-06-13  Bean  <bean123ch@gmail.com>
6751         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6753         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6755         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6756         to indicate sparse block.
6758 2008-06-12  Pavel Roskin  <proski@gnu.org>
6760         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6761         number, grub_fshelp_read() does it for us.
6763         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6764         linear disk read with journal translation.
6765         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6766         * include/grub/fshelp.h: Declare grub_fshelp_read().
6768 2008-06-09  Pavel Roskin  <proski@gnu.org>
6770         * fs/minix.c (grub_minix_mount): Handle error reading
6771         superblock.
6773 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6775         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6776         don't append the RAID prefix afterwards.
6777         Reported by Clint Adams.
6779 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6781         Based on description from Pavel:
6782         * kern/disk.c (grub_disk_check_range): Rename to ...
6783         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6784         tasks performed by this function.
6786 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6788         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6789         `num_serial' (for consistency with other variables).
6790         (struct grub_ntfs_data): Add `uuid' member.
6791         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6792         (grub_ntfs_uuid): New function.
6793         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6795 2008-06-07  Pavel Roskin  <proski@gnu.org>
6797         * util/biosdisk.c (open_device): Revert last change to the
6798         function, it broke installation.  The sector needs to be
6799         different dependent on which device is opened.
6801 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6803         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6804         rest of GRUB, and breakage doesn't happen if its value were modified.
6806         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6807         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6808         a constant (same value).
6809         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6810         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6812 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6814         * util/biosdisk.c (open_device): Do not modify sector offset when
6815         accessing a partition.  kern/disk.c already handles this for us.
6817 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6819         * util/grub-emu.c (grub_machine_init): Move code in this function from
6820         here ...
6821         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6822         segfault in case grub_printf() is called).
6824         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6825         grub_probe.  Update all users not to explicitly add it again.
6826         (grub_device): New variable; contains corresponding device for grubdir.
6827         (fs_module, partmap_module, devabstraction_module): Pass
6828         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6829         every time.
6831 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6833         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6834         is found, print it (same layout as with labels).
6836 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6838         * util/biosdisk.c (get_drive): Rename to ...
6839         (find_grub_drive): ... this.  Update all users.
6841         (get_os_disk): Rename to ...
6842         (convert_system_partition_to_system_disk): ... this.  Update all users.
6844         (find_drive): Rename to ...
6845         (find_system_device): ... this.  Update all users.
6847 2008-06-04  Robert Millan  <rmh@aybabtu.com>
6849         * util/biosdisk.c (get_os_disk): Handle IDA devices.
6850         * util/grub-mkdevicemap.c (get_mmc_disk_name)
6851         (make_device_map): Likewise.
6853 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6855         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
6856         before dereferencing it.
6858         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
6859         union with fat12/fat16-specific ones.  Add some new fields, including
6860         `num_serial' for both versions.
6861         (struct grub_fat_data): Add `uuid' member.
6862         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
6863         names.  Initialize `data->uuid' using `num_serial'.
6864         (grub_fat_uuid): New function.
6865         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
6867         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
6868         (grub_reiserfs_uuid): New function.
6869         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
6870         member.
6872         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
6873         (grub_xfs_uuid): New function.
6874         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
6876 2008-06-01  Robert Millan  <rmh@aybabtu.com>
6878         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
6879         code that is backward compatible with pre-uuid search command.
6881 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6883         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
6884         floppies after everything else, to ensure floppy drive isn't accessed
6885         unnecessarily (patch from Bean).
6887 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6889         * commands/search.c (search_label, search_fs_uuid, search_file): Do
6890         not print device names when we were asked to set a variable.
6892 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6894         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
6895         using "cursor-on" and "cursor-off" commands (understood at least by
6896         the Open Firmware flavour on OLPC).
6898 2008-05-31  Michael Gorven  <michael@gorven.za.net>
6900         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
6901         on and off sequences.
6903 2008-05-31  Robert Millan  <rmh@aybabtu.com>
6905         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
6906         * util/update-grub.in: Likewise.
6908 2008-05-30  Pavel Roskin  <proski@gnu.org>
6910         * util/biosdisk.c (linux_find_partition): Simplify logic and
6911         make the code more universal.  Keep special processing for
6912         devfs, but use a simple rule for all other devices.  If the
6913         device ends with a number, append 'p' and the partition number.
6914         Otherwise, append only the partition number.
6916 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6918         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
6919         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
6920         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
6921         the `root' parameter to Linux.
6923 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6925         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
6926         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
6927         --fs_uuid with --fs-uuid.
6928         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
6929         all filesystems support them).
6931 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6933         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
6934         grub_printf() flags, since we're printing in units of 2 bytes.
6936 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6938         * util/grub.d/00_header.in: Remove obsolete comment referencing
6939         convert_system_path_to_grub_path().
6940         * util/update-grub.in: Likewise.
6941         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
6942         (convert_system_path_to_grub_path): Add a warning message explaining
6943         that this function is deprecated.  Rely on is_path_readable_by_grub()
6944         for the readability checks.
6945         (font_path): Use is_path_readable_by_grub() for the readability
6946         check rather than convert_system_path_to_grub_path().
6948 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6950         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
6951         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
6952         converting it first.
6953         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
6954         grub.cfg for access to font file, and afterwards call it again to set
6955         the root device.
6957 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6959         * commands/search.c (options): Add --fs_uuid option.
6960         (search_fs_uuid): New function.
6961         (grub_cmd_search): Fix --set argument passing.
6962         Use search_fs_uuid() when requested via --fs_uuid.
6963         (grub_search_init): Update help message.
6964         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
6965         and redeclare it as an array of 16-bit words.
6966         (grub_ext2_uuid): New function.
6967         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
6968         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
6969         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
6970         (GRUB_DEVICE_BOOT_UUID): New variables.
6971         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
6972         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
6973         whenever possible.
6974         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
6975         just assume `root' variable has the right value.
6976         * util/grub.d/10_linux.in: Likewise.
6977         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
6978         via PRINT_FS_UUID.
6979         (main): Recognise `-t fs_uuid' argument.
6981 2008-05-30  Robert Millan  <rmh@aybabtu.com>
6983         * util/biosdisk.c (map): Redefine structure to hold information
6984         about GRUB drive name.
6985         (get_drive): Reimplement without assuming (and verifying) BIOS-like
6986         drive names.
6987         (call_hook): Remove.
6988         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
6989         member.  Assume drive has partitions.
6990         (grub_util_biosdisk_open): Access device names via `.device' struct
6991         member.
6992         (open_device): Likewise.
6993         (find_drive): Likewise.
6994         (read_device_map): Adjust map[] usage to match the new struct
6995         definition.  Don't check for duplicates (still possible, but not cheap
6996         anymore).
6997         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
6998         (make_device_name): Remove assumption of BIOS-like drive names.
7000 2008-05-30  Pavel Roskin  <proski@gnu.org>
7002         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7003         compiling execute.c doesn't need grub_script.tab.h anymore.
7004         (normal/command.c_DEPENDENCIES): Likewise.
7005         (normal/function.c_DEPENDENCIES): Likewise.
7006         * conf/i386-ieee1275.rmk: Likewise.
7007         * conf/i386-linuxbios.rmk: Likewise.
7008         * conf/i386-pc.rmk: Likewise.
7009         * conf/powerpc-ieee1275.rmk: Likewise.
7010         * conf/sparc64-ieee1275.rmk: Likewise.
7012 2008-05-29  Pavel Roskin  <proski@gnu.org>
7014         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7015         when scanning metadata for volume group name.
7017         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7018         a generated file, which may only be included from the files with
7019         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7020         use union YYSTYPE, as the later allows forward declaration.
7021         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7023 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7025         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7026         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7027         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7028         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7029         scan codes.
7031 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7033         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7034         control key combinations.
7036 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7038         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7039         * util/ieee1275/grub-install.in: ... to here.
7040         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7041         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7042         (grub_install_SOURCES): Likewise.
7044 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7046         * fs/affs.c: Update copyright year.
7047         * fs/ext2.c: Likewise.
7048         * fs/fshelp.c: Likewise.
7049         * fs/hfsplus.c: Likewise.
7050         * fs/ntfs.c: Likewise.
7051         * fs/xfs.c: Likewise.
7052         * include/grub/fshelp.h: Likewise.
7053         * util/grub-mkdevicemap.c: Likewise.
7055 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7057         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7058         might need to be fatfs to support some firmware implementations
7059         (e.g. OFW or EFI).
7061 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7063         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7064         devices.
7065         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7066         (make_device_map): Likewise.
7068 2008-05-20  Bean  <bean123ch@gmail.com>
7070         * fs/fshelp.c (grub_fshelp_map_block): New function.
7071         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7072         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7074         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7075         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7076         (grub_fshelp_journal): New structure.
7077         (grub_fshelp_map_block): New function prototype.
7078         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7079         (grub_fshelp_map_block): Likewise.
7081         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7082         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7083         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7084         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7085         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7086         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7087         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7088         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7089         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7090         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7091         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7092         (grub_ext2_sblock): New members for journal support.
7093         (grub_ext3_journal_header): New structure.
7094         (grub_ext3_journal_revoke_header): Likewise.
7095         (grub_ext3_journal_block_tag): Likewise.
7096         (grub_ext3_journal_sblock): Likewise.
7097         (grub_fshelp_node): New members logfile and journal.
7098         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7099         grub_fshelp_map_block to get real block number.
7100         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7101         number.
7102         (grub_ext2_read_inode): Likewise.
7103         (grub_ext3_get_journal): New function.
7104         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7105         (grub_ext2_close): Release memory used by journal.
7107         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7108         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7109         (grub_reiserfs_transaction_header): Renamed to
7110         grub_reiserfs_description_block, replace field data with real_blocks.
7111         (grub_reiserfs_commit_block): New structure.
7112         (grub_reiserfs_data): New member journal.
7113         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7114         number.
7115         (grub_reiserfs_read_symlink): Likewise.
7116         (grub_reiserfs_iterate_dir): Likewise.
7117         (grub_reiserfs_open): Likewise.
7118         (grub_reiserfs_read): Likewise.
7119         (grub_reiserfs_get_journal): New function.
7120         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7121         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7122         using grub_reiserfs_get_journal.
7123         (grub_reiserfs_close): Release memory used by journal.
7125         * fs/affs.c (grub_affs_read_block): Change block type to
7126         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7128         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7130         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7132         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7134         * fs/udf.c (grub_udf_read_block): Change block type to
7135         grub_disk_addr_t. Use type cast to avoid warning.
7137         * fs/xfs.c (grub_xfs_read_block): Likewise.
7139 2008-05-16  Christian Franke  <franke@computer.org>
7141         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7142         to ensure that break with ESC will always work.
7143         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7144         Remove ESC from keyboard queue.
7146 2008-05-16  Christian Franke  <franke@computer.org>
7148         * util/biosdisk.c: [__CYGWIN__] Add includes.
7149         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7150         (get_os_disk): Move variable declarations to OS specific
7151         parts to avoid warning.
7152         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7153         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7154         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7155         Cygwin.
7156         * util/getroot.c: [__CYGWIN__] Add includes.
7157         (strip_extra_slashes): Fix "/" case.
7158         [__CYGWIN__] (get_win32_path): New function.
7159         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7160         [__CYGWIN__] (find_root_device): Disable.
7161         [__CYGWIN__] (get_bootsec_serial): New function.
7162         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7163         [__linux__] (grub_guess_root_device): Add early returns to simplify
7164         structure.
7165         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7166         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7167         check for Linux only.
7169 2008-05-15  Bean  <bean123ch@gmail.com>
7171         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7172         keyboard hang problem in apple's intel mac.
7174 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7176         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7177         devices.
7178         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7179         (make_device_map): Likewise.
7180         Reported by Aurelien Jarno <aurel32@debian.org>
7182 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7184         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7185         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7186         (make_device_map): Output entries for xvd type disks.
7188 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7190         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7191         devices.
7192         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7193         (make_device_map): Likewise.
7194         Reported by Roland Dreier <rdreier@cisco.com>
7196 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7198         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7199         grub_strstr() call.  Correct a few mistakes in failure path handling.
7201 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7203         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7204         Do not print a trailing slash (therefore, the root directory is an
7205         empty string).
7206         (convert_system_path_to_grub_path): Do not remove trailing slash
7207         from make_system_path_relative_to_its_root() output.
7209         * util/i386/pc/grub-install.in: Add trailing slash to output from
7210         make_system_path_relative_to_its_root().
7212 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7214         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7215         ensures that output lines aren't intermangled with those sent to
7216         stderr (via grub_util_info()).
7217         * util/grub-probe.c (grub_refresh): Likewise.
7218         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7220 2008-05-05  Christian Franke  <franke@computer.org>
7222         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7223         Add Cygwin device names.
7224         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7225         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7226         (check_device): Return error instead of success on empty name.
7227         (make_device_map): Move label inside linux specific code to
7228         prevent compiler warning.
7230 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7232         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7233         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7234         first boot option.
7235         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7237 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7239         * docs/grub.cfg: New file (example GRUB configuration).
7241 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7243         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7244         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7245         and `disk/ieee1275/nand.c'.
7247 2008-04-25  Bean  <bean123ch@gmail.com>
7249         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7250         i386-linuxbios.
7252         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7253         change the buffer size to 4096 for cdrom device.
7255         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7256         and nand.mod.
7257         (_linux_mod_SOURCES): New variable.
7258         (_linux_mod_CFLAGS): Likewise.
7259         (_linux_mod_LDFLAGS): Likewise.
7260         (linux_mod_SOURCES): Likewise.
7261         (linux_mod_CFLAGS): Likewise.
7262         (linux_mod_LDFLAGS): Likewise.
7263         (nand_mod_SOURCES): Likewise.
7264         (nand_mod_CFLAGS): Likewise.
7265         (nand_mod_LDFLAGS): Likewise.
7267         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7268         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7269         type property. (nand device in olpc don't have this property)
7271         * include/grub/disk.h (grub_disk_dev_id): New macro
7272         GRUB_DISK_DEVICE_NAND_ID.
7274         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7275         function prototype.
7276         (grub_rescue_cmd_initrd): Likewise.
7278         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7279         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7280         ofw_cif_handler and ofw_idt, adjust padding number.
7282         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7283         GRUB_MACHINE_IEEE1275 is defined.
7285         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7286         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7288         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7289         on nested function heap_init.
7290         (grub_upper_mem): New variable for i386-ieee1275.
7291         (grub_get_extended_memory): New function for i386-ieee1275.
7292         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7294         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7295         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7296         property.
7298         * loader/i386/ieee1275/linux.c: New file.
7300         * loader/i386/ieee1275/linux_normal.c: New file.
7302         * disk/ieee1275/nand.c: New file.
7304 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7306         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7307         value.
7308         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7310 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7312         Restructures early code path on ieee1275 to unify grub_main() as
7313         the first C function that is executed in every platform.
7315         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7316         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7317         cmain().
7318         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7319         * kern/ieee1275/cmain.c (cmain): Rename to ...
7320         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7321         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7322         at the beginning.
7324 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7326         * util/update-grub.in: Fix syntax error when setting
7327         `GRUB_PRELOAD_MODULES'.
7328         Reported by Stephane Chazelas <stephane@artesyncp.com>
7330 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7332         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7333         section into account, newer toolchains generate unique build ids
7334         * configure.ac: remove the test for --build-id=none acceptance,
7335         we want build ids to be preserved
7336         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7337         far from other sections don't cause the raw binary images grow
7338         size
7340 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7342         * disk/lvm.c: Update copyright year.
7343         * kern/misc.c: Likewise.
7345 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7347         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7348         there is no memory left for physical volume name.
7350 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7352         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7353         volume name mapping to support bigger than 9 character names properly.
7355 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7357         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7358         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7360 2008-04-13  Christian Franke  <franke@computer.org>
7362         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7363         to create a floppy emulation boot CD when non emulation mode
7364         does not work.
7365         Enable Joliet CD filesystem extension.
7367 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7369         * kern/misc.c (grub_strncat): Fix off-by-one error.
7370         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7372         * kern/env.c (grub_env_context_close): Clear current context, not
7373         previous one.
7374         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7376         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7378 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7380         Improve robustness when handling LVM.
7382         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7383         (and leave `*p' unmodified).
7384         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7385         through it.
7386         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7387         iterating through it.
7388         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7389         through it.
7390         (grub_lvm_scan_device): Check the return value (and fail gracefully
7391         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7392         Don't assume `vg->pvs != NULL' when iterating through it.
7394 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7396         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7397         * genmk.rb (partmap): New variable.
7398         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7399         (#{partmap}): New target rule.
7400         * genpartmaplist.sh: New file.
7401         * Makefile.in (pkglib_DATA): Add partmap.lst.
7402         (partmap.lst): New target rule.
7403         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7404         modules (including all partition maps), instead of preloading them.
7406 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7408         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7409         `linux-boot-prober' (if installed) to detect other operating
7410         systems which are installed on the computer and add them to
7411         the boot menu.
7412         * conf/common.rmk: Build and install 30_os-prober.
7414 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7416         * kern/powerpc/ieee1275/init.c: Move from here ...
7417         * kern/ieee1275/init.c: ... to here.  Update all users.
7419         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7420         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7422         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7423         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7425         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7426         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7428 2008-04-10  Pavel Roskin  <proski@gnu.org>
7430         * configure.ac: Always use "_cv_" in cache variables for
7431         compatibility with Autoconf 2.62.
7433 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7435         Revert grub/machine/init.h addition by Pavel (since it breaks on
7436         i386-ieee1275 and others):
7437         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7438         * util/powerpc/ieee1275/misc.c: Likewise.
7440 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7442         * util/grub-probe.c (probe): Improve error message.
7444 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7446         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7447         (this prevents the presence of a bogus entry from ruining the whole
7448         thing).
7450 2008-04-06  Pavel Roskin  <proski@gnu.org>
7452         * util/biosdisk.c: Include grub/util/biosdisk.h.
7453         * util/grub-fstest.c (execute_command): Make static.
7454         * util/grub-mkdevicemap.c (check_device): Likewise.
7455         * util/i386/pc/misc.c: Include grub/machine/init.h.
7456         * util/powerpc/ieee1275/misc.c: Likewise.
7457         * util/lvm.c: Include grub/util/lvm.h.
7458         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7459         grub/cache.h.
7460         * util/raid.c: Include grub/util/raid.h.
7461         (grub_util_getdiskname): Make static.
7463         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7464         grub_hostfs_fini(), as they are called from grub_init_all() and
7465         grub_fini_all() respectively.  This fixes an infinite loop in
7466         grub-fstest due to double registration of hostfs.
7467         Reported by Christian Franke <Christian.Franke@t-online.de>
7469 2008-04-05  Pavel Roskin  <proski@gnu.org>
7471         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7472         all 8 functions.  Otherwise, probe function 0 only.
7474 2008-04-04  Pavel Roskin  <proski@gnu.org>
7476         * commands/lspci.c (grub_lspci_iter): Print the bus number
7477         correctly.
7479         * commands/lspci.c (grub_pci_classes): Fix typos.
7480         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7481         before device ID, as it's normally done.
7483         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7484         Fix signedness warnings.
7485         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7486         Likewise.
7487         * util/ieee1275/get_disk_name.c: Include config.h so that
7488         _GNU_SOURCE is defined and getline() is declared.  Mark an
7489         unused argument as such.  Fix a signedness warning.
7491 2008-04-02  Pavel Roskin  <proski@gnu.org>
7493         * genkernsyms.sh.in: Use more robust assignments for CC and
7494         srcdir.  Quote srcdir.
7495         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7496         the symbol table is not empty.
7498         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7499         * fs/cpio.c (grub_cpio_read): Likewise.
7501 2008-04-01  Pavel Roskin  <proski@gnu.org>
7503         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7504         * disk/host.c (grub_host_open): Likewise.
7505         * disk/loopback.c (grub_loopback_open): Likewise.
7506         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7507         disk->id as in disk/host.c, not a multi-character constant.
7509         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7510         later is obsolete, potentially dangerous and sets a bad example.
7511         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7512         * util/misc.c (grub_util_get_image_size): Likewise.
7514         * disk/loopback.c (options): Improve help for "--partitions".
7516         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7517         options to align them with the short options, e.g. "echo -e".
7519 2008-03-31  Bean  <bean123ch@gmail.com>
7521         * video/reader/png.c (grub_png_data): New member is_16bit and
7522         image_data.
7523         (grub_png_decode_image_header): Detect 16 bit png image.
7524         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7525         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7526         (grub_video_reader_png): Release memory occupied by image_data.
7528         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7529         4096 bytes.
7530         (grub_nfs_mount): Skip the test for sector per cluster.
7532         * include/grub/ntfs.h (MAX_SPC): Removed.
7534 2008-03-31  Bean  <bean123ch@gmail.com>
7536         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7537         (grub_probe_SOURCES): Add fs/afs.c.
7538         (grub_fstest_SOURCES): Likewise.
7539         (afs_mod_SOURCES): New variable.
7540         (afs_mod_CFLAGS): Likewise.
7541         (afs_mod_LDFLAGS): Likewise.
7543         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7544         (grub_emu_SOURCES): Likewise.
7546         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7548         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7550         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7552         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7554         * fs/afs.c: New file.
7556 2008-03-30  Pavel Roskin  <proski@gnu.org>
7558         * disk/host.c: Include grub/misc.h to fix a warning.
7559         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7560         warnings about implicit declarations.
7562         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7563         variable.
7564         * include/grub/i386/loader.h: Change declaration of
7565         grub_linux_boot() to match what grub_loader_set() expects.
7566         * util/getroot.c (grub_guess_root_device): Return const char* to
7567         fix a warning.
7568         * util/grub-probe.c (probe): Fix a warning about uninitialized
7569         abstraction_name variable.
7570         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7571         second argument as unused to fix a warning.
7573         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7574         missing grub_error() call.
7576         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7577         2.60 and newer uses it to define datadir.
7579         * commands/sleep.c: Fix warning about implicit declaration.
7580         * disk/memdisk.c: Likewise.
7581         * loader/aout.c: Likewise.
7582         * loader/i386/bsd_normal.c: Likewise.
7583         * util/grub-probe.c: Likewise.
7585         * commands/i386/cpuid.c (has_longmode): Make static.
7586         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7587         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7589         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7590         GDT.  This is more robust, as %ds can change.
7591         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7592         calling real_to_prot().
7593         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7595 2008-03-28  Pavel Roskin  <proski@gnu.org>
7597         * kern/i386/pc/startup.S: Assert that uncompressed functions
7598         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7599         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7600         code, as they push parts of the code (error handlers) beyond
7601         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7602         code as correctness and size.
7604 2008-03-28  Pavel Roskin  <proski@gnu.org>
7606         * kern/i386/pc/startup.S
7607         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7608         data block address to the real mode, keep offset minimal.  This
7609         works around a bug in AWARD BIOS on old Athlon systems, which
7610         makes CD detection hang.
7612 2008-03-26  Pavel Roskin  <proski@gnu.org>
7614         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7615         const.
7616         * include/grub/normal.h: Add grub_parse_color_name_pair()
7617         declaration.
7619 2008-03-24  Bean  <bean123ch@gmail.com>
7621         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7622         (cd_count): Removed.
7623         (cd_drive): New variable.
7624         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7625         (grub_biosdisk_call_hook): Likewise.
7626         (grub_biosdisk_iterate): Change cdrom detection method.
7627         (grub_biosdisk_open): Replace cd_start with cd_drive.
7628         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7629         detect cdrom device.
7631         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7632         Removed.
7633         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7634         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7635         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7636         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7637         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7638         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7639         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7640         (grub_biosdisk_cdrp): New structure.
7641         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7643         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7645         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7646         device.
7648         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7649         New function.
7651 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7653         Remove 2 TiB limit in ata.mod.
7654         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7655         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7656         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7657         grub_uint64_t instead of grub_uint32_t.
7659 2008-03-05  Bean  <bean123ch@gmail.com>
7661         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7662         (grub_multiboot): Set boot device.
7664         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7666 2008-03-02  Bean  <bean123ch@gmail.com>
7668         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7669         symlink_buffer.
7671 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7673         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7674         texinfo.tex.
7676         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7677         modified.
7679         * docs/fdl.texi: New file.
7681         * docs/mdate-sh: New file. Copied from gnulib.
7682         * docs/texinfo.tex: Likewise.
7684         * config.guess: Updated from gnulib.
7685         * install-sh: Likewise.
7687 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7689         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7690         (aout_mod_SOURCES): New variable.
7691         (aout_mod_CFLAGS): Likewise.
7692         (aout_mod_LDFLAGS): Likewise.
7694         * conf/i386-ieee1275.rmk: Likewise.
7696 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7698         * util/update-grub.in: Reorganise terminal validity check.  Accept
7699         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7700         Based on suggestion by Franklin PIAT.
7702 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7704         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7705         function.
7706         * util/getroot.c (grub_util_check_block_device): New function that
7707         returns the given argument if it is a block device and returns NULL else.
7708         * util/grub-probe.c (argument_is_device): New variable.
7709         (probe): Promote device_name from a variable to an argument. Receive
7710         device_name from grub_util_check_block_device() if path is NULL and from
7711         grub_guess_root_device() else. Do not free() device_name anymore.
7712         (options): Introduce new parameter '-d, --device'.
7713         (main): Add description of the new parameter to the help screen.
7714         Rename path variable to argument. Set argument_is_device if the '-d'
7715         option is given. Pass argument to probe() depending on
7716         argument_is_device.
7718 2008-02-24  Bean  <bean123ch@gmail.com>
7720         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7721         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7722         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7723         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7724         (GRUB_ISO9660_VOLDESC_END): Likewise.
7725         (grub_iso9660_primary_voldesc): New member escape.
7726         (grub_iso9660_data): New member joliet.
7727         (grub_iso9660_convert_string): New function.
7728         (grub_iso9660_mount): Detect joliet extension.
7729         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7730         (grub_iso9660_iso9660_label): Likewise.
7732         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7733         (grub_setup_SOURCES): Add fs/udf.c.
7734         (grub_fstest_SOURCES): Likewise.
7735         (udf_mod_SOURCES): New variable.
7736         (udf_mod_CFLAGS): Likewise.
7737         (udf_mod_LDFLAGS): Likewise.
7739         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7740         (grub_emu_SOURCES): Likewise.
7742         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7744         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7746         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7748         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7750         * fs/udf.c: New file.
7752 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7754         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7755         (normal/lexer.c_DEPENDENCIES): New variables.
7756         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7757         (normal/lexer.c_DEPENDENCIES): Likewise.
7758         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7759         (normal/lexer.c_DEPENDENCIES): Likewise.
7760         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7761         (normal/lexer.c_DEPENDENCIES): Likewise.
7762         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7763         (normal/lexer.c_DEPENDENCIES): Likewise.
7764         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7765         (normal/lexer.c_DEPENDENCIES): Likewise.
7767 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7769         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7770         since they were intended to be in hex.  This didn't break previously
7771         because of a bug in gpt_partition_map_iterate() (see below).
7773         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7774         when checking the validity of GPT header.
7775         Remove `partno', since it always provides the same information as `i'.
7777 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7779         * include/grub/efi/time.h: Fix a wrong comment.
7781 2008-02-19  Pavel Roskin  <proski@gnu.org>
7783         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7784         message.
7786 2008-02-19  Bean  <bean123ch@gmail.com>
7788         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7789         (aout_mod_SOURCES): New variable.
7790         (aout_mod_CFLAGS): Likewise.
7791         (aout_mod_LDFLAGS): Likewise.
7792         (_bsd_mod_SOURCES): New variable.
7793         (_bsd_mod_CFLAGS): Likewise.
7794         (_bsd_mod_LDFLAGS): Likewise.
7795         (bsd_mod_SOURCES): New variable.
7796         (bsd_mod_CFLAGS): Likewise.
7797         (bsd_mod_LDFLAGS): Likewise.
7799         * include/grub/aout.h: New file.
7801         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7803         * include/grub/i386/bsd.h: New file.
7805         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7806         to make it public.
7808         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7809         function is called, so that it's possible to change it inside the hook.
7810         (grub_elf64_load): Likewise.
7811         (grub_elf_file): Don't close the file if elf header is not found.
7812         (grub_elf_close): Close the file if grub_elf_file fails (The new
7813         grub_elf_file won't close it).
7814         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7815         (grub_elf64_size): Likewise.
7817         * kern/i386/loader.S (grub_unix_real_boot): New function.
7819         * loader/aout.c: New file.
7821         * loader/i386/bsd.c: New file.
7823         * loader/i386/bsd_normal.c: New file.
7825         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7827         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7828         can test other formats.
7830 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7832         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7833         (grub_gpt_partition_type_empty): Redefine with macro from
7834         `<grub/gpt_partition.h>'.
7835         (gpt_partition_map_iterate): Adjust partition type comparison.
7837         Export `entry' as partmap-specific `part.data' struct.
7838         (grub_gpt_header, grub_gpt_partentry): Move from here ...
7840         * include/grub/gpt_partition.h (grub_gpt_header)
7841         (grub_gpt_partentry): ... to here (new file).
7843         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
7845         (grub_gpt_partition_type_bios_boot): New const variable, defined
7846         with macro from `<grub/gpt_partition.h>'.
7848         (setup): Replace `first_start' with `embed_region', which keeps
7849         track of the embed region (and is partmap-agnostic).
7851         Replace find_first_partition_start() with find_usable_region(),
7852         which finds a usable region for embedding using partmap-specific
7853         knowledge (supports PC/MSDOS and GPT).
7855         Fix all assumptions that the embed region start at sector 1, using
7856         `embed_region.start' from now on.  Similarly, use `embed_region.end'
7857         rather than `first_start' to calculate available size.
7859         In grub_util_info() message, replace "into after the MBR" with an
7860         indication of the specific sector our embed region starts at.
7862 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7864         * DISTLIST: Replace `commands/ieee1275/halt.c' and
7865         `commands/ieee1275/reboot.c' with `commands/halt.c' and
7866         `commands/reboot.c'.
7867         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7868         (halt_mod_SOURCES): Likewise.
7869         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
7870         (halt_mod_SOURCES): Likewise.
7872 2008-02-17  Christian Franke  <franke@computer.org>
7874         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
7876 2008-02-17  Robert Millan  <rmh@aybabtu.com>
7878         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7879         set `first_start' to 0 for non-PC/MSDOS partition maps.
7881 2008-02-16  Robert Millan  <rmh@aybabtu.com>
7883         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
7884         do not assume partition map is PC/MSDOS before performing checks that
7885         are specific to that layout.
7887 2008-02-13  Robert Millan  <rmh@aybabtu.com>
7889         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
7890         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
7891         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
7893 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
7895         * configure.ac: Only a cosmetic change on the handling of
7896         -fno-stack-protector.
7898 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
7900         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
7901         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
7902         reboot.c.
7903         (grub_install_SOURCES): Add halt.mod and reboot.mod.
7904         (halt_mod_SOURCES): New variable.
7905         (halt_mod_CFLAGS): Likewise.
7906         (halt_mod_LDFLAGS): Likewise.
7907         (reboot_mod_SOURCES): Likewise.
7908         (reboot_mod_CFLAGS): Likewise.
7909         (reboot_mod_LDFLAGS): Likewise.
7911         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
7912         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
7913         reboot.c.
7914         (halt_mod_SOURCES): Likewise.
7915         (reboot_mod_SOURCES): Likewise.
7917         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
7918         commands/i386/pc/reboot.c by commands/reboot.c.
7919         (reboot_mod_SOURCES): Likewise.
7921         * commands/i386/pc/reboot.c: merge this file ...
7923         * commands/ieee1275/reboot.c: ... and this file ...
7925         * commands/reboot.c: ... to this file.
7926         Add some precompiler directive to include the correct header for
7927         each machine.
7929         * commands/ieee1275/halt.c: move this file ...
7931         * commands/halt.c: ... to here.
7932         Add some precompiler directive to include the correct header for
7933         each machine.
7935         * include/grub/efi/efi.h (grub_reboot): New function declaration.
7936         (grub_halt): Likewise.
7938         * kern/efi/efi.c (grub_reboot): New function.
7939         (grub_halt): Likewise.
7941 2008-02-12  Robert Millan  <rmh@aybabtu.com>
7943         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
7944         /dev (like it is done for /dev/mapper).  This doesn't provide support
7945         for EVMS, but at least it is now easy to identify the problem when it
7946         arises.
7948 2008-02-11  Robert Millan  <rmh@aybabtu.com>
7950         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
7951         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
7952         comparing it with -1, not 0.
7954 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7956         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
7957         `disk/lvm.c'.
7958         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7959         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
7961         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
7962         `disk/lvm.c' to the end of the list.
7963         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7964         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
7966 2008-02-10  Robert Millan  <rmh@aybabtu.com>
7968         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
7969         grub_print_error() instead.  This will let user know why we're entering
7970         rescue mode.
7971         Based on suggestions from Sam Morris.
7973 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
7975         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
7976         on remaining N args, instead of "--" arg N times.
7978 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
7980         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
7981         (fill_with_default_glyph): Changed to use unknown_glyph for fill
7982         pattern for unknown glyphs.
7984 2008-02-09  Robert Millan  <rmh@aybabtu.com>
7986         * configure.ac: Probe for `help2man'.
7987         * Makefile.in (builddir): New variable.
7988         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
7989         or otherwise add a few flags/options to it.
7990         (install-local): For every executable utility or script that is
7991         installed, invoke $(HELP2MAN) to install a manpage based on --help
7992         output.
7994         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
7995         that it doesn't prevent --help from working in build tree.
7997         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
7998         with `bug-grub@gnu.org'.
7999         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8000         * util/update-grub.in (usage): New function.
8001         Implement proper argument check, with support for --help and --version
8002         (as well as existing -y).
8004 2008-02-09  Christian Franke  <franke@computer.org>
8006         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8007         avoid overwriting previous output.
8008         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8010 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8012         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8013         drawing the menu.
8015 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8017         * commands/sleep.c: New file.
8018         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8019         (sleep_mod_SOURCES): New variable.
8020         (sleep_mod_CFLAGS): Likewise.
8021         (sleep_mod_LDFLAGS): Likewise.
8023 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8025         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8026         situations in which we can deduce the RAID size and the superblock
8027         doesn't match it.
8029 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8031         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8032         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8033         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8035         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8036         and return a grub_diskmemberlist_t composed of physical array members.
8037         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8039         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8040         prototype.
8041         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8042         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8043         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8045         * util/grub-probe.c (probe): Move partmap probing code from here ...
8046         (probe_partmap): ... to here.
8047         (probe): Use probe_partmap() once for the disk we're probing, and
8048         additionally, when such disk contains a memberlist() struct member,
8049         once for each disk that is contained in the structure returned by
8050         memberlist().
8052 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8054         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8055         environment variable to 'all' in order to obtain debug output from
8056         non-util/ code.
8057         * util/i386/pc/grub-setup.c (main): Likewise.
8059 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8061         * disk/raid.c (grub_raid_scan_device): Check for
8062         `array->device[sb.this_disk.number]' rather than for
8063         `array->device[sb.this_disk.number]->name', since the latter is not
8064         guaranteed to be accessible.
8066 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8068         * disk/raid.c: Update copyright.
8069         * fs/cpio.c: Likewise.
8070         * include/grub/raid.h: Likewise.
8071         * loader/i386/pc/multiboot.c: Likewise.
8072         * util/hostfs.c: Likewise.
8074 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8076         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8077         to a grub_disk_t array.
8078         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8079         `device[x]'.
8080         (grub_raid_scan_device): Replace `device[x].name' accesses with
8081         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8083 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8085         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8086         grub_dprintf() calls.
8087         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8088         error message.
8090 2008-02-07  Christian Franke  <franke@computer.org>
8092         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8093         instead of fseek and ftell to support large files.
8094         (grub_hostfs_read): Likewise.
8096 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8098         Patch from Jeroen Dekkers.
8099         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8100         failure, since successfully reading all array members might not be
8101         required.
8103 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8105         * util/grub-probe.c (probe): Simplify partmap probing (with the
8106         assumption that the first word up to the underscore equals to
8107         the module name).
8109 2008-02-06  Christian Franke  <franke@computer.org>
8111         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8112         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8113         last block of a cpio or tar stream.
8114         Check for "TRAILER!!!" instead of any empty data
8115         block to detect last block of a cpio stream.
8116         (grub_cpio_dir): Fix constness of variable np.
8117         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8118         cpio or tar trailer is detected.  This fixes a crash
8119         on open of a non existing file.
8121 2008-02-05  Bean  <bean123ch@gmail.com>
8123         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8124         address of entry.
8125         (grub_multiboot_load_elf64): Likewise.
8126         (grub_multiboot): Initialize mbi structure.
8128         * util/grub-fstest.c: Don't include unused header file script.h.
8130         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8131         of file.
8132         (grub_fstest_SOURCES): Likewise.
8134 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8136         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8137         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8138         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8139         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8141         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8142         (translation_table): Replace hardcoded values with macros
8143         provided by `<grub/term.h>'.
8145         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8146         (keyboard_map): Correct/add a few values, with macros provided
8147         by `<grub/term.h>'.
8148         (keyboard_map_shift): Zero values that don't differ from their
8149         `keyboard_map' equivalents.
8150         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8151         Discard the second scan code that is always sent by Caps lock.
8152         Only use `keyboard_map_shift' when it provides a non-zero value,
8153         otherwise fallback to `keyboard_map'.
8155 2008-02-04  Bean  <bean123ch@gmail.com>
8157         * Makefile.in (enable_grub_fstest): New variable.
8159         * conf/common.rmk (grub_fstest_init.lst): New rule.
8160         (grub_fstest_init.h): Likewise.
8161         (grub_fstest_init.c): Likewise.
8162         (util/grub-fstest.c_DEPENDENCIES): New variable.
8163         (grub_fstest_SOURCES): Likewise.
8165         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8167         * util/grub-fstest.c: New file.
8169 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8171         Make grub-setup handle a separate root device.
8173         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8174         so that the root device can be compared with the destination
8175         device.
8176         When embedding the core image, if the root and destination devices
8177         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8178         0xFF.
8179         When not embedding, set ROOT_DRIVE to 0xFF.
8181 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8183         Add support for having a grub directory in a different drive. This
8184         is still only the data handling part.
8186         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8187         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8188         (grub_root_drive): New variable.
8190         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8191         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8192         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8193         as it was.
8195         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8197         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8198         macro.
8199         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8201         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8202         is bogus, because PXE booting does not specify any drive
8203         correctly.
8205         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8206         am not sure if this is really correct.
8208         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8209         is always identical to the boot drive when booting from a CD.
8211         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8212         longer.
8213         (root_drive): New variable.
8214         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8215         (setup_sectors): Push %dx right after popping it, because %dh will
8216         be modified later.
8217         (copy_buffer): Restore %dx.
8219 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8221         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8222         use `cdboot.img' for cdrom images.
8224 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8226         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8227         only setup gfxterm when `font' command has succeeded.
8229 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8231         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8232         (grub_rescue_cmd_multiboot_loader)
8233         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8235 2008-02-03  Pavel Roskin  <proski@gnu.org>
8237         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8238         %edx and %esi from stack only after grub_gate_a20() is called.
8239         grub_gate_a20() clobbers %edx.
8241 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8243         * configure.ac (AC_INIT): Bumped to 1.96.
8245         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8246         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8247         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8248         video/readers/png.c.
8250 2008-02-03  Bean  <bean123ch@gmail.com>
8252         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8253         (cdboot_img_SOURCES): New variable.
8254         (cdboot_img_ASFLAGS): New variable.
8255         (cdboot_img_LDFLAGS): New variable.
8257         * boot/i386/pc/cdboot.S: New file.
8259         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8260         (cd_count): Likewise.
8261         (grub_biosdisk_get_drive): Add support for cd device.
8262         (grub_biosdisk_call_hook): Likewise.
8263         (grub_biosdisk_iterate): Likewise.
8264         (grub_biosdisk_open): Likewise.
8265         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8266         (grub_biosdisk_rw): Support reading from cd device.
8267         (GRUB_MOD_INIT): Iterate cd devices.
8269         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8270         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8271         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8273         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8275 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8277         * commands/read.c: New file.
8278         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8279         (read_mod_SOURCES): New variable.
8280         (read_mod_CFLAGS): Likewise.
8281         (read_mod_LDFLAGS): Likewise.
8283 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8285         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8286         determining whether menu has to be displayed.
8288 2008-02-02  Marco Gerards  <marco@gnu.org>
8290         * bus/pci.c: New file.
8292         * include/grub/pci.h: Likewise.
8294         * include/grub/i386/pc/pci.h: Likewise.
8296         * commands/lspci.c: Likewise.
8298         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8299         `lspci.mod'.
8300         (pci_mod_SOURCES): New variable.
8301         (pci_mod_CFLAGS): Likewise.
8302         (pci_mod_LDFLAGS): Likewise.
8303         (lspci_mod_SOURCES): Likewise.
8304         (lspci_mod_CFLAGS): Likewise.
8305         (lspci_mod_LDFLAGS): Likewise.
8307 2008-02-02  Bean  <bean123ch@gmail.com>
8309         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8310         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8312         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8313         (grub_xfs_btree_node): New structure.
8314         (grub_xfs_btree_root): New structure.
8315         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8316         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8317         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8318         (GRUB_XFS_EXTENT_SIZE): Likewise.
8319         (grub_xfs_read_block): Support btree format type.
8320         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8321         Use directory block as basic unit.
8323         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8325         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8326         __attribute__ ((__regparm__ (1))).
8328 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8330         Correct a mistake in previous commit.
8332         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8333         top.
8334         (normal/command.c_DEPENDENCIES): New variable.
8336 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8338         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8339         top.
8340         (normal/command.c_DEPENDENCIES): New variable.
8341         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8342         * conf/i386-ieee1275.rmk: Likewise.
8343         * conf/i386-linuxbios.rmk: Likewise.
8344         * conf/i386-pc.rmk: Likewise.
8345         * conf/sparc64-ieee1275.rmk: Likewise.
8346         * conf/powerpc-ieee1275.rmk: Likewise.
8347         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8349         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8351 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8353         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8354         call at beginning of function.
8356 2008-01-31  Pavel Roskin  <proski@gnu.org>
8358         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8359         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8360         (grub_mkrescue_SOURCES): Likewise.
8361         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8363 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8365         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8366         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8367         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8368         (grub_probe_SOURCES): ... to here.
8370         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8371         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8372         * conf/i386-ieee1275.rmk: Likewise.
8373         * conf/i386-linuxbios.rmk: Likewise.
8374         * conf/powerpc-ieee1275.rmk: Likewise.
8376 2008-01-30  Tristan Gingold  <gingold@free.fr>
8378         * kern/rescue.c: Silently accept empty lines.
8380 2008-01-29  Bean  <bean123ch@gmail.com>
8382         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8383         (real_code_2): Code cleanup and change comment style.
8384         (move_memory): Avoid using 32-bit address mode.
8386 2008-01-29  Bean  <bean123ch@gmail.com>
8388         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8389         (png_mod_SOURCES): New variable.
8390         (png_mod_CFLAGS): Likewise.
8391         (png_mod_LDFLAGS): Likewise.
8393         * video/readers/png.c: New file.
8395 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8397         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8398         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8399         `ifndef GRUB_MOD_GAP' hack.
8400         * util/elf/grub-mkimage.c (add_segments): Likewise.
8402 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8404         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8405         `GRUB_MOD_GAP' for platforms in which it's not defined.
8406         * util/elf/grub-mkimage.c (add_segments): Likewise.
8408 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8410         Get grub-emu to build again (including parallel builds).
8412         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8413         Split into ...
8414         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8415         (normal/execute.c_DEPENDENCIES): ... this, ...
8416         (grub-emu_DEPENDENCIES): ... and this.
8418         * conf/i386-efi.rmk: Likewise.
8419         * conf/i386-linuxbios.rmk: Likewise.
8420         * conf/i386-ieee1275.rmk: Likewise.
8421         * conf/powerpc-ieee1275.rmk: Likewise.
8422         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8424 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8426         * NEWS: Add a few items.
8428 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8430         Fix parallel builds with grub-emu.  Based on earlier commit for
8431         grub-probe and grub-setup.
8433         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8434         (util/grub-emu.c_DEPENDENCIES): ... this.
8435         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8436         (util/grub-emu.c_DEPENDENCIES): ... this.
8437         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8438         (util/grub-emu.c_DEPENDENCIES): ... this.
8439         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8440         (util/grub-emu.c_DEPENDENCIES): ... this.
8441         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8442         (util/grub-emu.c_DEPENDENCIES): ... this.
8444 2008-01-27  Pavel Roskin  <proski@gnu.org>
8446         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8447         to create a gap between _end and the modules added to the image
8448         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8449         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8450         * util/elf/grub-mkimage.c (add_segments): Likewise.
8452 2008-01-26  Pavel Roskin  <proski@gnu.org>
8454         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8455         just return an error.
8457 2008-01-26  Bean  <bean123ch@gmail.com>
8459         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8460         (grub_reiserfs_get_item): Save offset of the next item.
8461         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8463 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8465         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8466         make all filesystem sources appear together (possibly fixing omissions
8467         while at it).
8468         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8469         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8470         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8471         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8473         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8474         add `kern/file.c'.
8475         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8476         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8477         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8478         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8480         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8481         (probe): Add a sanity check to make sure of our ability to read
8482         requested files when probing for filesystem type.
8484         * genmk.rb: Update copyright year (2007).
8486         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8487         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8488         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8489         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8490         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8491         : Remove function prototypes.
8493 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8495         Revert my previous commits (based on wrong assumption of how grub_errno
8496         works).
8498         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8499         * kern/file.c (grub_file_open): Likewise.
8501 2008-01-24  Pavel Roskin  <proski@gnu.org>
8503         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8504         that hang if GRUB tries to setup colors.
8505         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8506         colors for firmwares that don't support it.
8507         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8508         Recognize Open Hack'Ware, set flags to work around its
8509         limitations.
8511 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8513         * kern/file.c (grub_file_open): Do not account previous failures of
8514         unrelated functions when grub_errno is checked for.
8515         Reported by Oleg Strikov.
8517 2008-01-24  Bean  <bean123ch@gmail.com>
8519         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8520         (grub_ufs_sblock): New member volume name.
8521         (grub_ufs_find_file): Fix string copy bug.
8522         (grub_ufs_label): Implement this function properly.
8524         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8525         (grub_hfs_iterate_records): Use the correct file number for extents
8526         and catalog file. Fix problem in next index calculation.
8527         (grub_hfs_find_node): Replace recursive function call with loop.
8528         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8530 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8532         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8533         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8534         (grub_multiboot2_real_boot): New function prototype.
8536         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8537         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8539         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8540         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8542 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8544         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8545         #ifdef'ed out grub_printf().
8547 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8549         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8550         grub_dprintf calls, since they make "debug=all" mode unusable.
8551         (grub_console_checkkey): Likewise.
8553 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8555         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8556         `term/i386/pc/at_keyboard.c'.
8557         (pkglib_MODULES): Add `serial.mod'.
8558         (serial_mod_SOURCES): New variable.
8559         (serial_mod_CFLAGS): Likewise.
8560         (serial_mod_LDFLAGS): Likewise.
8562         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8563         `<grub/powerpc/ieee1275/console.h>'.
8564         (grub_keyboard_controller_init): New function prototype.
8565         (grub_console_checkkey): Likewise.
8566         (grub_console_getkey): Likewise.
8568         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8569         keyboard on i386.
8571         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8572         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8574 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8576         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8577         present, "(memdisk)/boot/grub" becomes the default prefix.
8579         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8580         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8581         allows users to overlay additional files into the image.
8583 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8585         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8586         and `machine/memory.h'.
8587         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8588         (_multiboot_mod_SOURCES): New variable.
8589         (_multiboot_mod_CFLAGS): Likewise.
8590         (_multiboot_mod_LDFLAGS): Likewise.
8591         (multiboot_mod_SOURCES): Likewise.
8592         (multiboot_mod_CFLAGS): Likewise.
8593         (multiboot_mod_LDFLAGS): Likewise.
8595         * include/grub/i386/ieee1275/loader.h: New file.
8597         * include/grub/i386/ieee1275/machine.h: Likewise.
8599         * include/grub/i386/ieee1275/memory.h: Likewise.
8601         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8602         variable declaration.
8603         (grub_os_area_size): Likewise.
8605         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8606         (grub_lower_mem, grub_upper_mem): New variables.
8607         (grub_stop_floppy): New function (just to make
8608         grub_multiboot2_real_boot() happy).
8610         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8611         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8612         (grub_stop): New function.
8613         Include `"../realmode.S"' and `"../loader.S"'.
8615         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8616         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8618         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8619         rely on grub_multiboot2_real_boot() for final boot.
8621 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8623         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8624         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8625         device that doesn't look like an SD card.
8626         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8627         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8628         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8629         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8630         found.
8632 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8634         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8635         avoid claiming over our own code.
8637 2008-01-22  Bean  <bean123ch@gmail.com>
8639         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8640         (jpeg_mod_SOURCES): New variable.
8641         (jpeg_mod_CFLAGS): Likewise.
8642         (jpeg_mod_LDFLAGS): Likewise.
8644         * video/readers/jpeg.c : New file.
8646 2008-01-22  Bean  <bean123ch@gmail.com>
8648         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8649         there are no more items.
8651 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8653         * kern/mm.c (grub_mm_init_region): Improve debug message.
8655 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8657         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8658         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8659         address.
8660         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8661         a C macro.
8662         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8663         Indicates start of upper memory.
8664         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8665         (generate_image): Abort when image size is big enough to corrupt
8666         upper memory.
8668         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8669         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8670         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8671         instead of hardcoding 0xA0000.
8672         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8673         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8674         instead of hardcoding 0xA0000.
8676 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8678         * disk/memdisk.c (memdisk_size): New variable.
8679         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8680         `memdisk_size'.
8681         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8682         image to dynamic memory.
8683         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8684         `memdisk_size'.  Free memdisk block.
8686 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8688         Fix detection of very small filesystems (like tar).
8690         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8691         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8692         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8693         a problem with this disk).
8695 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8697         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8698         on grub_biosdisk_rw_standard() error.
8700 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8702         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8703         recent changes.
8704         * kern/elf.c: Likewise.
8705         * kern/ieee1275/ieee1275.c: Likewise.
8706         * kern/powerpc/ieee1275/openfw.c: Likewise.
8707         * term/ieee1275/ofconsole.c: Likewise.
8709 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8711         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8713         * include/grub/kernel.h (grub_arch_memdisk_addr)
8714         (grub_arch_memdisk_size): Moved from here ...
8716         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8717         (grub_arch_memdisk_size): ... to here.
8719 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8721         Mostly based on bugfix from Bean.
8723         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8724         attribute with hook() parameter.
8725         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8726         declaration.
8727         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8728         attribute with hook() parameter.
8729         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8730         declaration.
8732 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8734         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8735         (pkglib_MODULES): Add `memdisk.mod'.
8736         (memdisk_mod_SOURCES): New variable.
8737         (memdisk_mod_CFLAGS): Likewise.
8738         (memdisk_mod_LDFLAGS): Likewise.
8740         * disk/memdisk.c: New file.
8742         * include/grub/disk.h (grub_disk_dev_id): Add
8743         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8745         * include/grub/i386/pc/kernel.h
8746         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8747         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8748         (grub_kernel_image_size): New variable declaration.
8749         (grub_total_module_size): Likewise.
8750         (grub_memdisk_image_size): Likewise.
8752         * include/grub/i386/pc/memory.h
8753         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8755         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8756         (grub_arch_memdisk_addr): New variable declaration.
8757         (grub_arch_memdisk_size): Likewise.
8759         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8760         (grub_arch_memdisk_size): Likewise.
8762         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8763         (codestart): Replace hardcoded `0x100000' with
8764         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8766         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8767         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8768         not NULL, append the contents of the file it refers to, at the end of
8769         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8770         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8771         (options): Add "memdisk"|'m' option.
8772         (main): Parse --memdisk|-m option, and pass user-provided path as
8773         parameter to generate_image().
8775 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8777         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8778         grub_dprintf() calls from here ...
8779         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8781 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8783         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8785         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8786         declaration.
8787         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8788         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8789         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8790         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8791         property).
8792         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8793         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8795 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8797         Get rid of confusing function (superseded by
8798         `grub_ieee1275_get_integer_property')
8799         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8800         prototype.
8801         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8802         function.
8803         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8804         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8805         in native endianness from grub_ieee1275_get_integer_property().
8807 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8809         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8810         command after "shut-down", since implementations differ on which
8811         the command for halt is.
8813 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8815         * include/grub/i386/linuxbios/console.h: Add header protection.
8816         (grub_keyboard_controller_init): New function prototype.
8817         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8818         (KEYBOARD_COMMAND_READ): Likewise.
8819         (KEYBOARD_COMMAND_WRITE): Likewise.
8820         (KEYBOARD_SCANCODE_SET1): Likewise.
8821         (grub_keyboard_controller_write): New function.
8822         (grub_keyboard_controller_read): Likewise.
8823         (grub_keyboard_controller_init): Likewise.
8825         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8826         (grub_console_init): On coreboot/LinuxBIOS, call
8827         grub_keyboard_controller_init().
8829 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8831         PowerPC changes provided by Pavel Roskin.
8833         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8834         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
8835         don't rely on cmain() doing it.
8836         * kern/i386/ieee1275/startup.S (_start): Store %eax in
8837         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
8839 2008-01-16  Robert Millan  <rmh@aybabtu.com>
8841         * include/grub/i386/linuxbios/memory.h
8842         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
8843         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
8844         receive `table_header' as argument.  Instead, probe for it in the
8845         known memory ranges where it can be present.
8846         (grub_available_iterate): Do not pass a fixed `table_header' address
8847         to grub_linuxbios_table_iterate().
8849 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8851         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
8852         * conf/i386-ieee1275.rmk: New file.
8853         * include/grub/i386/ieee1275/console.h: Likewise.
8854         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
8855         * include/grub/i386/ieee1275/kernel.h: Likewise.
8856         * include/grub/i386/ieee1275/time.h: Likewise.
8857         * kern/i386/ieee1275/init.c: Likewise.
8858         * kern/i386/ieee1275/startup.S: Likewise.
8860 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8862         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
8863         when pointers are 32-bit (but still do set it to one when they are
8864         64-bit).
8866 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8868         * include/grub/ieee1275/ieee1275.h
8869         (grub_ieee1275_get_integer_property): New function prototype.
8871         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
8872         (grub_ieee1275_get_integer_property): New function.  Wraps around
8873         grub_ieee1275_get_property() to handle endianness.
8875         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
8876         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
8877         where appropriate.
8878         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
8879         (grub_map): Likewise.
8880         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
8882 2008-01-15  Bean  <bean123ch@gmail.com>
8884         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
8885         (grub_script_execute_cmdline): Reset grub_errno.
8887         * normal/main.c (read_config_file): Reset grub_errno.
8889         * normal/parse.y (script_init): New.
8890         (script): Move function and menuentry here.
8891         (delimiter): New.
8892         (command): Add delimiter at the end of command.
8893         (commands): Adjust to match the new command.
8894         (commandblock): Remove grub_script_lexer_record_start.
8895         (menuentry): Add grub_script_lexer_record_start, use the new commands.
8896         (if): Use the new commands.
8898         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
8900 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8902         * normal/menu.c (run_menu): Move timeout message from here ...
8903         (print_timeout): ... to here.
8904         (run_menu): Use print_timeout() once during initial draw to print
8905         the whole message, and again in every clock tick to update only
8906         the number of seconds.
8908 2008-01-15  Robert Millan  <rmh@aybabtu.com>
8910         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
8911         actual size of `available' from grub_ieee1275_get_property(), and
8912         restrict parsing to that bound.
8914 2008-01-15  Christian Franke  <franke@computer.org>
8916         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
8917         (argp_program_version): Remove variable.
8918         (argp_program_bug_address): Likewise.
8919         (options): Convert from struct argp_option to struct option.
8920         (struct arguments): Remove.
8921         (parse_opt): Remove.
8922         (usage): New function.
8923         (main): Replace struct args members by simple variables.
8924         Replace argp_parse() by getopt_long().
8925         Add switch to evaluate options.
8926         Add missing "(...)" around root_dev in prefix string.
8928 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8930         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
8931         for grub_ieee1275_exit(), in order to improve portability.
8933 2008-01-14  Robert Millan  <rmh@aybabtu.com>
8935         * util/grub.d/10_linux.in (prefix): Define.
8936         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
8938 2008-01-13  Pavel Roskin  <proski@gnu.org>
8940         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
8941         grub_errno if no errors have been detected.
8943 2008-01-12  Robert Millan  <rmh@aybabtu.com>
8945         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
8946         (grub_util_get_dev_abstraction): New function prototype.
8948         * util/getroot.c: Include `<grub/util/getroot.h>'
8949         (grub_util_get_grub_dev): Move detection of abstraction type to ...
8950         (grub_util_get_dev_abstraction): ... here (new function).
8952         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
8953         `PRINT_ABSTRACTION'.
8954         (probe): Probe for abstraction type when requested.
8955         (main): Understand `--target=abstraction'.
8957         * util/i386/efi/grub-install.in: Add abstraction module to core
8958         image when it is found to be necessary.
8959         * util/i386/pc/grub-install.in: Likewise.
8960         * util/powerpc/ieee1275/grub-install.in: Likewise.
8962         * util/update-grub_lib.in (font_path): Return system path without
8963         converting to GRUB path.
8964         * util/update-grub.in: Convert system path returned by font_path()
8965         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
8966         abstraction module is needed for loading fonts (if any).  Export
8967         that as `GRUB_PRELOAD_MODULES'.
8968         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
8969         insmod commands).
8971 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
8973         Remove some unused code from reiserfs.
8975         * fs/reiserfs.c (struct grub_reiserfs_key)
8976         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
8977         (struct grub_reiserfs_node_body): Removed.
8978         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8979         Likewise.
8980         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8981         Likewise.
8982         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8983         Likewise.
8984         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
8985         Likewise.
8986         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
8987         Likewise.
8988         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
8989         Likewise.
8990         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8991         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8992         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
8994 2008-01-10  Robert Millan  <rmh@aybabtu.com>
8996         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
8997         Determines if a file is garbage left by packaging systems, etc.
8998         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
8999         for processing /etc/grub.d scripts.
9000         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9001         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9002         as a condition for processing Linux images.
9004 2008-01-10  Pavel Roskin  <proski@gnu.org>
9006         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9007         to compile reiserfs.c on PowerPC.
9009 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9011         * kern/device.c (grub_device_iterate): Do not abort device iteration
9012         when one of the devices cannot be opened.
9013         * kern/disk.c (grub_disk_open): Do not account previous failures of
9014         unrelated functions when grub_errno is checked for.
9016 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9018         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9019         `! grub_linux_is_bzimage', change order of address comparison to make
9020         it more intuitive, and improve "too big zImage" error message.
9022 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9024         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9025         `$(update-grub_DATA)'.
9026         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9027         targets.
9029 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9031         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9032         which instruction is modified by grub-setup during installation
9033         (since it wasn't obvious by only looking at this file).
9035 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9037         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9038         listing actual TODO items.
9040 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9042         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9043         correctly.
9044         (grub_reiserfs_get_key_offset): Likewise.
9045         (grub_reiserfs_set_key_offset): Likewise.
9046         (grub_reiserfs_set_key_type): Likewise.
9047         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9049         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9050         better to remove the bitfield version completely.
9052 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9054         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9055         allocated from the heap, due to the fshelp implementation.
9056         (grub_reiserfs_dir): Free NODE, due to the same reason.
9058 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9060         Mostly from Vincent Pelletier:
9062         * fs/reiserfs.c: New file.
9064         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9065         (reiserfs_mod_SOURCES): New variable.
9066         (reiserfs_mod_CFLAGS): Likewise.
9067         (reiserfs_mod_LDFLAGS): Likewise.
9069         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9070         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9071         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9072         normal/color.c.
9074 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9076         * normal/color.c: Remove `<grub/env.h>'.
9078 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9080         * include/grub/normal.h: Include <grub/env.h>.
9082 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9084         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9085         usage example with `(hd0,1)'.
9086         Reported by Samuel Thibault.
9088 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9090         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9091         (grub_linux_boot_zimage): Rename to ...
9092         (grub_linux_boot): ... this.
9093         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9094         (grub_linux_boot_zimage): Conditionalize zImage copy.
9096         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9097         (grub_linux_boot_bzimage): Remove prototype.
9098         (grub_linux_boot_zimage): Rename to ...
9099         (grub_linux_boot): ... this.
9101         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9102         (grub_linux_boot): Remove function.
9104 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9106         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9107         (grub_env_write_color_highlight): Likewise.
9108         (grub_wait_after_message): Likewise.
9110         * normal/color.c: New file.
9112         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9113         (normal_mod_DEPENDENCIES): Likewise.
9115         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9116         (normal_mod_DEPENDENCIES): Likewise.
9118         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9119         (normal_mod_DEPENDENCIES): Likewise.
9121         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9122         (normal_mod_DEPENDENCIES): Likewise.
9124         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9125         for waiting after a message is printed.
9126         * normal/main.c (read_config_file): Likewise.
9127         (grub_normal_init): Register grub_env_write_color_normal() and
9128         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9129         `color_highlight' variables as global.
9131         * normal/menu.c (grub_wait_after_message): New function.
9132         (grub_color_menu_normal): New variable.  Replaces ...
9133         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9134         (grub_color_menu_highlight): New variable.  Replaces ...
9135         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9136         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9137         `GRUB_TERM_COLOR_STANDARD'.
9138         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9139         `normal_code' and `highlight_code' to `old_color_normal' and
9140         `old_color_highlight', respectively.
9141         (grub_menu_init_page): Update colors when drawing the menu, based on
9142         `menu_color_normal' and `menu_color_highlight' variables.
9143         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9144         a message is printed.
9146 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9148         * kern/env.c (grub_env_context_open): Propagate hooks for global
9149         variables to new context.
9151         * kern/main.c (grub_set_root_dev): Export `root' variable.
9153 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9155         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9156         discs unconditionally, since udev and others have options to provide
9157         them.
9159 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9161         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9163 2008-01-04  Christian Franke  <franke@computer.org>
9165         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9166         of eisa_mmap.
9168 2008-01-03  Pavel Roskin  <proski@gnu.org>
9170         * kern/i386/linuxbios/init.c: Put "void" to all function
9171         declarations with no arguments.
9172         * kern/powerpc/ieee1275/init.c: Likewise.
9173         * term/i386/pc/at_keyboard.c: Likewise.
9174         * term/i386/pc/vga_text.c: Likewise.
9175         * util/grub-mkdevicemap.c: Likewise.
9177 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9179         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9180         message when loaded image is out of bounds.
9181         (grub_multiboot_load_elf64): Likewise.
9183 2008-01-02  Pavel Roskin  <proski@gnu.org>
9185         * util/grub.d/10_linux.in: Try version without ".old" when
9186         looking for initrd.  It's better to use initrd from the newer
9187         kernel of the same version than no initrd at all.
9189 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9191         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9193 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9195         * include/grub/video.h: Added grub_video_unmap_color and
9196         grub_video_get_active_render_target.
9197         (grub_video_adapter): Added unmap_color and get_active_render_target.
9199         * video/video.c: Added grub_video_unmap_color and
9200         grub_video_get_active_render_target.
9201         (grub_video_get_info): Changed method to accept NULL pointer as an
9202         argument to allow detection of active video adapter.
9204         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9205         grub_video_vbe_unmap_color_int.
9206         Added grub_video_vbe_unmap_color and
9207         grub_video_vbe_get_active_render_target.
9208         (grub_video_vbe_adapter): Added unmap_color and
9209         get_active_render_target.
9211         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9212         with grub_video_vbe_unmap_color_int.
9214         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9215         (DEFAULT_NORMAL_COLOR): Likewise.
9216         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9217         (DEFAULT_FG_COLOR): Removed.
9218         (DEFAULT_BG_COLOR): Likewise.
9219         (DEFAULT_CURSOR_COLOR): Changed value.
9220         (grub_virtual_screen): Added standard_color_setting,
9221         normal_color_setting, highlight_color_setting and term_color.
9222         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9223         (bitmap_width): Added.
9224         (bitmap_height): Likewise.
9225         (bitmap): Likewise.
9226         (set_term_color): Likewise.
9227         (grub_virtual_screen_setup): Changed to use new terminal coloring
9228         settings.
9229         (grub_gfxterm_init): Added init for bitmap.
9230         (grub_gfxterm_fini): Added destroy for bitmap.
9231         (redraw_screen_rect): Updated to use background bitmap and new
9232         terminal coloring.
9233         (scroll_up): Added optimization for case when there is no bitmap.
9234         (grub_gfxterm_cls): Fixed to use correct background color.
9235         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9236         coloring.
9237         (grub_virtual_screen_setcolor): Likewise.
9238         (grub_virtual_screen_getcolor): Added.
9239         (grub_gfxterm_background_image_cmd): Likewise.
9240         (grub_video_term): Added setcolor and getcolor.
9241         (MOD_INIT): Added registration of background_image command.
9242         (MOD_TERM): Added unregistration for background_image command.
9244 2007-12-30  Pavel Roskin  <proski@gnu.org>
9246         * loader/multiboot_loader.c: Fix multiboot command
9247         unregistration.  Fix all typos in the word "multiboot".
9249 2007-12-29  Pavel Roskin  <proski@gnu.org>
9251         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9252         support for initrd names used in Fedora.
9254 2007-12-26  Bean  <bean123ch@gmail.com>
9256         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9257         (cpio_mod_SOURCES): New variable.
9258         (cpio_mod_CFLAGS): Likewise.
9259         (cpio_mod_LDFLAGS): Likewise.
9261         * fs/cpio.c: New file.
9263         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9265         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9267         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9269         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9271 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9273         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9274         (grub_getcolor): New function.
9276         * kern/term.c (grub_getcolor): New function.
9277         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9278         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9279         (print_entry): Set normal and highlight colors to
9280         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9281         respectively, before printing and restore them to old
9282         values afterwards.
9283         (grub_menu_init_page): Likewise.  Fill an additional colored space
9284         that would otherwise be left blank.
9286         * term/efi/console.c (grub_console_getcolor): New function.
9287         (struct grub_console_term.getcolor): New variable.
9288         * term/i386/pc/console.c (grub_console_getcolor): New function.
9289         (struct grub_console_term.getcolor): New variable.
9290         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9291         (struct grub_console_term.getcolor): New variable.
9293         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9294         (struct grub_console_term.setcolor): Remove variable.
9295         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9296         (struct grub_console_term.setcolor): Remove variable.
9297         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9298         (struct grub_console_term.setcolor): Remove variable.
9299         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9300         (struct grub_console_term.setcolor): Remove variable.
9302 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9304         * configure.ac: Search for possible unifont.hex locations, and
9305         define UNIFONT_HEX if found.
9307         * Makefile.in (UNIFONT_HEX): Define variable.
9308         (DATA): Rename to ...
9309         (PKGLIB): ... this.  Update all users.
9310         (PKGDATA): New variable.
9311         (pkgdata_IMAGES): Rename to ...
9312         (pkglib_IMAGES): ... this. Update all users.
9313         (pkgdata_MODULES): Rename to ...
9314         (pkglib_MODULES): ... this. Update all users.
9315         (pkgdata_PROGRAMS): Rename to ...
9316         (pkglib_PROGRAMS): ... this. Update all users.
9317         (pkgdata_DATA): Rename to ...
9318         (pkglib_DATA): ... this. Update all users.
9319         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9320         (unicode.pff, ascii.pff): New rules.
9321         (all-local): Add `$(PKGDATA)' dependency.
9322         (install-local): Process `$(PKGDATA)'.
9324         * util/update-grub_lib.in (font_path): Search for *.pff files in
9325         a few more locations, including `${pkgdata}'.
9327 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9329         Patch from Bean  <bean123ch@gmail.com>:
9330         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9331         `size'.
9333 2007-12-21  Bean  <bean123ch@gmail.com>
9335         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9336         (ntfscomp_mod_SOURCES): New variable.
9337         (ntfscomp_mod_CFLAGS): Likewise.
9338         (ntfscomp_mod_LDFLAGS): Likewise.
9340         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9341         (grub_probe_SOURCES): Likewise.
9342         (grub_emu_SOURCES): Likewise.
9344         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9345         (grub_emu_SOURCES): Likewise.
9347         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9348         (grub_emu_SOURCES): Likewise.
9350         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9351         (grub_emu_SOURCES): Likewise.
9353         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9354         (read_run_list): Renamed to grub_ntfs_read_run_list.
9355         (decomp_nextvcn): Moved to ntfscomp.c.
9356         (decomp_getch): Likewise.
9357         (decomp_get16): Likewise.
9358         (decomp_block): Likewise.
9359         (read_block): Likewise.
9360         (read_data): Partially moved to ntfscomp.c.
9361         (fixup): Change unsigned to grub_uint16_t.
9362         (read_mft): Change unsigned long to grub_uint32_t.
9363         (read_attr): Likewise.
9364         (read_data): Likewise.
9365         (read_run_data): Likewise.
9366         (read_run_list): Likewise.
9367         (read_mft): Likewise.
9369         * fs/ntfscomp.c: New file.
9371         * include/grub/ntfs.h: New file.
9373 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9375         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9376         IDE disk check, since Linux is known to support 20 IDE disks.
9377         Reported by Colin Watson.
9379 2007-12-15  Bean  <bean123ch@gmail.com>
9381         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9382         (lnxboot_img_SOURCES): New variable.
9383         (lnxboot_img_ASFLAGS): Likewise.
9384         (lnxboot_img_LDFLAGS): Likewise.
9386         * boot/i386/pc/lnxboot.S: New file.
9388 2007-11-24  Pavel Roskin  <proski@gnu.org>
9390         * configure.ac: Test if '--build-id=none' is supported by the
9391         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9392         objcopy to generate incorrect binary files (binutils
9393         2.17.50.0.18-1 as shipped by Fedora 8).
9394         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9395         linking, so that build ID doesn't break the test.
9397 2007-11-24  Pavel Roskin  <proski@gnu.org>
9399         * include/grub/i386/time.h: use "void" in the argument list
9400         of grub_cpu_idle().
9401         * include/grub/powerpc/time.h: Likewise.
9402         * include/grub/sparc64/time.h: Likewise.
9404 2007-11-18  Christian Franke  <franke@computer.org>
9406         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9407         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9408         This fixes the problem that function keys did not work in grub-emu.
9410 2007-11-18  Christian Franke  <franke@computer.org>
9412         * disk/host.c (grub_host_open): Remove attribute unused from
9413         name parameter. Add check for "host". This fixes the problem
9414         that grub-emu does not find partitions.
9416 2007-11-18  Christian Franke  <franke@computer.org>
9418         * util/hostfs.c (is_dir): New function.
9419         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9420         (grub_hostfs_read): Add missing fseek().
9421         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9422         of grub-emu on "ls (host)".
9424 2007-11-18  Christian Franke  <franke@computer.org>
9426         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9427         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9428         to 64 bit boundary by default.
9430 2007-11-18  Bean  <bean123ch@gmail.com>
9432         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9433         (hexdump_mod_SOURCES): New variable.
9434         (hexdump_mod_CFLAGS): Likewise.
9435         (hexdump_mod_LDFLAGS): Likewise.
9437         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9439         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9441         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9443         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9445         * include/grub/hexdump.h: New file.
9447         * commands/hexdump.c: New file.
9449 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9451         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9452         in grub_outb() calls.
9453         (beep_on): Likewise.
9455 2007-11-10  Christian Franke  <franke@computer.org>
9457         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9458         (grub_menu_run): Likewise.
9460 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9462         * include/grub/i386/efi/machine.h: New file.
9463         * include/grub/i386/linuxbios/machine.h: Likewise.
9464         * include/grub/i386/pc/machine.h: Likewise.
9465         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9466         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9468         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9469         (serial_hw_io_addr): New variable.
9470         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9471         instead of `(unsigned short *) 0x400'.
9473 2007-11-10  Bean  <bean123ch@gmail.com>
9475         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9477 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9479         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9480         (vga_mod_SOURCES): Added.
9481         (vga_mod_CFLAGS): Likewise.
9482         (vga_mod_LDFLAGS): Likewise.
9484         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9485         grub_outb() calls.
9486         (set_map_mask): Likewise.
9487         (set_read_map): Likewise.
9488         (set_read_address): Likewise.
9489         (vga_font): Removed variable.
9490         (get_vga_glyph): Removed function.
9491         (invalidate_char): Likewise.
9492         (write_char): Changed to use grub_font_get_glyph() for font
9493         information.
9494         (grub_vga_putchar): Likewise.
9495         (grub_vga_getcharwidth): Likewise.
9497 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9499         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9500         flags.
9501         (pxeboot_img_LDFLAGS): Likewise.
9502         (diskboot_img_LDFLAGS): Likewise.
9503         (kernel_img_LDFLAGS): Likewise.
9505 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9507         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9508         in grub_outb() calls.
9509         (serial_hw_init): Likewise.
9511 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9513         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9514         spaces.  Skip non-regular files.
9516 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9518         * kern/disk.c (grub_disk_firmware_fini)
9519         (grub_disk_firmware_is_tainted): New variables.
9521         * include/grub/disk.h (grub_disk_firmware_fini)
9522         (grub_disk_firmware_is_tainted): Likewise.
9524         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9525         (grub_disk_biosdisk_fini): ... to here.
9526         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9527         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9528         is set.  Register grub_disk_biosdisk_fini() in
9529         `grub_disk_firmware_fini'.
9531         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9532         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9533         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9534         to finish existing firmware disk interface.
9536         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9537         (ata_mod_SOURCES): New variable.
9538         (ata_mod_CFLAGS): Likewise.
9539         (ata_mod_LDFLAGS): Likewise.
9541 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9543         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9544         (grub_ata_wait): Reimplement using grub_millisleep().
9546         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9547         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9549 2007-11-03  Marco Gerards  <marco@gnu.org>
9551         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9552         (CRTC_ADDR_PORT): New macro.
9553         (CRTC_DATA_PORT): Likewise.
9554         (CRTC_CURSOR): Likewise.
9555         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9556         (CRTC_CURSOR_ADDR_LOW): Likewise.
9557         (update_cursor): New function.
9558         (grub_console_real_putchar): Call `update_cursor'.
9559         (grub_console_gotoxy): Likewise.
9560         (grub_console_cls): Set the default color when clearing the
9561         screen.
9562         (grub_console_setcursor): Implemented.
9564 2007-11-03  Marco Gerards  <marco@gnu.org>
9566         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9567         become activate.
9568         (grub_ata_pio_write): Likewise.
9570         (grub_atapi_identify): Wait after issuing an ATA command.
9571         (grub_atapi_packet): Likewise.
9572         (grub_ata_identify): Likewise.
9573         (grub_ata_readwrite): Likewise.
9575 2007-11-03  Marco Gerards  <marco@gnu.org>
9577         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9578         (grub_ata_pio_write): Likewise.
9579         (grub_ata_readwrite): Use `grub_error', instead of
9580         returning `grub_errno'.
9582 2007-11-03  Marco Gerards  <marco@gnu.org>
9584         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9585         grub_ata_pio_write once for every single sector, instead of for
9586         multiple sectors.
9588 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9590         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9592         * conf/i386-linuxbios.rmk: New file.
9594         * kern/i386/pc/hardware.c: Likewise.
9595         * term/i386/pc/at_keyboard.c: Likewise.
9596         * term/i386/pc/vga_text.c: Likewise.
9598         * include/grub/i386/linuxbios/boot.h: Likewise.
9599         * include/grub/i386/linuxbios/console.h: Likewise.
9600         * include/grub/i386/linuxbios/init.h: Likewise.
9601         * include/grub/i386/linuxbios/kernel.h: Likewise.
9602         * include/grub/i386/linuxbios/loader.h: Likewise.
9603         * include/grub/i386/linuxbios/memory.h: Likewise.
9604         * include/grub/i386/linuxbios/serial.h: Likewise.
9605         * include/grub/i386/linuxbios/time.h: Likewise.
9607         * kern/i386/linuxbios/init.c: Likewise.
9608         * kern/i386/linuxbios/startup.S: Likewise.
9609         * kern/i386/linuxbios/table.c: Likewise.
9611 2007-10-31  Marco Gerards  <marco@gnu.org>
9613         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9614         (ata_mod_SOURCES): New variable.
9615         (ata_mod_CFLAGS): Likewise.
9616         (ata_mod_LDFLAGS): Likewise.
9618         * disk/ata.c: New file.
9620         * include/grub/disk.h (grub_disk_dev_id): Add
9621         `GRUB_DISK_DEV_ATA_ID'.
9623 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9625         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9626         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9628         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9629         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9631         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9632         `<grub/types.h>'.
9634         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9636 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9638         * include/grub/types.h (ULONG_MAX): Define macro.
9640 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9642         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9643         `"../realmode.S"'.
9644         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9646 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9648         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9649         (pkgdata_MODULES): Add `biosdisk.mod'.
9650         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9651         variables.
9653         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9654         (grub_biosdisk_init): Replace with ...
9655         (GRUB_MOD_INIT(biosdisk)): ... this.
9656         (grub_biosdisk_fini): Replace with ...
9657         (GRUB_MOD_FINI(biosdisk)): ... this.
9659         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9660         (grub_machine_init): Remove call to grub_biosdisk_init().
9661         (grub_machine_fini): Remove call to grub_machine_fini().
9663         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9665 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9667         * include/grub/time.h: New file.
9668         * include/grub/i386/time.h: Likewise.
9669         * include/grub/powerpc/time.h: Likewise.
9670         * include/grub/sparc64/time.h: Likewise.
9672         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9673         instances to ...
9674         (KERNEL_MACHINE_TIME_HEADER): ... this.
9675         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9676         instances to ...
9677         (KERNEL_MACHINE_TIME_HEADER): ... this.
9678         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9679         instances to ...
9680         (KERNEL_MACHINE_TIME_HEADER): ... this.
9682         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9683         (grub_millisleep): New function.
9684         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9685         (grub_millisleep): New function.
9686         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9687         Remove `grub/machine/time.h' include.
9688         (grub_millisleep): New function.
9689         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9690         Remove `grub/machine/time.h' include.
9691         (grub_millisleep): New function.
9693         * include/grub/misc.h (grub_div_roundup): New function.
9695         * kern/misc.c: Include `<grub/time.h>'.
9696         (grub_millisleep_generic): New function.
9698         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9699         Add `time.h'.
9700         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9701         Add `time.h'.
9702         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9703         `machine/time.h'.  Add `time.h'.
9704         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9706 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9708         * include/grub/misc.h (grub_max): New function.
9710 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9712         * util/misc.c (grub_util_info): Call fflush() before returning.
9714 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9716         * genmk.rb (Image): Copy `extra_flags' from here ...
9717         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9719         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9720         to `argc' and `args' arguments.
9722 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9724         * kern/i386/loader.S: New file.
9726         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9727         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9728         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9729         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9730         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9731         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9732         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9733         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9734         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9735         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9736         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9737         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9738         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9739         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9741         * kern/i386/realmode.S: New file.
9743         * kern/i386/pc/startup.S (protstack): Moved from here ...
9744         * kern/i386/realmode.S (protstack)... to here.
9745         * kern/i386/pc/startup.S (gdt): Moved from here ...
9746         * kern/i386/realmode.S (gdt)... to here.
9747         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9748         * kern/i386/realmode.S (prot_to_real)... to here.
9750         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9751         `kern/i386/realmode.S'.
9753 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9755         * include/grub/i386/loader.h: New file.
9757         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9758         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9759         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9760         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9761         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9762         * include/grub/i386/loader.h (grub_linux_prot_size)
9763         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9764         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9765         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9766         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9768         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9770 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9772         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9773         filesystem when dev->disk is unset.
9774         Do probe for filesystem even when dev->disk->has_partitions is set.
9775         In case a filesystem is found, always report it.
9776         In case it isn't, if dev->disk->has_partitions is set, report that
9777         a partition table was found instead of reporting that no filesystem
9778         could be identified.
9780 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9782         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9783         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9785         * include/grub/types.h (grub_host_to_target16): New macro.
9786         (grub_host_to_target32): Likewise.
9787         (grub_host_to_target64): Likewise.
9788         (grub_target_to_host16): Likewise.
9789         (grub_target_to_host32): Likewise.
9790         (grub_target_to_host64): Likewise.
9792         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9793         Renamed from to ...
9794         (GRUB_MOD_ALIGN): ...this.  Update all users.
9796         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9797         grub_host_to_target32.
9798         Replace grub_be_to_cpu32 with grub_target_to_host32.
9799         (load_modules): Likewise.
9800         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9801         Replace grub_be_to_cpu32 with grub_target_to_host32.
9802         Replace grub_cpu_to_be16 with grub_host_to_target16.
9803         Replace grub_cpu_to_be32 grub_host_to_target32.
9805 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9807         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9808         * util/elf/grub-mkimage.c: ... here.
9810         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9811         `util/powerpc/ieee1275/grub-mkimage.c'.
9813 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9815         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9816         and make it easier to figure out.
9817         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9818         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9819         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9820         leave us with less than HEAP_MIN_SIZE total heap.
9821         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9823 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9825         * include/grub/i386/io.h: New file.
9826         * commands/i386/pc/play.c (inb): Removed.
9827         (outb): Removed.
9828         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9829         with grub_outb().
9830         * term/i386/pc/serial.c  (inb): Removed.
9831         (outb): Removed.
9832         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9833         with grub_outb().
9834         * term/i386/pc/vga.c  (inb): Removed.
9835         (outb): Removed.
9836         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9837         with grub_outb().
9839 2007-10-02  Robert Millan  <rmh@aybabtu.com>
9841         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
9842         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9843         Reported by Marcin Kurek.
9845 2007-09-07  Robert Millan  <rmh@aybabtu.com>
9847         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
9848         SmartFirmware version updates (as released by Sven Luther), and avoid
9849         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
9850         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
9851         known broken.
9853 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9855         From Hitoshi Ozeki:
9856         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
9857         when merging two regions.
9859 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9861         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
9862         * normal/completion.c (grub_normal_do_completion): Likewise.
9863         Reported by Hitoshi Ozeki.
9865 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
9867         Do not use devices at boot in chainloading.
9869         * loader/i386/pc/chainloader.c (boot_drive): New variable.
9870         (boot_part_addr): Likewise.
9871         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
9872         with BOOT_DRIVE and BOOT_PART_ADDR.
9873         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
9874         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
9876 2007-08-29  Robert Millan  <rmh@aybabtu.com>
9878         Patch from Simon Peter <dn.tlp@gmx.net>:
9879         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
9880         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
9881         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
9882         util/i386/pc/grub-setup.c_DEPENDENCIES.
9883         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
9884         util/grub-probe.c_DEPENDENCIES.
9885         * conf/powerpc-ieee1275.rmk: Likewise.
9887 2007-08-28  Robert Millan  <rmh@aybabtu.com>
9889         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
9890         to tell grub-mkdevicemap how to name devices.
9891         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
9892         feature).
9894         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
9895         util/i386/get_disk_name.c.
9896         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
9897         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
9898         util/ieee1275/get_disk_name.c.
9900         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
9902         * DISTLIST: Add util/i386/get_disk_name.c and
9903         util/ieee1275/get_disk_name.c.
9905         * util/grub-mkdevicemap.c: Replace device naming logic with
9906         grub_util_get_disk_name() calls.
9908 2007-08-20  Robert Millan  <rmh@aybabtu.com>
9910         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
9911         (so that it works for both plural and singular quantities).
9913 2007-08-05  Robert Millan  <rmh@aybabtu.com>
9915         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
9916         so that [xz] isn't taken into account when determining order.
9918 2007-08-02  Marco Gerards  <marco@gnu.org>
9920         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
9921         `include/multiboot2.h', `include/grub/elfload.h',
9922         `include/multiboot.h', `include/grub/multiboot.h',
9923         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
9924         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
9925         `kern/elf.c', `loader/multiboot_loader.c',
9926         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
9927         `loader/i386/pc/multiboot2.c',
9928         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
9929         `util/i386/pc/grub-mkrescue.in'.  Remove
9930         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
9931         `include/grub/i386/pc/util/biosdisk.h' and
9932         `include/grub/powerpc/ieee1275/multiboot.h'.
9934 2007-08-02  Bean  <bean123ch@gmail.com>
9936         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
9937         (ntfs_mod_SOURCES): New variable.
9938         (ntfs_mod_CFLAGS): Likewise.
9939         (ntfs_mod_LDFLAGS): Likewise.
9941         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
9942         (grub_probe_SOURCES): Likewise.
9943         (grub_emu_SOURCES): Likewise.
9945         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9946         (grub_emu_SOURCES): Likewise.
9948         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
9949         (grub_emu_SOURCES): Likewise.
9951         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
9953         * fs/ntfs.c: New file.
9955 2007-08-02  Bean  <bean123ch@gmail.com>
9957         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
9959         * file.h (grub_file): Likewise.
9961         * fshelp.h (grub_fshelp_read_file): Likewise.
9963         * util/i386/pc/grub-setup.c (setup): Likewise.
9964         (save_first_sector): Likewise.
9965         (save_blocklists): Likewise.
9967         * fs/affs.c (grub_affs_read_file): Likewise.
9969         * fs/ext2.c (grub_ext2_read_file): Likewise.
9971         * fs/fat.c (grub_fat_read_data): Likewise.
9973         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
9975         * fs/hfs.c (grub_hfs_read_file): Likewise.
9977         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
9979         * fs/jfs.c (grub_jfs_read_file): Likewise.
9981         * fs/minix.c (grub_minix_read_file): Likewise.
9983         * fs/sfs.c (grub_sfs_read_file): Likewise.
9985         * fs/ufs.c (grub_ufs_read_file): Likewise.
9987         * fs/xfs.c (grub_xfs_read_file): Likewise.
9989         * command/blocklist.c (read_blocklist): Likewise.
9990         (print_blocklist): Likewise.
9992 2007-08-02  Marco Gerards  <marco@gnu.org>
9994         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
9995         `util/hostfs.c'.
9997         * disk/host.c: New file.
9999         * util/hostfs.c: Likewise.
10001         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10002         return `GRUB_ERR_BAD_FS'.
10003         * fs/sfs.c (grub_sfs_mount): Likewise.
10004         * fs/xfs.c (grub_xfs_mount): Likewise.
10006         * include/grub/disk.h (enum grub_disk_dev_id): Add
10007         `GRUB_DISK_DEVICE_HOST_ID'.
10009         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10011 2007-07-24  Jerone Young  <jerone@gmail.com>
10013         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10014         modules for compilation.
10015         * conf/powerpc-ieee1275.rmk: Likewise.
10017         * include/multiboot.h: Move multiboot definitions to one file. Rename
10018         many definitions to not get grub specific.
10019         * include/multiboot2.h: Create header with multiboot 2 definitions.
10020         * include/grub/multiboot.h: Header for grub specific function
10021         prototypes and definitions.
10022         * include/grub/multiboot2.h: Likewise.
10023         * include/grub/multiboot_loader.h: Likewise.
10024         * include/grub/i386/pc/multiboot.h: Removed.
10025         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10027         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10028         and 2 to allow for one multiboot and module commands.
10029         * loader/multiboot2.c: Add multiboot2 functionality.
10030         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10031         and definition names.
10032         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10033         2 functions.
10034         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10035         ieee1275 specific multiboot2 code.
10037         * kern/i386/pc/startup.S: Change headers and definition names for
10038         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10040 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10042         * geninitheader.sh: Process file specified in first parameter rather
10043         than hardcoding grub_modules_init.lst.
10044         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10045         than hardcoding grub_modules_init.h.
10047         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10048         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10049         grub_probe_init.[ch] and grub_setup_init.[ch].
10051         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10052         grub_modules_init.h with grub_emu_init.h.
10053         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10054         grub_probe_init.[ch] files.
10055         * conf/i386-efi.rmk: Likewise.
10056         * conf/i386-pc.rmk: Likewise.
10057         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10058         grub_setup_init.[ch] files.
10060         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10061         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10062         to initialize modules rather than a list of hardcoded functions.
10063         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10064         grub_init_all() to initialize modules rather than a list of hardcoded
10065         functions.
10067 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10069         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10070         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10072 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10074         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10075         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10076         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10077         flag when running on SmartFirmware.
10078         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10079         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10080         was set.
10082         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10083         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10084         rather than decreasing it.
10086         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10087         there's not enough space to do it, fail in the same way as when it
10088         can't be done because there are no partitions.
10090         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10091         when nvsetenv failed.
10093 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10095         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10096         because this rule is automatically generated.
10097         (grub-mkrescue): Removed for the same reason as above.
10099 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10101         Migrate to GNU General Public License Version 3.
10103         * COPYING: Replaced with the plain text version of GPLv3.
10105         * config.guess: Updated from gnulib.
10106         * config.sub: Likewise.
10108         * geninit.sh: Output a GPLv3 copyright notice.
10109         * geninitheader.sh: Likewise.
10110         * genmodsrc.sh: Likewise.
10111         * gensymlist.sh.in: Likewise.
10113         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10114         * boot/i386/pc/diskboot.S: Likewise.
10115         * boot/i386/pc/pxeboot.S: Likewise.
10116         * commands/blocklist.c: Likewise.
10117         * commands/boot.c: Likewise.
10118         * commands/cat.c: Likewise.
10119         * commands/cmp.c: Likewise.
10120         * commands/configfile.c: Likewise.
10121         * commands/echo.c: Likewise.
10122         * commands/help.c: Likewise.
10123         * commands/ls.c: Likewise.
10124         * commands/search.c: Likewise.
10125         * commands/terminal.c: Likewise.
10126         * commands/test.c: Likewise.
10127         * commands/videotest.c: Likewise.
10128         * commands/i386/cpuid.c: Likewise.
10129         * commands/i386/pc/halt.c: Likewise.
10130         * commands/i386/pc/play.c: Likewise.
10131         * commands/i386/pc/reboot.c: Likewise.
10132         * commands/i386/pc/vbeinfo.c: Likewise.
10133         * commands/i386/pc/vbetest.c: Likewise.
10134         * commands/ieee1275/halt.c: Likewise.
10135         * commands/ieee1275/reboot.c: Likewise.
10136         * commands/ieee1275/suspend.c: Likewise.
10137         * disk/loopback.c: Likewise.
10138         * disk/lvm.c: Likewise.
10139         * disk/raid.c: Likewise.
10140         * disk/efi/efidisk.c: Likewise.
10141         * disk/i386/pc/biosdisk.c: Likewise.
10142         * disk/ieee1275/ofdisk.c: Likewise.
10143         * font/manager.c: Likewise.
10144         * fs/affs.c: Likewise.
10145         * fs/ext2.c: Likewise.
10146         * fs/fat.c: Likewise.
10147         * fs/fshelp.c: Likewise.
10148         * fs/hfs.c: Likewise.
10149         * fs/hfsplus.c: Likewise.
10150         * fs/iso9660.c: Likewise.
10151         * fs/jfs.c: Likewise.
10152         * fs/minix.c: Likewise.
10153         * fs/sfs.c: Likewise.
10154         * fs/ufs.c: Likewise.
10155         * fs/xfs.c: Likewise.
10156         * hello/hello.c: Likewise.
10157         * include/grub/acorn_filecore.h: Likewise.
10158         * include/grub/arg.h: Likewise.
10159         * include/grub/bitmap.h: Likewise.
10160         * include/grub/boot.h: Likewise.
10161         * include/grub/cache.h: Likewise.
10162         * include/grub/device.h: Likewise.
10163         * include/grub/disk.h: Likewise.
10164         * include/grub/dl.h: Likewise.
10165         * include/grub/elfload.h: Likewise.
10166         * include/grub/env.h: Likewise.
10167         * include/grub/err.h: Likewise.
10168         * include/grub/file.h: Likewise.
10169         * include/grub/font.h: Likewise.
10170         * include/grub/fs.h: Likewise.
10171         * include/grub/fshelp.h: Likewise.
10172         * include/grub/gzio.h: Likewise.
10173         * include/grub/hfs.h: Likewise.
10174         * include/grub/kernel.h: Likewise.
10175         * include/grub/loader.h: Likewise.
10176         * include/grub/lvm.h: Likewise.
10177         * include/grub/misc.h: Likewise.
10178         * include/grub/mm.h: Likewise.
10179         * include/grub/net.h: Likewise.
10180         * include/grub/normal.h: Likewise.
10181         * include/grub/parser.h: Likewise.
10182         * include/grub/partition.h: Likewise.
10183         * include/grub/pc_partition.h: Likewise.
10184         * include/grub/raid.h: Likewise.
10185         * include/grub/rescue.h: Likewise.
10186         * include/grub/script.h: Likewise.
10187         * include/grub/setjmp.h: Likewise.
10188         * include/grub/symbol.h: Likewise.
10189         * include/grub/term.h: Likewise.
10190         * include/grub/terminfo.h: Likewise.
10191         * include/grub/tparm.h: Likewise.
10192         * include/grub/types.h: Likewise.
10193         * include/grub/video.h: Likewise.
10194         * include/grub/efi/api.h: Likewise.
10195         * include/grub/efi/chainloader.h: Likewise.
10196         * include/grub/efi/console.h: Likewise.
10197         * include/grub/efi/console_control.h: Likewise.
10198         * include/grub/efi/disk.h: Likewise.
10199         * include/grub/efi/efi.h: Likewise.
10200         * include/grub/efi/pe32.h: Likewise.
10201         * include/grub/efi/time.h: Likewise.
10202         * include/grub/i386/linux.h: Likewise.
10203         * include/grub/i386/setjmp.h: Likewise.
10204         * include/grub/i386/types.h: Likewise.
10205         * include/grub/i386/efi/kernel.h: Likewise.
10206         * include/grub/i386/efi/loader.h: Likewise.
10207         * include/grub/i386/efi/time.h: Likewise.
10208         * include/grub/i386/pc/biosdisk.h: Likewise.
10209         * include/grub/i386/pc/boot.h: Likewise.
10210         * include/grub/i386/pc/chainloader.h: Likewise.
10211         * include/grub/i386/pc/console.h: Likewise.
10212         * include/grub/i386/pc/init.h: Likewise.
10213         * include/grub/i386/pc/kernel.h: Likewise.
10214         * include/grub/i386/pc/loader.h: Likewise.
10215         * include/grub/i386/pc/memory.h: Likewise.
10216         * include/grub/i386/pc/multiboot.h: Likewise.
10217         * include/grub/i386/pc/serial.h: Likewise.
10218         * include/grub/i386/pc/time.h: Likewise.
10219         * include/grub/i386/pc/vbe.h: Likewise.
10220         * include/grub/i386/pc/vbeblit.h: Likewise.
10221         * include/grub/i386/pc/vbefill.h: Likewise.
10222         * include/grub/i386/pc/vbeutil.h: Likewise.
10223         * include/grub/i386/pc/vga.h: Likewise.
10224         * include/grub/ieee1275/ieee1275.h: Likewise.
10225         * include/grub/ieee1275/ofdisk.h: Likewise.
10226         * include/grub/powerpc/libgcc.h: Likewise.
10227         * include/grub/powerpc/setjmp.h: Likewise.
10228         * include/grub/powerpc/types.h: Likewise.
10229         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10230         * include/grub/powerpc/ieee1275/console.h: Likewise.
10231         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10232         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10233         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10234         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10235         * include/grub/powerpc/ieee1275/time.h: Likewise.
10236         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10237         * include/grub/sparc64/libgcc.h: Likewise.
10238         * include/grub/sparc64/setjmp.h: Likewise.
10239         * include/grub/sparc64/types.h: Likewise.
10240         * include/grub/sparc64/ieee1275/console.h: Likewise.
10241         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10242         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10243         * include/grub/sparc64/ieee1275/time.h: Likewise.
10244         * include/grub/util/biosdisk.h: Likewise.
10245         * include/grub/util/getroot.h: Likewise.
10246         * include/grub/util/lvm.h: Likewise.
10247         * include/grub/util/misc.h: Likewise.
10248         * include/grub/util/raid.h: Likewise.
10249         * include/grub/util/resolve.h: Likewise.
10250         * io/gzio.c: Likewise.
10251         * kern/device.c: Likewise.
10252         * kern/disk.c: Likewise.
10253         * kern/dl.c: Likewise.
10254         * kern/elf.c: Likewise.
10255         * kern/env.c: Likewise.
10256         * kern/err.c: Likewise.
10257         * kern/file.c: Likewise.
10258         * kern/fs.c: Likewise.
10259         * kern/loader.c: Likewise.
10260         * kern/main.c: Likewise.
10261         * kern/misc.c: Likewise.
10262         * kern/mm.c: Likewise.
10263         * kern/parser.c: Likewise.
10264         * kern/partition.c: Likewise.
10265         * kern/rescue.c: Likewise.
10266         * kern/term.c: Likewise.
10267         * kern/efi/efi.c: Likewise.
10268         * kern/efi/init.c: Likewise.
10269         * kern/efi/mm.c: Likewise.
10270         * kern/i386/dl.c: Likewise.
10271         * kern/i386/efi/init.c: Likewise.
10272         * kern/i386/efi/startup.S: Likewise.
10273         * kern/i386/pc/init.c: Likewise.
10274         * kern/i386/pc/lzo1x.S: Likewise.
10275         * kern/i386/pc/startup.S: Likewise.
10276         * kern/ieee1275/ieee1275.c: Likewise.
10277         * kern/powerpc/cache.S: Likewise.
10278         * kern/powerpc/dl.c: Likewise.
10279         * kern/powerpc/ieee1275/cmain.c: Likewise.
10280         * kern/powerpc/ieee1275/crt0.S: Likewise.
10281         * kern/powerpc/ieee1275/init.c: Likewise.
10282         * kern/powerpc/ieee1275/openfw.c: Likewise.
10283         * kern/sparc64/cache.S: Likewise.
10284         * kern/sparc64/dl.c: Likewise.
10285         * kern/sparc64/ieee1275/init.c: Likewise.
10286         * kern/sparc64/ieee1275/openfw.c: Likewise.
10287         * loader/efi/chainloader.c: Likewise.
10288         * loader/efi/chainloader_normal.c: Likewise.
10289         * loader/i386/efi/linux.c: Likewise.
10290         * loader/i386/efi/linux_normal.c: Likewise.
10291         * loader/i386/pc/chainloader.c: Likewise.
10292         * loader/i386/pc/chainloader_normal.c: Likewise.
10293         * loader/i386/pc/linux.c: Likewise.
10294         * loader/i386/pc/linux_normal.c: Likewise.
10295         * loader/i386/pc/multiboot.c: Likewise.
10296         * loader/i386/pc/multiboot_normal.c: Likewise.
10297         * loader/powerpc/ieee1275/linux.c: Likewise.
10298         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10299         * normal/arg.c: Likewise.
10300         * normal/cmdline.c: Likewise.
10301         * normal/command.c: Likewise.
10302         * normal/completion.c: Likewise.
10303         * normal/execute.c: Likewise.
10304         * normal/function.c: Likewise.
10305         * normal/lexer.c: Likewise.
10306         * normal/main.c: Likewise.
10307         * normal/menu.c: Likewise.
10308         * normal/menu_entry.c: Likewise.
10309         * normal/misc.c: Likewise.
10310         * normal/parser.y: Likewise.
10311         * normal/script.c: Likewise.
10312         * normal/i386/setjmp.S: Likewise.
10313         * normal/powerpc/setjmp.S: Likewise.
10314         * normal/sparc64/setjmp.S: Likewise.
10315         * partmap/acorn.c: Likewise.
10316         * partmap/amiga.c: Likewise.
10317         * partmap/apple.c: Likewise.
10318         * partmap/gpt.c: Likewise.
10319         * partmap/pc.c: Likewise.
10320         * partmap/sun.c: Likewise.
10321         * term/gfxterm.c: Likewise.
10322         * term/terminfo.c: Likewise.
10323         * term/efi/console.c: Likewise.
10324         * term/i386/pc/console.c: Likewise.
10325         * term/i386/pc/serial.c: Likewise.
10326         * term/i386/pc/vesafb.c: Likewise.
10327         * term/i386/pc/vga.c: Likewise.
10328         * term/ieee1275/ofconsole.c: Likewise.
10329         * util/biosdisk.c: Likewise.
10330         * util/console.c: Likewise.
10331         * util/genmoddep.c: Likewise.
10332         * util/getroot.c: Likewise.
10333         * util/grub-emu.c: Likewise.
10334         * util/grub-mkdevicemap.c: Likewise.
10335         * util/grub-probe.c: Likewise.
10336         * util/lvm.c: Likewise.
10337         * util/misc.c: Likewise.
10338         * util/raid.c: Likewise.
10339         * util/resolve.c: Likewise.
10340         * util/update-grub.in: Likewise.
10341         * util/update-grub_lib.in: Likewise.
10342         * util/grub.d/00_header.in: Likewise.
10343         * util/grub.d/10_hurd.in: Likewise.
10344         * util/grub.d/10_linux.in: Likewise.
10345         * util/i386/efi/grub-install.in: Likewise.
10346         * util/i386/efi/grub-mkimage.c: Likewise.
10347         * util/i386/pc/grub-install.in: Likewise.
10348         * util/i386/pc/grub-mkimage.c: Likewise.
10349         * util/i386/pc/grub-mkrescue.in: Likewise.
10350         * util/i386/pc/grub-setup.c: Likewise.
10351         * util/i386/pc/misc.c: Likewise.
10352         * util/powerpc/ieee1275/grub-install.in: Likewise.
10353         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10354         * util/powerpc/ieee1275/misc.c: Likewise.
10355         * video/bitmap.c: Likewise.
10356         * video/video.c: Likewise.
10357         * video/i386/pc/vbe.c: Likewise.
10358         * video/i386/pc/vbeblit.c: Likewise.
10359         * video/i386/pc/vbefill.c: Likewise.
10360         * video/i386/pc/vbeutil.c: Likewise.
10361         * video/readers/tga.c: Likewise.
10363 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10365         * conf/i386-efi.rmk: Replace obsolete reference to
10366         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10367         with util/getroot.c.
10368         * conf/powerpc-ieee1275.rmk: Likewise.
10369         * conf/sparc64-ieee1275.rmk: Likewise.
10371         * util/grub-emu.c (main): Fix unchecked pointer handling.
10373 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10375         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10376         invocation to fail, in order to support partition-less media.
10378         * util/i386/pc/grub-install.in: Likewise.
10380         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10381         which fs or partmap modules are needed (akin to its sister scripts).
10383         Also use grub-probe to get rid of unportable /proc/mounts check.
10385         Print the same informational message that the other scripts do, before
10386         exiting.
10388 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10390         * util/update-grub_lib.in (font_path): New function.  Determine whether
10391         a font file can be found and, if so, echo the GRUB path to it.
10393         * util/update-grub.in: Handle multiple terminals depending on user
10394         input, platform availability and font file presence.  Propagate
10395         variables of our findings to /etc/grub.d/ children.
10397         * util/grub.d/00_header.in: Handle multiple terminals, based on
10398         environment setup by update-grub.
10400 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10402         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10404 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10406         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10407         indicate end of data section in kernel image.
10408         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10409         GRUB_KERNEL_MACHINE_DATA_END.
10411         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10412         space for it.
10413         * kern/i386/efi/startup.S: Likewise.
10415         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10416         during image generation.  Implement --prefix option to override this
10417         patch.
10418         * util/i386/efi/grub-mkimage.c: Likewise.
10420         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10421         code to make path relative to its root into a separate function.
10423         * util/i386/pc/grub-install.in: Use newly provided
10424         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10425         pass the result to grub-install --prefix.
10427 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10429         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10430         DEFAULT_DEVICE_MAP.
10431         * util/grub-emu.c: Use above definitions from misc.h instead of
10432         defining them.
10433         * util/grub-mkdevicemap.c: Likewise.
10434         * util/i386/pc/grub-setup.c: Likewise.
10435         * util/grub-probe.c: Likewise.
10436         (probe): Abort with grub_util_error() when either
10437         grub_guess_root_device or grub_util_get_grub_dev fails.
10439 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10441         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10442         "pager" assignment.
10443         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10444         "pcdata".
10445         * util/grub-probe.c (probe): Likewise for "drive_name".
10447 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10449         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10450         not just the cdrom one.
10452 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10454         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10455         Add --pkglibdir=DIR option to override pkglibdir.
10456         Mention --image-type=TYPE in help output.
10457         Fix --grub-mkimage (it was a no-op).
10458         Abort gracefully when no parameter is given.
10460 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10462         * util/i386/pc/grub-mkrescue.in: New file.
10463         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10464         * Makefile.in: Handle bin_SCRIPTS.
10466 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10468         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10469         list of video modes.
10471 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10473         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10474         file doesn't exist, or if it is in a filesystem grub can't read.
10476         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10477         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10478         header comment to fit in 80 columns when the variables are resolved.
10480         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10481         could be identified by update-grub.  Remove redundant check for
10482         unifont.pff existence (since convert_system_path_to_grub_path now
10483         handles that).
10485 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10487         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10489         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10491         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10493 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10495         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10497         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10498         grub_apple_partition_map_fini.
10500         * util/biosdisk.c
10501         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10502         to access >2 TiB disks).
10504         Print disk->total_sectors with %llu instead of %lu, since this
10505         variable is always 64-bit (prevents wrong disk size from being displayed
10506         on either >2 TiB disk or big-endian CPU).
10508         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10509         into a generic case that supports all (sane) partition maps.
10511         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10512         breaks big-endian.
10514         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10515         and grub_apple_partition_map_fini() after that.
10517 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10519         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10521         * util/grub.d/00_header.in: Only enable gfxterm when
10522         convert_system_path_to_grub_path() succeeds.
10524 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10526         * util/update-grub_lib.in: New file.
10527         * DISTLIST: Add update-grub_lib.in.
10528         * conf/common.rmk: Generate update-grub_lib and install it in
10529         $(lib_DATA).
10530         * Makefile.in: Add install routine for $(lib_DATA).
10532         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10533         function provided by update-grub_lib to support arbitrary paths of
10534         unifont.pff.
10535         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10536         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10538 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10540         * commands/i386/cpuid.c: New module.
10541         * DISTLIST: Add it.
10542         * conf/i386-efi.rmk: Enable cpuid.mod.
10543         * conf/i386-pc.rmk: Likewise.
10545 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10547         * kern/disk.c (grub_disk_read): Check return value of
10548         grub_realloc().
10550 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10552         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10553         arrays.
10554         * disk/raid.c (grub_raid_open): Likewise.
10556 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10558         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10559         stack instead of on the heap.
10561         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10562         before doing a read on it.
10564         * configure.ac: Only use -fno-stack-protector for the target
10565         environment.
10567 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10569         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10570         __attribute_ ((unused)) to mode_type argument.
10572         * util/getroot.c (grub_guess_root_device): Fix #endif.
10574         * kern/misc.c (memcmp): Fix prototype.
10576         * include/grub/partition.h [GRUB_UTIL]
10577         (grub_gpt_partition_map_init): Add prototype.
10578         (grub_gpt_partition_map_fini): Likewise.
10580         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10581         at the right place.
10583         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10584         (grub_fat_read_data): Likewise.
10585         (grub_fat_find_dir): Likewise.
10587         * font/manager.c (find_glyph): Make table a const.
10588         (grub_font_get_glyph): Remove bitmap from if statement.
10590 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10592         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10593         code, first search for device in /dev/mapper, then in /dev.
10594         (grub_util_get_grub_dev): New function.
10595         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10596         prototype.
10597         * util/grub-probe.c (probe): Remove check for RAID, call
10598         grub_util_get_grub_dev() instead of
10599         grub_util_biosdisk_get_grub_dev().
10600         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10601         grub_util_biosdisk_get_grub_dev().
10602         * util/i386/pc/grub-setup.c (main): Likewise.
10604 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10606         * DISTLIST: Update for the latest changes.
10607         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10608         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10609         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10610         grub/util/biosdisk.h.
10611         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10612         grub/util/biosdisk.h.
10614 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10616         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10618 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10620         * util/i386/efi/grub-install.in: New.
10621         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10622         newly added grub-install.
10623         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10624         include.
10625         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10626         grub/util/biosdisk.h.
10627         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10628         grub/util/biosdisk.h.
10630 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10632         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10633         * include/grub/util/biosdisk.h: ... here.
10634         * util/i386/pc/biosdisk.c: Moved to ...
10635         * util/biosdisk.c: ... here.
10636         * util/i386/pc/getroot.c: Moved to ...
10637         * util/getroot.c: ... here.
10638         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10639         * util/grub-mkdevicemap.c: ... here.
10640         * util/i386/pc/grub-probe.c: Moved to ...
10641         * util/grub-probe.c: ... here.
10643 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10645         * util/update-grub.in: Remove duplicated line in grub.cfg header
10646         message.
10648 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10650         * util/update-grub.in: Fix a few assumptions about the devices holding
10651         /, /boot and /boot/grub being the same.
10652         * util/grub.d/00_header.in: Likewise.
10653         * util/grub.d/10_hurd.in: Likewise.
10654         * util/grub.d/10_linux.in: Likewise.
10656         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10657         patterns.  Use that to define the `.old' suffix as older than `'.
10659         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10661         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10662         the grub.cfg header message.
10664 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10666         * util/update-grub.in: Create device.map if it doesn't already exist,
10667         before attempting to run grub-probe.
10668         Check for grub-probe and grub-mkdevicemap with the same code
10669         grub-install is using.
10670         Remove test mode.
10672 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10674         * Makefile.in: Add the datarootdir autoconf variable.
10676 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10678         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10679         fail gracefully if dev->disk->partition == NULL.
10681 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10683         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10684         determine partition map module.
10685         * util/i386/pc/grub-install.in: Use this feature to decide which
10686         partition module to load, instead of hardcoding pc and gpt.
10688 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10690         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10691         source directory differs from build directory.
10693 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10695         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10696         initialisation.
10698 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10700         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10702 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10704         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10705         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10707 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10709         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10710         (grub_probe_SOURCES): Likewise.
10711         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10712         GPT and initialize dos_part and bsd_part accordingly.
10713         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10714         install_bsd_part.
10715         (main): Activate gpt module for use during partition identification,
10716         and deactivate it afterwards.
10717         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10718         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10719         partition identification, and deactivate it afterwards.
10721 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10723         * term/i386/pc/console.c (grub_console_fini): Call
10724         grub_term_set_current() before grub_term_unregister().
10726 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10728         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10729         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10730         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10731         and update-grub_DATA.
10732         * conf/common.rmk: Build and install update-grub components.
10733         * conf/common.mk: Regenerate.
10734         * util/update-grub.in: New.  Core of update-grub.
10735         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10736         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10737         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10738         * util/grub.d/README: New.  Document grub.d directory layout.
10740 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10742         * util/grub-emu.c: Move initialization functions
10743         grub_util_biosdisk_init() and grub_init_all() before
10744         grub_util_biosdisk_get_grub_dev(), which relies on them.
10746 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10748         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10749         it is used later.
10751 2007-04-18  Jerone Young  <jerone@gmail.com>
10753         * kernel/elf.c: Add missing parenthesis for conditional statement
10754         stanza.
10756 2007-04-10  Jerone Young  <jerone@gmail.com>
10758         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10759         continue on and look for device node with real device name.
10761 2007-04-10  Jerone Young  <jerone@gmail.com>
10763         * configure.ac: Add argument for autoconf to use transformation
10764         ability.
10765         * Makefile.in: Add autoconf package transformation code.
10766         * util/i386/pc/grub-install.in: Likewise.
10767         * util/powerpc/ieee1275/grub-install.in: Likewise.
10769 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10771         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10772         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10773         (EXT2_REVISION): Likewise.
10774         (EXT2_INODE_SIZE): Likewise.
10775         (struct grub_ext2_block_group): Added a missing member
10776         "used_dirs".
10777         (grub_ext2_read_inode): Divide by the inode size in a superblock
10778         instead of 128 to obtain INODES_PER_BLOCK.
10779         Use the macro EXT2_INODE_SIZE instead of directly using
10780         SBLOCK->INODE_SIZE.
10782 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10784         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10785         superblock instead of the structure size to compute an
10786         offset. This fixes the problem that GRUB could not read a
10787         filesystem when inode size is different from 128-byte.
10789 2007-03-05  Marco Gerards  <marco@gnu.org>
10791         * normal/main.c (read_config_file): When "menu" is not set, create
10792         an initial context.
10794 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10796         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10797         (HEAP_LIMIT): New macro.
10798         (grub_claim_heap): Claim memory up to `heaplimit'.
10800 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10802         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10803         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10804         (_start): Likewise.
10805         (grub_arch_modules_addr): Return address after `_end'.
10806         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10807         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10808         (add_segments): Calculate `_end' from phdr size and location.
10809         (ALIGN_UP): Moved to ...
10810         * include/grub/misc.h: here.
10811         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10812         New macro.
10813         (GRUB_IEEE1275_MODULE_BASE): Removed.
10815 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10817         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10818         loop boundary.
10820 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10822         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10823         All users updated.
10824         (grub_elf64_load_hook_t): Likewise.
10825         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10826         debug output.
10828 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10830         * kern/mm.c: Update copyright.
10831         (grub_mm_debug): Correct syntax error.
10832         (grub_mm_dump_free): New function.
10833         (grub_debug_free): Call `grub_free'.
10834         * include/grub/mm.h: Update copyright.
10835         (grub_mm_dump_free): Add declaration.
10837 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10839         * include/grub/ieee1275/ieee1275.h: Update copyright.
10840         * kern/powerpc/ieee1275/init.c: Likewise.
10841         * kern/powerpc/ieee1275/openfw.c: Likewise.
10843         * loader/powerpc/ieee1275/linux.c: Likewise.
10844         * include/grub/elfload.h: Likewise.
10845         * kern/elf.c: Likewise.
10846         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
10847         callers.
10848         (grub_elf64_load): Likewise.
10849         (grub_elf32_load_segment): Move to a nested function.
10850         (grub_elf64_load_segment): Likewise.
10852 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
10854         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
10855         prototype.
10856         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
10857         (grub_heap_len): Likewise.
10858         (HEAP_SIZE): New macro.
10859         (grub_claim_heap): New function.
10860         (grub_machine_init): Don't claim heap directly.  Call
10861         `grub_claim_heap'.
10862         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
10863         (grub_available_iterate): New function.
10865 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
10867         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
10868         * configure.ac: Use it for testing the HOST and TARGET compilers.
10870 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
10872         * Makefile.in (enable_grub_emu): New variable.
10873         * configure.ac (--enable-grub-emu): New option.
10874         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
10875         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
10876         * conf/i386-pc.rmk: Likewise.
10877         * conf/powerpc-ieee1275.rmk: Likewise.
10878         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
10880 2006-12-12  Marco Gerards  <marco@gnu.org>
10882         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
10884         * kern/env.c (grub_env_unset): Don't free the member `value' when
10885         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
10886         pointer.
10888         * normal/main.c (current_menu): Removed.
10889         (free_menu): Unset the `menu' environment variable.
10890         (grub_normal_menu_addentry): Make use of the environment variable
10891         `menu', instead of using the global `current_menu'.  Allocate
10892         memory for the sourcecode of this entry.
10893         (read_config_file): New argument `nested', changed all callers.
10894         Only in the case of a new context, initialize a new menu.  Set the
10895         `menu' environment variable.
10896         (grub_normal_execute): Don't set and unset the environment
10897         variable `menu' here anymore.  Only free the menu when leaving the
10898         context.
10900         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
10901         leak.
10903 2006-12-11  Marco Gerards  <marco@gnu.org>
10905         * normal/menu_entry.c (run): Fix off by one bug so the last line
10906         is executed.  Move the loader check to outside the loop.
10908 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
10910         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
10912 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
10914         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
10915         the number of sectors.  Reported by Andrey Shuvikov
10916         <mr_hyro@yahoo.com>.
10918 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
10920         * kern/disk.c (grub_disk_read): When there is a read error, always
10921         try to read only the necessary data.
10923         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
10924         disk/raid.c.
10925         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
10926         prototype.
10927         [GRUB_UTIL] (grub_raid_fini): Likewise.
10928         [GRUB_UTIL] (grub_lvm_init): Likewise.
10929         [GRUB_UTIL] (grub_lvm_fini): Likewise.
10930         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
10931         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
10932         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
10933         and grub_raid_fini().
10935 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10937         * include/grub/types.h (__unused): Rename to UNUSED.
10938         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
10939         (grub_elf64_size): Likewise.
10941 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10943         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
10944         grub_error_push and grub_error_pop in the error-handling path.
10945         (grub_elf32_load_segment): Only call grub_file_read with non-zero
10946         length.
10948 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
10950         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
10951         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
10952         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10953         (kernel_elf_SOURCES): Likewise.
10954         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
10955         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
10956         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10957         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10958         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
10959         (elf_mod_SOURCES): New variable.
10960         (elf_mod_CFLAGS): Likewise.
10961         (elf_mod_LDFLAGS): Likewise.
10962         * include/grub/types.h (__unused): New macro.
10963         * include/grub/elfload.h: New file.
10964         * kern/elf.c: Likewise.
10965         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
10966         (ELF32_LOADMASK): New macro.
10967         (ELF64_LOADMASK): Likewise.
10968         (vmlinux): Removed.
10969         (grub_linux_load32): New function.
10970         (grub_linux_load64): Likewise.
10971         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
10972         Use grub_elf_t instead of grub_file_t.
10974 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
10976         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
10977         `catch_result' to struct set_color_args.
10979 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
10981         * normal/menu.c: Include grub/script.h.
10982         * normal/menu_entry.c: Likewise.
10983         * include/grub/normal.h: Do not include grub/script.h.
10985 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10987         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
10989 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
10991         * kern/disk.c (grub_disk_open): Print debug messages when opening a
10992         disk.
10993         (grub_disk_close): Print debug messages when closing a disk.
10994         (grub_disk_read): Print debug messages when disk read fails.
10995         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
10996         filesystem type.
10997         * kern/partition.c: Include misc.h.
10998         (grub_partition_iterate): Print debug messages when detecting
10999         partition type.
11001 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11003         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11004         is negative.
11005         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11007 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11009         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11010         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11012 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11014         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11015         instead of sizeof(lv). Patch by Michael Guntsche.
11017 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11019         * disk/lvm.c: Rename VGS to VG_LIST.
11020         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11021         (grub_lvm_open): Likewise.
11022         Thanks to Michael Guntsche for finding this bug.
11024 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11026         * configure.ac (AC_INIT): Bumped to 1.95.
11028 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11030         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11031         with "/dev/.static/dev/md".
11033 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11035         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11036         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11037         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11038         DRIVE_NAME are always freed.
11040         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11041         DOS_PART, as a DOS partition is counted from one instead of zero
11042         now. Reported by Robert Millan.
11044 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11046         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11047         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11048         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11049         string returned by grub_guess_root_device.
11050         * util/i386/pc/grub-setup.c: Likewise.
11051         * util/i386/pc/grub-probefs.c: Likewise.
11053         * util/i386/pc/grub-probefs.c: Rename to ...
11054         * util/i386/pc/grub-probe.c: ... this.
11055         * DISTLIST: Remove grub-probefs, add grub-probe.
11056         * conf/i386-efi.rmk: Likewise.
11057         * conf/i386-pc.rmk: Likewise.
11058         * util/i386/pc/grub-install.in: Likewise.
11060         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11061         choose which information we want to print.
11063 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11065         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11066         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11067         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11068         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11069         video/readers/tga.c and video/i386/pc/vbeutil.c.
11071 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11073         Added support for RAID and LVM.
11075         * disk/lvm.c: New file.
11076         * disk/raid.c: Likewise.
11077         * include/grub/lvm.h: Likewise.
11078         * include/grub/raid.h: Likewise.
11079         * include/grub/util/lvm.h: Likewise.
11080         * include/grub/util/raid.h: Likewise.
11081         * util/lvm.c: Likewise.
11082         * util/raid.c: Likewise.
11084         * include/grub/disk.h (grub_disk_dev_id): Add
11085         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11086         (grub_disk_get_size): New prototype.
11087         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11088         returns a partition.
11089         (grub_disk_get_size): New function.
11091         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11092         verbatim if grub_install_dos_part is -2.
11094         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11095         and LVM devices.
11097         * util/i386/pc/grub-setup.c (setup): New argument
11098         MUST_EMBED. Force embedding of GRUB when the argument is
11099         true. Close FILE before returning.
11100         (main): Add support for RAID and LVM.
11102         * conf/common.rmk: Add RAID and LVM modules.
11103         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11104         util/lvm.c.
11105         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11107         * kern/misc.c (grub_strstr): New function.
11108         * include/grub/misc.h (grub_strstr): New prototype.
11110 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11112         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11114 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11116         * kern/misc.c (grub_strtoull): Guess the base only if not
11117         specified.
11119 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11121         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11122         PowerMac support.
11124 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11126         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11128         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11129         Remove `flags' argument.  All callers changed.
11130         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11131         (IEEE1275_IHANDLE_INVALID): New variable.
11132         (IEEE1275_CELL_INVALID): New variable.
11133         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11134         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11135         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11136         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11137         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11138         codes from Open Firmware.  All callers updated.
11139         (grub_ieee1275_next_property): Directly return Open Firmware return
11140         code.
11141         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11142         Standardize error checking from `grub_ieee1275_get_property'.
11143         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11144         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11146 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11148         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11149         `instance_to_package_args' to `instance_to_path_args'.
11151         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11152         `grub_ieee1275_chosen'.
11154         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11155         `grub_ieee1275_interpret'.
11157 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11159         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11161 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11163         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11164         (__cmpdi): Likewise.
11166         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11167         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11168         `grub_ssize_t'.
11170         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11172         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11173         to type `grub_ssize_t'.
11174         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11176 2006-09-22  Marco Gerards  <marco@gnu.org>
11178         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11179         newlines.
11181 2006-09-22  Marco Gerards  <marco@gnu.org>
11183         * commands/echo.c: New file.
11185         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11187         * conf/common.rmk (echo_mod_SOURCES): New variable.
11188         (echo_mod_CFLAGS): Likewise.
11189         (echo_mod_LDFLAGS): Likewise.
11191 2006-09-22  Marco Gerards  <marco@gnu.org>
11193         * normal/main.c (get_line): Malloc memory instead of using
11194         preallocated memory.  Removed the arguments `cmdline' and
11195         `max_len'.  Updated all callers.
11197 2006-09-22  Marco Gerards  <marco@gnu.org>
11199         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11200         (normal_mod_DEPENDENCIES): Likewise.
11202         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11203         (normal_mod_DEPENDENCIES): Likewise.
11205         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11207 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11209         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11210         programs.
11211         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11212         (normal_mod_DEPENDENCIES): Likewise.
11213         * conf/i386-pc.mk: Regenerate.
11214         * conf/i386-efi.mk: Likewise
11215         * conf/common.mk: Likewise.
11216         * conf/powerpc-ieee1275.mk: Likewise.
11217         * conf/sparc64-ieee1275.mk: Likewise.
11219 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11221         Sync with i386 version.
11222         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11223         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11225 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11227         Import from GRUB Legacy (lib/device.c):
11228         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11229         (init_device_map) [__linux__]: Add support for I2O devices.
11231 2006-09-14  Marco Gerards  <marco@gnu.org>
11233         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11234         `-melf_i386'.
11236 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11238         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11239         /boot/grub/*.lst.
11241         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11243         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11244         before adding it to device.map.
11246 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11248         * genmk.rb: Let GCC generate dependencies the first time it
11249         compiles a file; using the -MD option.
11250         * conf/common.mk: Regenerate.
11251         * conf/i386-pc.mk: Likewise.
11252         * conf/i386-efi.mk: Likewise.
11253         * conf/powerpc-ieee1275.mk: Likewise.
11254         * conf/sparc64-ieee1275.mk: Likewise.
11256 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11258         Move the prototypes of grub_setjmp and grub_longjmp to
11259         cpu/setjmp.h, so that each architecture may specify different
11260         attributes.
11262         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11263         (grub_longjmp): Likewise.
11264         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11265         (grub_longjmp): Likewise.
11266         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11267         (grub_longjmp): Likewise.
11269         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11270         [!GRUB_UTIL] (grub_longjmp): Removed.
11272 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11274         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11275         "color!" method does not return any value.
11277 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11279         * include/grub/bitmap.h: New file.
11281         * include/grub/i386/pc/vbeutil.h: Likewise.
11283         * video/bitmap.c: Likewise.
11285         * video/readers/tga.c: Likewise.
11287         * video/i386/pc/vbeutil.c: Likewise.
11289         * commands/videotest.c: Code cleanup and updated to reflect to new
11290         video API.
11292         * term/gfxterm.c: Likewise.
11294         * video/video.c: Likewise.
11296         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11297         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11298         (bitmap_mod_SOURCES): New entry.
11299         (bitmap_mod_CFLAGS): Likewise.
11300         (bitmap_mod_LDFLAGS): Likewise.
11301         (tga_mod_SOURCES): Likewise.
11302         (tga_mod_CFLAGS): Likewise.
11303         (tga_mod_LDFLAGS): Likewise.
11305         * include/grub/video.h (grub_video_blit_operators): New enum type.
11306         (grub_video_render_target): Changed as forward declaration and moved
11307         actual definition to be video driver specific.
11308         (grub_video_adapter.blit_bitmap): Added blitting operator.
11309         (grub_video_adapter.blit_render_target): Likewise.
11310         (grub_video_blit_bitmap): Likewise.
11311         (grub_video_blit_render_target): Likewise.
11313         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11314         driver specific render target definition.
11315         (grub_video_vbe_map_rgba): Added driver internal helper.
11316         (grub_video_vbe_unmap_color): Updated to use
11317         grub_video_i386_vbeblit_info.
11318         (grub_video_vbe_get_video_ptr): Likewise.
11320         * include/grub/i386/pc/vbeblit.h
11321         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11322         grub_video_i386_vbeblit_info.
11323         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11324         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11325         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11326         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11327         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11328         (grub_video_i386_vbeblit_index_index): Likewise.
11329         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11330         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11331         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11332         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11333         operator.
11334         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11335         operator.
11337         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11338         include/grub/i386/pc/vbeblit.h.
11340         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11341         Updated to use grub_video_i386_vbeblit_info.
11342         (grub_video_i386_vbefill_R8G8B8): Likewise.
11343         (grub_video_i386_vbefill_index): Likewise.
11344         (grub_video_i386_vbefill): Added generic filler.
11346         * video/i386/pc/vbefill.c: Updated to reflect changes on
11347         include/grub/i386/pc/vbefill.h.
11349         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11350         grub_video_i386_vbeblit_info.
11351         (grub_video_vbe_unmap_color): Likewise.
11352         (grub_video_vbe_blit_glyph): Likewise.
11353         (grub_video_vbe_scroll): Likewise.
11354         (grub_video_vbe_draw_pixel): Removed function.
11355         (grub_video_vbe_get_pixel): Likewise.
11356         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11357         updated code to use it.
11358         (common_blitter): Added common blitter for render target and bitmap.
11359         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11360         (grub_video_vbe_blit_render_target): Likewise.
11362 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11364         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11365         is in text mode if there is no console control protocol instance
11366         available.
11368 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11370         * include/grub/video.h: Code cleanup.
11372         * include/grub/i386/pc/vbe.h: Likewise.
11374         * video/i386/pc/vbe.c: Likewise.
11376         * video/i386/pc/vbeblit.c: Likewise.
11378         * video/i386/pc/vbefill.c: Likewise.
11380         * video/video.c: Likewise.  Also added more comments.
11382 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11384         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11385         (struct grub_biosdisk_dap): Likewise.
11387         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11388         linkage settings for all functions.
11390 2006-07-12  Marco Gerards  <marco@gnu.org>
11392         * configure.ac (--enable-mm-debug): Fix typo.
11394         * genkernsyms.sh.in: Use proper quoting for `CC'.
11396 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11398         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11399         (normal_mod_ASFLAGS): Remove "-m32".
11401 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11403         * util/misc.c: Include config.h.
11404         [!HAVE_MEMALIGN]: Do not include malloc.h.
11405         (grub_memalign): Use posix_memalign, if present. Then, use
11406         memalign, if present. Otherwise, emit an error.
11408         * util/grub-emu.c: Do not include malloc.h.
11410         * include/grub/util/misc.h: Include unistd.h. This is required for
11411         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11412         D. Eades III <hde@foobar-qux.org>.
11414         * configure.ac (AC_GNU_SOURCE): Added.
11415         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11416         type.
11418 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11420         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11421         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11423 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11425         * include/grub/types.h (grub_host_addr_t): Rename to
11426         grub_target_addr_t.
11427         (grub_host_off_t): Rename to grub_target_off_t.
11428         (grub_host_size_t): Rename to grub_target_size_t.
11429         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11430         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11432         * include/grub/kernel.h (struct grub_module_header): Change type
11433         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11434         (grub_module_info): Likewise.
11436 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11438         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11439         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11440         Velazquez <jesus.velazquez@gmail.com>.
11442 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11444         Count partitions from 1 instead of 0 in the string representation
11445         of partitions. Still use 0-based internally.
11447         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11448         (sun_partition_map_iterate): Use grub_partition_t instead of
11449         struct grub_partition *. Cast DESC->START_CYLINDER to
11450         grub_uint64_t after converting the endian.
11451         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11452         (sun_partition_map_get_name): Add 1 to P->INDEX.
11454         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11455         PCDATA->DOS_PART.
11456         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11458         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11459         zero instead of one.
11460         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11461         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11463         * partmap/apple.c (apple_partition_map_iterate): Change the type
11464         of POS to unsigned.
11465         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11466         (apple_partition_map_get_name): Add 1 into P->INDEX.
11468         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11469         of POS to unsigned.
11470         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11471         calculate the offset of a partition.
11472         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11473         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11475         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11476         SECTOR to grub_disk_addr_t.
11477         (acorn_partition_map_iterate): Likewise.
11478         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11479         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11480         top.
11481         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11483         * kern/i386/pc/init.c (make_install_device): Add 1 into
11484         GRUB_INSTALL_DOS_PART.
11486         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11487         conditional.
11489 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11491         Clean up the code to support 64-bit addressing in disks and
11492         files. This change is not enough for filesystems yet.
11494         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11495         type of "start" to grub_uint64_t.
11496         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11497         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11498         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11499         convert addresses.
11501         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11502         to grub_disk_addr_t.
11504         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11505         string.
11507         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11509         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11510         to char *.
11512         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11514         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11516         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11518         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11519         to grub_off_t, to detect an error from grub_file_seek.
11520         (grub_multiboot_load_elf32): Likewise.
11522         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11523         maximum unsigned long value when an overflow is detected.
11524         (grub_strtoull): New function.
11525         (grub_divmod64): Likewise.
11526         (grub_lltoa): use grub_divmod64.
11528         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11529         grub_disk_addr_t.
11530         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11531         the pointer to next character. Use grub_strtoull instead of
11532         grub_strtoul.
11533         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11534         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11535         respectively.
11537         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11538         return value is signed.
11539         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11540         test if OFFSET is less than zero, as OFFSET is unsigned now.
11542         * kern/disk.c (struct grub_disk_cache): Change the type of
11543         "sector" to grub_disk_addr_t.
11544         (grub_disk_cache_get_index): Change the type of SECTOR to
11545         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11546         unsigned after shifting.
11547         (grub_disk_cache_invalidate): Change the type of SECTOR to
11548         grub_disk_addr_t.
11549         (grub_disk_cache_unlock): Likewise.
11550         (grub_disk_cache_store): Likewise.
11551         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11552         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11553         grub_disk_addr_t and grub_uint64_t, respectively.
11554         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11555         body, as the value of OFFSET is tweaked by
11556         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11557         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11558         respectively.
11559         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11560         body, as the value of OFFSET is tweaked by
11561         grub_disk_check_range. Change the types of LEN and N to
11562         grub_size_t.
11564         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11565         and "saved_offset" to grub_off_t.
11566         (test_header): Cast BUF to char *.
11567         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11568         to char *.
11569         (grub_gzio_read): Change the types of OFFSET and SIZE to
11570         grub_off_t and grub_size_t, respectively.
11572         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11573         Removed.
11574         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11575         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11576         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11577         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11578         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11580         * include/grub/types.h (grub_off_t): Unconditionally set to
11581         grub_uint64_t.
11582         (grub_disk_addr_t): Changed to grub_uint64_t.
11584         * include/grub/partition.h (struct grub_partition): Change the
11585         types of "start", "len" and "offset" to grub_disk_addr_t,
11586         grub_uint64_t and grub_disk_addr_t, respectively.
11587         (grub_partition_get_start): Return grub_disk_addr_t.
11588         (grub_partition_get_len): Return grub_uint64_t.
11590         * include/grub/misc.h (grub_strtoull): New prototype.
11591         (grub_divmod64): Likewise.
11593         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11594         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11595         grub_off_t, respectively.
11596         All callers and references changed.
11598         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11599         grub_size_t in "read".
11600         All callers and references changed.
11602         * include/grub/file.h (struct grub_file): Change the types of
11603         "offset" and "size" to grub_off_t and grub_off_t,
11604         respectively. Change the type of SECTOR to grub_disk_addr_t in
11605         "read_hook".
11606         (grub_file_read): Change the type of LEN to grub_size_t.
11607         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11608         grub_off_t.
11609         (grub_file_size): Return grub_off_t.
11610         (grub_file_tell): Likewise.
11611         All callers and references changed.
11613         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11614         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11615         "write".
11616         (struct grub_disk): Change the type of "total_sectors" to
11617         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11618         "read_hook".
11619         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11620         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11621         (grub_disk_write): Likewise.
11622         All callers and references changed.
11624         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11625         char * for grub_strncmp to silence gcc.
11626         (grub_iso9660_mount): Likewise.
11627         (grub_iso9660_mount): Likewise.
11628         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11629         return statement.
11630         (grub_iso9660_iterate_dir): Likewise.
11631         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11633         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11634         LEN to grub_disk_addr_t and grub_size_t, respectively.
11636         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11638         * fs/jfs.c (grub_jfs_read_file): Likewise.
11640         * fs/minix.c (grub_jfs_read_file): Likewise.
11642         * fs/sfs.c (grub_jfs_read_file): Likewise.
11644         * fs/ufs.c (grub_jfs_read_file): Likewise.
11646         * fs/xfs.c (grub_jfs_read_file): Likewise.
11648         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11649         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11650         respectively.
11652         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11653         BLKNR to -1 instead of returning GRUB_ERRNO.
11654         (grub_ext2_read_file): Change the types of SECTOR and
11655         LEN to grub_disk_addr_t and grub_size_t, respectively.
11657         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11658         LEN to grub_disk_addr_t and grub_size_t, respectively.
11660         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11661         grub_file_read.
11663         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11664         string. Do not cast SECTOR explicitly.
11666         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11667         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11668         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11669         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11670         over 2TB and LBA mode is not supported, raise an error.
11671         (get_safe_sectors): New function.
11672         (grub_biosdisk_read): Use get_safe_sectors.
11673         (grub_biosdisk_write): Likewise.
11675         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11676         (grub_efidisk_write): Likewise.
11678         * disk/loopback.c (delete_loopback): Cosmetic changes.
11679         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11680         correctly.
11681         (grub_loopback_open): Likewise.
11682         (grub_loopback_read): Likewise. Also, change the type of POS to
11683         grub_off_t, and fix the usage of grub_memset.
11685         * commands/i386/pc/play.c: Include grub/machine/time.h.
11687         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11688         print FILE->SIZE.
11690         * commands/configfile.c: Include grub/env.h.
11692         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11693         GRUB_ERRNO directly instead. Change the type of POS to
11694         grub_off_t. Follow the coding standard.
11696         * commands/blocklist.c: Include grub/partition.h.
11697         (grub_cmd_blocklist): Return an error if the underlying device is
11698         not a disk. Take the starting sector of a partition into account,
11699         if a partition is used.
11701         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11702         a length field.
11703         (lba_mode): Support 64-bit addresses.
11704         (chs_mode): Likewise.
11705         (copy_buffer): Adapted to the new offsets of a length field and a
11706         segment field.
11707         (blocklist_default_start): Allocate 64-bit space.
11709         * boot/i386/pc/boot.S (force_lba): Removed.
11710         (boot_drive): Moved to under KERNEL_SECTOR.
11711         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11712         space.
11713         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11714         is useless.
11715         (lba_mode): Refactored to support a 64-bit address. More size
11716         optimization.
11717         (setup_sectors): Likewise.
11719 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11721         * DISTLIST: Added include/grub/i386/linux.h. Removed
11722         include/grub/i386/pc/linux.h
11724         * configure.ac (AC_INIT): Bumped to 1.94.
11726         * config.guess: Updated from gnulib.
11727         * config.sub: Likewise.
11728         * install-sh: Likewise.
11729         * mkinstalldirs: Likewise.
11731 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11733         * conf/common.rmk (grub_modules_init.lst): Depended on
11734         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11735         MODSRCFILES.
11737         * genmk.rb (PModule::rule): Reverted the previous change.
11739 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11741         * conf/common.rmk (grub_modules_init.lst): Depends on
11742         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11743         that the target does not exist before producing.
11744         (grub_modules_init.h): Remove the target before generating.
11745         (grub_emu_init.c): Likewise.
11747         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11749 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11751         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11752         for the target-specific tests. Make sure that we also have the
11753         up-to-date target variables for those tests.
11755 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11757         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11758         (PModule::rule): Likewise.
11760 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11762         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11763         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11764         target-specific flags should be prefixed.
11765         (PModule::rule): Likewise.
11767 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11769         * configure.ac (CMP): Check if cmp is available explicitly.
11771 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11773         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11774         (target_cpu): New variable.
11775         (pkglibdir): Use target_cpu instead of host_cpu.
11777         * util/i386/pc/grub-install.in (host_cpu): Removed.
11778         (target_cpu): New variable.
11779         (pkglibdir): Use target_cpu instead of host_cpu.
11781         * util/genmoddep.c: Removed.
11783         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11784         instead of GRUB_HOST_SIZEOF_VOID_P.
11785         * kern/dl.c: Likewise.
11787         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11788         ...
11789         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11790         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11791         (GRUB_TARGET_SIZEOF_LONG): ... this.
11792         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11793         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11794         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11795         to ...
11796         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11797         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11798         (GRUB_TARGET_SIZEOF_LONG): ... this.
11799         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11800         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11801         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11802         to ...
11803         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11804         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11805         (GRUB_TARGET_SIZEOF_LONG): ... this.
11806         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11807         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11809         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11810         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11811         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11812         instead of GRUB_HOST_SIZEOF_LONG.
11813         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11814         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11815         GRUB_CPU_WORDS_BIGENDIAN.
11816         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11817         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11818         grub_host_ssize_t.
11820         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11821         (genmoddep_SOURCES): Likewise.
11822         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11823         (genmoddep_SOURCES): Likewise.
11824         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11825         (genmoddep_SOURCES): Likewise.
11826         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11827         Likewise.
11828         (genmoddep_SOURCES): Likewise.
11830         * genmoddep.awk: New file.
11832         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11833         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11834         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
11835         (PModule::rule): Likewise.
11836         (Program::rule): Likewise.
11837         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
11838         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
11839         respectively.
11841         * configure.ac: Rewritten intensively to use host and target
11842         instead of build and host, respectively.
11844         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
11845         (host_cpu): Removed.
11846         (target_cpu): New variable.
11847         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
11848         (BUILD_CC): Removed.
11849         (BUILD_CFLAGS): Likewise.
11850         (BUILD_CPPFLAGS): Likewise.
11851         (TARGET_CC): New variable.
11852         (TARGET_CFLAGS): Likewise.
11853         (TARGET_CPPFLAGS): Likewise.
11854         (TARGET_LDFLAGS): Likewise.
11855         (AWK): Likewise.
11856         (include): Use target_cpu instead of host_cpu.
11857         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
11859         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
11861 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
11863         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
11864         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
11865         field 'false' to 'exec_on_false'.
11866         (grub_script_create_cmdif): Renamed argument names to reflect above
11867         changes.
11869         * normal/execute.c (grub_script_execute_cmdif): Likewise.
11871         * normal/script.c (grub_script_create_cmdif): Likewise.
11873 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
11875         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
11876         top.
11877         (grub_hfsplus_btree_recptr): Likewise.
11878         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
11879         FILEBLOCK both to pass a block number and store next block
11880         number.
11881         (grub_hfsplus_read_block): Rewritten heavily to support an extent
11882         overflow file correctly. Specify errors appropriately, because
11883         fshelp expects that GRUB_ERRNO is set when fails. Reuse
11884         grub_hfsplus_btree_recptr to get the pointer to a found key.
11885         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
11886         is found.
11888         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
11889         linux.mod.
11890         (_linux_mod_SOURCES): New variable.
11891         (_linux_mod_CFLAGS): Likewise.
11892         (_linux_mod_LDFLAGS): Likewise.
11893         (linux_mod_SOURCES): Likewise.
11894         (linux_mod_CFLAGS): Likewise.
11895         (linux_mod_LDFLAGS): Likewise.
11897         * DISTLIST: Added loader/i386/efi/linux.c,
11898         loader/i386/efi/linux_normal.c and
11899         include/grub/i386/efi/loader.h.
11901         * loader/i386/efi/linux.c: New file.
11902         * loader/i386/efi/linux_normal.c: Likewise.
11903         * include/grub/i386/efi/loader.h: Likewise.
11905 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
11907         * commands/blocklist.c: New file.
11909         * DISTLIST: Added commands/blocklist.c.
11911         * term/efi/console.c (grub_console_highlight_color): Use a lighter
11912         color for the background, and a darker color for the foreground.
11913         (grub_console_checkkey): Return READ_KEY.
11914         (grub_console_cls): Set the background to
11915         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
11917         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
11919         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
11920         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
11922         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
11923         prototype.
11925         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
11926         BG. The spec is wrong again.
11928         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
11929         prototype.
11930         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
11932         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
11933         commands/blocklist.c.
11934         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11936         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
11937         (blocklist_mod_SOURCES): New variable.
11938         (blocklist_mod_CFLAGS): Likewise.
11939         (blocklist_mod_LDFLAGS): Likewise.
11941 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
11943         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
11944         duplication.
11945         (lba_mode): Use %eax more intensively to reduce the code size.
11947 2006-05-20  Marco Gerards  <marco@gnu.org>
11949         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
11951         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
11952         for `menuentry'.
11953         (script): Accept leading newlines.
11954         (newlines): New rule to describe 0 or more newlines.
11955         (commands): Accept `command' with trailing newline.  Fixed the
11956         order in which arguments were passed to `grub_script_add_cmd'.
11957         Accept commands separated by newlines.
11958         (function): Changed to accept newlines.
11959         (menuentry) Rewritten.
11961         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
11962         front of the list, instead of to the end.
11964 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
11966         * util/i386/pc/grub-install.in (bindir): New variable.
11967         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
11968         Shaver <lbgwjl@gmail.com>.
11970 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
11972         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
11973         grub/machine/linux.h
11974         * loader/i386/pc/linux.c: Likewise.
11976         * include/grub/i386/pc/linux.h: Moved to ...
11977         * include/grub/i386/linux.h: ... here.
11979         * include/grub/i386/linux.h (struct linux_kernel_params): New
11980         struct.
11982 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
11984         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
11985         checking.
11986         (grub_video_vbe_blit_glyph): Likewise.
11987         (grub_video_vbe_blit_bitmap): Likewise.
11988         (grub_video_vbe_blit_render_target): Likewise.
11990 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
11992         * configure.ac (--with-platform): Properly quote the square
11993         brackets.
11995 2006-05-08  Marco Gerards  <marco@gnu.org>
11997         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
11998         this...
11999         (kernel_elf_HEADERS): ...to this.  Updated all users.
12000         (grubof_symlist.c): Renamed from this...
12001         (kernel_elf_symlist.c): ...to this.  Updated all users.
12002         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12003         (grubof_SOURCES): Renamed from this...
12004         (kernel_elf_SOURCES): ...to this.
12005         (grubof_HEADERS): Renamed from this...
12006         (kernel_elf_HEADERS): ...to this.
12007         (grubof_CFLAGS): Renamed from this...
12008         (kernel_elf_CFLAGS): ...to this.
12009         (grubof_ASFLAGS): Renamed from this...
12010         (kernel_elf_ASFLAGS): ...to this.
12011         (grubof_LDFLAGS): Renamed from this...
12012         (kernel_elf_LDFLAGS): ...to this.
12014         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12015         this...
12016         (kernel_elf_HEADERS): ...to this.  Updated all users.
12017         (grubof_symlist.c): Renamed from this...
12018         (kernel_elf_symlist.c): ...to this.  Updated all users.
12019         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12020         (grubof_SOURCES): Renamed from this...
12021         (kernel_elf_SOURCES): ...to this.
12022         (grubof_HEADERS): Renamed from this...
12023         (kernel_elf_HEADERS): ...to this.
12024         (grubof_CFLAGS): Renamed from this...
12025         (kernel_elf_CFLAGS): ...to this.
12026         (grubof_ASFLAGS): Renamed from this...
12027         (kernel_elf_ASFLAGS): ...to this.
12028         (grubof_LDFLAGS): Renamed from this...
12029         (kernel_elf_LDFLAGS): ...to this.
12031         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12032         `kernel.elf' instead of `grubof'.
12034 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12036         Add --with-platform to configure. Use pkglibdir instead of
12037         pkgdatadir. This is reported by Roger Leigh.
12039         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12040         (host_vendor): Likewise.
12041         (host_os): Likewise.
12042         (pkgdatadir): Likewise.
12043         (platform): New variable.
12044         (pkglibdir): Likewise.
12045         Use PKGLIBDIR instead of PKGDATADIR.
12047         * util/i386/pc/grub-install.in (datadir): Removed.
12048         (host_vendor): Likewise.
12049         (host_os): Likewise.
12050         (pkgdatadir): Likewise.
12051         (platform): New variable.
12052         (pkglibdir): Likewise.
12053         Use PKGLIBDIR instead of PKGDATADIR.
12055         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12056         instead of GRUB_DATADIR.
12057         (main): Likewise.
12058         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12059         (main): Likewise.
12060         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12061         (main): Likewise.
12063         * configure.ac (--with-platform): New option.
12064         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12066         * Makefile.in: Include a makefile based on PLATFORM instead of
12067         HOST_VENDOR.
12068         (pkgdatadir): Not appended by the machine type.
12069         (pkglibdir): Appended by the machine type.
12070         (host_vendor): Removed.
12071         (platform): New variable.
12072         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12073         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12074         (uninstall): Likewise.
12076 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12078         Use the environment context in the menu. Remove the commands
12079         "default" and "timeout", and use variables instead.
12081         * normal/menu.c: Include grub/env.h.
12082         (print_entry): Cast TITLE to silence gcc.
12083         (get_timeout): New function.
12084         (set_timeout): Likewise.
12085         (get_entry_number): Likewise.
12086         (run_menu): Use a default entry, a fallback entry and a timeout
12087         in the environment variables "default", "fallback" and
12088         "timeout". Also, tweak the default entry if it is not within the
12089         current menu entries.
12090         (grub_menu_run): Use a fallback entry in the environment variable
12091         "fallback".
12093         * normal/main.c (read_config_file): Do not initialize
12094         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12095         NEWMENU->TIMEOUT.
12096         (grub_normal_execute): Use a data slot to store the menu.
12098         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12099         fallback_entry and timeout.
12100         (struct grub_menu_list): Removed.
12101         (grub_menu_list_t): Likewise.
12102         (struct grub_context): Likewise.
12103         (grub_context_t): Likewise.
12104         (grub_context_get): Likewise.
12105         (grub_context_get_current_menu): Likewise.
12106         (grub_context_push_menu): Likewise.
12107         (grub_context_pop_menu): Likewise.
12108         (grub_default_init): Likewise.
12109         (grub_default_fini): Likewise.
12110         (grub_timeout_init): Likewise.
12111         (grub_timeout_fini): Likewise.
12113         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12114         and timeout.mod.
12115         (normal_mod_SOURCES): Removed normal/context.c.
12117         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12118         commands/default.c, commands/timeout.c and normal/context.c.
12119         (normal_mod_SOURCES): Removed normal/context.c.
12121         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12122         commands/timeout.c and normal/context.c.
12123         (normal_mod_SOURCES): Removed normal/context.c.
12125         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12126         commands/default.c, commands/timeout.c and normal/context.c.
12127         (normal_mod_SOURCES): Removed normal/context.c.
12129         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12130         timeout.mod.
12131         (default_mod_SOURCES): Removed.
12132         (default_mod_CFLAGS): Likewise.
12133         (default_mod_LDFLAGS): Likewise.
12134         (timeout_mod_SOURCES): Removed.
12135         (timeout_mod_CFLAGS): Likewise.
12136         (timeout_mod_LDFLAGS): Likewise.
12138         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12139         normal/context.c.
12141         * commands/default.c: Removed.
12142         * commands/timeout.c: Likewise.
12143         * normal/context.c: Likewise.
12145 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12147         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12149 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12151         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12152         "next" to "prev" for readability.
12153         (struct grub_env_sorted_var): New struct.
12154         (grub_env_context): Renamed to ...
12155         (initial_context): ... this.
12156         (grub_env_var_context): Renamed to ...
12157         (current_context): ... this.
12158         (grub_env_find): Look only at CURRENT_CONTEXT.
12159         (grub_env_context_open): Rewritten to copy exported variables from
12160         previous context.
12161         (grub_env_context_close): Rewritten according to the new
12162         scheme. Also, add an assertion to prevent the initial context from
12163         removed.
12164         (grub_env_insert): Removed the code for the sorted list.
12165         (grub_env_remove): Likewise.
12166         (grub_env_export): Simply mark the variable with
12167         GRUB_ENV_VAR_GLOBAL.
12168         (grub_env_set): A cosmetic change for naming consistency.
12169         (grub_env_get): Likewise.
12170         (grub_env_unset): Likewise.
12171         (grub_env_iterate): Rewritten to sort variables within this
12172         function.
12173         (grub_register_variable_hook): Fixed for naming consistency. Call
12174         grub_env_find again, only if NAME is not found at the first time.
12175         (mangle_data_slot_name): New function.
12176         (grub_env_set_data_slot): Likewise.
12177         (grub_env_get_data_slot): Likewise.
12178         (grub_env_unset_data_slot): Likewise.
12180         * include/grub/env.h (grub_env_var_type): New enum.
12181         (GRUB_ENV_VAR_LOCAL): New constant.
12182         (GRUB_ENV_VAR_GLOBAL): Likewise.
12183         (GRUB_ENV_VAR_DATA): Likewise.
12184         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12185         "type".
12186         (grub_env_set): Replace VAR with NAME for consistency.
12187         (grub_register_variable_hook): Likewise.
12188         (grub_env_export): Specify the name of the argument.
12189         (grub_env_set_data_slot): New prototype.
12190         (grub_env_get_data_slot): Likewise.
12191         (grub_env_unset_data_slot): Likewise.
12193 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12195         Extend the loader so that GRUB can accept a loader which comes
12196         back to GRUB when a loaded image exits. Also, this change adds
12197         support for a chainloader on EFI.
12199         * term/efi/console.c: Include grub/misc.h.
12200         (grub_console_checkkey): Display a scan code on the top for
12201         debugging. This will be removed once the EFI port gets stable.
12202         Correct the scan code mapping.
12204         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12205         allocate memory from larger regions, in order to reduce the number
12206         of allocated regions. Otherwise, the MacOSX loader panics.
12207         (filter_memory_map): Avoid less than 1MB for compatibility with
12208         other loaders.
12209         (add_memory_regions): Allocate from the tail of a region, if
12210         possible, to avoid allocating a region near to 1MB, for the MacOSX
12211         loader.
12213         * kern/efi/init.c (grub_efi_set_prefix): Specify
12214         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12216         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12217         argument IMAGE_HANDLE and specify it to get a loaded image.
12218         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12219         grub_efi_get_loaded_image.
12220         (grub_efi_get_filename): Divide the length by the size of
12221         grub_efi_char16_t.
12222         (grub_efi_get_device_path): New function.
12223         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12224         the length by the size of grub_efi_char16_t for a file path device
12225         path node.
12227         * kern/loader.c (grub_loader_noreturn): New variable.
12228         (grub_loader_set): Accept a new argument NORETURN. Set
12229         GRUB_LOADER_NORETURN to NORETURN.
12230         All callers changed.
12231         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12232         grub_machine_fini.
12234         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12235         prototype.
12236         (grub_efi_get_loaded_image): Take an argument to specify an image
12237         handle.
12239         * include/grub/loader.h (grub_loader_set): Added one more argument
12240         NORETURN.
12242         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12243         instead of grub_efi_open_protocol.
12244         (grub_efidisk_get_device_name): Likewise.
12245         (grub_efidisk_close): Print a newline.
12246         (grub_efidisk_get_device_handle): Fixed to use
12247         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12248         GRUB_EFI_DEVICE_PATH_TYPE.
12250         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12251         * kern/efi/efi.c (device_path_guid): ... here.
12253         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12254         chain.mod.
12255         (kernel_mod_HEADERS): Added efi/disk.h.
12256         (_chain_mod_SOURCES): New variable.
12257         (_chain_mod_CFLAGS): Likewise.
12258         (_chain_mod_LDFLAGS): Likewise.
12259         (chain_mod_SOURCES): Likewise.
12260         (chain_mod_CFLAGS): Likewise.
12261         (chain_mod_LDFLAGS): Likewise.
12263         * DISTLIST: Added include/grub/efi/chainloader.h,
12264         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12266         * include/grub/efi/chainloader.h: New file.
12267         * loader/efi/chainloader.c: Likewise.
12268         * loader/efi/chainloader_normal.c: Likewise.
12270 2006-04-30  Marco Gerards  <marco@gnu.org>
12272         * commands/configfile.c (grub_cmd_source): New function.
12273         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12274         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12276 2006-04-30  Marco Gerards  <marco@gnu.org>
12278         * normal/execute.c (grub_script_execute_cmd): Change the return
12279         type to `grub_err_t'.  Correctly return the error.
12280         (grub_script_execute_cmdline): In case a command line is not a
12281         command or a function, try to interpret it as an assignment.
12283 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12285         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12286         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12287         skip a node whose name is obviously invalid as UTF-16,
12288         i.e. contains a NUL character. Stop the iteration when the last
12289         directory entry is found. Instead of using the return value of
12290         grub_hfsplus_btree_iterate_node, store the value in RET and use
12291         it, because the iterator can be stopped by the last directory
12292         entry.
12294 2006-04-30  Marco Gerards  <marco@gnu.org>
12296         * include/grub/env.h (grub_env_export): New prototype.  Reported
12297         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12299 2006-04-30  Marco Gerards  <marco@gnu.org>
12301         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12302         size of the extents in a catalog file record.
12304 2006-04-29  Marco Gerards  <marco@gnu.org>
12306         * commands/configfile.c (grub_cmd_configfile): Execute the
12307         configfile within its own context.
12309         * include/grub/env.h (grub_env_context_open): New prototype.
12310         (grub_env_context_close): Likewise.
12312         * kern/env.c (grub_env): Removed.
12313         (grub_env_sorted): Likewise.
12314         (grub_env_context): New variable.
12315         (grub_env_var_context): Likewise.
12316         (grub_env_find): Search both the active context and the global
12317         context.
12318         (grub_env_context_open): New function.
12319         (grub_env_context_close): Likewise.
12320         (grub_env_insert): Likewise.
12321         (grub_env_remove): Likewise.
12322         (grub_env_export): Likewise.
12323         (grub_env_set): Changed to use helper functions to avoid code
12324         duplication.
12325         (grub_env_iterate): Rewritten so both the current context and the
12326         global context are being used.
12328         * normal/command.c (export_command): New function.
12329         (grub_command_init): Register the `export' function.
12331 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12333         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12334         explicitly to suppress gcc's warnings.
12335         * fs/fat.c (grub_fat_find_dir): Likewise.
12336         (grub_fat_label): Likewise.
12337         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12338         (grub_xfs_mount): Likewise.
12339         (grub_xfs_label): Likewise.
12340         * fs/affs.c (grub_affs_mount): Likewise.
12341         (grub_affs_label): Likewise.
12342         (grub_affs_iterate_dir): Likewise.
12343         * fs/sfs.c (grub_sfs_mount): Likewise.
12344         (grub_sfs_iterate_dir): Likewise.
12345         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12346         * fs/hfs.c (grub_hfs_mount): Likewise.
12347         (grub_hfs_cmp_catkeys): Likewise.
12348         (grub_hfs_find_dir): Likewise.
12349         (grub_hfs_dir): Likewise.
12350         (grub_hfs_label): Likewise.
12351         * fs/jfs.c (grub_jfs_mount): Likewise.
12352         (grub_jfs_opendir): Likewise.
12353         (grub_jfs_getent): Likewise.
12354         (grub_jfs_lookup_symlink): Likewise.
12355         (grub_jfs_label): Likewise.
12356         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12357         (grub_hfsplus_iterate_dir): Likewise.
12358         (grub_hfsplus_btree_iterate_node): Made static.
12360         * util/grub-emu.c (prefix): New variable.
12361         (grub_machine_set_prefix): New function.
12362         (main): Do not set the environment variable "prefix" here. Only
12363         set PREFIX, which is used later by grub_machine_set_prefix.
12365         * include/grub/video.h: Do not include grub/symbol.h.
12366         (grub_video_register): Not exported. This symbol is not defined in
12367         the kernel.
12368         (grub_video_unregister): Likewise.
12369         (grub_video_iterate): Likewise.
12370         (grub_video_setup): Likewise.
12371         (grub_video_restore): Likewise.
12372         (grub_video_get_info): Likewise.
12373         (grub_video_get_blit_format): Likewise.
12374         (grub_video_set_palette): Likewise.
12375         (grub_video_get_palette): Likewise.
12376         (grub_video_set_viewport): Likewise.
12377         (grub_video_get_viewport): Likewise.
12378         (grub_video_map_color): Likewise.
12379         (grub_video_map_rgb): Likewise.
12380         (grub_video_map_rgba): Likewise.
12381         (grub_video_fill_rect): Likewise.
12382         (grub_video_blit_glyph): Likewise.
12383         (grub_video_blit_bitmap): Likewise.
12384         (grub_video_blit_render_target): Likewise.
12385         (grub_video_scroll): Likewise.
12386         (grub_video_swap_buffers): Likewise.
12387         (grub_video_create_render_target): Likewise.
12388         (grub_video_delete_render_target): Likewise.
12389         (grub_video_set_active_render_target): Likewise.
12391         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12392         Undefined.
12393         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12395         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12396         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12397         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12398         instead of $(srcdir)/genkernsyms.sh.
12400         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12401         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12402         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12403         instead of $(srcdir)/genkernsyms.sh.
12405         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12406         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12407         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12408         instead of $(srcdir)/genkernsyms.sh.
12410         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12411         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12412         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12413         instead of $(srcdir)/genkernsyms.sh.
12415         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12416         genkernsyms.sh.
12418         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12419         genkernsyms.sh.
12420         (gensymlist.sh): New target.
12421         (genkernsyms.sh): Likewise.
12423         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12424         genkernsyms.sh.in and gensymlist.sh.in.
12426         * genkernsyms.sh: Removed.
12427         * gensymlist.sh: Likewise.
12429         * genkernsyms.sh.in: New file.
12430         * gensymlist.sh.in: Likewise.
12432 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12434         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12435         clobber "prefix", since we may have already set it manually.
12437 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12439         * kern/misc.c (abort): New alias for grub_abort.
12441 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12443         A new machine-specific function "grub_machine_set_prefix" is
12444         defined. This is called after loading modules, so that a prefix
12445         initialization can use modules. Also, this change adds an
12446         intensive debugging feature for the memory manager via the
12447         configure option "--enable-mm-debug".
12449         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12450         PART.LEN.
12452         * kern/sparc64/ieee1275/init.c (abort): Removed.
12453         (grub_stop): Likewise.
12454         (grub_exit): New function.
12455         (grub_set_prefix): Renamed to ...
12456         (grub_machine_set_prefix): ... this.
12457         (grub_machine_init): Do not call grub_set_prefix.
12459         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12460         (grub_machine_set_prefix): ... this.
12461         (grub_machine_init): Do not call grub_set_prefix.
12463         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12464         (grub_machine_init): Do not set the prefix here.
12466         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12468         * kern/efi/init.c: Include grub/mm.h.
12469         (grub_efi_set_prefix): New function.
12471         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12472         (grub_efi_get_filename): New function.
12473         (grub_print_device_path): Renamed to ...
12474         (grub_efi_print_device_path): ... this.
12476         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12477         [MM_DEBUG] (grub_realloc): Likewise.
12478         [MM_DEBUG] (grub_free): Likewise.
12479         [MM_DEBUG] (grub_memalign): Likewise.
12480         [MM_DEBUG] (grub_mm_debug): New variable.
12481         [MM_DEBUG] (grub_debug_malloc): New function.
12482         [MM_DEBUG] (grub_debug_free): New function.
12483         [MM_DEBUG] (grub_debug_realloc): New function.
12484         [MM_DEBUG] (grub_debug_memalign): New function.
12486         * kern/misc.c (grub_abort): Print a newline to distinguish
12487         the message.
12489         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12490         grub_set_root_dev after loading modules. This is necessary when
12491         setting a prefix depends on modules.
12493         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12494         (grub_efi_print_device_path): ... this.
12495         (grub_efi_get_filename): New prototype.
12496         (grub_efi_set_prefix): Likewise.
12498         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12499         and grub/disk.h.
12500         (grub_efidisk_get_device_handle): New prototype.
12501         (grub_efidisk_get_device_name): Likewise.
12503         * include/grub/mm.h: Include config.h.
12504         (MM_DEBUG): Removed.
12505         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12506         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12507         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12508         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12509         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12510         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12511         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12512         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12513         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12515         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12517         * disk/efi/efidisk.c: Include grub/partition.h.
12518         (iterate_child_devices): New function.
12519         (add_device): First, compare only last device path nodes, so that
12520         devices are sorted by the types.
12521         (grub_efidisk_get_device_handle): New function.
12522         (grub_efidisk_get_device_name): Likewise.
12524         * configure.ac (--enable-mm-debug): New option to enable the
12525         memory manager debugging feature. This makes the binary much
12526         bigger, so is disabled by default.
12528 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12530         Use grub_abort instead of grub_stop, and grub_exit must be
12531         define in each architecture now. Also, this change adds support
12532         for EFI disks.
12534         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12535         (grub_getkey): New function.
12536         (grub_term_get_current): Likewise.
12538         * util/i386/pc/grub-setup.c: Include grub/term.h.
12539         (grub_getkey): New function.
12540         (grub_term_get_current): Likewise.
12542         * util/misc.c (grub_stop): Renamed to ...
12543         (grub_exit): ... this.
12545         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12546         (grub_exit): ... this.
12547         (grub_machine_init): Use grub_abort instead of abort.
12548         (grub_stop): Removed.
12550         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12551         abort.
12553         * kern/i386/pc/startup.S (grub_exit): New function.
12554         (cold_reboot): New label.
12556         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12557         (grub_efi_init): Call grub_efidisk_init.
12558         (grub_efi_fini): Call grub_efidisk_fini.
12560         * kern/efi/efi.c: Include grub/mm.h.
12561         (grub_efi_console_control_guid): Renamed to ...
12562         (console_control_guid): ... this.
12563         (grub_efi_loaded_image_guid): Renamed to ...
12564         (loaded_image_guid): ... this.
12565         (grub_efi_locate_handle): New function.
12566         (grub_efi_open_protocol): Likewise.
12567         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12568         GRUB_EFI_CONSOLE_CONTROL_GUID.
12569         (grub_efi_exit): Removed.
12570         (grub_stop): Likewise.
12571         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12572         (grub_exit): New function.
12573         (grub_print_device_path): Likewise.
12575         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12576         (grub_enter_rescue_mode): Register "exit".
12578         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12579         (grub_abort): New function.
12581         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12583         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12585         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12587         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12588         (grub_print_device_path): New prototype.
12589         (grub_efi_locate_handle): Likewise.
12590         (grub_efi_open_protocol): Likewise.
12592         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12593         * disk/efi/efidisk.c: Likewise.
12595         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12597         * include/grub/efi/console_control.h
12598         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12600         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12601         last 8 bytes as an array.
12602         (GRUB_EFI_DISK_IO_GUID): New macro.
12603         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12604         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12605         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12606         grub_uint8_t.
12607         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12608         (struct grub_efi_device_path): Rename the member "sub_type" to
12609         "subtype".
12610         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12611         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12612         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12613         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12614         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12615         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12616         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12617         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12618         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12619         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12620         (struct grub_efi_pci_device_path): New structure.
12621         (grub_efi_pci_device_path_t): New type.
12622         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12623         (struct grub_efi_pccard_device_path): New structure.
12624         (grub_efi_pccard_device_path_t): New type.
12625         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12626         (struct grub_efi_memory_mapped_device_path): New structure.
12627         (grub_efi_memory_mapped_device_path_t): New type.
12628         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12629         (struct grub_efi_vendor_device_path): New structure.
12630         (grub_efi_vendor_device_path_t): New type.
12631         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12632         (struct grub_efi_controller_device_path): New structure.
12633         (grub_efi_controller_device_path_t): New type.
12634         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12635         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12636         (struct grub_efi_acpi_device_path): New structure.
12637         (grub_efi_acpi_device_path_t): New type.
12638         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12639         (struct grub_efi_expanded_acpi_device_path): New structure.
12640         (grub_efi_expanded_acpi_device_path_t): New type.
12641         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12642         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12643         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12644         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12645         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12646         (struct grub_efi_atapi_device_path): New structure.
12647         (grub_efi_atapi_device_path_t): New type.
12648         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12649         (struct grub_efi_fibre_channel_device_path): New structure.
12650         (grub_efi_fibre_channel_device_path_t): New type.
12651         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12652         (struct grub_efi_1394_device_path): New structure.
12653         (grub_efi_1394_device_path_t): New type.
12654         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12655         (struct grub_efi_usb_device_path): New structure.
12656         (grub_efi_usb_device_path_t): New type.
12657         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12658         (struct grub_efi_usb_class_device_path): New structure.
12659         (grub_efi_usb_class_device_path_t): New type.
12660         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12661         (struct grub_efi_i2o_device_path): New structure.
12662         (grub_efi_i2o_device_path_t): New type.
12663         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12664         (struct grub_efi_mac_address_device_path): New structure.
12665         (grub_efi_mac_address_device_path_t): New type.
12666         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12667         (struct grub_efi_ipv4_device_path): New structure.
12668         (grub_efi_ipv4_device_path_t): New type.
12669         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12670         (struct grub_efi_ipv6_device_path): New structure.
12671         (grub_efi_ipv6_device_path_t): New type.
12672         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12673         (struct grub_efi_infiniband_device_path): New structure.
12674         (grub_efi_infiniband_device_path_t): New type.
12675         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12676         (struct grub_efi_uart_device_path): New structure.
12677         (grub_efi_uart_device_path_t): New type.
12678         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12679         (struct grub_efi_vendor_messaging_device_path): New structure.
12680         (grub_efi_vendor_messaging_device_path_t): New type.
12681         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12682         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12683         (struct grub_efi_hard_drive_device_path): New structure.
12684         (grub_efi_hard_drive_device_path_t): New type.
12685         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12686         (struct grub_efi_cdrom_device_path): New structure.
12687         (grub_efi_cdrom_device_path_t): New type.
12688         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12689         (struct grub_efi_vendor_media_device_path): New structure.
12690         (grub_efi_vendor_media_device_path_t): New type.
12691         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12692         (struct grub_efi_file_path_device_path): New structure.
12693         (grub_efi_file_path_device_path_t): New type.
12694         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12695         (struct grub_efi_protocol_device_path): New structure.
12696         (grub_efi_protocol_device_path_t): New type.
12697         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12698         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12699         (struct grub_efi_bios_device_path): New structure.
12700         (grub_efi_bios_device_path_t): New type.
12701         (struct grub_efi_disk_io): New structure.
12702         (grub_efi_disk_io_t): New type.
12703         (struct grub_efi_block_io_media): New structure.
12704         (grub_efi_block_io_media_t): New type.
12705         (struct grub_efi_block_io): New structure.
12706         (grub_efi_block_io_t): New type.
12708         * include/grub/misc.h (grub_stop): Removed.
12709         (grub_exit): New prototype.
12710         (grub_abort): Likewise.
12712         * include/grub/disk.h (enum grub_disk_dev_id): Added
12713         GRUB_DISK_DEVICE_EFIDISK_ID.
12715         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12716         disk/efi/efidisk.c.
12717         (kernel_syms.lst): Remove the target if an error occurs.
12719 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12721         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12722         as it was simply too buggy.
12724 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12726         * kern/misc.c (grub_lltoa): New function.
12727         (grub_vsprintf): Added support for the long long suffix,
12728         i.e. "ll".
12730 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12732         * Makefile.in (LDFLAGS): Add variable.
12733         (LD): Remove variable.
12734         * configure.ac: Add -m32 to LDFLAGS.
12735         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12736         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12737         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12738         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12739         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12740         variables.
12741         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12742         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12743         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12745 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12747         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12748         length for unknown glyph.
12750 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12752         Add support for pre-loaded modules into the EFI port.
12754         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12755         completely. Accept one more argument DIR. The caller has changed.
12757         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12759         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12760         (grub_efi_loaded_image_guid): New variable.
12761         (grub_efi_get_loaded_image): New function.
12762         (grub_arch_modules_addr): Likewise.
12764         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12765         prototype.
12767         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12768         (struct grub_efi_loaded_image): New structure.
12769         (grub_efi_loaded_image_t): New type.
12771 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12773         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12774         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12775         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12777 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12779         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12781 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12783         * DISTLIST: Added include/grub/efi/console.h,
12784         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12785         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12787         * include/grub/efi/console.h: New file.
12788         * include/grub/efi/time.h: Likewise.
12789         * include/grub/i386/efi/kernel.h: Likewise.
12790         * kern/efi/init.c: Likewise.
12791         * kern/efi/mm.c: Likewise.
12792         * term/efi/console.c: Likewise.
12794         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12795         (grub_stop): Removed.
12796         (grub_get_rtc): Likewise.
12797         (grub_machine_init): Simply call grub_efi_init.
12798         (grub_machine_fini): Call grub_efi_fini.
12800         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12801         (grub_efi_output_string): Removed.
12802         (grub_efi_stall): New function.
12803         (grub_stop): Likewise.
12804         (grub_get_rtc): Likewise.
12806         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12807         (grub_efi_stall): New prototype.
12808         (grub_efi_allocate_pages): Likewise.
12809         (grub_efi_free_pages): Likewise.
12810         (grub_efi_get_memory_map): Likewise.
12811         (grub_efi_mm_init): Likewise.
12812         (grub_efi_mm_fini): Likewise.
12813         (grub_efi_init): Likewise.
12814         (grub_efi_fini): Likewise.
12816         * include/grub/i386/efi/time.h: Do not include
12817         grub/symbol.h. Include grub/efi/time.h.
12818         (GRUB_TICKS_PER_SECOND): Removed.
12819         (grub_get_rtc): Likewise.
12821         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12822         Added padding. The EFI spec is buggy.
12823         (GRUB_EFI_BLACK): New macro.
12824         (GRUB_EFI_BLUE): Likewise.
12825         (GRUB_EFI_GREEN): Likewise.
12826         (GRUB_EFI_CYAN): Likewise.
12827         (GRUB_EFI_RED): Likewise.
12828         (GRUB_EFI_MAGENTA): Likewise.
12829         (GRUB_EFI_BROWN): Likewise.
12830         (GRUB_EFI_LIGHTGRAY): Likewise.
12831         (GRUB_EFI_BRIGHT): Likewise.
12832         (GRUB_EFI_DARKGRAY): Likewise.
12833         (GRUB_EFI_LIGHTBLUE): Likewise.
12834         (GRUB_EFI_LIGHTGREEN): Likewise.
12835         (GRUB_EFI_LIGHTCYAN): Likewise.
12836         (GRUB_EFI_LIGHTRED): Likewise.
12837         (GRUB_EFI_LIGHTMAGENTA): Likewise.
12838         (GRUB_EFI_YELLOW): Likewise.
12839         (GRUB_EFI_WHITE): Likewise.
12840         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
12841         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
12842         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
12843         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
12844         (GRUB_EFI_BACKGROUND_RED): Likewise.
12845         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
12846         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
12847         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
12848         (GRUB_EFI_TEXT_ATTR): Likewise.
12850         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
12851         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12852         (kernel_mod_HEADERS): Added efi/time.h.
12854 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
12856         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
12857         include/grub/efi/api.h, include/grub/efi/console_control.h,
12858         include/grub/efi/efi.h, include/grub/efi/pe32.h,
12859         include/grub/i386/efi/time.h, kern/efi/efi.c,
12860         kern/i386/efi/init.c, kern/i386/efi/startup.S,
12861         and util/i386/efi/grub-mkimage.c.
12863         * Makefile.in (RMKFILES): Added i386-efi.rmk.
12865         * genmk.rb (PModule#rule): Do not export symbols if
12866         #{prefix}_EXPORTS is set to "no".
12868         * conf/i386-efi.mk: New file.
12869         * conf/i386-efi.rmk: Likewise.
12870         * include/grub/efi/api.h: Likewise.
12871         * include/grub/efi/console_control.h: Likewise.
12872         * include/grub/efi/efi.h: Likewise.
12873         * include/grub/efi/pe32.h: Likewise.
12874         * include/grub/i386/efi/time.h: Likewise.
12875         * kern/efi/efi.c: Likewise.
12876         * kern/i386/efi/init.c: Likewise.
12877         * kern/i386/efi/startup.S: Likewise.
12878         * util/i386/efi/grub-mkimage.c: Likewise.
12880 2006-04-17  Marco Gerards  <marco@gnu.org>
12882         * include/grub/script.h: Include <grub/parser.h> and
12883         "grub_script.tab.h".
12884         (struct grub_lexer_param): New struct.
12885         (struct grub_parser_param): Likewise.
12886         (grub_script_create_arglist): Pass the state in an argument.
12887         (grub_script_add_arglist): Likewise.
12888         (grub_script_create_cmdline): Likewise.
12889         (grub_script_create_cmdblock): Likewise.
12890         (grub_script_create_cmdif): Likewise.
12891         (grub_script_create_cmdmenu): Likewise.
12892         (grub_script_add_cmd): Likewise.
12893         (grub_script_arg_add): Likewise.
12894         (grub_script_lexer_ref): Likewise.
12895         (grub_script_lexer_deref): Likewise.
12896         (grub_script_lexer_record_start): Likewise.
12897         (grub_script_lexer_record_stop): Likewise.
12898         (grub_script_mem_record): Likewise.
12899         (grub_script_mem_record_stop): Likewise.
12900         (grub_script_malloc): Likewise.
12901         (grub_script_yylex): Likewise.
12902         (grub_script_yyparse): Likewise.
12903         (grub_script_yyerror): Likewise.
12904         (grub_script_yylex): Likewise.
12905         (grub_script_lexer_init): Return the state.
12907         * normal/lexer.c (grub_script_lexer_state): Removed variable.
12908         (grub_script_lexer_done): Likewise.
12909         (grub_script_lexer_getline): Likewise.
12910         (grub_script_lexer_refs): Likewise.
12911         (script): Likewise.
12912         (newscript): Likewise.
12913         (record): Likewise.
12914         (recording): Likewise.
12915         (recordpos): Likewise.
12916         (recordlen): Likewise.
12917         (grub_script_lexer_init): Return the state instead of setting
12918         global variables.
12919         (grub_script_lexer_ref): Use the newly added argument for state
12920         instead of globals.
12921         (grub_script_lexer_deref): Likewise.
12922         (grub_script_lexer_record_start): Likewise.
12923         (grub_script_lexer_record_stop): Likewise.
12924         (recordchar): Likewise.
12925         (nextchar): Likewise.
12926         (grub_script_yylex2): Likewise.
12927         (grub_script_yylex): Likewise.
12928         (grub_script_yyerror): Likewise.
12930         * normal/parser.y (func_mem): Removed variable.
12931         (menu_entry): Likewise.
12932         (err): Likewise.
12933         (%lex-param): New parser option.
12934         (%parse-param): Likewise.
12935         (script): Always return the AST.
12936         (argument): Pass the state around.
12937         (arguments): Likewise.
12938         (grubcmd): Likewise.
12939         (commands): Likewise.
12940         (function): Likewise.
12941         (menuentry): Likewise.
12942         (if_statement): Likewise.
12943         (if): Likewise.
12945         * normal/script.c (grub_script_memused): Removed variable.
12946         (grub_script_parsed): Likewise.
12947         (grub_script_malloc): Added a state argument.  Use that instead of
12948         global variables.
12949         (grub_script_mem_record): Likewise.
12950         (grub_script_mem_record_stop): Likewise.
12951         (grub_script_arg_add): Likewise.
12952         (grub_script_add_arglist): Likewise.
12953         (grub_script_create_cmdline): Likewise.
12954         (grub_script_create_cmdif): Likewise.
12955         (grub_script_create_cmdmenu): Likewise.
12956         (grub_script_add_cmd): Likewise.
12957         (grub_script_parse): Setup the state before calling the parser.
12959 2006-04-16  Marco Gerards  <marco@gnu.org>
12961         * normal/command.c (grub_command_init): Remove the title command.
12963         * normal/lexer.c (grub_script_yylex): Renamed from this...
12964         (grub_script_yylex2): ... to this.
12965         (grub_script_yylex): New function.  Temporary
12966         introduced to filter some tokens.
12967         (grub_script_yyerror): Print a newline.
12969         * normal/main.c (read_config_file): Output information about the
12970         lines that contain errors.  Wait for a key after all lines have
12971         been processed.  Don't return an empty menu.
12973         * normal/parser.y (func_mem): Don't initialize.
12974         (menu_entry): Likewise.
12975         (err): New variable.
12976         (script): Don't return anything when an error was encountered.
12977         (ws, returns): Removed rules.
12978         (argument): Disabled concatenated variable support.
12979         (arguments): Remove explicit separators.
12980         (grubcmd): Likewise.
12981         (function): Likewise.
12982         (menuentry): Likewise.
12983         (if): Likewise.
12984         (commands): Likewise.  Add error handling.
12986         * normal/script.c (grub_script_create_cmdline): If
12987         `grub_script_parsed' is 0, assume the parser encountered an error.
12989 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
12991         * configure.ac: Add support for EFI. Fix the typo
12992         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
12994 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
12996         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
12997         foreign multibyte characters should be shown correctly.
12999 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13001         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13002         calculation.
13003         (read_config_file): Made it to close file before returning.
13005 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13007         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13008         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13009         video/i386/pc/vbefill.c.
13011         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13012         video/i386/pc/vbefill.c.
13014         * include/grub/video.h (grub_video_blit_format): New enum.
13015         (grub_video_mode_info): Added new member blit_format.
13016         (grub_video_get_blit_format): New function prototype.
13018         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13019         function prototype.
13020         (grub_video_vbe_map_rgb): Likewise.
13021         (grub_video_vbe_unmap_color): Likewise.
13023         * include/grub/i386/pc/vbeblit.h: New file.
13025         * include/grub/i386/pc/vbefill.h: New file.
13027         * video/video.c (grub_video_get_blit_format): New function.
13028         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13029         (grub_video_vbe_map_rgb): Likewise.
13030         (grub_video_vbe_unmap_color): Likewise.
13032         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13033         optimized fills.
13034         (grub_video_vbe_blit_render_target): Changed to use more optimized
13035         blits.
13036         (grub_video_vbe_setup): Added detection for optimized settings.
13037         (grub_video_vbe_create_render_target): Likewise.
13039         * video/i386/pc/vbeblit.c: New file.
13041         * video/i386/pc/vbefill.c: New file.
13043 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13045         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13046         here...
13048         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13049         parsing to support both hex and dec ranges.  If filename was missing
13050         show usage information.
13052 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13054         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13055         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13057         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13058         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13059         (video_mod_SOURCES): Added.
13060         (video_mod_CFLAGS): Likewise.
13061         (video_mod_LDFLAGS): Likewise.
13062         (gfxterm_mod_SOURCES): Likewise.
13063         (gfxterm_mod_CFLAGS): Likewise.
13064         (gfxterm_mod_LDFLAGS): Likewise.
13065         (videotest_mod_SOURCES): Likewise.
13066         (videotest_mod_CFLAGS): Likewise.
13067         (videotest_mod_LDFLAGS): Likewise.
13068         (vesafb_mod_SOURCES): Removed.
13069         (vesafb_mod_CFLAGS): Likewise.
13070         (vesafb_mod_LDFLAGS): Likewise.
13071         (vga_mod_SOURCES): Likewise.
13072         (vga_mod_CFLAGS): Likewise.
13073         (vga_mod_LDFLAGS): Likewise.
13075         * commands/videotest.c: New file.
13077         * font/manager.c (fill_with_default_glyph): Modified to use
13078         grub_font_glyph.
13079         (grub_font_get_glyph): Likewise.
13080         (fontmanager): Renamed from this...
13081         (font_manager): ... to this.
13083         * include/grub/font.h (grub_font_glyph): Added new structure.
13084         (grub_font_get_glyph): Modified to use grub_font_glyph.
13086         * include/grub/misc.h (grub_abs): Added as inline function.
13088         * include/grub/video.h: New file.
13090         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13091         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13092         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13093         (grub_vbe_get_controller_info): Renamed from this...
13094         (grub_vbe_bios_get_controller_info): ... to this.
13095         (grub_vbe_get_mode_info): Renamed from this...
13096         (grub_vbe_bios_get_mode_info): ... to this.
13097         (grub_vbe_set_mode): Renamed from this...
13098         (grub_vbe_bios_set_mode): ... to this.
13099         (grub_vbe_get_mode): Renamed from this...
13100         (grub_vbe_bios_get_mode): ... to this.
13101         (grub_vbe_set_memory_window): Renamed from this...
13102         (grub_vbe_bios_set_memory_window): ... to this.
13103         (grub_vbe_get_memory_window): Renamed from this...
13104         (grub_vbe_bios_get_memory_window): ... to this.
13105         (grub_vbe_set_scanline_length): Renamed from this...
13106         (grub_vbe_set_scanline_length): ... to this.
13107         (grub_vbe_get_scanline_length): Renamed from this...
13108         (grub_vbe_bios_get_scanline_length): ... to this.
13109         (grub_vbe_set_display_start): Renamed from this...
13110         (grub_vbe_bios_set_display_start): ... to this.
13111         (grub_vbe_get_display_start): Renamed from this...
13112         (grub_vbe_bios_get_display_start): ... to this.
13113         (grub_vbe_set_palette_data): Renamed from this...
13114         (grub_vbe_bios_set_palette_data): ... to this.
13115         (grub_vbe_set_pixel_rgb): Removed.
13116         (grub_vbe_set_pixel_index): Likewise.
13118         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13119         from this...
13120         (grub_vbe_bios_get_controller_info): ... to this.
13121         (grub_vbe_get_mode_info): Renamed from this...
13122         (grub_vbe_bios_get_mode_info): ... to this.
13123         (grub_vbe_set_mode): Renamed from this...
13124         (grub_vbe_bios_set_mode): ... to this.
13125         (grub_vbe_get_mode): Renamed from this...
13126         (grub_vbe_bios_get_mode): ... to this.
13127         (grub_vbe_set_memory_window): Renamed from this...
13128         (grub_vbe_bios_set_memory_window): ... to this.
13129         (grub_vbe_get_memory_window): Renamed from this...
13130         (grub_vbe_bios_get_memory_window): ... to this.
13131         (grub_vbe_set_scanline_length): Renamed from this...
13132         (grub_vbe_set_scanline_length): ... to this.
13133         (grub_vbe_get_scanline_length): Renamed from this...
13134         (grub_vbe_bios_get_scanline_length): ... to this.
13135         (grub_vbe_set_display_start): Renamed from this...
13136         (grub_vbe_bios_set_display_start): ... to this.
13137         (grub_vbe_get_display_start): Renamed from this...
13138         (grub_vbe_bios_get_display_start): ... to this.
13139         (grub_vbe_set_palette_data): Renamed from this...
13140         (grub_vbe_bios_set_palette_data): ... to this.
13141         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13142         getting corrupted after calling it.  Added more pushes and pops.
13143         (grub_vbe_bios_set_mode): Likewise.
13144         (grub_vbe_bios_get_mode): Likewise.
13145         (grub_vbe_bios_get_memory_window): Likewise.
13146         (grub_vbe_bios_set_scanline_length): Likewise.
13147         (grub_vbe_bios_get_scanline_length): Likewise.
13148         (grub_vbe_bios_get_display_start): Likewise.
13149         (grub_vbe_bios_set_palette_data): Likewise.
13151         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13152         (cl_insert): Likewise.
13153         (cl_delete): Likewise.
13155         * term/gfxterm.c: New file.
13157         * term/i386/pc/vesafb.c: Removed file.
13159         * video/video.c: New file.
13161         * video/i386/pc/vbe.c (real2pm): Added new function.
13162         (grub_video_vbe_draw_pixel): Likewise.
13163         (grub_video_vbe_get_video_ptr): Likewise.
13164         (grub_video_vbe_get_pixel): Likewise
13165         (grub_video_vbe_init): Likewise.
13166         (grub_video_vbe_fini): Likewise.
13167         (grub_video_vbe_setup): Likewise.
13168         (grub_video_vbe_get_info): Likewise.
13169         (grub_video_vbe_set_palette): Likewise.
13170         (grub_video_vbe_get_palette): Likewise.
13171         (grub_video_vbe_set_viewport): Likewise.
13172         (grub_video_vbe_get_viewport): Likewise.
13173         (grub_video_vbe_map_color): Likewise.
13174         (grub_video_vbe_map_rgb): Likewise.
13175         (grub_video_vbe_map_rgba): Likewise.
13176         (grub_video_vbe_unmap_color): Likewise.
13177         (grub_video_vbe_fill_rect): Likewise.
13178         (grub_video_vbe_blit_glyph): Likewise.
13179         (grub_video_vbe_blit_bitmap): Likewise.
13180         (grub_video_vbe_blit_render_target): Likewise.
13181         (grub_video_vbe_scroll): Likewise.
13182         (grub_video_vbe_swap_buffers): Likewise.
13183         (grub_video_vbe_create_render_target): Likewise.
13184         (grub_video_vbe_delete_render_target): Likewise.
13185         (grub_video_vbe_set_active_render_target): Likewise.
13186         (grub_vbe_set_pixel_rgb): Remove function.
13187         (grub_vbe_set_pixel_index): Likewise.
13188         (index_color_mode): Remove static variable.
13189         (active_mode): Likewise.
13190         (framebuffer): Likewise.
13191         (bytes_per_scan_line): Likewise.
13192         (grub_video_vbe_adapter): Added new static variable.
13193         (framebuffer): Likewise.
13194         (render_target): Likewise.
13195         (initial_mode): Likewise.
13196         (mode_in_use): Likewise.
13197         (mode_list): Likewise.
13199 2006-03-10  Marco Gerards  <marco@gnu.org>
13201         * configure.ac (AC_INIT): Bumped to 1.93.
13203         * DISTLIST: Added `include/grub/hfs.h'.
13205 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13207         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13208         18H, which might help the BIOS falling back to next boot media.
13210 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13212         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13213         Poe Chen <poe.poechen@gmail.com>.
13215 2006-01-17  Marco Gerards  <marco@gnu.org>
13217         * include/grub/normal.h: Include <grub/script.h>.
13218         (grub_command_list): Removed struct.
13219         (grub_command_list_t): Removed type.
13220         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13221         members `commands' and `sourcecode'.
13222         * include/grub/script.h: Add inclusion guards.
13223         (grub_script_cmd_menuentry): New struct.
13224         (grub_script_execute_menuentry): New prototype.
13225         (grub_script_lexer_record_start): Likewise.
13226         (grub_script_lexer_record_stop): Likewise.
13227         * normal/execute.c (grub_script_execute_menuentry): New function.
13228         * normal/lexer.c (record, recording, recordpos, recordlen): New
13229         variables.
13230         (grub_script_lexer_record_start): New function.
13231         (grub_script_lexer_record_stop): Likewise.
13232         (recordchar): Likewise.
13233         (nextchar): Likewise.
13234         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13235         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13236         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13237         (current_menu): New variable.
13238         (free_menu): Mainly rewritten.
13239         (grub_normal_menu_addentry): New function.
13240         (read_config_file): Rewritten.
13241         * normal/menu.c (run_menu_entry): Mainly rewritten.
13242         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13243         the menu entry.
13244         (run): Mainly rewritten.
13245         * normal/parser.y (menu_entry): New variable.
13246         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13247         (menuentry): New rule.
13248         (command): Add `menuentry'.
13249         (if_statement): Allow additional returns before `fi'.
13250         * normal/script.c (grub_script_create_cmdmenu): New function.
13252 2006-01-03  Marco Gerards  <marco@gnu.org>
13254         * INSTALL: GNU Bison is required.
13255         * configure.ac: Rewritten the test to detect Bison.
13256         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13257         <xun.sun.cn@gmail.com>.
13259 2006-01-03  Marco Gerards  <marco@gnu.org>
13261         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13262         the HFS+ filesystem to filesystem blocks.
13263         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13264         GCC warning is silenced.
13266 2006-01-03  Marco Gerards  <marco@gnu.org>
13268         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13269         read from disk from big endian to host byte order.
13271 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13273         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13274         documentation.
13275         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13276         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13277         embedded HFS+ filesystem.
13278         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13279         (grub_hfs_sblock): Move from here...
13280         * include/grub/hfs.h: To here...  New file.
13281         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13282         documentation.
13283         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13284         New macros.
13285         (grub_hfsplus_volheader): Change type of member `magic' to
13286         `grub_uint16_t'.
13287         (grub_hfsplus_data): Add new member `embedded_offset'.
13288         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13289         returned block.
13290         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13291         Calculate the offset.
13293 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13295         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13296         Removed.
13297         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13299 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13301         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13302         ENV->NAME is NULL after allocating ENV->VALUE.
13304 2005-12-25  Marco Gerards  <marco@gnu.org>
13306         * kern/env.c (grub_env_set): Rewritten the error handling code.
13308 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13310         * geninit.sh: Made more robust, and more portable.
13312 2005-12-25  Marco Gerards  <marco@gnu.org>
13314         Add support for Apple HFS+ filesystems.
13316         * fs/hfsplus.c: New file.
13318         * DISTLIST: Added `fs/hfsplus.c'.
13320         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13321         (hfsplus_mod_SOURCES): New variable.
13322         (hfsplus_mod_CFLAGS): Likewise.
13323         (hfsplus_mod_LDFLAGS): Likewise.
13324         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13325         (grub_setup_SOURCES): Likewise.
13326         (grub_mkdevicemap_SOURCES): Likewise.
13327         (grub_emu_SOURCES): Likewise.
13328         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13330         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13332         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13334 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13336         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13337         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13338         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13339         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13340         normal/lexer.c, normal/parser.y, normal/script.c, and
13341         partmap/gpt.c.
13342         Removed kern/sparc64/cache.c.
13344         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13345         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13346         grub_emu_init.c.
13348         * configure.ac (AC_INIT): Bumped to 1.92.
13350 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13352         * kern/err.c (grub_error_push): Added new function to support error
13353         stacks.
13354         (grub_error_pop): Likewise.
13355         (grub_error_stack_items): New local variable to support error stacks.
13356         (grub_error_stack_pos): Likewise.
13357         (grub_error_stack_assert): Likewise.
13358         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13359         stack depth.
13360         (grub_print_error): Added support to print errors from error stack.
13362         * include/grub/err.h (grub_error_push): Added function prototype.
13363         (grub_error_pop): Likewise.
13365 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13367         * configure.ac: Accept `powerpc64' as host_cpu.
13368         (amd64): Rename to `biarch32'.
13370         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13371         non-cacheline-aligned addresses.
13373         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13374         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13375         if `size' is non-zero.
13377 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13379         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13380         and `cd' to make sure the filename is not prefixed with a
13381         directory name.
13382         (pkgdata_MODULES): Add `gpt.mod'.
13383         (gpt_mod_SOURCES): New variable.
13384         (gpt_mod_CFLAGS): Likewise.
13385         (gpt_mod_LDFLAGS): Likewise.
13387         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13389         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13390         New macro.
13392         * partmap/gpt.c: New file.
13394         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13395         GPT partition map is detected.
13397 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13399         * commands/i386/pc/play.c: New file.
13400         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13401         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13402         macros.
13404 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13406         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13407         ((unused))' to silence gcc warning.
13409 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13411         * configure.ac: Correct `AC_PROG_YACC' test.
13413 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13415         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13416         check before installing files.
13418 2005-11-22  Mike Small  <smallm@panix.com>
13420         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13421         number regex so multidigit numbers are recognized correctly.
13423 2005-11-22  Mike Small  <smallm@panix.com>
13425         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13426         debugging message before attempting to claim memory.
13427         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13428         multiple addresses in case of failure.
13430 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13432         * term/tparm.c (get_space): Remove empty `if' statement.
13434         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13436         * kern/parser.c (check_varstate): Rename `state' to 's'.
13438 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13440         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13441         variable definitions to the beginning of each function.  Sort stack
13442         variables by size.
13443         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13444         `buf' argument to `char *'.
13446 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13448         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13449         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13450         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13451         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13452         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13453         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13454         configfile.mod, search.mod, gzio.mod and test.mod.
13455         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13456         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13457         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13458         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13459         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13460         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13461         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13462         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13463         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13464         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13465         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13466         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13467         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13468         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13469         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13470         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13471         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13472         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13473         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13474         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13475         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13476         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13477         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13479         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13480         `grep --include'.
13481         (pkgdata_MODULES): Add test.mod.
13483 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13485         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13486         appending to variables with "+=".
13487         (PModule): Use full pathname to generate *.lst filenames.
13489         * Makefile.in: Fixed list rules moved from genmk.rb.
13490         (.DELETE_ON_ERROR): New special target.
13491         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13493         * conf/i386-pc.rmk: Include conf/common.mk.
13494         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13495         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13496         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13497         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13498         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13499         configfile.mod, search.mod, gzio.mod and test.mod.
13500         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13501         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13502         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13503         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13504         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13505         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13506         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13507         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13508         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13509         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13510         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13511         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13512         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13513         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13514         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13515         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13516         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13517         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13518         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13519         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13520         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13521         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13522         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13523         here...
13524         * conf/common.rmk: ... to here.  New file.
13526         * conf/common.mk: New file.
13528 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13530         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13531         (grub_script.tab.c): ... here.
13533         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13534         (grub_script.tab.c): ... here.
13536         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13537         (grub_script.tab.c): ... here.
13539         * normal/command.c (grub_command_find): Fixed a memory leak of
13540         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13542 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13544         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13545         "@" which marks the start of a comment on ARM.
13546         (VARIABLE): Likewise.
13548 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13550         Add support for Linux/ADFS partition tables.
13552         * partmap/acorn.c: New file.
13554         * include/grub/acorn_filecore.h: Likewise.
13556         * DISTLIST: Added `partmap/acorn.c' and
13557         `include/grub/acorn_filecore.h'.
13559         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13560         `partmap/acorn.c'.
13561         (pkgdata_MODULES): Add `acorn.mod'.
13562         (acorn_mod_SOURCES): New variable.
13563         (acorn_mod_CFLAGS): Likewise.
13565         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13566         `partmap/acorn.c'.
13567         (pkgdata_MODULES): Add `acorn.mod'.
13568         (acorn_mod_SOURCES): New variable.
13569         (acorn_mod_CFLAGS): Likewise.
13571         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13572         (pkgdata_MODULES): Add `acorn.mod'.
13573         (acorn_mod_SOURCES): New variable.
13574         (acorn_mod_CFLAGS): Likewise.
13575         (acorn_mod_LDFLAGS): Likewise.
13577         * include/types.h (grub_disk_addr_t): New typedef.
13579 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13581         * geninit.sh: New file.
13583         * geninitheader.sh: Likewise.
13585         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13586         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13587         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13588         * commands/configfile.c (grub_configfile_init)
13589         (grub_configfile_fini): Likewise.
13590         * commands/default.c (grub_default_init, grub_default_fini):
13591         Likewise.
13592         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13593         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13594         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13595         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13596         Likewise.
13597         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13598         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13599         Likewise.
13600         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13601         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13602         Likewise.
13603         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13604         Likewise.
13605         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13606         Likewise.
13607         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13608         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13609         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13610         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13611         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13612         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13613         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13614         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13615         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13616         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13617         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13618         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13619         * partmap/amiga.c (grub_amiga_partition_map_init)
13620         (grub_amiga_partition_map_fini): Likewise.
13621         * partmap/apple.c (grub_apple_partition_map_init)
13622         (grub_apple_partition_map_fini): Likewise.
13623         * partmap/pc.c (grub_pc_partition_map_init)
13624         (grub_pc_partition_map_fini): Likewise.
13625         * partmap/sun.c (grub_sun_partition_map_init,
13626         grub_sun_partition_map_fini): Likewise.
13627         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13628         Likewise.
13630         * util/grub-emu.c: Include <grub_modules_init.h>.
13631         (main): Don't initialize and de-initialize any modules directly,
13632         use `grub_init_all' and `grub_fini_all' instead.
13634         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13635         `grub_vesafb_mod_init'.
13636         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13637         all users.
13638         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13639         `grub_vga_mod_init'.  Updated all users.
13640         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13642         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13643         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13644         rules.
13646         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13647         Generate a function to initialize the module in utilities.
13648         Updated all callers.
13649         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13650         initialize the module in utilities.  Updated all callers.
13652 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13654         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13655         escape sequence and a literal ^L to clear the screen.
13657         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13658         when returning from Open Firmware.
13660 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13662         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13663         (grub_ofconsole_height): Likewise.
13664         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13665         manually insert a '\n'.
13666         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13667         `grub_ofconsole_height'.  Return early if these are already set.
13669 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13671         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13672         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13673         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13674         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13675         and `normal/script.c'.
13676         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13677         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13678         (test_mod_SOURCES): New variable.
13679         (test_mod_CFLAGS): Likewise.
13680         (test_mod_LDFLAGS): Likewise.
13681         (pkgdata_MODULES): Add `test.mod'.
13682         (grub_script.tab.c): New rule.
13683         (grub_script.tab.h): Likewise.
13685 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13687         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13688         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13689         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13690         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13691         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13692         (test_mod_SOURCES): New variable.
13693         (test_mod_CFLAGS): Likewise.
13694         (pkgdata_MODULES): Add `test.mod'.
13695         (grub_script.tab.c): New rule.
13696         (grub_script.tab.h): Likewise.
13698 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13700         Add initial scripting support.
13702         * commands/test.c: New file.
13703         * include/grub/script.h: Likewise.
13704         * normal/execute.c: Likewise.
13705         * normal/function.c: Likewise.
13706         * normal/lexer.c: Likewise.
13707         * normal/parser.y: Likewise.
13708         * normal/script.c: Likewise.
13710         * configure.ac: Add `AC_PROG_YACC' test.
13712         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13713         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13714         `normal/function.c' and `normal/script.c'.
13715         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13716         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13717         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13718         variables.
13719         (pkgdata_MODULES): Add `test.mod'.
13720         (grub_script.tab.c): New rule.
13721         (grub_script.tab.h): Likewise.
13723         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13725         * include/grub/normal.h (grub_test_init): New prototype.
13726         (grub_test_fini): Likewise.
13728         * normal/command.c: Include <grub/script.h>.
13729         (grub_command_execute): Rewritten.
13731         * util/grub-emu.c (main): Call `grub_test_init' and
13732         `grub_test_fini'.
13734 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13736         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13737         to 0.
13738         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13739         there are no pending characters.
13741 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13743         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13744         `grub_strndup' to drop device arguments. Replace unnecessary
13745         `grub_strndup' with `grub_strdup'.
13747 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13749         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13750         `debug' environment variable has been set.
13752 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13754         * Makefile.in (install-local): Use $(DATA).
13755         (uninstall): Likewise.
13756         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13757         (sbin_UTILITIES): ... to here.
13758         (sbin_SCRIPTS): New variable.
13759         (grub_install_SOURCES): New variable.
13760         * util/powerpc/ieee1275/grub-install.in: New file.
13761         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13762         variable.
13763         (add_segments): Call `grub_util_get_path'.
13765 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13767         From Timothy Baldwin:
13768         * commands/ls.c (grub_ls_list_files): Close FILE with
13769         grub_file_close.
13770         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13772 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13774         * include/grub/parser.h: New file.
13776         * kern/parser.c: Likewise.
13778         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13779         (grub_setup_SOURCES): Likewise.
13780         (grub_probefs_SOURCES): Likewise.
13781         (grub_emu_SOURCES): Likewise.
13782         (kernel_img_HEADERS): Add `parser.h'.
13784         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13785         (grub_emu_SOURCES): Add `kern/parser.c'.
13786         (grubof_SOURCES): Likewise.
13788         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13789         (grubof_SOURCES): Add `kern/parser.c'.
13791         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13793         * kern/misc.c (grub_split_cmdline): Removed function.
13795         * kern/rescue.c: Include <grub/parser.h>.
13796         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13797         of `grub_split_cmdline'.
13799         * normal/command.c: Include <grub/parser.h>.
13800         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13801         of `grub_split_cmdline'.
13803         * normal/completion.c: Include <grub/parser.h>.
13804         (cmdline_state): New variable.
13805         (iterate_dir): End the filename with a quote depending on the
13806         command line state.
13807         (get_state): new function.
13808         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13809         split the arguments and determine the current argument.  When the
13810         argument string is not quoted, escape all spaces.
13812 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13814         * normal/sparc64/setjmp.S: New file.
13816 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13818         * include/grub/sparc64/libgcc.h: New file.
13819         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13820         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13821         normal/sparc64/setjmp.c.
13823 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13825         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13826         * kern/sparc64/cache.S: New file.
13827         * kern/sparc64/cache.c: Removed.
13828         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13829         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13830         -mtune=ultrasparc.
13831         (COMMON_LDFLAGS): Add -melf64_sparc.
13832         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13833         (grubof_SOURCES): Use cache.S instead of cache.c.
13834         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
13835         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
13836         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
13837         commented though.
13838         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
13839         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
13840         (linux_mod_CFLAGS): Commented out.
13841         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
13842         out because module isn't built.
13843         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
13844         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
13845         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
13846         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
13847         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
13848         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13849         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13850         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
13851         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
13852         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
13853         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13854         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13855         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
13856         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
13858 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
13860         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
13861         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
13862         longer, because HFS should not be used on PC.
13864 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13866         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
13867         consistently within the loop.
13869 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
13871         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
13872         directory can not be read.
13874 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13876         * configure.ac (AC_INIT): Increase the version number to 1.91.
13878         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
13879         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
13880         term/i386/pc/serial.c.
13882 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13884         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
13885         file size must be permitted.
13887         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
13888         between %ah and %al.
13890 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
13892         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
13893         grub_uint64_t.
13894         Call the hook with a NUL-terminated filename.
13895         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
13896         grub_cpu_to_be32.
13898         * kern/term.c (cursor_state): New variable.
13899         (grub_term_set_current): Reset the cursor state on a new
13900         terminal.
13901         (grub_setcursor): Rewritten to use CURSOR_STATE.
13902         (grub_getcursor): New function.
13904         * include/grub/term.h (grub_getcursor): New prototype.
13906         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
13907         integers on ARM. Reported by Timothy Baldwin
13908         <T.E.Baldwin99@members.leeds.ac.uk>.
13910 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
13912         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
13913         allocated.
13914         (grub_sfs_dir): Likewise.
13916 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
13918         Add support for the SFS filesystem.
13920         * fs/sfs.c: New file.
13922         * DISTLIST: Added `fs/sfs.c'.
13924         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
13925         (grub_probefs_SOURCES): Likewise.
13926         (grub_emu_SOURCES): Likewise.
13927         (pkgdata_MODULES): Add `sfs.mod'.
13928         (sfs_mod_SOURCES): New variable.
13929         (sfs_mod_CFLAGS): Likewise.
13930         (sfs_mod_LDFLAGS): Likewise.
13932         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
13933         (pkgdata_MODULES): Add `sfs.mod'.
13934         (sfs_mod_SOURCES): New variable.
13935         (sfs_mod_CFLAGS): Likewise.
13937         * util/grub-emu.c (main): Call `grub_sfs_init' and
13938         `grub_sfs_fini'.
13940         * include/grub/fs.h (grub_sfs_init): New prototype.
13941         (grub_sfs_fini): Likewise.
13943 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
13945         Add support for the AFFS filesystem.
13947         * fs/affs.c: New file.
13949         * DISTLIST: Added `fs/affs.c'.
13951         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
13952         (grub_probefs_SOURCES): Likewise.
13953         (grub_emu_SOURCES): Likewise.
13954         (pkgdata_MODULES): Add `affs.mod'.
13955         (affs_mod_SOURCES): New variable.
13956         (affs_mod_CFLAGS): Likewise.
13957         (affs_mod_LDFLAGS): Likewise.
13959         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
13960         (pkgdata_MODULES): Add `affs.mod'.
13961         (affs_mod_SOURCES): New variable.
13962         (affs_mod_CFLAGS): Likewise.
13964         * util/grub-emu.c (main): Call `grub_affs_init' and
13965         `grub_affs_fini'.
13967         * include/grub/fs.h (grub_affs_init): New prototype.
13968         (grub_affs_fini): Likewise.
13970 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13972         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
13974 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
13976         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
13977         `-m32' to CFLAGS.
13979         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
13980         linking.
13982         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
13983         (COMMON_LDFLAGS): New variable.
13984         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
13985         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
13986         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
13987         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
13988         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
13989         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
13990         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
13991         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
13992         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
13993         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
13994         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
13995         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
13996         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
13997         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
13998         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
13999         variables.
14000         (normal_mod_ASFLAGS): Add `-m32'.
14002         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14003         (grub_host_size_t, grub_host_ssize_t): New types.
14004         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14005         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14006         `GRUB_HOST_SIZEOF_VOID_P'.
14008         * include/grub/kernel.h (struct grub_module_header): Type of
14009         member offset changed to `grub_host_off_t'.  Type of member size
14010         changed to `grub_host_size_t'.
14011         (struct grub_module_info): Type of member offset changed to
14012         `grub_host_off_t'.  Type of member size changed to
14013         `grub_host_size_t'.
14015 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14017         Make GRUB's kernel compliant to Multiboot Specification.
14019         * kern/i386/pc/startup.S (multiboot_header): New label.
14020         (multiboot_entry): Likewise.
14021         (multiboot_trampoline): Likewise.
14023         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14024         Increased to 0x4A0.
14026         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14027         put parentheses after a question mark.
14028         [!GRUB_UTIL] (my_mod): New variable.
14030         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14032 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14034         Adds support for the XFS filesystem.  Btrees are not supported
14035         yet.
14037         * fs/xfs.c: New file.
14039         * DISTLIST: Added `fs/xfs.c'.
14041         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14042         (grub_probefs_SOURCES): Likewise.
14043         (grub_emu_SOURCES): Likewise.
14044         (pkgdata_MODULES): Add `xfs.mod'.
14045         (xfs_mod_SOURCES): New variable.
14046         (xfs_mod_CFLAGS): Likewise.
14048         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14049         (pkgdata_MODULES): Add `xfs.mod'.
14050         (xfs_mod_SOURCES): New variable.
14051         (xfs_mod_CFLAGS): Likewise.
14053         * util/grub-emu.c (main): Call `grub_xfs_init' and
14054         `grub_xfs_fini'.
14056         * include/grub/fs.h (grub_xfs_init): New prototype.
14057         (grub_xfs_fini): Likewise.
14060 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14062         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14063         color modes, allow greater than 16 colors to be configured as
14064         a default palette.
14066 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14068         * normal/completion.c (complete_arguments): Add the qualifier
14069         const into OPTIONS.
14071         From Omniflux <omniflux+lists@omniflux.com>:
14072         * include/grub/terminfo.h: New file.
14073         * include/grub/tparm.h: Likewise.
14074         * include/grub/i386/pc/serial.h: Likewise.
14075         * term/terminfo.c: Likewise.
14076         * term/tparm.c: Likewise.
14077         * term/i386/pc/serial.c: Likewise.
14078         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14079         serial.mod.
14080         (terminfo_mod_SOURCES): New variable.
14081         (terminfo_mod_CFLAGS): Likewise.
14082         (serial_mod_SOURCES): Likewise.
14083         (serial_mod_CFLAGS): Likewise.
14085 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14087         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14088         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14089         and kern/powerpc/ieee1275/cmain.c, respectively.
14091         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14092         * kern/powerpc/ieee1275/crt0.S: ... here.
14094         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14095         * kern/powerpc/ieee1275/cmain.c: ... here.
14097         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14098         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14099         instead of boot/powerpc/ieee1275/crt0.S and
14100         boot/powerpc/ieee1275/cmain.c, respectively.
14102         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14103         sectors. It was not used anyway.
14105 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14107         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14108         `unused parameter' warning.
14110 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14112         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14113         function.
14114         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14115         getcharwidth.
14117 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14119         * include/grub/normal.h (enum grub_completion_type): Added
14120         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14122         * normal/cmdline.c (print_completion): Handle
14123         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14124         * normal/menu_entry.c (store_completion): Likewise.
14126         * normal/completion.c (complete_arguments): New function.
14127         (grub_normal_do_completion): Call `complete_arguments' when the
14128         current words start with a dash.
14130 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14132         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14133         `gzio.mod' instead of `io.mod').
14135 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14137         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14138         (DISTDIRS): Added io and video.
14139         Rewrite the search routine to make an output consistently.
14141         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14142         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14143         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14144         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14145         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14146         util/powerpc/ieee1275/misc.c.
14148         * include/grub/gzio.h: New file.
14149         * io/gzio.c: Likewise.
14151         * kern/file.c (grub_file_close): Call grub_device_close only if
14152         FILE->DEVICE is not NULL.
14154         * include/grub/mm.h [!NULL] (NULL): New macro.
14156         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14158         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14159         (pkgdata_MODULES): Added gzio.mod.
14160         (gzio_mod_SOURCES): New variable.
14161         (gzio_mod_CFLAGS): Likewise.
14163         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14164         (pkgdata_MODULES): Added gzio.mod.
14165         (gzio_mod_SOURCES): New variable.
14166         (gzio_mod_CFLAGS): Likewise.
14168         * commands/cat.c: Include grub/gzio.h.
14169         (grub_cmd_cat): Use grub_gzfile_open instead of
14170         grub_file_open.
14172         * commands/cmp.c: Include grub/gzio.h.
14173         (grub_cmd_cmp): Use grub_gzfile_open instead of
14174         grub_file_open.
14176         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14177         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14178         grub_file_open.
14179         (grub_rescue_cmd_module): Likewise.
14181 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14183         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14184         kern/sparc64/ieee1275/init.c because it contains _start.
14185         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14187 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14189         * configure.ac: Add support for sparc64 host with ieee1275
14190         firmware.
14191         * configure: Generated from configure.ac.
14192         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14193         instead of int.
14194         (grub_ofdisk_read): Likewise.
14195         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14196         pointers as (void *) to remove a warning.
14197         (grub_ofdisk_close): Likewise.
14198         (grub_ofdisk_read): Likewise.
14199         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14200         returns, so make it return void to remove a warning.
14201         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14202         Corresponding prototype change.
14203         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14204         values, and cast the pointers as (void *) to remove a warning.
14205         (grub_mm_dump): Likewise.
14206         * conf/sparc64-ieee1275.mk: New file.
14207         * conf/sparc64-ieee1275.rmk: Likewise.
14208         * include/grub/sparc64/setjmp.h: Likewise.
14209         * include/grub/sparc64/types.h: Likewise.
14210         * include/grub/sparc64/ieee1275/console.h: Likewise.
14211         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14212         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14213         * include/grub/sparc64/ieee1275/time.h: Likewise.
14214         * kern/sparc64/cache.c: Likewise.
14215         * kern/sparc64/dl.c: Likewise.
14216         * kern/sparc64/ieee1275/init.c: Likewise.
14217         * kern/sparc64/ieee1275/openfw.c: Likewise.
14219 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14221         * util/console.c (grub_ncurses_putchar): If C is greater than
14222         0x7f, set C to a question mark.
14223         (grub_ncurses_getcharwidth): New function.
14224         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14225         getcharwidth.
14227         * normal/menu.c (print_entry): Made aware of Unicode. First,
14228         convert TITLE to UCS-4, and predict the cursor position by
14229         grub_getcharwidth.
14231         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14232         const to SRC.
14233         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14235 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14237         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14238         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14239         grub_strcat.
14241         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14242         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14243         grub_strcpy and grub_strlen. Take it into account that a space
14244         character is inserted as a delimiter.
14246 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14248         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14249         invalid magic in the error.
14251         * commands/search.c: New file.
14253         * util/grub-emu.c (main): Call grub_search_init and
14254         grub_search_fini.
14256         * kern/rescue.c (grub_rescue_print_disks): Removed.
14257         (grub_rescue_print_devices): New function.
14258         (grub_rescue_cmd_ls): Use grub_device_iterate with
14259         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14260         grub_rescue_print_disks.
14262         * kern/partition.c (grub_partition_iterate): Return the result of
14263         PARTMAP->ITERATE instead of GRUB_ERRNO.
14265         * kern/device.c: Include grub/partition.h.
14266         (grub_device_iterate): New function.
14268         * include/grub/partition.h (grub_partition_iterate): Return int
14269         instead of grub_err_t.
14271         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14272         prototype.
14273         [GRUB_UTIL] (grub_search_fini): Likewise.
14275         * include/grub/device.h (grub_device_iterate): New prototype.
14277         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14278         commands/search.c.
14279         (pkgdata_MODULES): Added search.mod.
14280         (search_mod_SOURCES): New variable.
14281         (search_mod_CFLAGS): Likewise.
14283         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14284         (pkgdata_MODULES): Added search.mod.
14285         (search_mod_SOURCES): New variable.
14286         (search_mod_CFLAGS): Likewise.
14288         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14289         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14290         All callers changed.
14292         * DISTLIST: Added commands/search.c.
14294 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14296         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14297         conversion.
14298         (grub_getcharwidth): New function.
14300         * kern/misc.c (grub_utf8_to_ucs4): New function.
14302         * include/grub/term.h (struct grub_term): Added a new member
14303         "getcharwidth".
14304         (grub_getcharwidth): New prototype.
14306         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14308         * term/i386/pc/console.c (map_char): New function. Segregated from
14309         grub_console_putchar.
14310         (grub_console_putchar): Use map_char.
14311         (grub_console_getcharwidth): New function.
14312         (grub_console_term): Specified grub_console_getcharwidth as
14313         getcharwidth.
14315         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14316         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14318         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14319         GRUB_ERRNO.
14320         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14321         on grub_strtoul completely.
14322         (write_char): Declare local variables in the beginning of the
14323         function.
14324         (grub_vesafb_getcharwidth): New function.
14325         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14326         getcharwidth.
14328 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14330         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14331         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14332         commands/i386/pc/vbetest.c.
14334         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14335         call grub_vbe_get_controller_info again, because the returned
14336         information is volatile.
14337         (grub_vbe_set_video_mode): Mostly rewritten.
14338         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14339         grub_vbe_status_t correctly.
14340         (grub_vbe_get_video_mode_info): Likewise.
14341         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14342         several if statements.
14344         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14345         * commands/i386/pc/vbeinfo.c: ... this.
14347         * commands/i386/pc/vbe_test.c: Renamed to ...
14348         * commands/i386/pc/vbetest.c: ... this.
14350         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14351         ...
14352         (grub_cmd_vbeinfo): ... this. Save video modes before
14353         iterating. Skip a video mode, if it is not available, not enough
14354         information is given or it is monochrome. Show the memory
14355         model. Leave the interpretation of MODEVAR to grub_strtoul
14356         completely.
14357         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14358         (GRUB_MOD_FINI): Likewise.
14360         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14361         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14362         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14363         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14364         grub_strtoul completely.
14365         (real2pm): Removed.
14366         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14367         (GRUB_MOD_FINI): Likewise.
14369         * normal/misc.c: Include grub/mm.h.
14371         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14372         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14373         (vbe_list_modes_mod_SOURCES): Removed.
14374         (vbe_list_modes_mod_CFLAGS): Likewise.
14375         (vbe_test_mod_SOURCES): Likewise.
14376         (vbe_test_mod_CFLAGS): Likewise.
14377         (vbeinfo_mod_SOURCES): New variable.
14378         (vbeinfo_mod_CFLAGS): Likewise.
14379         (vbetest_mod_SOURCES): Likewise.
14380         (vbetest_mod_CFLAGS): Likewise.
14382 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14384         * normal/misc.c: New file.
14386         * DISTLIST: Added normal/misc.c.
14388         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14389         DISK to HOOK. Call HOOK with DISK.
14390         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14391         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14392         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14394         * normal/menu_entry.c (struct screen): Added a new member
14395         "completion_shown".
14396         (completion_buffer): New global variable.
14397         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14398         (store_completion): New function.
14399         (complete): Likewise.
14400         (clear_completions): Likewise.
14401         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14402         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14403         a tab, call complete.
14405         * normal/completion.c (disk_dev): Removed.
14406         (print_simple_completion): Likewise.
14407         (print_partition_completion): Likewise.
14408         (print_func): New global variable.
14409         (add_completion): Do not take the arguments WHAT or PRINT any
14410         longer. Added a new argument TYPE. Instead of printing directly,
14411         call PRINT_FUNC if not NULL.
14412         All callers changed.
14413         (complete_device): Use a local variable DEV instead of
14414         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14415         (grub_normal_do_completion): Take a new argument HOOK. Do not
14416         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14417         empty string, return NULL instead.
14418         All callers changed.
14420         * normal/cmdline.c (print_completion): New function.
14422         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14423         to HOOK.
14424         All callers changed.
14426         * kern/disk.c (grub_print_partinfo): Removed.
14428         * include/grub/partition.h (struct grub_partition_map): Add a new
14429         argument DISK into HOOK of ITERATE.
14430         (grub_partition_iterate): Add a new argument DISK to HOOK.
14432         * include/grub/normal.h (enum grub_completion_type): New enum.
14433         (grub_completion_type_t): New type.
14434         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14435         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14436         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14437         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14438         (grub_normal_do_completion): Added a new argument HOOK.
14439         (grub_normal_print_device_info): New prototype.
14441         * include/grub/disk.h (grub_print_partinfo): Removed.
14443         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14444         (normal_mod_SOURCES): Likewise.
14445         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14446         (normal_mod_SOURCES): Likewise.
14448         * commands/ls.c (grub_ls_list_disks): Use
14449         grub_normal_print_device_info instead of grub_print_partinfo. Free
14450         PNAME.
14451         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14452         duplicating the code.
14454 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14456         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14457         follow GCS more precisely.
14458         * commands/i386/pc/vbe_test.c: Likewise.
14459         * include/grub/i386/pc/vbe.h: Likewise.
14460         * term/i386/pc/vesafb.c: Likewise.
14461         * video/i386/pc/vbe.c: Likewise.
14463 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14465         * DISTLIST: Added term/i386/pc/vesafb.c
14466         DISTLIST: Added video/i386/pc/vbe.c
14467         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14468         DISTLIST: Added commands/i386/pc/vbe_test.c.
14469         * commands/i386/pc/vbe_list_modes.c: New file.
14470         * commands/i386/pc/vbe_test.c: Likewise.
14471         * term/i386/pc/vesafb.c: Likewise.
14472         * video/i386/pc/vbe.c: Likewise.
14473         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14474         (grub_vbe_probe) Added prototype.
14475         (grub_vbe_set_video_mode) Likewise.
14476         (grub_vbe_get_video_mode) Likewise.
14477         (grub_vbe_get_video_mode_info) Likewise.
14478         (grub_vbe_set_pixel_rgb) Likewise.
14479         (grub_vbe_set_pixel_index) Likewise.
14480         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14481         (pkgdata_MODULES): Added vesafb.mod.
14482         (pkgdata_MODULES): Added vbe_list_modes.mod.
14483         (pkgdata_MODULES): Added vbe_test.mod.
14484         (vbe_mod_SOURCES): Added.
14485         (vbe_mod_CFLAGS): Likewise.
14486         (vesafb_mod_SOURCES): Likewise.
14487         (vesafb_mod_CFLAGS): Likewise.
14488         (vbe_list_modes_mod_SOURCES): Likewise.
14489         (vbe_list_modes_mod_CFLAGS): Likewise.
14490         (vbe_test_mod_SOURCES): Likewise.
14491         (vbe_test_mod_CFLAGS): Likewise.
14493 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14495         * normal/command.c (grub_command_execute): If INTERACTIVE is
14496         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14497         CMDLINE. Disable the pager if INTERACTIVE is true.
14498         All callers are changed.
14500         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14501         before reading a config file.
14502         * normal/main.c (read_config_file): Even if a command is not
14503         found, register it if it is within an entry.
14505         * util/grub-emu.c: Include sys/types.h and unistd.h.
14506         (options): Added --hold.
14507         (struct arguments): Added a new member "hold".
14508         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14509         missing.
14510         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14511         cleared by a debugger, if it is not zero.
14513         * include/grub/normal.h (grub_command_execute): Add an argument
14514         INTERACTIVE.
14516 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14518         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14520 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14522         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14523         program with another one, because the old one didn't detect a bug
14524         in gcc-3.4. Always use regparm 2, because the new test is still
14525         not enough for gcc-4.0. Someone must investigate a simple test
14526         case which detects a bug in gcc-4.0.
14528 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14530         * DISTLIST: Added normal/completion.c.
14532         * normal/completion.c: New file.
14534         * term/i386/pc/console.c (grub_console_getwh): New function.
14535         (grub_console_term): Assign grub_console_getwh to getwh.
14537         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14538         function is defined in normal/completion.c as
14539         grub_normal_do_completion.
14540         (grub_cmdline_get): Use grub_normal_do_completion instead of
14541         grub_tab_complete.
14543         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14544         returns non-zero, otherwise return 0.
14545         (grub_partition_iterate): First, probe the partition map. Then,
14546         call ITERATE only for this partition map.
14548         * kern/misc.c (grub_strncmp): Rewritten.
14550         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14551         returns non-zero. Otherwise return 0.
14553         * include/grub/partition.h (grub_partition_map_iterate): Return
14554         int instead of void.
14556         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14558         * include/grub/misc.h (grub_strncmp): Change the type of N to
14559         grub_size_t.
14561         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14562         of void.
14564         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14565         unsigned explicitly before comparing it with I.
14567         * kern/main.c (grub_env_write_root): Add the attribute unused into
14568         VAR.
14570         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14571         normal/completion.c.
14572         (normal_mod_SOURCES): Likewise.
14573         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14574         (normal_mod_SOURCES): Likewise.
14576         * normal/command.c (grub_iterate_commands): If ITERATE returns
14577         non-zero, return one immediately.
14579 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14581         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14582         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14583         descriptions.
14584         (grub_vbe_get_controller_info): New function.
14585         (grub_vbe_get_mode_info): Likewise.
14586         (grub_vbe_set_mode): Likewise.
14587         (grub_vbe_get_mode): Likewise.
14588         (grub_vbe_set_memory_window): Likewise.
14589         (grub_vbe_get_memory_window): Likewise.
14590         (grub_vbe_set_scanline_length): Likewise.
14591         (grub_vbe_get_scanline_length): Likewise.
14592         (grub_vbe_set_display_start): Likewise.
14593         (grub_vbe_get_display_start): Likewise.
14594         (grub_vbe_set_palette_data): Likewise.
14595         * include/grub/i386/pc/vbe.h: New file.
14597 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14599         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14600         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14601         * DISTLIST: Likewise.
14602         * kern/ieee1275/of.c: Moved to ...
14603         * kern/ieee1275/ieee1275.c: ... here.
14605 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14607         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14608         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14609         Pass 0 as `end' parameter to grub_strtoul().
14611 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14613         * include/grub/powerpc/ieee1275/console.h: Do not include
14614         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14615         ifdef.
14616         (grub_console_cur_color): Remove i386-specific prototype.
14617         (grub_console_real_putchar): Likewise.
14618         (grub_console_checkkey): Likewise.
14619         (grub_console_getkey): Likewise.
14620         (grub_console_getxy): Likewise.
14621         (grub_console_gotoxy): Likewise.
14622         (grub_console_cls): Likewise.
14623         (grub_console_setcursor): Likewise.
14624         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14625         Include <grub/machine/console.h>.
14626         * term/ieee1275/ofconsole.c: Likewise.
14628 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14630         * Makefile.in (LIBLZO): New variable.
14632         * configure.ac: Check for LZO version 2.
14634         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14635         lzo/lzo1x.h instead of lzo1x.h.
14637         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14638         of -llzo.
14640         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14641         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14643         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14644         copying the data from PARTITION to P.
14646 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14648         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14649         negative, unload the module.
14651         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14652         map is "pc_partition_map" but not "pc".
14653         (usage): Fix the description. The options are --boot-image and
14654         --core-image but not --boot-file or --core-file.
14655         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14656         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14657         DEFAULT_DIRECTORY.
14659         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14660         --core-file. Specify INSTALL_DEVICE as an argument.
14662         * util/console.c: Include config.h.
14663         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14664         [HAVE_NCURSES_H]: Include ncurses.h.
14665         [HAVE_CURSES_H]: Include curses.h.
14666         [!A_NORMAL] (A_NORMAL): Defined as zero.
14667         [!A_STANDOUT] (A_STANDOUT): Likewise.
14669         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14670         -lncurses.
14671         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14673         * configure.ac: Check for curses libraries and headers.
14675         * Makefile.in (LIBCURSES): New variable.
14677         * genmk.rb (Script::rule): Set the executable bits.
14679         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14680         name of the PC partition map is "pc_partition_map" but not "pc".
14682 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14684         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14685         (modules): Likewise.
14686         (usage): Added descriptions for --modules and --grub-probefs.
14687         Handle --modules and --grub-probefs. Save the arguments in MODULES
14688         and GRUB_PROBEFS, respectively.
14689         Auto-detect a filesystem module against GRUBDIR. If the result is
14690         empty and modules are not specified explicitly, abort the
14691         installation. Add the result to MODULES.
14693         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14694         disk/powerpc/ieee1275/ofdisk.c,
14695         include/grub/powerpc/ieee1275/init.h and
14696         term/powerpc/ieee1275/ofconsole.c.
14697         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14698         term/ieee1275/ofconsole.c.
14700         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14702         * COPYING: Upgraded to the latest version. Only the address of the
14703         FSF office has changed.
14705 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14707         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14708         kern/ieee1275.c with kern/ieee1275/of.c.
14710         * kern/ieee1275.c: Moved to ...
14711         * kern/ieee1275/of.c: ... here.
14713 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14715         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14716         readability.
14718         * config.guess: Updated to the latest version from gnulib.
14719         * config.sub: Likewise.
14720         * install.sh: Likewise.
14721         * mkinstalldirs: Likewise.
14723         * include/grub/console.h: Removed. This file is arch-specific. Do
14724         not put this in include/grub.
14726         * include/grub/i386/pc/console.h: Resurrected.
14728         * util/console.c: Include grub/machine/console.h instead of
14729         grub/console.h.
14730         * util/grub-emu.c: Likewise.
14732 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14734         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14735         hardcoded value.
14737         From Vincent Pelletier  <subdino2004@yahoo.fr>
14738         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14739         Redefined to use grub_getwh.
14740         (grub_term): New member named getwh.
14741         (grub_getwh): New prototype.
14742         * kern/term.c (grub_getwh): New function.
14743         * term/i386/pc/console.c (grub_console_getwh): New function.
14744         (grub_console_term): New member `getwh'.
14745         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14746         (grub_vga_term): New member `getwh'.
14747         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14748         grub_ssize_t.
14749         (grub_ofconsole_getw): New function.
14750         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14751         (grub_ofconsole_term): New field named getwh and new initial
14752         value.
14754 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14756         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14757         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14758         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14759         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14760         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14761         of <grub/machine/ieee1275.h>.
14762         * commands/ieee1275/reboot.c: Likewise.
14763         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14764         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14765         parameter structs to use new type `grub_ieee1275_cell_t'.
14766         * term/powerpc/ieee1275/ofconsole.c: Move ...
14767         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14768         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14769         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14770         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14771         to return int.
14772         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14773         Remove unused prototypes.  All users updated.
14774         * include/grub/powerpc/ieee1275/console.h: Removed.
14775         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14776         `grub_ieee1275_cell_t'.
14777         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14778         Cast comparisons with -1 to the correct type.
14779         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14780         type to match `grub_ieee1275_entry_fn'.
14782 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14784         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14786         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14787         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14788         partmap/sun.c.
14789         (grub_probefs_SOURCES): New variable.
14791         * util/i386/pc/grub-probefs.c: New file.
14793         * util/i386/pc/grub-setup.c (main): Call
14794         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14795         grub_hfs_init and grub_jfs_init to initialize the system. Call
14796         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14797         grub_pc_partition_map_fini to finish the system.
14799 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14801         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14802         function.
14803         (grub_multiboot_load_elf32): Likewise.
14804         (grub_multiboot_is_elf64): Likewise.
14805         (grub_multiboot_load_elf64): Likewise.
14806         (grub_multiboot_load_elf): Likewise.
14807         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14808         an ELF32 or ELF64 file.
14809         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14811         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14812         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14813         NULL before calling FS->LABEL.
14814         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14815         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14816         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14817         before calling FS->LABEL.
14819 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14821         * util/i386/pc/grub-install.in (datadir): New variable.
14822         (libdir): Removed.
14823         (pkgdatadir): New variable.
14824         (pkglibdir): Removed.
14826 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14828         * DISTLIST: Added util/i386/pc/grub-install.in.
14830         * util/i386/pc/grub-install.in: New file.
14832         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14833         (grub_install_SOURCES): Likewise.
14835         * genmk.rb: Added support for scripts.
14836         (Script): New class.
14837         (scripts): New variable.
14839         * Makefile.in (install-local): Install sbin_SCRIPTS by
14840         INSTALL_SCRIPT.
14841         (uninstall): Remove sbin_SCRIPTS.
14843         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
14844         device, try to get a GRUB device by
14845         grub_util_biosdisk_get_grub_dev.
14846         Free DEST_DEV.
14848         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
14849         description for --device-map.
14851 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14853         Change the semantics of variable hooks. They now return strings
14854         instead of error values.
14856         * util/i386/pc/grub-setup.c: Include grub/env.h.
14857         (setup): Use grub_device_set_root instead of grub_env_set.
14859         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
14860         grub_env_get instead of grub_device_set_root and
14861         grub_device_get_root, respectively.
14863         * kern/main.c (grub_env_write_root): New function.
14864         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
14865         grub_env_set instead of grub_device_set_root.
14867         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
14868         many variables.
14869         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
14870         rather than calling ENV->WRITE_HOOK afterwards.
14871         (grub_env_get): Return the result of ENV->READ_HOOK rather than
14872         passing a pointer of a pointer.
14873         (grub_register_variable_hook): Change the types of "read_hook" and
14874         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
14875         respectively.
14876         Allocate the default empty string on the heap, because this string
14877         may be freed later.
14879         * kern/device.c: Include grub/env.h.
14880         (grub_device_set_root): Removed.
14881         (grub_device_get_root): Likewise.
14882         (grub_device_open): Use grub_env_get instead of
14883         grub_device_get_root.
14885         * include/grub/env.h (grub_env_read_hook_t): New type.
14886         (grub_env_write_hook_t): Likewise.
14887         (grub_env_var): Change the types of "read_hook" and "write_hook"
14888         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
14889         (grub_register_variable_hook): Likewise.
14891         * include/grub/device.h (grub_device_set_root): Removed.
14892         (grub_device_set_root): Likewise.
14894         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
14895         make sure that DIRNAME terminates with '/', so that
14896         grub_fat_find_dir will fail if PATH is not a directory.
14898         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
14899         from DIRNAME.
14900         Use the qualifier auto for print_files and print_files_long.
14901         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
14902         as a regular file.
14903         Put a newline only if there is no error.
14904         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
14905         used.
14907 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
14909         * kern/partition.c (grub_partition_probe): Initialize PART to
14910         NULL. Otherwise, when no partition map is registered, this returns
14911         a garbage.
14913 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
14915         * partmap/apple.c (apple_partition_map_iterate): Check if POS
14916         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
14917         valid.
14919 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
14921         * commands/ls.c (grub_ls_list_disks): Print the filesystem
14922         information on each device, if it does not have partitions. Print
14923         "Device" instead of "Disk", because this function is not specific
14924         to disk devices.
14926         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
14927         static to ensure that it is put on the memory rather than a
14928         register.
14930 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14932         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
14933         (grub_cat_init): Likewise.
14934         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
14935         (options): Likewise.
14936         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
14937         (grub_configfile_init): Likewise.
14938         * font/manager.c (GRUB_MOD_INIT): Likewise.
14939         * commands/help.c (GRUB_MOD_INIT): Likewise.
14940         (grub_help_init): Likewise.
14941         * normal/command.c (grub_command_init): Likewise.
14942         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
14943         * disk/loopback.c (grub_loop_init): Likewise.
14944         (GRUB_MOD_INIT): Likewise.
14945         * commands/ls.c (grub_ls_init): Likewise.
14946         (GRUB_MOD_INIT): Likewise.
14947         (options): Likewise.
14948         * commands/boot.c (grub_boot_init): Likewise.
14949         (GRUB_MOD_INIT): Likewise.
14950         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
14951         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
14952         (GRUB_MOD_INIT): Likewise.
14953         * commands/cmp.c (grub_cmp_init): Likewise.
14954         (GRUB_MOD_INIT): Likewise.
14956         * normal/arg.c: Use <> instead of "" to include header files.
14957         (SHORT_ARG_HELP): New macro.
14958         (SHORT_ARG_USAGE): Likewise.
14959         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
14960         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
14961         descriptions.
14962         (find_short): Check if C is 'h' or 'u' explicitly.
14963         (grub_arg_show_help): Use space characters instead of tabs. Treat
14964         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
14965         are shown with --help and --usage only if they are not used for
14966         the command itself.
14967         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
14968         'h' and 'u'.
14970         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
14971         const into "longarg". Change the type of "shortarg" to int.
14973 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14975         * boot/i386/pc/boot.S (boot_drive_check): New label.
14977         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
14978         macro.
14980         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
14981         which do not pass a boot drive correctly. Copied from GRUB Legacy.
14983 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14985         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
14986         When turning off Gate A20, skip the check and return immediately,
14987         because this is not fatal usually.
14989 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
14991         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
14992         be 0x7C00 instead of 0x8000.
14994         * boot/i386/pc/pxeboot.S: Rewritten.
14996         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
14997         EXT_C.
14998         (gate_a20_check_state): Read a byte from 0x108000. Invert the
14999         result.
15001 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15003         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15004         robustness. This routine now supports a BIOS call and System
15005         Control Port A to modify the gate A20.
15007         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15008         Increased to 0x440.
15010 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15012         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15013         device path and resulting ihandle.
15014         (grub_ofdisk_close): dprintf the ihandle being closed.
15015         (grub_ofdisk_read): dprintf function parameters.
15016         * kern/mm.c (grub_mm_init_region): Likewise.
15017         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15018         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15019         size, and boot arguments.
15020         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15021         before loading into memory.
15022         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15023         before loading into memory.
15025 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15027         * kern/mm.c: Added much documentation.
15028         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15029         8, set to 5 instead of 8.
15031 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15033         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15035         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15036         (grub_mkdevicemap_SOURCES): New variable.
15038         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15039         lib/device.c of GRUB Legacy.
15041 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15043         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15044         instead of PATH is NULL.
15046 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15048         * commands/cmp.c (BUFFER_SIZE): New macro.
15049         (grub_cmd_cmp): Close the right file at the right time.  Compare
15050         only data just read.  Don't report files of different  size as
15051         identical.  Dynamically allocate buffers.  Move variable
15052         declarations at the beginning of function.
15054 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15056         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15057         reverse.
15059 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15061         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15062         when backspace is pressed at beginning of line.
15064 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15066         * DISTLIST: Added genfslist.sh.
15068         * normal/main.c (fs_module_list): New variable.
15069         (autoload_fs_module): New function.
15070         (read_fs_list): Likewise.
15071         (grub_normal_execute): Call read_fs_list.
15073         * kern/fs.c (grub_fs_autoload_hook): New variable.
15074         (grub_fs_probe): Added support for auto-loading.
15076         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15077         (grub_fs_module_list_t): New type.
15079         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15080         (grub_fs_autoload_hook): New prototype.
15082         * genfslist.sh: New file.
15084         * genmk.rb: Added a rule to generate a filesystem list.
15086 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15088         * configure.ac: Fix the test for cross-compiling.
15090         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15091         define GRUB_UTIL anymore.
15093         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15094         so this function works on other systems than just big endian.
15095         (load_modules): Likewise.
15096         (add_segments): Likewise.
15098 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15100         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15101         contains `l' modifier, get a long from va_arg().
15103 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15105         * kern/mm.c (grub_free): If the next free block which is being
15106         merged is the first free block, set the first block to the block
15107         being freed.
15108         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15110 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15112         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15113         `grub_ieee1275_chosen'.
15115 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15117         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15118         (grub_ieee1275_chosen): New variable.
15119         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15120         `chosen'.
15121         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15122         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15123         Rename first argument to `phandle' for consistency.
15124         (grub_ieee1275_get_property_length): Likewise.
15125         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15126         to grub_ieee1275_phandle_t.
15127         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15128         Move export next to declaration.
15129         (grub_ieee1275_chosen): New variable.
15130         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15131         Correct cosmetic typo.
15132         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15133         `grub_ieee1275_chosen'.
15134         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15135         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15136         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15137         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15138         `grub_ieee1275_chosen'.
15140 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15142         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15143         /chosen/bootargs.
15144         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15145         /chosen/bootargs as "variable=value" pairs.
15147 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15149         * include/grub/misc.h (grub_dprintf): New macro.
15150         (grub_real_dprintf): New prototype.
15151         (grub_strword): Likewise.
15152         (grub_iswordseparator): Likewise.
15153         * kern/misc.c (grub_real_dprintf): New function.
15154         (grub_strword): Likewise.
15155         (grub_iswordseparator): Likewise.
15157 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15159         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15160         (roundup): Remove macro.
15161         (grub_ieee1275_flags): Make static.
15162         (grub_ieee1275_realmode): Remove.
15163         (grub_ieee1275_test_flag): New function.
15164         (grub_ieee1275_set_flag): Likewise.
15165         (find_options): Rename to `grub_ieee1275_find_options'; update
15166         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15167         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15168         (cmain): New prototype.
15169         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15170         `grub_ieee1275_flags' directly.
15171         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15172         machine/biosdisk.h.
15173         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15174         Don't include grub/machine/init.h.
15175         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15176         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15177         Remove prototype.
15178         (grub_ieee1275_realmode): Likewise.
15179         (grub_ieee1275_flag): New enum.
15180         (grub_ieee1275_test_flag): New prototype.
15181         (grub_ieee1275_set_flag): New prototype.
15182         * include/grub/powerpc/ieee1275/init.h: Remove file.
15183         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15184         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15185         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15186         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15187         comment.
15188         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15189         `grub_ieee1275_test_flag'.
15190         (grub_ieee1275_encode_devname): Likewise.
15192 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15194         * include/grub/powerpc/ieee1275/ieee1275.h
15195         (grub_ieee1275_encode_devname): New prototype.
15196         (grub_ieee1275_get_filename): Likewise.
15197         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15198         function.
15199         (grub_set_prefix): Likewise.
15200         (grub_machine_init): Call grub_set_prefix.
15201         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15202         (grub_parse_type): New enum.
15203         (grub_ieee1275_get_devargs): New function.
15204         (grub_ieee1275_get_devname): Likewise.
15205         (grub_ieee1275_parse_args): Likewise.
15206         (grub_ieee1275_get_filename): Likewise.
15207         (grub_ieee1275_encode_devname): Likewise.
15209 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15211         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15212         `grub_loader_unset'.
15214 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15216         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15217         instead of grub_ieee1275_interpret.
15218         (grub_halt_init): New function.
15219         (grub_halt_fini): Likewise.
15220         (GRUB_MOD_INIT): Correct message grammar.
15221         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15222         instead of grub_ieee1275_interpret.
15223         (grub_reboot_init): New function.
15224         (grub_reboot_fini): Likewise.
15225         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15226         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15227         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15228         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15229         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15230         function.
15231         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15232         Add prototype.
15233         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15234         prototype.
15235         (grub_halt): Likewise.
15236         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15237         (cmain): Remove __attribute__((unused)).
15238         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15239         (grub_heap_len): Likewise.
15240         (grub_machine_fini): New function.
15241         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15242         (grub_halt): Likewise.
15243         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15244         function.
15245         * util/powerpc/ieee1275/misc.c: New file.
15247 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15249         * DISTLIST: New file.
15250         * gendistlist.sh: Likewise.
15252         * Makefile.in (COMMON_DISTFILES): Removed.
15253         (BOOT_DISTFILES): Likewise.
15254         (CONF_DISTFILES): Likewise.
15255         (DISK_DISTFILES): Likewise.
15256         (FS_DISTFILES): Likewise.
15257         (INCLUDE_DISTFILES): Likewise.
15258         (KERN_DISTFILES): Likewise.
15259         (LOADER_DISTFILES): Likewise.
15260         (TERM_DISTFILES): Likewise.
15261         (UTIL_DISTFILES): Likewise.
15262         (DISTFILES): Likewise.
15263         (uninstall): Uninstall files in $(pkgdata_DATA).
15264         (DISTLIST): New target.
15265         (distdir): Use the contents of the file DISTLIST to get a list of
15266         distributed files.
15268 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15270         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15271         descriptor. This is ported from GRUB Legacy.
15273         * gencmdlist.sh: Added an extra semicolon to make it work with
15274         old sed versions. Reported by Robert Bihlmeyer
15275         <robbe@orcus.priv.at>.
15277 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15279         Automatic loading of commands is supported.
15281         * normal/main.c (read_command_list): New function.
15282         (grub_normal_execute): Call read_command_list.
15284         * normal/command.c (grub_register_command): Return zero or CMD.
15285         Allocate CMD->NAME from the heap.
15286         Initialize CMD->MODULE_NAME to zero.
15287         Find the same name as well. If the same command is found and it is
15288         a dummy command, overwrite members. If it is not a dummy command,
15289         return zero.
15290         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15291         (grub_command_find): If a dummy command is found, load a module
15292         and retry to find a command only once.
15294         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15295         make sure that each command is loaded.
15297         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15298         macro.
15299         (struct grub_command): Remove const from the member `name'.
15300         Add a new member `module_name'.
15301         (grub_register_command): Return grub_command_t.
15303         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15304         sure that each command is loaded.
15306         * genmk.rb (PModule::rule): Specify a module name without the
15307         suffix ".mod" to gencmdlist.sh.
15309 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15311         * gencmdlist.sh: New file.
15313         * genmk.rb (PModule::rule): Generate a rule for a command list.
15314         Clean command.lst.
15315         Generate command.lst from $(COMMANDFILES).
15317         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15318         (DATA): Added $(pkgdata_DATA).
15319         (install-local): Install files in $(pkgdata_DATA).
15321 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15323         * term/i386/pc/vga.c (debug_command): Removed.
15324         (GRUB_MOD_INIT): Do not register the command "debug".
15326         From Hollis Blanchard:
15327         * commands/configfile.c: New file.
15328         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15329         commands/configfile.c.
15330         (pkgdata_MODULES): Added configfile.mod.
15331         (configfile_mod_SOURCES): New variable.
15332         (configfile_mod_CFLAGS): Likewise.
15333         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15334         commands/configfile.c.
15335         (pkgdata_MODULES): Added configfile.mod.
15336         (configfile_mod_SOURCES): New variable.
15337         (configfile_mod_CFLAGS): Likewise.
15338         * util/grub-emu.c (main): Call grub_configfile_init and
15339         grub_configfile_fini.
15340         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15341         prototype.
15342         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15344 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15346         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15347         address.
15349         * commands/help.c (grub_cmd_help): Do not print newlines after
15350         the last command in print_command_help.
15352 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15354         * commands/default.h: New file.
15355         * commands/timeout.h: Likewise.
15356         * normal/context.c: Likewise.
15358         * util/misc.c: Do not include sys/times.h.
15359         Include sys/time.h and grub/machine/time.h.
15360         (grub_get_rtc): Rewritten with gettimeofday.
15362         * util/grub-emu.c (main): Call grub_default_init and
15363         grub_timeout_init before grub_normal_init, and call
15364         grub_timeout_fini and grub_default_fini after grub_main.
15366         * util/console.c (grub_ncurses_checkkey): Return the read
15367         character or -1.
15369         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15370         timeouts.
15372         * normal/main.c (read_config_file): Push MENU. If this fails,
15373         print an error and wait for a user input.
15374         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15375         If a menu is empty or an error occurs, pop MENU.
15376         (grub_normal_execute): Pop and free MENU after grub_menu_run
15377         returns.
15379         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15381         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15382         include time.h.
15383         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15384         without GRUB_UTIL.
15385         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15386         time.h.
15387         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15388         without GRUB_UTIL.
15390         * include/grub/normal.h (struct grub_menu_list): New struct.
15391         (grub_menu_list_t): New type.
15392         (struct grub_context): New struct.
15393         (grub_context_t): New type.
15394         (grub_register_command): Got rid of EXPORT_FUNC.
15395         (grub_unregister_command): Likewise.
15396         (grub_context_get): New prototype.
15397         (grub_context_get_current_menu): Likewise.
15398         (grub_context_push_menu): Likewise.
15399         (grub_context_pop_menu): Likewise.
15400         [GRUB_UTIL] (grub_default_init): Likewise.
15401         [GRUB_UTIL] (grub_default_fini): Likewise.
15402         [GRUB_UTIL] (grub_timeout_init): Likewise.
15403         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15405         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15406         commands/timeout.c and normal/context.c.
15407         (pkgdata_MODULES): Added default.mod and timeout.mod.
15408         (normal_mod_SOURCES): Added normal/context.c.
15409         (default_mod_SOURCES): New variable.
15410         (default_mod_CFLAGS): Likewise.
15411         (timeout_mod_SOURCES): Likewise.
15412         (timeout_mod_CFLAGS): Likewise.
15413         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15414         conf/i386-pc.rmk.
15415         (pkgdata_MODULES): Added default.mod and timeout.mod.
15416         (normal_mod_SOURCES): Added normal/context.c.
15417         (default_mod_SOURCES): New variable.
15418         (default_mod_CFLAGS): Likewise.
15419         (timeout_mod_SOURCES): Likewise.
15420         (timeout_mod_CFLAGS): Likewise.
15422         * Makefile.in (all-local): Added $(MKFILES).
15424 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15426         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15427         (grub_emu_SOURCES): Likewise.
15428         (pkgdata_MODULES): Add `sun.mod'.
15429         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15430         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15431         `partmap/sun.c'.
15432         (pkgdata_MODULES): Add `sun.mod'.
15433         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15434         * include/grub/partition.h (grub_sun_partition_map_init): New
15435         prototype.
15436         (grub_sun_partition_map_fini): Likewise.
15437         * partmap/sun.c: New file.
15438         * util/grub-emu.c (main): Initialize and de-initialize the sun
15439         partitionmap support.
15441 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15443         This implements an Emacs-like menu entry editor.
15445         * normal/menu_entry.c: New file.
15447         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15448         characters to ASCII.
15449         (saved_char): New variable.
15450         (grub_ncurses_checkkey): Rewritten completely.
15451         (grub_ncurses_getkey): Likewise.
15452         (grub_ncurses_init): Call raw instead of cbreak.
15454         * normal/menu.c (print_entry): Do not put a space.
15455         (init_page): Renamed to ...
15456         (grub_menu_init_page): ... this. All callers changed.
15457         (edit_menu_entry): Removed.
15458         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15460         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15462         * kern/misc.c (grub_vprintf): Call grub_refresh.
15464         * normal/menu.c (DISP_LEFT): Renamed to ...
15465         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15466         * normal/menu.c (DISP_UP): Renamed to ...
15467         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15468         * normal/menu.c (DISP_RIGHT): Renamed to ...
15469         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15470         * normal/menu.c (DISP_DOWN): Renamed to ...
15471         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15472         * normal/menu.c (DISP_HLINE): Renamed to ...
15473         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15474         * normal/menu.c (DISP_VLINE): Renamed to ...
15475         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15476         * normal/menu.c (DISP_UL): Renamed to ...
15477         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15478         * normal/menu.c (DISP_UR): Renamed to ...
15479         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15480         * normal/menu.c (DISP_LL): Renamed to ...
15481         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15482         * normal/menu.c (DISP_LR): Renamed to ...
15483         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15484         * normal/menu.c (TERM_WIDTH): Renamed to ...
15485         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15486         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15487         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15488         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15489         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15490         * normal/menu.c (TERM_MARGIN): Renamed to ...
15491         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15492         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15493         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15494         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15495         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15496         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15497         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15498         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15499         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15500         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15501         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15502         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15503         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15504         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15505         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15506         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15507         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15508         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15509         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15510         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15511         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15512         All callers changed.
15514         * include/grub/normal.h: New prototype.
15516         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15517         normal/menu_entry.c.
15518         (normal_mod_SOURCES): Likewise.
15519         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15520         (normal_mod_SOURCES): Likewise.
15522 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15524         * include/grub/normal.h (grub_halt_init): New prototype.
15525         (grub_halt_fini): Likewise.
15526         (grub_reboot_init): Likewise.
15527         (grub_reboot_fini): Likewise.
15529         * util/grub-emu.c: Include signal.h.
15530         (main_env): New global variable.
15531         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15532         catch C-c.
15533         (grub_machine_fini): New function.
15534         (main): Call grub_halt_init and grub_reboot_init before
15535         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15536         Call setjmp with MAIN_ENV to go back afterwards.
15537         Call grub_machine_fini right before return.
15539         * include/grub/util/misc.h: Include setjmp.h.
15540         (main_env): New prototype.
15542         * include/grub/kernel.h (grub_machine_fini): New prototype.
15543         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15544         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15546         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15547         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15548         * term/i386/pc/console.c (grub_console_fini): Likewise.
15550         * util/i386/pc/misc.c: New file.
15552         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15553         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15554         commands/i386/pc/reboot.c.
15556 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15558         * include/grub/dl.h (grub_dl_check_header): New prototype.
15559         (grub_arch_dl_check_header): Change return type to grub_err_t,
15560         remove size parameter and export function.  Update all callers.
15561         * kern/dl.c (grub_dl_check_header): New function.
15562         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15563         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15564         are inside the core.
15565         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15566         independent ELF header checks.
15567         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15568         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15569         `grub_dl_check_header' instead of explicit checks.  Check for the
15570         ELF type.
15571         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15572         `grub_dl_check_header' instead of explicit checks.  Remove arch
15573         specific ELF header checks.
15575         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15576         argument SIZE.
15578 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15580         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15581         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15583 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15585         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15586         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15587         (part_map_iterate): Clear `grub_errno' and return 0 if
15588         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15589         * partmap/amiga.c (amiga_partition_map_iterate): Return
15590         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15591         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15593 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15595         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15596         help info.
15598 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15600         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15601         Removed prototype.
15602         (grub_rescue_cmd_linux): New prototype.
15603         (grub_rescue_cmd_initrd): Likewise.
15604         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15605         `bi_rec'.
15606         (grub_linux_release_mem): Release the memory for the initrd.
15607         (grub_load_linux): Renamed from this...
15608         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15609         Changed `entry' not to be static.  Loop over memory regions to
15610         find another one when the default fails.
15611         (grub_rescue_cmd_initrd): New function.
15612         (grub_linux_init): Remove function.
15613         (grub_linux_fini): Likewise.
15614         (GRUB_MOD_INIT): Register `initrd'.
15615         (GRUB_MOD_FINI): Unregister `initrd'.
15616         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15617         Function removed.
15618         (grub_linux_normal_fini): Likewise.
15619         (GRUB_MOD_INIT): Register `initrd'.
15620         (GRUB_MOD_FINI): Unregister `initrd'.
15622 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15624         * commands/help.c: New file.
15625         * normal/arg.c (show_help): Renamed to...
15626         (grub_arg_show_help): ... this.
15627         * commands/i386/pc/halt.c: New file.
15628         * commands/i386/pc/reboot.c: Likewise.
15629         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15630         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15631         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15632         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15633         variables.
15634         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15635         `commands/help.c'.
15636         (pkgdata_MODULES): Add `help.mod'.
15637         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15638         * grub/i386/pc/init.h (grub_reboot): New prototype.
15639         (grub_halt): Likewise.
15640         * include/grub/normal.h (grub_arg_show_help): New prototype.
15641         (grub_help_init): Likewise.
15642         (grub_help_fini): Likewise.
15643         * util/grub-emu.c (main): Initialize and deinitialize the help
15644         command.
15646         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15648         * normal/command.c (grub_command_init): Fixed the description of
15649         the `set' and `unset' commands.
15651 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15653         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15654         function.
15655         * commands/ieee1275/halt.c: New file.
15656         * commands/ieee1275/reboot.c: Likewise.
15657         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15658         `__attribute__ ((unused))'.  Some GCS related fixed.
15659         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15660         (grub_suspend_fini): Likewise.
15661         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15662         and `halt.mod'.
15663         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15664         (halt_mod_CFLAGS): New variables.
15665         * include/grub/powerpc/ieee1275/ieee1275.h
15666         (grub_ieee1275_interpret): New prototype.
15668 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15670         * include/grub/misc.h (memmove): New prototype.
15671         (memcpy): Likewise.
15673 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15675         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15676         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15678 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15680         * kern/misc.c (grub_strndup): Function rewritten.
15682 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15684         * normal/menu.c (TERM_WIDTH): Macro redefined.
15685         (TERM_TOP_BORDER_Y): Likewise.
15686         (draw_border): Replaced while-loop by a for-loop.  Make the number
15687         of lines consistent with the number of lines displayed in
15688         print_entries.  Added a margin below the rectangle.
15689         (print_entry): Make the entry fit in the rectangle.
15690         (print_entries): Display the scroll arrows next to the right
15691         border.
15693 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15695         * fs/minix.c (grub_minix_find_file): Reserve more space for
15696         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15697         `grub_strncpy' to copy `path' into it.
15699 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15701         Add the loopback device, a device via which files can be accessed
15702         as devices.
15704         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15705         (pkgdata_MODULES): Add loopback.mod.
15706         (loopback_mod_SOURCES): New variable.
15707         (loopback_mod_CFLAGS): Likewise.
15708         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15709         `disk/loopback.c'.
15710         (pkgdata_MODULES): Add loopback.mod.
15711         (loopback_mod_SOURCES): New variable.
15712         (loopback_mod_CFLAGS): Likewise.
15713         * disk/loopback.c: new file.
15714         * include/grub/normal.h (grub_loop_init): New prototype.
15715         (grub_loop_fini): New prototype.
15716         * util/grub-emu.c (main): Initialize and de-initialize loopback
15717         support.
15718         * include/grub/disk.h (grub_disk_dev_id): Add
15719         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15721 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15723         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15724         function.
15725         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15726         (suspend_mod_SOURCES): New variable.
15727         (suspend_mod_CFLAGS): Likewise.
15728         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15729         New prototype.
15730         * commands/ieee1275/suspend.c: New file.
15732 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15734         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15735         ((unused))' to `__attribute__ ((used))'.
15736         (GRUB_MOD_FINI): Likewise.
15737         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15738         * genmk.rb (PModule): Assign space to common symbols when linking
15739         modules.
15741 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15743         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15744         `unsigned' arguments to `grub_size_t'.
15745         (grub_malloc): Likewise.
15746         (grub_realloc): Likewise.
15747         (grub_memalign): Likewise.
15748         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15749         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15750         * util/misc.c (grub_malloc): Likewise.
15751         (grub_realloc): Likewise.
15752         * kern/mm.c (get_header_from_pointer): Change the casts to
15753         `unsigned' into a cast to `grub_size_t'.
15755         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15756         point to `currnode' when `currnode' is changed.
15758         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15759         Schottelius <nico-linux@schottelius.org>.
15761 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15763         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15764         (note_path): Remove variable.
15765         (GRUB_IEEE1275_NOTE_NAME): New macro.
15766         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15767         (grub_ieee1275_note_hdr): New structure.
15768         (grub_ieee1275_note_desc): Likewise.
15769         (grub_ieee1275_note): Likewise.
15770         (load_note): Remove `dir' argument.  All callers updated.  Remove
15771         `note_img' and `path'.  Do not load a file from `note_path'.
15772         Initialize a struct grub_ieee1275_note and write that to `out'.
15773         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15775 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15777         * util/misc.c (grub_util_read_image): Revert last change.  It
15778         called `grub_util_read_at', which seeks from the beginning of the
15779         file.
15781 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15783         * TODO: Add note about endianness in grub-mkimage.
15784         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15785         section.
15786         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15787         (grub_mkimage_SOURCES): New target.
15788         * include/grub/kernel.h (grub_start_addr): Remove variable.
15789         (grub_end_addr): Likewise.
15790         (grub_total_module_size): Likewise.
15791         (grub_kernel_image_size): Likewise.
15792         (GRUB_MODULE_MAGIC): New constant.
15793         (grub_module_info): New structure.
15794         (grub_arch_modules_addr): New prototype.
15795         (grub_get_end_addr): Remove prototype.
15796         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15797         * include/grub/powerpc/ieee1275/kernel.h: New file.
15798         * include/grub/util/misc.h (grub_util_get_fp_size): New
15799         prototype.
15800         (grub_util_read_at): Likewise.
15801         (grub_util_write_image_at): Likewise.
15802         * kern/main.c (grub_get_end_addr): Remove function.
15803         (grub_load_modules): Call grub_arch_modules_addr instead of using
15804         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15805         the grub_module_info fields instead of calling grub_get_end_addr
15806         as loop conditions.  Move grub_add_unused_region code here.
15807         (grub_add_unused_region): Remove function.
15808         * kern/i386/pc/init.c: Include grub/cache.h.
15809         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15810         one call to add_mem_region.
15811         (grub_arch_modules_addr): New function.
15812         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15813         (grub_total_module_size): Likewise.
15814         Include grub/machine/kernel.h.
15815         (grub_arch_modules_addr): New function.
15816         * util/grub-emu.c (grub_end_addr): Remove variable.
15817         (grub_total_module_size): Likewise.
15818         (grub_arch_modules_addr): New function.
15819         * util/misc.c: Include unistd.h.
15820         (grub_util_get_fp_size): New function.
15821         (grub_util_read_at): Likewise.
15822         (grub_util_write_image_at): Likewise.
15823         (grub_util_read_image): Call grub_util_read_at.
15824         (grub_util_write_image): Call grub_util_write_image_at.
15825         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15826         additional memory in kernel_img for a struct grub_module_info.
15827         Fill in that grub_module_info.
15828         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15830 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15832         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15833         New function.
15834         * include/grub/powerpc/ieee1275/ieee1275.h
15835         (grub_ieee1275_milliseconds): New prototype.
15836         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
15837         Change to 1000.
15838         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
15839         grub_ieee1275_milliseconds.
15841 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15843         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
15844         variable.
15845         (find_options): New function.
15846         (cmain): Call find_options.
15847         * include/grub/powerpc/ieee1275/ieee1275.h
15848         (grub_ieee1275_realmode): New extern variable.
15849         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
15850         grub_map if grub_ieee1275_realmode is false.
15852 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
15854         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
15855         lines are inserted and make it work like readline.  Reported by
15856         Vincent Pelletier <subdino2004@yahoo.fr>.
15858 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
15860         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
15862         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
15863         `kern/powerpc/cache.S'.
15865 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
15867         * genmk.rb: Handle the `Program' class in the main loop.  Written
15868         by Johan Rydberg <jrydberg@gnu.org>.
15869         (Program): New class.
15870         (programs): New variable.
15871         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
15872         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
15873         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
15874         (help_arch): Function removed.
15875         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
15876         `powerpc/libgcc.h' and `loader.h'.
15877         (pkgdata_PROGRAMS): New variable.
15878         (sbin_UTILITIES): Variable removed.
15879         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
15880         (grubof_SOURCES): Variable re-defined so it only includes the
15881         core functionality.
15882         (grubof_CFLAGS): Remove `-DGRUBOF'.
15883         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
15884         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
15885         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
15886         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
15887         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
15888         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
15889         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
15890         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
15891         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
15892         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
15893         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
15894         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
15895         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
15896         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
15897         (pc_mod_CFLAGS): New variables.
15898         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
15899         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
15900         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
15901         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
15902         Moved from here...
15903         * include/grub/i386/pc/init.h (grub_os_area_addr)
15904         (rub_os_area_size): ... to here.
15905         * include/grub/powerpc/ieee1275/ieee1275.h
15906         (grub_ieee1275_entry_fn): Export symbol.
15907         * include/grub/powerpc/ieee1275/init.h: New file.
15908         * include/grub/powerpc/libgcc.h: Likewise.
15909         * include/grub/cache.h: Likewise.
15910         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
15911         <hollis@penguinppc.org>.
15912         * kern/dl.c: Include <grub/cache.h>.
15913         (grub_dl_flush_cache): New function.
15914         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
15915         for this module.
15916         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
15917         (grub_console_init): Removed prototypes.
15918         (grub_machine_init): Don't initialize the modules anymore.
15919         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
15920         static.
15921         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
15922         Macro undef removed.
15923         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
15924         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
15925         relocation `R_PPC_REL32'.  Return an error when the relocation is
15926         unknown.
15927         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
15928         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
15929         * util/misc.c (grub_arch_sync_caches): Likewise.
15931 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
15933         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
15934         `symlist.c', add `grubof_symlist.c'.
15935         (symlist.c): Variable removed.
15936         (grubof_HEADERS): Variable added.
15937         (grubof_symlist.c): New target.
15938         (kernel_syms.lst): Use `grubof_HEADERS' instead of
15939         `kernel_img_HEADERS'.
15940         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
15941         * kern/powerpc/dl.c: New file.
15942         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
15943         Function removed.
15944         (grub_arch_dl_relocate_symbols): Likewise.
15945         (grub_register_exported_symbols): Likewise.
15947 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
15949         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
15950         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
15951         to fail instead.  Reported by Vincent Pelletier
15952         <subdino2004@yahoo.fr>.
15954         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
15955         it is not allocated.  Reported by Vincent Pelletier
15956         <subdino2004@yahoo.fr>.
15958         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
15959         output so the output looks better.
15961 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
15963         Modulize the partition map support and add support for the amiga
15964         partition map.
15966         * commands/ls.c: Include <grub/partition.h> instead of
15967         <grub/machine/partition.h>.
15968         * kern/disk.c: Likewise.
15969         * kern/rescue.c: Likewise.
15970         * loader/i386/pc/chainloader.c: Likewise.
15971         * normal/cmdline.c: Likewise.
15972         * kern/powerpc/ieee1275/init.c: Likewise.
15973         (grub_machine_init): Call `grub_pc_partition_map_init',
15974         `grub_amiga_partition_map_init' and
15975         `grub_apple_partition_map_init'.
15976         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
15977         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
15978         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
15979         `partition.h' and `pc_partition.h'.
15980         (grub_setup_SOURCES): Remove
15981         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
15982         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15983         (grub_emu_SOURCES): Likewise.
15984         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
15985         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
15986         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
15987         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
15988         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
15989         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
15990         (grubof_SOURCES): Likewise.
15991         * disk/i386/pc/partition.c: File removed.
15992         * disk/powerpc/ieee1275/partition.c: Likewise.
15993         * include/grub/powerpc/ieee1275/partition.h: Likewise.
15994         * include/grub/i386/pc/partition.h: Likewise.
15995         * kern/partition.c: New file.
15996         * partmap/amiga.c: Likewise.
15997         * partmap/apple.c: Likewise.
15998         * partmap/pc.c: Likewise.
15999         * include/grub/partition.h: Likewise..
16000         * include/grub/pc_partition.h: Likewise.
16001         * util/grub-emu.c: Include <grub/partition.h> instead of
16002         <grub/machine/partition.h>.
16003         (main): Call `grub_pc_partition_map_init',
16004         `grub_amiga_partition_map_init' and
16005         `grub_apple_partition_map_init' and deinitialize afterwards.
16006         * util/i386/pc/biosdisk.c: Include `#include
16007         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16008         `<grub/machine/partition.h>'.
16009         * util/i386/pc/grub-setup.c: Likewise.
16010         * util/i386/pc/biosdisk.c: Likewise.
16011         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16012         partition information in case of a PC partition.
16013         * util/i386/pc/grub-setup.c: Include `#include
16014         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16015         `<grub/machine/partition.h>'.
16016         (setup): Only access the PC specific partition information in case
16017         of a PC partition.
16019 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16021         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16022         (grub_longjmp): Likewise.
16023         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16024         20.
16025         * normal/powerpc/setjmp.S: New file.
16026         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16027         `normal/powerpc/setjmp.S'.
16028         (grubof_CFLAGS): Add `-DGRUBOF'.
16029         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16030         [GRUB_UTIL && !GRUBOF].
16032 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16034         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16035         property named `name'.  Correctly handle the error returned by
16036         `grub_ieee1275_finddevice' if a device can not be opened.
16038 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16040         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16041         `actual' for negativity.
16042         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16043         kern/fshelp.c.
16045 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16047         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16048         (PAGE_OFFSET): New macro.
16049         (CRTC_ADDR_PORT): Likewise.
16050         (CRTC_DATA_PORT): Likewise.
16051         (START_ADDR_HIGH_REGISTER): Likewise.
16052         (START_ADDR_LOW_REGISTER): Likewise.
16053         (GRAPHICS_ADDR_PORT): Likewise.
16054         (GRAPHICS_DATA_PORT): Likewise.
16055         (READ_MAP_REGISTER): Likewise.
16056         (INPUT_STATUS1_REGISTER): Likewise.
16057         (INPUT_STATUS1_VERTR_BIT): Likewise.
16058         (page): New variable.
16059         (wait_vretrace): New function.
16060         (set_read_map): Likewise.
16061         (set_start_address): Likewise.
16062         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16063         the right page.
16064         (check_vga_mem): Take the page into account.
16065         (write_char): Likewise.
16066         (write_cursor): Likewise.
16067         (scroll_up): Likewise.  Copy the page to the page that is not
16068         shown and switch between both pages.
16069         (grub_vga_putchar): Fix off by one error.
16070         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16071         account.
16073 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16075         Add support for iso9660 (including rockridge).
16077         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16078         (iso9660_mod_SOURCES): New variable.
16079         (iso9660_mod_CFLAGS): Likewise.
16080         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16081         * include/grub/fs.h (grub_iso9660_init): New prototype.
16082         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16083         * fs/iso9660.c: New file.
16085         * include/grub/misc.h (grub_strncat): New prototype.
16086         * kern/misc.c (grub_strncat): New function.
16088         * fs/hfs.c (grub_hfs_mount): Translate the error
16089         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16090         * fs/jfs.c (grub_jfs_mount): Likewise.
16091         * fs/ufs.c (grub_ufs_mount): Likewise.
16093 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16095         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16096         which initialized BAT registers.
16097         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16098         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16099         Move from here...
16100         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16101         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16102         ... to here.
16103         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16104         (grub_mapclaim): Likewise.
16105         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16106         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16107         hand.
16109 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16111         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16112         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16113         -ffreestanding and -msoft-float.
16115 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16117         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16118         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16119         set in grub_ieee1275_flags.
16121 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16123         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16124         prototype.
16125         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16126         grub_console_init first.
16127         Change the memory range used for grub_ieee1275_claim and
16128         grub_mm_init_region.
16129         Print an error message if the claim fails.
16130         Include <grub/misc.h>.
16132 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16134         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16135         Call grub_children_iterate for device nodes of type `scsi',
16136         `ide', or `ata'.
16137         (grub_ofdisk_open): Remove manual device alias resolution.
16138         Fix memory leak when device cannot be opened.
16139         * include/grub/powerpc/ieee1275/ieee1275.h
16140         (grub_children_iterate): New prototype.
16141         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16142         New function.
16143         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16144         Return -1 if args.size was -1.
16146 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16148         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16149         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16150         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16151         Open Firmware's memory for it; claim memory from _start to _end.
16152         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16153         (_end): New extern.
16154         (_start): Zero BSS from __bss_start to _end.
16155         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16156         New extern.
16157         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16159 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16161         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16162         -1 if args.base was -1.
16164 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16166         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16167         escape sequence instead of a literal ^L. Also call
16168         grub_ofconsole_gotoxy.
16170 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16172         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16173         void *  arguments to grub_addr_t.  All callers updated.  Also make
16174         the `result' argument optional.
16175         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16176         All callers updated.
16178 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16180         * commands/ls.c (grub_ls_list_files): Use the string following the
16181         initial ')', if present, as the filesystem path.
16182         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16184         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16186 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16188         Make the source code of the menu interface more readable.
16190         * normal/menu.c: Include grub/mm.h.
16191         (TERM_WIDTH): New macro.
16192         (TERM_HEIGHT): Likewise.
16193         (TERM_INFO_HEIGHT): Likewise.
16194         (TERM_MARGIN): Likewise.
16195         (TERM_SCROLL_WIDTH): Likewise.
16196         (TERM_TOP_BORDER_Y): Likewise.
16197         (TERM_LEFT_BORDER_X): Likewise.
16198         (TERM_BORDER_WIDTH): Likewise.
16199         (TERM_MESSAGE_HEIGHT): Likewise.
16200         (TERM_BORDER_HEIGHT): Likewise.
16201         (TERM_NUM_ENTRIES): Likewise.
16202         (TERM_FIRST_ENTRY_Y): Likewise.
16203         (TERM_ENTRY_WIDTH): Likewise.
16204         (TERM_CURSOR_X): Likewise.
16205         (draw_border): Use macros instead of magic numbers.
16206         (print_entry): Likewise.
16207         (print_entries): Likewise.
16208         (run_menu): Likewise. Also, handle the key 'e'.
16209         (run_menu_entry): Ignore empty command lines.
16210         (print_message): Added a new argument EDIT. If EDIT is true,
16211         print a different message.
16212         (init_page): Likewise.
16213         (edit_menu_entry): New function. Not implemented yet.
16215 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16217         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16218         can be loaded from normal mode.
16220         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16221         `multiboot.mod'.
16222         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16223         (multiboot_mod_CFLAGS): New variables.
16224         * loader/i386/pc/linux_normal.c: New file.
16225         * loader/i386/pc/multiboot_normal.c: Likewise.
16227         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16228         attribute `unused'.
16230         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16231         `fdiro' to read the mode information from instead of `diro'.
16233         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16234         looking up a symlink.
16236         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16237         macro.
16238         * normal/command.c (grub_command_execute): Don't parse the
16239         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16240         flags of the command.
16242         * normal/menu.c (grub_menu_run): Fix typo.
16244 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16246         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16248         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16249         `y + 1' instead of `y - 1'.
16251         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16253 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16255         From Hollis Blanchard <hollis@penguinppc.org>:
16256         * kern/misc.c (memmove): New alias for grub_memmove.
16257         (memcmp): New alias for grub_memcmp.
16258         (memset): New alias for grub_memset.
16259         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16260         Change "int handle" to "grub_ieee1275_phandle_t handle".
16261         * include/grub/powerpc/ieee1275/ieee1275.h
16262         (grub_ieee1275_get_property): Likewise.
16264 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16266         Added normal mode command `chainloader' as module chain.mod, which
16267         depends on normal.mod and _chain.mod.
16269         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16270         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16271         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16272         Deleted prototype.
16273         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16274         but arguments parsing moved to ...
16275         (grub_chainloader_cmd): ... here.  New function.
16276         * include/grub/i386/pc/chainloader.h: New file.
16277         * loader/i386/pc/chainloader_normal.c: Likewise.
16279 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16281         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16282         (grub_mkimage_LDFLAGS): Likewise.
16283         (grub_emu_SOURCES): Likewise.
16284         (kernel_img_HEADERS): Added fshelp.h.
16285         * fs/ext2.c: Include <grub/fshelp.h>.
16286         (FILETYPE_REG): New macro.
16287         (FILETYPE_INO_REG): Likewise.
16288         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16289         Changed all users.
16290         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16291         all users.
16292         (grub_fshelp_node): New struct.
16293         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16294         to a pointer.
16295         (grub_ext2_get_file_block): Removed function.
16296         (grub_ext2_read_block): New function.
16297         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16298         This function was written.
16299         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16300         (grub_ext2_find_file): Removed function.
16301         (grub_ext2_read_symlink): New function.
16302         (grub_ext2_iterate_dir): Likewise.
16303         (grub_ext2_open): Rewritten.
16304         (grub_ext2_dir): Rewritten.
16305         * include/grub/fshelp.h: New file.
16306         * fs/fshelp.c: Likewise.
16308 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16310         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16311         (print_message): Add a missing newline.
16312         (run_menu): Added timeout support.
16313         (run_menu_entry): New local function.
16314         (grub_menu_run): Added support for booting.
16316         * kern/loader.c (grub_loader_is_loaded): New function.
16318         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16319         (grub_get_rtc): Exported.
16321         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16322         (grub_get_rtc): Exported.
16324         * include/grub/normal.h (struct grub_command_list): Remove
16325         constant from the member `command'.
16327         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16329         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16331         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16333 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16335         Add support for the JFS filesystem.
16337         * fs/jfs.c: New file.
16338         * include/grub/fs.h (grub_jfs_init): New prototype.
16339         (grub_jfs_fini): New prototype.
16340         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16341         (grub_emu_SOURCES): Likewise.
16342         (pkgdata_MODULES): Add jfs.mod.
16343         (jfs_mod_SOURCES): New variable.
16344         (jfs_mod_CFLAGS): Likewise.
16345         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16346         (grubof_SOURCES): Likewise.
16347         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16349         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16350         endian to the host endian.
16351         (grub_fat_utf16_to_utf8): Move function from there...
16352         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16353         the endianness of the source string anymore.
16354         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16356 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16358         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16359         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16360         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16361         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16363         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16364         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16365         for `node_found' and `it_dir'.
16366         (grub_hfs_dir): Add prototype for `dir_hook'.
16368         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16369         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16370         and `indir32' to silence a gcc warning.
16372         * include/grub/fs.h (grub_hfs_init): New prototype.
16373         (grub_hfs_fini): Likewise.
16376 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16378         Each disk device has its own id now. This is useful to make use
16379         of multiple disk devices.
16381         * include/grub/disk.h (grub_disk_dev_id): New enum.
16382         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16383         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16385         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16386         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16388         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16389         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16391         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16392         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16394         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16395         "id" which is used by the cache manager.
16397         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16398         of just "GRUB".
16400 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16402         * fs/hfs.c: New file.
16403         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16404         (grub_emu_SOURCES): Likewise.
16405         (pkgdata_MODULES): Add hfs.mod.
16406         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16407         (grubof_SOURCES): Likewise.
16408         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16410         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16411         * kern/misc.c (grub_strncasecmp): Add function.
16413 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16415         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16416         with parentheses.
16418         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16419         (grub_ext2_dir): In case the directory entry type is unknown, read
16420         it from the inode.
16422 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16424         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16425         grub_load_linux instead of grub_rescue_cmd_linux as second
16426         argument of grub_rescue_register_command.
16428         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16430 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16432         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16433         function.
16434         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16435         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16436         `loader/powerpc/ieee1275/linux.c',
16437         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16438         * include/grub/powerpc/ieee1275/ieee1275.h
16439         (grub_ieee1275_release): New prototype.
16440         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16441         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16442         normal, boot, linux and linux_normal.
16443         * loader/powerpc/ieee1275/linux.c: New file.
16444         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16446 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16448         * normal/arg.c (grub_arg_parse): Correct error handling after
16449         reallocating the argumentlist (check if `argl' is not null instead
16450         of checking if `args' is not null).
16451         * kern/mm.c (grub_realloc): Return the same pointer when using the
16452         same region, instead of returning the header address.
16454 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16456         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16457         one block instead of two when looking for the initial partition.
16458         (grub_partition_probe): Initialize the local variable `p' with 0.
16459         Use base 10 for the grub_strtoul call.
16460         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16461         need for one local variable.
16462         (grub_strtoul): Don't add the new value to `num', instead of that
16463         just assign it.
16465 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16467         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16468         (pxeboot_img_SOURCES): New variable.
16469         (pxeboot_img_ASFLAGS): Likewise.
16470         (pxeboot_img_LDFLAGS): Likewise.
16471         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16472         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16473         <lode_leroy@hotmail.com>.
16475 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16477         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16478         there was no input.
16480 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16482         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16483         the history buffer logic.
16485 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16487         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16488         (FILETYPE_INO_SYMLINK): New macros.
16489         (grub_ext2_find_file): Check if the node is a directory using the
16490         inode stat information instead of using the filetype in the
16491         dirent.  Exclude the first character of an absolute symlink.
16492         (grub_ext2_dir): Mask out the filetype part of the mode member of
16493         the inode.
16495 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16497         Add support for UFS version 1 and 2.  Add support for the minix
16498         filesystem version 1 and 2, both the variants with 14 and 30 long
16499         filenames.
16501         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16502         fs/minix.c.
16503         (grub_emu_SOURCES): Likewise.
16504         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16505         (ufs_mod_SOURCES): New variable.
16506         (ufs_mod_CFLAGS): Likewise.
16507         (minix_mod_SOURCES): Likewise.
16508         (minix_mod_CFLAGS): Likewise.
16509         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16510         fs/minix.c.
16511         (grubof_SOURCES): Likewise.
16512         * fs/ufs.c: New file.
16513         * fs/minix.c: New file.
16514         * include/grub/fs.h (grub_ufs_init): New prototype.
16515         (grub_ufs_fini): Likewise.
16516         (grub_minix_init): Likewise.
16517         (grub_minix_fini): Likewise.
16518         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16519         minix fs.
16521 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16523         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16524         commands/ls.c, commands/terminal.c, commands/boot.c,
16525         commands/cmp.c and commands/cat.c.
16526         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16528         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16529         "env.h"
16531 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16533         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16534         and grub_, respectively. Because the conversion is trivial and
16535         mechanical, I omit the details here. Please refer to the CVS
16536         if you need more information.
16538 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16540         * include/pupa: Renamed to ...
16541         * include/grub: ... this.
16542         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16543         * util/i386/pc/grub-mkimage.c: ... this.
16544         * util/i386/pc/pupa-setup.c: Renamed to ...
16545         * util/i386/pc/grub-setup.c: ... this.
16546         * util/pupa-emu.c: Renamed to ...
16547         * util/grub-emu.c: ... this.
16549 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16551         Add support for the newworld apple macintosh (PPC).  This has been
16552         tested on the powerbook 2000 only.  It only adds support for
16553         generic ieee1275 functions, console and disk support.  This should
16554         be easy to port to other architectures with support for Open
16555         Firmware.
16557         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16558         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16559         specific tests are only executed while building for the i386.
16560         Inverse test for crosscompile.
16561         * genmk.rb (Utility): Allow assembler files.
16562         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16563         * conf/powerpc-ieee1275.rmk: New file.
16564         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16565         * disk/powerpc/ieee1275/partition.c: Likewise.
16566         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16567         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16568         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16569         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16570         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16571         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16572         * include/pupa/powerpc/ieee1275/loader.h
16573         * include/pupa/powerpc/setjmp.h: Likewise.
16574         * include/pupa/powerpc/types.h: Likewise.
16575         * kern/powerpc/ieee1275/init.c: Likewise.
16576         * kern/powerpc/ieee1275/openfw.c: Likewise.
16577         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16579         These files were written by Johan Rydberg
16580         (jrydberg@night.trouble.net) and I only modified them slightly.
16582         * boot/powerpc/ieee1275/cmain.c: New file.
16583         * boot/powerpc/ieee1275/crt0.S: Likewise.
16584         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16585         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16587 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16589         * Makefile.in: Update copyright.
16590         * genmodsrc.sh: Likewise.
16591         * gensymlist.sh: Likewise.
16592         * term/i386/pc/vga.c: Indent correctly.
16594         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16595         bugreporting address.
16596         * util/i386/pc/pupa-setup.c (usage): Likewise,
16597         (main): Call pupa_ext2_init and pupa_ext2_fini.
16599         * fs/fat.c (log2): Renamed to ...
16600         (fat_log2): ... this.
16601         All callers changed.
16602         * kern/misc.c (memcpy): Alias to pupa_memmove.
16603         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16604         lvalue cast.
16605         * util/console.c (pupa_ncurses_fini): Return 0.
16607         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16608         Move fail label here.
16609         [__GNU__]: Don't warn when using stat.
16610         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16611         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16612         long int. Use strtol instead of strtoul.
16614 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16616         * commands/boot.c: New file.
16617         * commands/cat.c: Likewise.
16618         * commands/cmp.c: Likewise.
16619         * commands/ls.c: Likewise.
16620         * commands/terminal.c: Likewise.
16621         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16622         (pupa_register_command): Changed interface to match the new
16623         argument parser.
16624         (pupa_command_execute): Changed (almost rewritten) so it uses
16625         pupa_split_command.  Added support for setting variables using the
16626         syntax `foo=bar'.
16627         (rescue_command): Changed to work with the new argument parser.
16628         (terminal_command): Moved from here to commands/terminal.c.
16629         (set_command): New function.
16630         (unset_command): New function.
16631         (insmod_command): New function.
16632         (rmmod_command): New function.
16633         (lsmod_command): New function.
16634         (pupa_command_init): Don't initialize the command terminal
16635         anymore.  Initialize the commands set, unset, insmod, rmmod and
16636         lsmod.
16637         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16638         (kernel_img_HEADERS): Add arg.h and env.h.
16639         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16640         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16641         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16642         normal/arg.c.
16643         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16644         terminal.mod.
16645         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16646         (boot_mod_SOURCES): New variable.
16647         (terminal_mod_SOURCES): Likewise.
16648         (ls_mod_SOURCES): Likewise.
16649         (cmp_mod_SOURCES): Likewise.
16650         (cat_mod_SOURCES): Likewise.
16652         * normal/arg.c: New file.
16653         * kern/env.c: Likewise.
16654         * include/pupa/arg.h: Likewise.
16655         * include/pupa/env.h: Likewise.
16656         * font/manager.c (font_command): Changed to match argument parsing
16657         interface changes.
16658         (PUPA_MOD_INIT): Likewise.
16659         * hello/hello.c (pupa_cmd_hello): Likewise.
16660         (PUPA_MOD_INIT): Likewise.
16661         * include/pupa/disk.h: Include <pupa/device.h>.
16662         (pupa_print_partinfo): New prototype.
16663         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16664         (pupa_dl_get_prefix): Likewise.
16665         * include/pupa/misc.h: Include <pupa/err.h>.
16666         (pupa_isgraph): New prototype.
16667         (pupa_isdigit): Likewise.
16668         (pupa_split_cmdline): Likewise.
16669         * include/pupa/normal.h: Include <pupa/arg.h>.
16670         (pupa_command): Changed the prototype of the member `func' to
16671         match the argument parsing interface.  Added member `options'.
16672         (pupa_register_command): Updated to match function.
16673         (pupa_arg_parse): New prototype.
16674         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16675         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16676         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16677         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16678         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16679         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16680         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16681         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16682         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16683         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16684         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16685         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16686         * kern/disk.c: Include <pupa/file.h>.
16687         (pupa_print_partinfo): New function.
16688         * kern/dl.c: Include <pupa/env.h>.
16689         (pupa_dl_dir): Variable removed.
16690         (pupa_dl_load): Use the environment variable `prefix' instead of
16691         the variable pupa_dl_dir.
16692         (pupa_dl_set_prefix): Function removed.
16693         (pupa_dl_get_prefix): Likewise.
16694         * kern/i386/pc/init.c: Include <pupa/env.h>.
16695         (pupa_machine_init): Use the environment variable `prefix' instead of
16696         using pupa_dl_set_prefix to set the prefix.
16697         * kern/main.c: Include <pupa/env.h>.
16698         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16699         using pupa_dl_get_prefix to get the prefix.
16700         * kern/misc.c: Include <pupa/env.h>.
16701         (pupa_isdigit): New function.
16702         (pupa_isgraph): Likewise.
16703         (pupa_ftoa): Likewise.
16704         (pupa_vsprintf): Added support for printing values of the type
16705         `double'.  Make it possible to format variable output when using
16706         formatting like `%1.2%f'.
16707         (pupa_split_cmdline): New function.
16708         * kern/rescue.c: Include <pupa/env.h>.
16709         (next_word): Removed function.
16710         (pupa_rescue_cmd_prefix): Likewise.
16711         (pupa_rescue_cmd_set): New function.
16712         (pupa_rescue_cmd_unset): New function.
16713         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16714         split the command line instead of splitting it here.  Added
16715         support for setting variables using the syntax `foo=bar'.  Don't
16716         initialize the prefix command anymore.  Initialized the set and
16717         unset commands.
16718         * normal/cmdline.c: Include <pupa/env.h>.
16719         (pupa_tab_complete): Added prototypes for print_simple_completion,
16720         print_partition_completion, add_completion, iterate_commands,
16721         iterate_dev, iterate_part and iterate_dir. Moved code to print
16722         partition information from here to kern/disk.c.
16723         (pupa_cmdline_run): Don't check if the function exists anymore.
16724         * normal/main.c: Include <pupa/env.h>.
16725         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16726         instead of using pupa_dl_get_prefix to get the prefix.
16727         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16728         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16729         warning.
16730         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16731         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16732         ((unused))' to silence a gcc warning.
16733         (pupa_vga_setcolor): Likewise.
16734         (debug_command): Changed to match argument parsing
16735         interface changes.
16736         * util/pupa-emu.c: Include <pupa/env.h>.
16737         (options): Added 0's for unused fields to silence a gcc warning.
16738         (argp): Likewise.
16739         (main): Use the environment variable `prefix' instead of using
16740         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16741         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16742         and terminal.
16744         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16745         * util/misc.c: Include <malloc.h>.
16746         (pupa_malloc): Rewritten so errors are correctly reported.
16747         (pupa_realloc): Likewise.
16748         (pupa_memalign): Likewise.
16749         (pupa_mm_init_region): Declare unused variables with
16750         `__attribute__ ((unused))' to silence a gcc warning.
16751         * normal/i386/setjmp.S: Remove tab at the end of the file to
16752         silence a gcc warning.
16753         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16754         variables with `__attribute__ ((unused))' to silence a gcc
16755         warning.
16756         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16757         local variable i unsigned to silence a gcc warning.
16759         * kern/term.c: Include <pupa/misc.h>.
16760         (pupa_more_lines): New variable.
16761         (pupa_more): Likewise.
16762         (pupa_putcode): When the pager is active pause at the end of every
16763         screen.
16764         (pupa_set_more): New function.
16765         * include/pupa/term.h (pupa_set_more): New prototype.
16768 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16770         Now this project is GRUB 2 rather than PUPA. The location of
16771         the CVS repository was moved to GRUB's.
16773         * configure.ac: Use bug-grub as the reporting address.
16774         Use GRUB instead of PUPA.
16775         Change the version number to 1.90.
16777 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16779         * genkernsyms.sh: Updated copyright information.
16780         * genmk.rb: Likewise.
16781         * genmodsrc.sh: Likewise.
16782         * gensymlist.sh: Likewise.
16783         * boot/i386/pc/boot.S: Likewise.
16784         * boot/i386/pc/diskboot.S: Likewise.
16785         * disk/i386/pc/biosdisk.c: Likewise.
16786         * disk/i386/pc/partition.c: Likewise.
16787         * font/manager.c: Likewise.
16788         * fs/ext2.c: Likewise.
16789         * fs/fat.c: Likewise.
16790         * include/pupa/boot.h: Likewise.
16791         * include/pupa/device.h: Likewise.
16792         * include/pupa/disk.h: Likewise.
16793         * include/pupa/dl.h: Likewise.
16794         * include/pupa/elf.h: Likewise.
16795         * include/pupa/err.h: Likewise.
16796         * include/pupa/file.h: Likewise.
16797         * include/pupa/font.h: Likewise.
16798         * include/pupa/fs.h: Likewise.
16799         * include/pupa/kernel.h: Likewise.
16800         * include/pupa/loader.h: Likewise.
16801         * include/pupa/misc.h: Likewise.
16802         * include/pupa/mm.h: Likewise.
16803         * include/pupa/net.h: Likewise.
16804         * include/pupa/normal.h: Likewise.
16805         * include/pupa/rescue.h: Likewise.
16806         * include/pupa/setjmp.h: Likewise.
16807         * include/pupa/symbol.h: Likewise.
16808         * include/pupa/term.h: Likewise.
16809         * include/pupa/types.h: Likewise.
16810         * include/pupa/i386/setjmp.h: Likewise.
16811         * include/pupa/i386/types.h: Likewise.
16812         * include/pupa/i386/pc/biosdisk.h: Likewise.
16813         * include/pupa/i386/pc/boot.h: Likewise.
16814         * include/pupa/i386/pc/console.h: Likewise.
16815         * include/pupa/i386/pc/init.h: Likewise.
16816         * include/pupa/i386/pc/kernel.h: Likewise.
16817         * include/pupa/i386/pc/linux.h: Likewise.
16818         * include/pupa/i386/pc/loader.h: Likewise.
16819         * include/pupa/i386/pc/memory.h: Likewise.
16820         * include/pupa/i386/pc/multiboot.h: Likewise.
16821         * include/pupa/i386/pc/partition.h: Likewise.
16822         * include/pupa/i386/pc/time.h: Likewise.
16823         * include/pupa/i386/pc/vga.h: Likewise.
16824         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16825         * include/pupa/util/getroot.h: Likewise.
16826         * include/pupa/util/misc.h: Likewise.
16827         * include/pupa/util/resolve.h: Likewise.
16828         * kern/device.c: Likewise.
16829         * kern/disk.c: Likewise.
16830         * kern/dl.c: Likewise.
16831         * kern/err.c: Likewise.
16832         * kern/file.c: Likewise.
16833         * kern/fs.c: Likewise.
16834         * kern/loader.c: Likewise.
16835         * kern/main.c: Likewise.
16836         * kern/misc.c: Likewise.
16837         * kern/mm.c: Likewise.
16838         * kern/rescue.c: Likewise.
16839         * kern/term.c: Likewise.
16840         * kern/i386/dl.c: Likewise.
16841         * kern/i386/pc/init.c: Likewise.
16842         * kern/i386/pc/lzo1x.S: Likewise.
16843         * kern/i386/pc/startup.S: Likewise.
16844         * loader/i386/pc/chainloader.c: Likewise.
16845         * loader/i386/pc/linux.c: Likewise.
16846         * loader/i386/pc/multiboot.c: Likewise.
16847         * normal/cmdline.c: Likewise.
16848         * normal/command.c: Likewise.
16849         * normal/main.c: Likewise.
16850         * normal/menu.c: Likewise.
16851         * normal/i386/setjmp.S: Likewise.
16852         * term/i386/pc/console.c: Likewise.
16853         * term/i386/pc/vga.c: Likewise.
16854         * util/console.c: Likewise.
16855         * util/genmoddep.c: Likewise.
16856         * util/misc.c: Likewise.
16857         * util/pupa-emu.c: Likewise.
16858         * util/resolve.c: Likewise.
16859         * util/unifont2pff.rb: Likewise.
16860         * util/i386/pc/biosdisk.c: Likewise.
16861         * util/i386/pc/getroot.c: Likewise.
16862         * util/i386/pc/pupa-mkimage.c: Likewise.
16863         * util/i386/pc/pupa-setup.c: Likewise.
16865 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
16867         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
16868         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
16869         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
16870         reading and reset it after reading.
16871         (pupa_ext2_close): Return PUPA_ERR_NONE.
16873         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
16874         Correct value.
16875         (struct linux_kernel_header): Add kernel_version and
16876         initrd_addr_max.
16877         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
16878         pupa_file_read succeeds.
16879         (pupa_rescue_cmd_initrd): Implement.
16881 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
16883         * fs/ext2.c (pupa_ext2_label): New function.
16884         (pupa_ext2_fs): Added label.
16885         * fs/fat.c (pupa_fat_label): New function.
16886         (pupa_fat_fs): Added label.
16887         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
16889         * kern/misc.c (pupa_strndup): New function.
16890         * include/pupa/misc.h (pupa_strndup): New prototype.
16892         * include/pupa/normal.h: Include <pupa/err.h>.
16893         (pupa_set_history): New prototype.
16894         (pupa_iterate_commands): New prototype.
16895         * normal/cmdline.c: Include <pupa/machine/partition.h>,
16896         <pupa/disk.h>, <pupa/file.h>.
16897         (hist_size): New variable.
16898         (hist_lines): Likewise.
16899         (hist_end): Likewise.
16900         (hist_used): Likewise.
16901         (pupa_set_history): New function.
16902         (pupa_history_get): Likewise.
16903         (pupa_history_add): Likewise.
16904         (pupa_history_replace): Likewise.
16905         (pupa_tab_complete): Likewise.
16906         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
16907         completion shows partitionnames while completing partitions, this
16908         feature was suggested by Jeff Bailey.
16909         * normal/command.c (pupa_iterate_commands): New function.
16910         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
16911         (pupa_normal_init): Initialize history buffer.
16912         (PUPA_MOD_INIT): Likewise.
16913         (pupa_normal_fini): Free the history buffer.
16914         (PUPA_MOD_FINI): Likewise.
16916         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
16917         key.
16919         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
16920         * configure.ac [i386]: Check for regparam bug.
16921         (NESTED_FUNC_ATTR) [! i386]: Defined.
16923 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
16925         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
16926         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
16927         (pupa_emu_SOURCES): New variable.
16928         (pupa_emu_LDFLAGS): Likewise.
16929         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
16930         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
16931         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
16932         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16933         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
16934         (pupa_jmp_buf): New typedef.
16935         (pupa_setjmp) [PUPA_UTIL]: New macro.
16936         (pupa_longjmp) [PUPA_UTIL]: Likewise.
16937         * include/pupa/term.h (struct pupa_term): New member `refresh'.
16938         (pupa_refresh): New prototype.
16939         * include/pupa/util/getroot.h: New file.
16940         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
16941         it.
16942         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
16943         (pupa_rescue_cmd_cat): Likewise.
16944         (pupa_rescue_cmd_ls): Likewise.
16945         (pupa_rescue_cmd_testload): Likewise.
16946         (pupa_rescue_cmd_lsmod): Likewise.
16947         * normal/cmdline.c (pupa_cmdline_get): Likewise.
16948         * normal/menu.c (run_menu): Likewise.
16949         * kern/term.c (pupa_cls): Likewise.
16950         (pupa_refresh): New function.
16951         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
16952         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
16953         * util/console.c: New file.
16955         * util/i386/pc/getroot.c: New file.
16956         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
16957         (pupa_putchar): New function.
16958         (pupa_refresh): Likewise.
16959         (xgetcwd): Function moved to ...
16960         (strip_extra_slashes): Likewise.
16961         (get_prefix): Likewise.
16962         * util/i386/pc/getroot.c: ... here.
16963         (find_root_device): Function moved and renamed to...
16964         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
16965         Changed all callers.
16966         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
16967         and renamed to...
16968         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
16969         Changed all callers.
16970         * util/misc.c (pupa_memalign): New function.
16971         (pupa_mm_init_region): Likewise.
16972         (pupa_register_exported_symbols): Likewise.
16973         (pupa_putchar): Function removed.
16974         * util/pupa-emu.c: New file.
16976 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
16978         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
16979         (_multiboot_mod_SOURCES): New variable.
16980         (_multiboot_mod_CFLAGS): Likewise.
16981         * loader/i386/pc/multiboot.c: New file.
16982         * include/pupa/i386/pc/multiboot.h: Likewise.
16983         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
16984         (pupa_multiboot_real_boot): New function.
16985         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
16986         (pupa_multiboot_real_boot): New prototype.
16987         (pupa_rescue_cmd_multiboot): Likewise
16988         (pupa_rescue_cmd_module): Likewise.
16990         * kern/loader.c (pupa_loader_set): Continue when
16991         pupa_loader_unload_func() fails.
16992         (pupa_loader_unset): New function.
16993         * include/pupa/loader.h (pupa_loader_unset): New prototype.
16995         * kern/misc.c (pupa_stpcpy): New function.
16996         * include/pupa/misc.h (pupa_stpcpy): New prototype.
16998 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17000         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17001         for available extensions.
17003         * include/pupa/i386/pc/time.h: New file.
17004         * kern/disk.c: Include <pupa/machine/time.h>.
17005         (PUPA_CACHE_TIMEOUT): New macro.
17006         (pupa_last_time): New variable.
17007         (pupa_disk_open): Flush the cache when there was a timeout.
17008         (pupa_disk_close): Reset the timer.
17009         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17010         pupa_currticks.
17011         * util/misc.c: Include <sys/times.h>
17012         (pupa_get_rtc): New function.
17014 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17016         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17017         as blocks.
17018         (pupa_ext2_get_file_block): Use blocks member.
17020         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17021         first block. Return -1 instead of pupa_errno on error.
17023 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17025         * README: In the pupa-mkimage example use _chain instead of chain
17026         and ext2 instead of fat.
17027         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17028         adding journal playback for ext2fs.
17029         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17030         (pkgdata_MODULES): Added ext2.mod.
17031         (ext2_mod_SOURCES): New variable.
17032         (ext2_mod_CFLAGS): Likewise.
17033         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17034         * include/pupa/misc.h (pupa_strncpy): New prototype.
17035         (pupa_strcat): Likewise.
17036         (pupa_strncmp): Likewise.
17037         * kern/misc.c (pupa_strcat): Enable function.
17038         (pupa_strncpy): New function.
17039         (pupa_strncmp): Likewise.
17040         * fs/ext2.c: New file.
17042         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17043         when the read failed before retrying.
17044         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17045         (_FILE_OFFSET_BITS): Likewise.
17046         * configure.ac: Added AC_SYS_LARGEFILE.
17048 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17050         * genmk.rb (PModule#rule): Make sure to get only symbol names
17051         from the output of nm.
17052         Reported by Robert Millan <zeratul2@wanadoo.es>.
17054 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17056         I forgot to check in these changes for a long time. This adds
17057         incomplete support for VGA console, and this is still very
17058         buggy. Also, a lot of consideration is required for I18N,
17059         UNICODE, and VGA font issues. Therefore, assume that this is
17060         such that "better than nothing".
17062         * font/manager.c: New file.
17063         * include/pupa/font.h: Likewise.
17064         * include/pupa/i386/pc/vga.h: Likewise.
17065         * term/i386/pc/vga.c: Likewise.
17066         * util/unifont2pff.rb: Likewise.
17068         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17069         (pkgdata_MODULES): Added vga.mod and font.mod.
17070         (vga_mod_SOURCES): New variables.
17071         (vga_mod_CFLAGS): Likewise.
17072         (font_mod_SOURCES): Likewise.
17073         (font_mod_CFLAGS): Likewise.
17075         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17077         * include/pupa/term.h: Include pupa/err.h.
17078         (struct pupa_term): Added init and fini.
17079         Changed the argument of putchar to pupa_uint32_t.
17081         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17082         (pupa_console_real_putchar): New prototype.
17083         (pupa_console_putchar): Removed.
17084         (pupa_console_checkkey): Exported.
17085         (pupa_console_getkey): Likewise.
17087         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17088         characters.
17090         * kern/term.c (pupa_term_set_current): Rewritten.
17091         (pupa_putchar): Likewise.
17092         (pupa_putcode): New function.
17094         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17095         (pupa_console_real_putchar): ... this.
17096         (pupa_vga_set_mode): New function.
17097         (pupa_vga_get_font): Likewise.
17099         * normal/command.c: Include pupa/term.h.
17100         (terminal_command): New function.
17101         (pupa_command_init): Register the command "terminal".
17103         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17104         (DISP_UP): Likewise.
17105         (DISP_RIGHT): Likewise.
17106         (DISP_DOWN): Likewise.
17107         (DISP_HLINE): Likewise.
17108         (DISP_VLINE): Likewise.
17109         (DISP_UL): Likewise.
17110         (DISP_UR): Likewise.
17111         (DISP_LL): Likewise.
17112         (DISP_LR): Likewise.
17114         * term/i386/pc/console.c (pupa_console_putchar): New function.
17116 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17118         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17119         FIX. Reverse the path_list.
17121         * include/pupa/normal.h: Export pupa_register_command and
17122         pupa_unregister_command.
17124         * hello/hello.c (pupa_cmd_hello): New module.
17125         * conf/i386-pc.rmk: Added hello.mod.
17127 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17129         * kern/i386/pc/lzo1x.S: New file.
17131         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17132         (compress_kernel): New variable.
17133         (generate_image): Heavily modified to support compressing a
17134         large part of the core image.
17136         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17137         leak.
17138         (pupa_util_load_image): New function.
17140         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17141         (pupa_compressed_size): New variable.
17142         (codestart): Enable Gate A20 here.
17143         Decompress the compressed part of the core image.
17144         Rearrange the code to put functions and variables which are
17145         required for initialization in the non-compressed part.
17146         Include lzo1x.S.
17148         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17149         here.
17151         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17153         * include/pupa/i386/pc/kernel.h
17154         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17155         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17156         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17157         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17158         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17160         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17162         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17163         (Utility#rule): Likewise.
17165         * configure.ac: Check if LZO is available.
17167 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17169         * include/pupa/normal.h: New file.
17170         * include/pupa/setjmp.h: Likewise.
17171         * include/pupa/i386/setjmp.h: Likewise.
17172         * normal/cmdline.c: Likewise.
17173         * normal/command.c: Likewise.
17174         * normal/main.c: Likewise.
17175         * normal/menu.c: Likewise.
17176         * normal/i386/setjmp.S: Likewise.
17178         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17179         (pupa_rescue_cmd_initrd): Likewise.
17181         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17182         Likewise.
17184         * kern/i386/pc/startup.S (translation_table): New variable.
17185         (translate_keycode): New function.
17186         (pupa_console_getkey): Call translate_keycode.
17188         * kern/rescue.c (attempt_normal_mode): New function.
17189         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17190         it failed, print a message.
17192         * kern/mm.c (pupa_real_malloc): Print more information when a
17193         free magic is broken.
17194         (pupa_free): If the first free header is not free actually, set
17195         it to P.
17197         * kern/main.c (pupa_load_normal_mode): Just load the module
17198         "normal".
17199         (pupa_main): Don't print the message
17200         "Entering into rescue mode..." here.
17202         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17203         Declared.
17204         (pupa_rescue_cmd_initrd): Likewise.
17205         (pupa_rescue_cmd_initrd): Likewise.
17207         * include/pupa/symbol.h (FUNCTION): Specify the type.
17208         (VARIABLE): Likewise.
17210         * include/pupa/err.h (pupa_err_t): Added
17211         PUPA_ERR_UNKNOWN_COMMAND.
17213         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17214         (pupa_dl_get_prefix): Likewise.
17216         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17217         Added _chain.mod and _linux.mod instead of chain.mod and
17218         linux.mod.
17219         (chain_mod_SOURCES): Renamed to ...
17220         (_chain_mod_SOURCES): ... this.
17221         (chain_mod_CFLAGS): Renamed to ...
17222         (_chain_mod_CFLAGS): ... this.
17223         (linux_mod_SOURCES): Renamed to ...
17224         (_linux_mod_SOURCES): ... this.
17225         (linux_mod_CFLAGS): Renamed to ...
17226         (_linux_mod_CFLAGS): ... this.
17227         (normal_mod_SOURCES): New variable.
17228         (normal_mod_CFLAGS): Likewise.
17229         (normal_mod_ASFLAGS): Likewise.
17231 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17233         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17234         possible.
17236         * kern/dl.c (pupa_dl_ref): Refer depending modules
17237         recursively.
17238         (pupa_dl_unref): Unrefer depending modules recursively.
17239         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17240         a module is unloaded before one depending on that module is
17241         unloaded.
17242         (pupa_dl_unload): Unload depending modules explicitly,
17243         if possible.
17245 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17247         * include/pupa/i386/pc/linux.h: New file.
17248         * loader/i386/pc/linux.c: Likewise.
17250         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17251         Removed.
17252         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17253         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17254         of PUPA_CHAINLOADER_BOOT_SECTOR.
17256         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17257         (pupa_linux_prot_size): New variable.
17258         (pupa_linux_tmp_addr): Likewise.
17259         (pupa_linux_real_addr): Likewise.
17260         (pupa_linux_boot_zimage): New function.
17261         (pupa_linux_boot_bzimage): Likewise.
17263         * kern/i386/pc/init.c (struct mem_region): New structure.
17264         (MAX_REGIONS): New macro.
17265         (mem_regions): New variable.
17266         (num_regions): Likewise.
17267         (pupa_os_area_addr): Likewise.
17268         (pupa_os_area_size): Likewise.
17269         (pupa_lower_mem): Likewise.
17270         (pupa_upper_mem): Likewise.
17271         (add_mem_region): New function.
17272         (compact_mem_regions): Likewise.
17273         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17274         the size of the conventional memory and that of so-called upper
17275         memory (before the first memory hole).
17276         Instead of adding each found region to free memory, use
17277         add_mem_region and add them after removing overlaps.
17278         Also, add only 1/4 of the upper memory to free memory. The rest
17279         is used for loading OS images. Maybe this is ad hoc, but this
17280         makes it much easier to relocate OS images when booting.
17282         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17283         (pupa_enter_rescue_mode): Don't register initrd and module.
17285         * kern/mm.c: Include pupa/dl.h.
17287         * kern/main.c: Include pupa/file.h and pupa/device.h.
17289         * kern/loader.c (pupa_loader_load_module_func): Removed.
17290         (pupa_loader_load_module): Likewise.
17292         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17293         ``.o''.
17295         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17296         (pupa_linux_tmp_addr): Likewise.
17297         (pupa_linux_real_addr): Likewise.
17298         (pupa_linux_boot_zimage): Likewise.
17299         (pupa_linux_boot_bzimage): Likewise.
17301         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17302         (pupa_upper_mem): Likewise.
17303         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17304         module is too dangerous.
17306         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17307         (pupa_os_area_size): Likewise.
17308         (pupa_loader_set): Remove the first argument. Loader doesn't
17309         manage modules or initrd any longer.
17310         (pupa_loader_load_module): Removed.
17312         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17313         (linux_mod_SOURCES): New variable.
17314         (linux_mod_CFLAGS): Likewise.
17316 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17318         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17319         the length of a blocklist correctly.
17321         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17322         Use ioctl only if the OS file is a block device.
17323         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17324         not very useful for normal files.
17326         * kern/main.c (pupa_set_root_dev): New function.
17327         (pupa_load_normal_mode): Likewise.
17328         (pupa_main): Call those above.
17330         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17331         pupa_uint16_t.
17333         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17335 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17337         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17338         (setup): Configure the installed partition information and the
17339         dl prefix.
17341         * loader/i386/pc/chainloader.c (my_mod): New variable.
17342         (pupa_chainloader_unload): New function.
17343         (pupa_rescue_cmd_chainloader): Refer itself.
17344         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17346         * kern/i386/pc/startup.S (install_partition): Removed.
17347         (version_string): Likewise.
17348         (config_file): Likewise.
17349         (pupa_install_dos_part): New variable.
17350         (pupa_install_bsd_part): Likewise.
17351         (pupa_prefix): Likewise.
17352         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17354         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17355         and pupa/misc.h.
17356         (make_install_device): New function.
17357         (pupa_machine_init): Set the dl prefix.
17359         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17360         (buf): Renamed to ...
17361         (linebuf): ... this.
17362         (pupa_rescue_cmd_prefix): New function.
17363         (pupa_rescue_cmd_insmod): Likewise.
17364         (pupa_rescue_cmd_rmmod): Likewise.
17365         (pupa_rescue_cmd_lsmod): Likewise.
17366         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17367         rmmod and lsmod.
17369         * kern/mm.c (pupa_memalign): If failed even after invalidating
17370         disk caches, unload unneeded modules and retry.
17372         * kern/misc.c (pupa_memmove): New function.
17373         (pupa_memcpy): Removed.
17374         (pupa_strcpy): New function.
17375         (pupa_itoa): Made static.
17377         * kern/dl.c (pupa_dl_iterate): New function.
17378         (pupa_dl_ref): Likewise.
17379         (pupa_dl_unref): Likewise.
17380         (pupa_dl_unload): Return if succeeded or not.
17381         (pupa_dl_unload_unneeded): New function.
17382         (pupa_dl_unload_all): Likewise.
17383         (pupa_dl_init): Renamed to ...
17384         (pupa_dl_set_prefix): ... this.
17385         (pupa_dl_get_prefix): New function.
17387         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17388         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17389         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17390         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17391         (pupa_install_dos_part): Declared.
17392         (pupa_install_bsd_part): Likewise.
17393         (pupa_prefix): Likewise.
17394         (pupa_boot_drive): Likewise.
17396         * include/pupa/types.h: Fix a typo.
17398         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17399         pupa_memmove.
17400         (pupa_memmove): Declared.
17401         (pupa_strcpy): Likewise.
17403         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17404         pupa_mod_init takes one argument, its own module.
17405         (pupa_dl_unload_unneeded): Declared.
17406         (pupa_dl_unload_all): Likewise.
17407         (pupa_dl_ref): Likewise.
17408         (pupa_dl_unref): Likewise.
17409         (pupa_dl_iterate): Likewise.
17410         (pupa_dl_init): Renamed to ...
17411         (pupa_dl_set_prefix): ... this.
17412         (pupa_dl_get_prefix): Declared.
17414         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17415         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17416         unloaded.
17417         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17418         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17420         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17421         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17423 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17425         * util/i386/pc/pupa-setup.c (setup): Define the internal
17426         function find_first_partition_start at the top level, because GCC
17427         3.0.x cannot compile internal functions in deeper scopes
17428         correctly.
17429         (find_root_device): Use lstat instead of stat.
17430         Don't follow symbolic links.
17431         Fix the path-constructing code.
17433         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17434         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17435         by a BLKGETSIZE ioctl first, because block devices don't fill
17436         the member st_mode of the structure stat on Linux.
17437         [__linux__] (linux_find_partition): Use a temporary buffer
17438         REAL_DEV for the working space. Copy it to DEV before returning.
17439         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17440         buffer cache consistent.
17441         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17442         strncmp. The previous value was merely wrong.
17443         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17445         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17446         FAT size is 12. The previous value was merely wrong.
17448         * kern/main.c (pupa_main): Don't split the starting message from
17449         newlines.
17451         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17452         LF, because BIOS goes crazy about character attributes in this
17453         case.
17455 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17457         * include/i386/pc/util/biosdisk.h: New file.
17458         * util/i386/pc/biosdisk.c: Likewise.
17459         * util/i386/pc/pupa-setup.c: Likewise.
17461         * Makefile.in (INCLUDE_DISTFILES): Added
17462         include/pupa/i386/pc/util/biosdisk.h.
17463         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17464         directory util/i386/pc.
17465         (install-local): Added a rule for sbin_UTILITIES.
17466         (uninstall): Likewise.
17468         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17470         * util/misc.c (xrealloc): New function.
17471         (pupa_malloc): Likewise.
17472         (pupa_free): Likewise.
17473         (pupa_realloc): Likewise.
17474         (pupa_stop): Likewise.
17475         (pupa_putchar): Likewise.
17477         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17479         * include/pupa/util/misc.h (xrealloc): Declared.
17481         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17482         macro.
17483         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17484         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17486         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17487         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17489         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17490         way should be implemented.
17491         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17493         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17494         the size of NAME for safety.
17495         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17496         0x88.
17498         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17499         (pupa_setup_SOURCES): Likewise.
17501         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17503 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17505         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17506         bunch of pushl's from pusha, because this destroys the return
17507         value.
17509 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17511         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17512         This means that any missing prototypes could be fatal. Also, you
17513         must take care when writing assembly code. See the comments at
17514         the beginning of startup.S, for more details.
17516         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17517         compilation mechanism.
17518         (pupa_chainloader_real_boot): Likewise.
17519         (pupa_biosdisk_rw_int13_extensions): Likewise.
17520         (pupa_biosdisk_rw_standard): Likewise.
17521         (pupa_biosdisk_check_int13_extensions): Likewise.
17522         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17523         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17524         (pupa_get_memsize): Likewise.
17525         (pupa_get_mmap_entry): Likewise.
17526         (pupa_console_putchar): Likewise.
17527         (pupa_console_setcursor): Likewise.
17528         (pupa_getrtsecs): Use pushl instead of push.
17530         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17531         memory instead of the stack for a mmap entry, because some
17532         BIOSes may ignore the maximum size and overflow.
17534         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17536         * genmk.rb (PModule#rule): Compile automatically generated
17537         sources with module-specific CFLAGS as well as other sources.
17539 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17541         * configure.ac: Check ld.
17542         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17543         respectively, before checking endianness and sizes.
17545         * Makefile.in (LD): New variable.
17547 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17549         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17551 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17553         * Changelog: New file.