Fix hang/crash when requesting ZPOOL with incorrect backing device
[grub2/phcoder.git] / ChangeLog
blob4a1e7b702d6b5cb411e2598cce768a57c8ac47e9
1 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
3         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
4         grub_raid_register
5         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
7 2009-06-19  Pavel Roskin  <proski@gnu.org>
9         * configure.ac: Remove stray AC_MSG_CHECKING.
11 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
13         * disk/scsi.c (grub_scsi_open): use continue instead of big if
15 2009-06-18  Pavel Roskin  <proski@gnu.org>
17         * conf/common.rmk: Add fs_file.mod.
18         * disk/fs_file.c: New file.
19         * include/grub/disk.h (enum grub_disk_dev_id): Add
20         GRUB_DISK_DEVICE_FILE_ID.
22 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
24         Fix build with Apple's toolchain. Part 2
26         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
27         a fake start
29 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
31         Fix build with Apple's toolchain. Part 1
33         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
34         for long calls
35         * configure.ac: remove a leftover AC_MSG_RESULT
36         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
37         Apple's toolchain
39 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
41         Fix warnings
43         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
44         (decomp_block): initialize ch
45         use grub_memcpy instead of memcpy
47 2009-06-17  Pavel Roskin  <proski@gnu.org>
49         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
50         version, use declarations needed to use vga_text as the startup
51         console.
53         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
54         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
55         the kernel.
56         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
57         and grub_at_keyboard_fini(), it's done on module load and
58         unload.
60 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
62         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
63         file can't be found.
64         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
66 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
68         Fix newline handling
70         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
71         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
72         (grub_script_yylex): don't segfault on unterminated script
73         newline terminates command and variable
75 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
77         avoid double grub_adjust_range call. Bug reported by David Simner
79         * kern/disk.c (grub_disk_write): change to raw disk access before
80         calling disk_read
82 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
84         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
85         spaces, for the benefit of help2man.
86         * util/i386/efi/grub-mkimage.c (usage): Likewise.
88 2009-06-16  Pavel Roskin  <proski@gnu.org>
90         * kern/i386/halt.c: Include grub/machine/init.h.
91         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
93 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
95         * util/grub.d/30_os-prober.in: Use ${root} in the generated
96         drivemap menuentry.
98 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
100         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
101         `echo' command.
103 2009-06-16  Pavel Roskin  <proski@gnu.org>
105         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
106         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
107         save %dx, we only need %dl and we never change it.
108         * boot/i386/pc/cdboot.S: Don't set the root drive.
109         * boot/i386/pc/pxeboot.S: Likewise.
110         * include/grub/i386/pc/boot.h: Remove
111         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
112         GRUB_BOOT_MACHINE_DRIVE_CHECK.
113         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
114         * kern/i386/pc/init.c (make_install_device): Remove references
115         to grub_root_drive.
116         * kern/i386/pc/startup.S: Likewise.
117         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
119 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
121         xnu_uuid command
123         * commands/xnu_uuid.c: new file
124         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
125         (xnu_uuid_mod_SOURCES): new variable
126         (xnu_uuid_mod_CFLAGS): likewise
127         (xnu_uuid_mod_LDFLAGS): likewise
128         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
129         * conf/i386-ieee1275.rmk: likewise
130         * conf/i386-pc.rmk: likewise
131         * conf/powerpc-ieee1275.rmk: likewise
132         * conf/sparc64-ieee1275.rmk: likewise
133         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
135 2009-06-16  Pavel Roskin  <proski@gnu.org>
137         * configure.ac: Avoid '==' in test command, it's not portable.
139 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
141         Probe command
143         * commands/probe.c: new file
144         * conf/common.rmk (pkglib_MODULES): add probe.mod
145         (probe_mod_SOURCES): new variable
146         (probe_mod_CFLAGS): likewise
147         (probe_mod_LDFLAGS): likewise
148         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
149         * conf/i386-ieee1275.rmk: likewise
150         * conf/i386-pc.rmk: likewise
151         * conf/powerpc-ieee1275.rmk: likewise
152         * conf/sparc64-ieee1275.rmk: likewise
154 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
156         Fix handling of string like \"hello\" and "a
157         b"
159         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
160         (grub_script_yylex): fix parsing of quoting, escaping and newline
162 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
164         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
165         handling
167 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
169         * util/grub-mkconfig.in: Fix parsing of --output option.
171 2009-06-12  Pavel Roskin  <proski@gnu.org>
173         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
174         genmk.rb don't need to be generated or installed.
176 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
178         * commands/i386/pc/drivemap_int13h.S: add more comments
180 2009-06-11  Pavel Roskin  <proski@gnu.org>
182         * Makefile.in (uninstall): Uninstall manuals.
184         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
185         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
186         and update-grub_lib in two places.
187         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
189         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
190         a compiler warning.
192         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
193         `entry_lo' to fix variable shadowing.
195 2009-06-11  Christian Franke  <franke@computer.org>
197         * kern/misc.c (__enable_execute_stack): Add missing return type
198         to prevent gcc warning.
200 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
202         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
204 2009-06-11  Pavel Roskin  <proski@gnu.org>
206         * Makefile.in: Don't rely on any scripts being executable.
207         Always use $(SHELL) to run shell scripts.
209         * configure.ac: Always define ___main if using -nostdlib.  This
210         fixes tests on Cygwin.
212 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
214         UDF fix
216         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
217         is in bytes and not in blocks
219 2009-06-11  Pavel Roskin  <proski@gnu.org>
221         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
222         warning.
224 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
226         * util/grub.d/30_os-prober.in: Fix a comment. Source
227         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
228         to set the root device.  Place drivemap command in the generated
229         chain entry.
231 2009-06-11  Pavel Roskin  <proski@gnu.org>
233         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
234         have long been resolved.
236 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
238         * util/grub.d/10_linux.in: Capitalise "Linux".
240         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
242 2009-06-11  Pavel Roskin  <proski@gnu.org>
244         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
245         fix a gcc warning and ensure that the function won't ever exit.
247         * kern/i386/ieee1275/init.c: Add missing prototype for
248         grub_stop_floppy().
250         * loader/ieee1275/multiboot2.c [__i386__]: Include
251         grub/cpu/multiboot.h.
253         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
254         casts to short - they are not portable and cause warnings.  Fix
255         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
257 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
259         Drivemap fixes
261         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
262         new function
263         (grub_get_root_biosnumber_saved): new variable
264         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
265         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
266         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
267         %dx after the call if necessary
268         * conf/common.rmk (pkglib_MODULES): remove boot.mod
269         (boot_mod_SOURCES): remove
270         (boot_mod_CFLAGS): remove
271         (boot_mod_LDFLAGS): remove
272         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
273         (boot_mod_SOURCES): new variable
274         (boot_mod_CFLAGS): likewise
275         (boot_mod_LDFLAGS): likewise
276         * conf/i386-efi.rmk: likewise
277         * conf/i386-ieee1275.rmk: likewise
278         * conf/i386-pc.rmk: likewise
279         * conf/powerpc-ieee1275.rmk: likewise
280         * conf/sparc64-ieee1275.rmk: likewise
281         * conf/x86_64-efi.rmk: likewise
282         * include/grub/i386/pc/biosnum.h: new file
283         * lib/i386/pc/biosnum.c: likewise
284         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
285         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
286         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
288 2009-06-10  Pavel Roskin  <proski@gnu.org>
290         * io/gzio.c (test_header): Don't reuse one buffer for all data.
291         Use separate variables.  Read only the file size at the end, but
292         not the checksum that we don't use.
294         * kern/file.c (grub_file_read): Use void pointer for the buffer.
295         Adjust all callers.
297         * kern/ieee1275/openfw.c: Remove libc includes.
298         * kern/ieee1275/cmain.c: Likewise.
299         * include/grub/ieee1275/ieee1275.h: Likewise.
301         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
302         compiler warnings.
304 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
306         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
307         `genparttoollist.sh'.
308         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
309         Add `*.sh' to the list find searches for and change `mdate.sh'
310         to `mdate-sh'.
312 2009-06-10  Pavel Roskin  <proski@gnu.org>
314         * include/grub/multiboot2.h: Provide compatibility defines for
315         multiboot2.h.
316         * include/multiboot2.h: Include stdint.h only if needed, using
317         angle brackets.
318         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
319         grub/multiboot2.h.
320         * loader/ieee1275/multiboot2.c: Likewise.
321         * loader/multiboot2.c: Likewise.
322         * loader/multiboot_loader.c: Likewise.
324         * configure.ac: Use -nostdlib when probing for the target.  It
325         should not be required to have libc for the target.
327         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
328         they fail without libc headers for the target.
329         * include/grub/powerpc/libgcc.h: Use weak attribute for all
330         exports.
331         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
332         preprocessor conditionals.
334         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
335         build system doesn't need to be aware of the tar.c internals.
337 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
339         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
341 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
343         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
344         disk limit to 26 for IDE, Virtio, Xen and SCSI.
346 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
348         * util/i386/pc/grub-install.in: Change the error message if UUIDs
349         aren't available if ata.mod gets used.
351 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
353         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
354         initialising controller.
355         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
357 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
359         * util/i386/pc/grub-install.in: Add a parameter --disk-module
360         to choose between ata and biosdisk module on i386-pc.
362 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
364         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
365         Subclass and Programming Interface fields in terms of the 3 byte
366         Class Code register.
367         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
369         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
370         interface is OHCI.  Add grub_dprintf for symmetry with
371         bus/usb/uhci.c.
372         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
373         interface is UHCI.  Add interf variable for programming
374         interface.  Print interface with class/subclass.
376         * bus/usb/ohci.c: Set interf with correct field.
378         * bus/usb/uhci.c: Remove unneeded doubled lines.
379         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
380         Remove whitespace inside comment.
382 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
384         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
385         as fallback an equivalent option without depth.
387 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
389         Not fail if unable to retrieve C/H/S on LBA disks
391         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
392         if unable to retrieve C/H/S on LBA disks
394 2009-06-08  Pavel Roskin  <proski@gnu.org>
396         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
397         about aliasing.
399 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
401         * Makefile.in (uninstall): Remove all $lib_DATA files.
403 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
405         Bugfix: install on partitionless device
407         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
408         is a whole disk
410 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
412         * Makefile.in (uninstall): Remove all $include_DATA files.
414 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
416         * commands/true.c: New file.  Implement the true and false commands.
417         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
418         (true_mod_SOURCES): New variable.
419         (true_mod_CFLAGS): Likewise.
420         (true_mod_LDFLAGS): Likewise.
422 2009-06-05  Colin D Bennett  <colin@gibibit.com>
424         Optimized font character lookup using binary search instead of linear
425         search.  Fonts now are required to have the character index ordered by
426         code point.
428         * font/font.c (load_font_index): Verify that fonts have ordered
429         character indices.
430         (find_glyph): Use binary search instead of linear search to find a
431         character in a font.
433 2009-06-05  Michael Scherer  <misc@mandriva.org>
435         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
436         uses case sensitive btree.
437         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
438         only for case insensitive filesystems.
440 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
442         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
443         * conf/common.rmk (search_mod_CFLAGS): likewise
445 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
447         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
448         compensate a compiler bug
450 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
452         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
453         instead of '\b'
455 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
457         Definitions for creating asm symbols with Apple's CC
459         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
460         [APPLE_CC] (VARIABLE): likewise
462 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
464         Disable lnxboot.img when compiled
465         with Apple's CC
467         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
468         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
469         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
470         [! APPLE_CC] (CODE_LENG): skip
471         [! APPLE_CC] (setup_sects): likewise
472         [! APPLE_CC]: skip filling
474 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
476         Address in trampolines based on 32-bit registers when compiled
477         with Apple's CC
479         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
480         for addresses
481         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
483 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
485         Avoid aliases when compiling with Apple's CC for PCBIOS machine
487         * kern/misc.c [APPLE_CC] (memcpy): new function
488         [APPLE_CC] (memmove): likewise
489         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
490         (memcpy): define alias conditionally on !APPLE_CC
491         (memset): likewise
492         (abort): likewise
493         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
494         APPLE_CC are defined
495         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
496         (grub_assert_fail): make prototype conditional
498 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
500         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
502         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
503         grub-macho2img
504         (CLEANFILES): add grub-macho2img
505         (grub_macho2img_SOURCES): new variable
506         * kern/i386/pc/startup.S (bss_start): new variable
507         (bss_end): likewise
508         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
509         * util/grub-macho2img.c: new file
511 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
513         Use objconv when compiling with Apple's CC
515         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
516         (efiemu64.o): likewise
517         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
518         when compiling with Apple's CC
519         (efiemu64_s.o): likewise
520         * configure.ac: check for objconv when compiling with Apple's CC
521         * genmk.rb: use objconv for modules when compiled with Apple's CC
523 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
525         Define segment as well as section when compiling with
526         Apple's CC
528         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
529         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
530         (efiemu_convert_pointer): likewise
531         (efiemu_set_virtual_address_map): likewise
532         (efiemu_convert_pointer): likewise
533         (efiemu_getcrc32): likewise
534         (init_crc32_table): likewise
535         (reflect): likewise
536         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
537         (GRUB_MOD_DEP): likewise
539 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
541         Allow a compilation without -mcmodel=large
543         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
544         when compiled without -mcmodel=large
545         (filter_memory_map): remove memory post 4 GiB when compiled
546         without -mcmodel=large
547         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
548         TARGET_CFLAGS when -mcmodel=large isn't supported
550 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
552         Remove nested functions in efiemu core
554         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
556 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
558         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
560         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
561         temporary storage
562         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
563         using Apple's CC
564         (grub_cpu_is_tsc_supported): likewise
565         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
567 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
569         Absolute addressing through constant with Apple's cc
571         * kern/i386/pc/startup.S: Define necessary constants
572         and address through it when using ABS with Apple's CC
573         * boot/i386/pc/diskboot.S: likewise
574         * boot/i386/pc/boot.S: likewise
575         * boot/i386/pc/lnxboot.S: likewise
576         * boot/i386/pc/cdboot.S: likewise
577         * mmap/i386/pc/mmap_helper.S: likewise
578         * commands/i386/pc/drivemap_int13h.S: likewise
580 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
582         Check if compiler is apple cc
584         * Makefile.in (ASFLAGS): new variable
585         (TARGET_ASFLAGS): likewise
586         (TARGET_MODULE_FORMAT): likewise
587         (TARGET_APPLE_CC): likewise
588         (OBJCONV): likewise
589         (TARGET_IMG_CFLAGS): likewise
590         (TARGET_CPPFLAGS): add includedir
591         * configure.ac: call grub_apple_cc and grub_apple_target_cc
592         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
593         Check for linker script only if compiler isn't Apple's CC
594         (TARGET_MODULE_FORMAT): set
595         (TARGET_APPLE_CC): likewise
596         (TARGET_ASFLAGS): likewise
597         (ASFLAGS): likewise
598         Check for objcopy only if compiler isn't Apple's CC
599         Check for BSS symbol only if compiler isn't Apple's CC
600         * genmk.rb: adapt nm options if we use Apple's utils
601         * aclocal.m4 (grub_apple_cc): new test
602         (grub_apple_target_cc): likewise
604 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
606         Simplify sed expressions and improve awk
608         * Makefile.in (install-local): simplify sed expression
609         * gencmdlist.sh: likewise
610         * genmoddep.awk: avoid adding module as a dependency of itself
612 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
614         Add missing start symbols
616         * boot/i386/pc/boot.S: add start
617         * boot/i386/pc/pxeboot.S: likewise
619 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
621         Fix wrong assumptions with grub-mkimage on EFI
623         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
624         (relocate_addresses): consider both r_addend and value at offset
625         (make_mods_section): zerofill modinfo and header
626         (convert_elf): write prefix here
628 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
630         Use .asciz instead of .string
632         * i386/pc/diskboot.S: use .asciz instead of .string
633         * i386/pc/boot.S: likewise
634         * include/grub/dl.h (GRUB_MOD_DEP): likewise
635         (GRUB_MOD_NAME): likewise
637 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
639         gfxpayload support
641         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
642         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
643         (grub_video_setup): remove
644         (grub_video_set_mode): new prototype
645         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
646         (vid_mode): remove
647         (linux_vesafb_res): compile only on PCBIOS
648         (grub_linux_boot): support gfxpayload
649         * loader/i386/pc/xnu.c (video_hook): new function
650         (grub_xnu_set_video): support gfxpayload
651         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
652         (DEFAULT_VIDEO_HEIGHT): likewise
653         (DEFAULT_VIDEO_FLAGS): likewise
654         (DEFAULT_VIDEO_MODE): new definition
655         (video_hook): new function
656         (grub_gfxterm_init): use grub_video_set_mode
657         * util/grub.d/30_os-prober.in: remove explicit modesetting before
658         loading xnu
659         * video/video.c (grub_video_setup): removed
660         (grub_video_set_mode): new function based on grub_gfxterm_init and
661         grub_video_setup
663 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
665         Avoid calling biosdisk in drivemap
667         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
668         (revparse_biosdisk): likewise
669         (list_mappings): derive name from id directly
670         (grub_cmd_drivemap): use tryparse_diskstring
672 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
674         Script fixes
676         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
677         (grub_lexer_param): add tokenonhold
678         (grub_script_create_cmdline): remove cmdline. All callers updated
679         (grub_script_function_create): make functionname
680         grub_script_arg. All callers updated
681         (grub_script_execute_argument_to_string): new prototype
682         * kern/parser.c (state_transitions): reorder
683         (grub_parser_cmdline_state): fix a bug and make more compact
684         * script/sh/execute.c (grub_script_execute_argument_to_string):
685         make global
686         (grub_script_execute_cmdline): use new format
687         * script/sh/function.c (grub_script_function_create): make functionname
688         grub_script_arg. All callers updated
689         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
690         (grub_script_yylex): remove
691         (grub_script_yylex2): renamed to ...
692         (grub_script_yylex): ...renamed
693         parse the expressions like a${b}c
694         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
695         (GRUB_PARSER_TOKEN_VAR): remove
696         (GRUB_PARSER_TOKEN_NAME): likewise
697         ("if"): declare as typeless
698         ("while"): likewise
699         ("function"): likewise
700         ("else"): likewise
701         ("then"): likewise
702         ("fi"): likewise
703         (text): remove
704         (argument): likewise
705         (script): accept empty scripts and make exit on error
706         (arguments): use GRUB_PARSER_TOKEN_ARG
707         (function): likewise
708         (command): move error handling to script
709         (menuentry): move grub_script_lexer_ref before
710         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
711         argument. All callers updated
713 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
715         Prevent GRUB from probing floppies during boot.
717         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
718         * commands/search.c (options): Add --no-floppy.
719         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
720         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
721         --no-floppy when searching for UUIDs.
723 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
725         Simplify the code duplication in commands/search.c.
727         * commands/search.c (search_label, search_fs_uuid): Merge into ...
728         (search_fs): ... this.  Update all users.
730 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
732         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
734 2009-05-28  Pavel Roskin  <proski@gnu.org>
736         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
737         Remove the original symlink explicitly.
739         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
740         just one slash.  That's how grub_fshelp_find_file() does it.
742 2009-05-26  Pavel Roskin  <proski@gnu.org>
744         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
745         to `str'.
747         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
748         possibly unused.
750 2009-05-25  Christian Franke  <franke@computer.org>
752         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
753         register.
754         (grub_atapi_identify): Add wait after drive select.
755         (grub_ata_identify): Do more strict status register check before
756         calling grub_atapi_identify ().  Suppress error message if status
757         register is 0x00 after command failure.  Add status register
758         check after PIO read to avoid bogus identify due to stuck DRQ.
759         Thanks to Pavel Roskin for testing.
760         (grub_device_initialize): Remove unsafe status register check.
761         Thanks to 'phcoder' for problem report and patch.
762         Prevent sign extension in debug message.
764 2009-05-23  Colin D Bennett  <colin@gibibit.com>
766         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
767         definition file, and functions defined in `normal/menu.c' have had
768         their prototypes moved to `include/grub/menu.h' for consistency.
770         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
771         from normal.h.
772         (grub_menu_get_entry): Likewise.
773         (grub_menu_get_timeout): Likewise.
774         (grub_menu_set_timeout): Likewise.
775         (grub_menu_execute_entry): Likewise.
776         (grub_menu_execute_with_fallback): Likewise.
777         (grub_menu_entry_run): Likewise.
779         * include/grub/normal.h: Re-ordered and grouped function
780         prototypes by file that the function is defined in.
781         (grub_menu_execute_callback): Removed; moved to menu.h.
782         (grub_menu_get_entry): Likewise.
783         (grub_menu_get_timeout): Likewise.
784         (grub_menu_set_timeout): Likewise.
785         (grub_menu_execute_entry): Likewise.
786         (grub_menu_execute_with_fallback): Likewise.
787         (grub_menu_entry_run): Likewise.
788         (grub_menu_addentry): Renamed from this ...
789         (grub_normal_add_menu_entry): ... to this.
791         * normal/main.c (grub_menu_addentry): Renamed from this ...
792         (grub_normal_add_menu_entry): ... to this.
794         * script/sh/execute.c (grub_script_execute_menuentry): Update
795         reference to renamed grub_menu_addentry function.
797 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
799         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
801 2009-05-22  Pavel Roskin  <proski@gnu.org>
803         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
804         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
805         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
806         compiling for the i386 targets, but not for the utilities.
808         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
809         to grub_uint8_t.
810         (grub_root_drive): Likewise.
811         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
812         remove alignment.
813         (grub_root_drive): Change size to byte.
814         (grub_start_addr): Remove.
815         (grub_end_addr): Likewise.
816         (grub_apm_bios_info): Likewise.
818 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
820         * normal/i386: Remove.
821         * normal/powerpc: Likewise.
822         * normal/sparc64: Likewise.
823         * normal/x86_64: Likewise.
825 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
827         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
828         * loader/i386/linux_trampoline.S: Fix indentation
829         * loader/i386/xnu_helper.S: Likewise
831 2009-05-18  Colin D Bennett  <colin@gibibit.com>
833         Display error messages when parsing a Lua statement fails.
834         Previously, executing a syntactically invalid statement like
835         ")foo" or "bar;" would silently fail.
837         * script/lua/grub_main.c (handle_lua_error): New function.
838         (grub_lua_parse_line): Improved reporting of Lua parser and
839         execution errors.
841 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
843         Remove -Werror which causes build to fail on some systems
845         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
846         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
847         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
849 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
851         trampoline for linux on 64-bit platform
853         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
854         loader/i386/efi/linux_trampoline.S
855         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
856         declaration
857         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
858         here
859         * loader/i386/linux_trampoline.S: moved here
860         * loader/i386/efi/linux.c (allocate_pages): reserve space for
861         trampoline
862         (jumpvector): removed
863         (grub_linux_trampoline_start): new declaration
864         (grub_linux_trampoline_end): likewise
865         (grub_linux_boot): use trampoline when on 64-bit platform
866         * loader/i386/linux.c: likewise
868 2009-05-16  Pavel Roskin  <proski@gnu.org>
870         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
871         const to avoid a warning.
872         (grub_lua_setenv): Likewise.
873         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
874         lmsg to fix a warning.
876 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
878         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
879         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
880         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
881         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
882         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
883         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
884         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
885         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
887 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
889         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
891 2009-05-16  Bean  <bean123ch@gmail.com>
893         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
894         (lua_mod_SOURCES): New variable.
895         (lua_mod_CFLAGS): Likewise.
896         (lua_mod_LDFLAGS): Likewise.
898         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
899         (setjmp_mod_SOURCES): New variable.
900         (setjmp_mod_CFLAGS): Likewise.
901         (setjmp_LDFLAGS): Likewise.
903         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
904         (setjmp_mod_SOURCES): New variable.
905         (setjmp_mod_CFLAGS): Likewise.
906         (setjmp_LDFLAGS): Likewise.
908         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
909         (setjmp_mod_SOURCES): New variable.
910         (setjmp_mod_CFLAGS): Likewise.
911         (setjmp_LDFLAGS): Likewise.
913         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
914         (setjmp_mod_SOURCES): New variable.
915         (setjmp_mod_CFLAGS): Likewise.
916         (setjmp_LDFLAGS): Likewise.
918         * normal/i386/setjmp.S: Moved from here ...
919         * lib/i386/setjmp.S: ... Moved here
920         * normal/x86_64/setjmp.S: Moved from here ...
921         * lib/x86_64/setjmp.S: ... Moved here
922         * normal/powerpc/setjmp.S: Moved from here ...
923         * lib/powerpc/setjmp.S: ... Moved here
924         * normal/sparc64/setjmp.S: Moved from here ...
925         * lib/sparc64/setjmp.S: ... Moved here
927         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
928         returns_twice in mingw.
930         * script/lua/grub_lib.c: New file.
931         * script/lua/grub_lib.h: Likewise.
932         * script/lua/grub_lua.h: Likewise.
933         * script/lua/grub_main.c: Likewise.
934         * script/lua/lapi.c: Likewise.
935         * script/lua/lapi.h: Likewise.
936         * script/lua/lauxlib.c: Likewise.
937         * script/lua/lauxlib.h: Likewise.
938         * script/lua/lbaselib.c: Likewise.
939         * script/lua/lcode.c: Likewise.
940         * script/lua/lcode.h: Likewise.
941         * script/lua/ldblib.c: Likewise.
942         * script/lua/ldebug.c: Likewise.
943         * script/lua/ldebug.h: Likewise.
944         * script/lua/ldo.c: Likewise.
945         * script/lua/ldo.h: Likewise.
946         * script/lua/ldump.c: Likewise.
947         * script/lua/lfunc.c: Likewise.
948         * script/lua/lfunc.h: Likewise.
949         * script/lua/lgc.c: Likewise.
950         * script/lua/lgc.h: Likewise.
951         * script/lua/linit.c: Likewise.
952         * script/lua/liolib.c: Likewise.
953         * script/lua/llex.c: Likewise.
954         * script/lua/llex.h: Likewise.
955         * script/lua/llimits.h: Likewise.
956         * script/lua/lmathlib.c: Likewise.
957         * script/lua/lmem.c: Likewise.
958         * script/lua/lmem.h: Likewise.
959         * script/lua/loadlib.c: Likewise.
960         * script/lua/lobject.c: Likewise.
961         * script/lua/lobject.h: Likewise.
962         * script/lua/lopcodes.c: Likewise.
963         * script/lua/lopcodes.h: Likewise.
964         * script/lua/loslib.c: Likewise.
965         * script/lua/lparser.c: Likewise.
966         * script/lua/lparser.h: Likewise.
967         * script/lua/lstate.c: Likewise.
968         * script/lua/lstate.h: Likewise.
969         * script/lua/lstring.c: Likewise.
970         * script/lua/lstring.h: Likewise.
971         * script/lua/lstrlib.c: Likewise.
972         * script/lua/ltable.c: Likewise.
973         * script/lua/ltable.h: Likewise.
974         * script/lua/ltablib.c: Likewise.
975         * script/lua/ltm.c: Likewise.
976         * script/lua/ltm.h: Likewise.
977         * script/lua/lua.h: Likewise.
978         * script/lua/luaconf.h: Likewise.
979         * script/lua/lualib.h: Likewise.
980         * script/lua/lundump.c: Likewise.
981         * script/lua/lundump.h: Likewise.
982         * script/lua/lvm.c: Likewise.
983         * script/lua/lvm.h: Likewise.
984         * script/lua/lzio.c: Likewise.
985         * script/lua/lzio.h: Likewise.
987 2009-05-16  Bean  <bean123ch@gmail.com>
989         * include/grub/kernel.h (grub_module_header_types): Add type
990         OBJ_TYPE_CONFIG.
992         * kern/main.c (grub_load_config): New function.
993         (grub_main): Call grub_load_config to read boot config.
995         * grub-mkimage (generate_image): New parameter config_path.
996         (options): New option --config.
997         (main): Parse --config option, and pass it to generate_image.
999 2009-05-14  Christian Franke  <franke@computer.org>
1001         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1002         This fixes build on Cygwin.
1004 2009-05-14  Pavel Roskin  <proski@gnu.org>
1006         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1007         jump.  This saves two bytes, so the typical case of 2 swapped
1008         drives would fit 32 bytes.
1010 2009-05-13  Pavel Roskin  <proski@gnu.org>
1012         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1013         grub_uint32_t to avoid a warning.
1015         * loader/i386/linux.c (allocate_pages): When assigning
1016         real_mode_mem, cast through grub_size_t to fix a warning.  The
1017         code already makes sure that the value would fit a pointer.
1018         (grub_linux_setup_video): Cast render_target->data to
1019         grub_size_t to fix a warning.
1021 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1023         * commands/i386/pc/drivemap.c: New file - implement drivemap
1024         command.
1025         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1026         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1028 2009-05-13  Pavel Roskin  <proski@gnu.org>
1030         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1031         embedding_area_exists.
1033 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1035         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1036         it easier to understand / work with.
1037         Improve warning messages for cases where there's no embedding area,
1038         or when it is too small (or core.img too large).
1040 2009-05-13  Pavel Roskin  <proski@gnu.org>
1042         * loader/i386/pc/multiboot2.c: Add necessary includes for
1043         grub_multiboot2_real_boot().
1045         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1046         PX record is always little-endian.  We only need the lower 2
1047         bytes of the mode.
1049         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1050         facilitate code reuse.
1051         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1052         fixes a warning reported by gcc 4.4.
1054         * kernel/disk.c (grub_disk_read): Use void pointer for the
1055         buffer.
1056         (grub_disk_write): Use const void pointer for the buffer.
1057         Adjust all callers.  Remove unnecessary casts.
1059 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1061         * util/i386/pc/grub-install.in: Update copyright year.
1063 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1065         gptsync
1067         * commands/gptsync.c: new file
1068         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1069         (gptsync_mod_SOURCES): new variable
1070         (gptsync_mod_CFLAGS): likewise
1071         (gptsync_mod_LDFLAGS): likewise
1072         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1073         new definition
1074         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1075         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1076         * conf/i386-ieee1275.rmk: likewise
1077         * conf/i386-pc.rmk: likewise
1078         * conf/powerpc-ieee1275.rmk: likewise
1080 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1082         Fixed grub-emu
1084         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1085         (grub_dl_ref): likewise
1087 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1089         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1090         split in two functions (one for msdos and one for gpt).
1092 2009-05-08  Pavel Roskin  <proski@gnu.org>
1094         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1095         not modified.
1097         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1098         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1099         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1100         nerr variable.
1102 2009-05-08  David S. Miller  <davem@davemloft.net>
1104         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1106 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1108         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1109         existence.
1111 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1113         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1114         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1116 2009-05-05  David S. Miller  <davem@davemloft.net>
1118         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1120 2009-05-05  Pavel Roskin  <proski@gnu.org>
1122         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1123         of grub_dl_ref() and grub_dl_unref().
1124         * commands/parttool.c: Remove preprocessor conditionals around
1125         grub_dl_ref() and grub_dl_unref().
1126         * fs/affs.c: Likewise.
1127         * fs/afs.c: Likewise.
1128         * fs/cpio.c: Likewise.
1129         * fs/ext2.c: Likewise.
1130         * fs/fat.c: Likewise.
1131         * fs/hfs.c: Likewise.
1132         * fs/hfsplus.c: Likewise.
1133         * fs/iso9660.c: Likewise.
1134         * fs/jfs.c: Likewise.
1135         * fs/minix.c: Likewise.
1136         * fs/ntfs.c: Likewise.
1137         * fs/reiserfs.c: Likewise.
1138         * fs/sfs.c: Likewise.
1139         * fs/udf.c: Likewise.
1140         * fs/ufs.c: Likewise.
1141         * fs/xfs.c: Likewise.
1142         * include/grub/dl.h: Likewise.
1143         * loader/xnu.c: Likewise.
1145 2009-05-04  Pavel Roskin  <proski@gnu.org>
1147         * commands/acpi.c: Remove unused variable my_mod.
1148         * partmap/amiga.c: Likewise.
1149         * partmap/apple.c: Likewise.
1150         * partmap/gpt.c: Likewise.
1151         * partmap/pc.c: Likewise.
1152         * partmap/sun.c: Likewise.
1153         * term/gfxterm.c: Likewise.
1154         * term/i386/pc/vesafb.c: Likewise.
1155         * term/i386/pc/vga.c: Likewise.
1157 2009-05-04  David S. Miller  <davem@davemloft.net>
1159         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1160         pointer args to grub_ieee1275_get_property().
1162         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1164         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1165         devices, and do not traverse down under controller nodes.
1167         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1168         (grub_ofdisk_open): Use it to un-escape "," characters.
1169         * kern/disk.c (find_part_sep): New.
1170         (grub_disk_open): Use it to find the first non-escaped ','
1171         character in the disk name.
1172         * util/ieee1275/devicemap.c (escape_of_path): New.
1173         (grub_util_emit_devicemap_entry): Use it.
1174         * util/sparc64/ieee1275/grub-install.in: Update script to
1175         strip partition specifiers properly by not triggering on
1176         '\' escaped ',' characters.
1178 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1180         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1181         to 0x300.
1182         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1183         resolutions.
1184         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1185         on documentation from Wikipedia).
1187 2009-05-04  Pavel Roskin  <proski@gnu.org>
1189         * disk/ata.c: Spelling fixes.
1190         * disk/raid.c: Likewise.
1191         * disk/usbms.c: Likewise.
1192         * disk/dmraid_nvidia.c: Likewise.
1193         * kern/ieee1275/openfw.c: Likewise.
1194         * kern/ieee1275/init.c: Likewise.
1195         * kern/ieee1275/cmain.c: Likewise.
1196         * boot/i386/pc/cdboot.S: Likewise.
1197         * video/readers/png.c: Likewise.
1198         * video/i386/pc/vbe.c: Likewise.
1199         * fs/udf.c: Likewise.
1200         * fs/hfs.c: Likewise.
1201         * fs/reiserfs.c: Likewise.
1202         * efiemu/runtime/efiemu.c: Likewise.
1203         * efiemu/main.c: Likewise.
1204         * efiemu/mm.c: Likewise.
1205         * include/grub/elf.h: Likewise.
1206         * include/grub/xnu.h: Likewise.
1207         * include/grub/usbdesc.h: Likewise.
1208         * include/grub/usb.h: Likewise.
1209         * include/grub/script_sh.h: Likewise.
1210         * include/grub/lib/LzmaEnc.h: Likewise.
1211         * include/grub/efiemu/efiemu.h: Likewise.
1212         * include/grub/command.h: Likewise.
1213         * normal/menu.c: Likewise.
1214         * normal/main.c: Likewise.
1215         * normal/datetime.c: Likewise.
1216         * bus/usb/uhci.c: Likewise.
1217         * mmap/i386/uppermem.c: Likewise.
1218         * mmap/mmap.c: Likewise.
1219         * commands/acpi.c: Likewise.
1220         * commands/test.c: Likewise.
1221         * partmap/apple.c: Likewise.
1222         * font/font.c: Likewise.
1223         * loader/sparc64/ieee1275/linux.c: Likewise.
1224         * loader/macho.c: Likewise.
1225         * loader/i386/bsd_trampoline.S: Likewise.
1226         * loader/i386/bsd.c: Likewise.
1227         * loader/xnu.c: Likewise.
1228         * term/i386/pc/vesafb.c: Likewise.
1229         * term/usb_keyboard.c: Likewise.
1230         * util/resolve.c: Likewise.
1231         * util/getroot.c: Likewise.
1233 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1235         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1237 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1239         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1240         build error.
1242 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1244         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1245         parameter only available on BIOS.
1247 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1249         Removed wrong semicolon in declaration
1251         * grub/misc.h (grub_dprintf): remove semicolon
1253 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1255         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1256         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1257         is done by grub_cmd_linux() now).
1258         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1259         restore video to text mode.
1260         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1261         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1262         `GRUB_LINUX_VID_MODE_NORMAL'.
1264 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1266         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1267         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1268         and `normal/script.c'.  Add `kern/rescue_reader.c',
1269         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1270         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1271         `grub_script.tab.c'.
1273         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1274         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1275         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1276         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1277         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1279         * Makefile.in: Remove duplicated 2008 in Copyright line.
1281 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1283         * util/misc.c (grub_util_warn): New function.  Emits a warning
1284         unconditionally.
1285         * include/grub/util/misc.h (grub_util_warn): New declaration.
1287         * util/i386/pc/grub-install.in: Understand --force and pass it down
1288         to grub-setup.
1290         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1291         down to setup().
1292         (setup): Improve error messages and add warnings when requested to
1293         install in odd layouts.  Refuse to install using blocklists unless
1294         --force was set.
1296 2009-05-04  martin f. krafft  <madduck@madduck.net>
1298         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1300 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1302         Updated copyright year
1304         * fs/hfsplus.c: updated copyright year
1306 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1308         HFS+ UUID
1310         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1311         in the space previously used by unused3
1312         (grub_hfsplus_uuid): new function
1313         (grub_hfsplus_fs): added uuid field
1315 2009-05-03  Pavel Roskin  <proski@gnu.org>
1317         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1318         suppress warnings.  It's no longer needed.
1319         * disk/host.c: Likewise.
1320         * disk/ata_pthru.c: Likewise.
1321         * disk/loopback.c: Likewise.
1322         * hook/datehook.c: Likewise.
1323         * parttool/pcpart.c: Likewise.
1324         * fs/i386/pc/pxe.c: Likewise.
1325         * fs/ntfscomp.c: Likewise.
1326         * efiemu/main.c: Likewise.
1327         * mmap/mmap.c: Likewise.
1328         * commands/crc.c: Likewise.
1329         * commands/hexdump.c: Likewise.
1330         * commands/hdparm.c: Likewise.
1331         * commands/acpi.c: Likewise.
1332         * commands/echo.c: Likewise.
1333         * commands/minicmd.c: Likewise.
1334         * commands/blocklist.c: Likewise.
1335         * commands/memrw.c: Likewise.
1336         * commands/loadenv.c: Likewise.
1337         * commands/usbtest.c: Likewise.
1338         * commands/lsmmap.c: Likewise.
1339         * commands/boot.c: Likewise.
1340         * commands/parttool.c: Likewise.
1341         * commands/configfile.c: Likewise.
1342         * commands/search.c: Likewise.
1343         * commands/ieee1275/suspend.c: Likewise.
1344         * commands/cat.c: Likewise.
1345         * commands/i386/pc/pxecmd.c: Likewise.
1346         * commands/i386/pc/play.c: Likewise.
1347         * commands/i386/pc/halt.c: Likewise.
1348         * commands/i386/pc/vbeinfo.c: Likewise.
1349         * commands/i386/pc/vbetest.c: Likewise.
1350         * commands/lspci.c: Likewise.
1351         * commands/date.c: Likewise.
1352         * commands/handler.c: Likewise.
1353         * commands/ls.c: Likewise.
1354         * commands/test.c: Likewise.
1355         * commands/cmp.c: Likewise.
1356         * commands/efi/loadbios.c: Likewise.
1357         * commands/efi/fixvideo.c: Likewise.
1358         * commands/halt.c: Likewise.
1359         * commands/help.c: Likewise.
1360         * commands/reboot.c: Likewise.
1361         * hello/hello.c: Likewise.
1362         * script/sh/main.c: Likewise.
1363         * loader/xnu.c: Likewise.
1364         * term/terminfo.c: Likewise.
1365         * term/i386/pc/serial.c: Likewise.
1366         * term/usb_keyboard.c: Likewise.
1368 2009-05-03  David S. Miller  <davem@davemloft.net>
1370         * normal/menu.c: Include grub/parser.h
1372 2009-05-03  Pavel Roskin  <proski@gnu.org>
1374         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1375         not char*.
1376         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1377         Suggested by Javier Martín <lordhabbit@gmail.com>
1379         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1380         efiemu??.o doesn't exist.
1381         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1382         copying.
1384 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1386         FreeBSD 64-bit support
1388         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1389         and loader/i386/bsd_trampoline.S
1390         (bsd_mod_ASFLAGS): new variable
1391         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1392         (FREEBSD_MODTYPE_KERNEL64): likewise
1393         (grub_bsd64_trampoline_start): likewise
1394         (grub_bsd64_trampoline_end): likewise
1395         (grub_bsd64_trampoline_selfjump): likewise
1396         (grub_bsd64_trampoline_gdt): likewise
1397         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1398         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1399         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1400         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1401         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1402         of "attrib" member
1403         * loader/i386/bsd_pagetable.c: new file
1404         * loader/i386/bsd_trampoline.S: likewise
1405         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1406         (ALIGN_VAR): likewise
1407         (entry_hi): new variable
1408         (kern_end_mdofs): likewise
1409         (is_64bit): likewise
1410         (grub_freebsd_add_meta): use ALIGN_VAR
1411         (grub_e820_mmap): new declaration
1412         (grub_freebsd_add_mmap): new function
1413         (grub_freebsd_add_meta_module): support 64 bit kernels
1414         (grub_freebsd_list_modules): use ALIGN_VAR
1415         (gdt_descriptor): new declaration
1416         (grub_freebsd_boot): support 64 bit kernels
1417         (grub_bsd_elf64_hook): new function
1418         (grub_bsd_load_elf): support elf64
1420 2009-05-03  Bean  <bean123ch@gmail.com>
1422         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1423         after we get the result of if statement.
1425 2009-05-03  Bean  <bean123ch@gmail.com>
1427         * Makefile.in (enable_efiemu): New variable.
1429         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1430         set.
1431         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1432         path.
1433         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1434         path, add -mno-red-zone option.
1435         (efiemu64_s.o): Likewise.
1436         (efiemu64.o): Use macro $^ for source file.
1438         * configure.ac (--enable-efiemu): New option.
1440 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1442         xnu support
1444         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1445         (pkglib_MODULES): add xnu.mod
1446         (xnu_mod_SOURCES): new variable
1447         (xnu_mod_CFLAGS): likewise
1448         (xnu_mod_LDFLAGS): likewise
1449         (xnu_mod_ASFLAGS): likewise
1450         * conf/i386-pc.rmk: likewise
1451         * conf/x86_64-efi.rmk: likewise
1452         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1453         new declaration
1454         * include/grub/i386/macho.h: new file
1455         * include/grub/i386/xnu.h: likewise
1456         * include/grub/macho.h: likewise
1457         * include/grub/machoload.h: likewise
1458         * include/grub/x86_64/macho.h: likewise
1459         * include/grub/x86_64/xnu.h: likewise
1460         * include/grub/xnu.h: likewise
1461         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1462         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1463         * loader/i386/efi/xnu.c: new file
1464         * loader/i386/pc/xnu.c: likewise
1465         * loader/i386/xnu.c: likewise
1466         * loader/i386/xnu_helper.S: likewise
1467         * loader/macho.c: likewise
1468         * loader/xnu.c: likewise
1469         * loader/xnu_resume.c: likewise
1470         * util/grub-dumpdevtree: likewise
1471         * include/grub/i386/pit.h: include grub/err.h
1472         (grub_pit_wait): export
1473         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
1475 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1477         Efiemu
1479         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
1480         _linux_efi, linux_efi.
1481         new files in grub-emu
1482         new targets efiemu32.o and efiemu64.o
1483         * loader/linux_normal_efiemu.c: likewise
1484         * loader/i386/efi/linux.c: added preliminary efiemu support
1485         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
1486         files to copy
1487         * include/grub/autoefi.h: new file
1488         * include/grub/i386/efiemu.h: likewise
1489         * include/grub/i386/pc/efiemu.h: likewise
1490         * include/grub/efi/api.h: add LL suffix when necessary
1491         new definitions relating to tables
1492         * include/grub/efiemu/efiemu.h: new file
1493         * include/grub/efiemu/runtime.h: likewise
1494         * efiemu/prepare.c: likewise
1495         * efiemu/loadcore_common.c: likewise
1496         * efiemu/loadcore64.c: likewise
1497         * efiemu/runtime/efiemu.sh: likewise
1498         * efiemu/runtime/efiemu.S: likewise
1499         * efiemu/runtime/efiemu.c: likewise
1500         * efiemu/runtime/config.h: likewise
1501         * efiemu/prepare32.c: likewise
1502         * efiemu/main.c: likewise
1503         * efiemu/modules/pnvram.c: likewise
1504         * efiemu/modules/i386: likewise
1505         * efiemu/modules/i386/pc: likewise
1506         * efiemu/modules/acpi.c: likewise
1507         * efiemu/i386/pc/cfgtables.c: likewise
1508         * efiemu/i386/loadcore64.c: likewise
1509         * efiemu/i386/loadcore32.c: likewise
1510         * efiemu/prepare64.c: likewise
1511         * efiemu/loadcore.c: likewise
1512         * efiemu/symbols.c: likewise
1513         * efiemu/mm.c: likewise
1514         * efiemu/loadcore32.c: likewise
1516 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1518         ACPI spoofing
1520         * commands/acpi.c: new file
1521         * commands/i386/pc/acpi.c: likewise
1522         * commands/efi/acpi.c: likewise
1523         * include/grub/acpi.h: likewise
1524         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
1525         (acpi_mod_SOURCES): new variable
1526         (acpi_mod_CFLAGS): likewise
1527         (acpi_mod_LDFLAGS): likewise
1528         * conf/i386-efi.rmk: likewise
1529         * conf/x86_64-efi.rmk: likewise
1531 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1533         Missing part from mmap patch
1535         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
1536         (grub_mmap_unregister)
1537         (grub_mmap_free_and_unregister): use grub_mmap_register
1539 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1541         Mmap services
1543         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
1544         * loader/i386/linux.c (find_mmap_size): likewise
1545         (allocate_pages): likewise
1546         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
1547         (grub_fill_multiboot_mmap): likewise
1548         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
1549         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
1550         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
1551         (OPENBSD_MMAP_RESERVED): likewise
1552         * include/grub/i386/pc/memory.h: include grub/memory.h
1553         (grub_lower_mem): removed
1554         (grub_upper_mem): likewise
1555         (GRUB_MACHINE_MEMORY_ACPI): new definition
1556         (GRUB_MACHINE_MEMORY_NVS): likewise
1557         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
1558         (GRUB_MACHINE_MEMORY_HOLE): likewise
1559         (grub_machine_mmap_register): likewise
1560         (grub_machine_mmap_unregister): likewise
1561         (grub_machine_get_upper): likewise
1562         (grub_machine_get_lower): likewise
1563         (grub_machine_get_post64): likewise
1564         * include/grub/i386/efi/memory.h: new file
1565         * include/grub/x86_64/efi/memory.h: likewise
1566         * include/grub/efi/memory.h: likewise
1567         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
1568         (mmap_mod_SOURCES): new variable
1569         (mmap_mod_LDFLAGS): likewise
1570         (mmap_mod_ASFLAGS): likewise
1571         * conf/i386-coreboot.rmk: likewise
1572         * conf/i386-ieee1275.rmk: likewise
1573         * conf/i386-efi.rmk: likewise
1574         * conf/x86_64-efi.rmk: likewise
1575         * include/grub/types.h (UINT_TO_PTR): new macro
1576         (PTR_TO_UINT32): likewise
1577         (PTR_TO_UINT64): likewise
1578         * include/grub/memory.h: new file
1579         * mmap/i386/pc/mmap.c: likewise
1580         * mmap/i386/pc/mmap_helper.S: likewise
1581         * mmap/i386/uppermem.c: likewise
1582         * mmap/mmap.c: likewise
1583         * mmap/efi/mmap.c: likewise
1584         * kern/i386/coreboot/init.c (grub_machine_init): don't use
1585         grub_upper_mem
1586         * kern/i386/pc/init.c (grub_lower_mem): removed variable
1587         (grub_upper_mem): likewise
1588         (grub_machine_init): don't use grub_upper_mem,
1589         make grub_lower_mem local
1590         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
1591         grub_mmap_iterate and grub_mmap_get_upper
1592         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
1594 2009-05-02  Bean  <bean123ch@gmail.com>
1596         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
1597         script/sh/parser.y.
1598         (pkglib_MODULES): Add normal.mod and sh.mod.
1599         (normal_SOURCES): New variable.
1600         (normal_mod_CFLAGS): Likewise.
1601         (normal_mod_LDFLAGS): Likewise.
1602         (sh_mod_SOURCES): Likewise.
1603         (sh_mod_CFLAGS): Likewise.
1604         (sh_mod_LDFLAGS): Likewise.
1606         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
1607         script/sh/lexer.c_DEPENDENCIES.
1608         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
1609         kern/rescue_reader.c and kern/rescue_parser.c.
1610         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
1611         (grub_emu_SOURCES): Change source files.
1612         (pkglib_MODULES): Remove normal.mod.
1613         (normal_SOURCES): Removed.
1614         (normal_mod_CFLAGS): Likewise.
1615         (normal_mod_LDFLAGS): Likewise.
1616         * conf/i386-coreboot.rmk: Likewise.
1617         * conf/i386-efi.rmk: Likewise.
1618         * conf/i386-ieee1276.rmk: Likewise.
1619         * conf/powerpc-ieee1275.rmk: Likewise.
1620         * conf/sparc64-ieee1275.rmk: Likewise.
1621         * conf/x86_64-efi.rmk: Likewise.
1623         * include/grub/command.h (grub_command_execute): New inline function.
1625         * include/grub/menu.h (grub_menu_entry): Removed commands field.
1627         * include/grub/normal.h: Remove <grub/setjmp.h>.
1628         (grub_fs_module_list): Moved to normal/autofs.c.
1629         (grub_exit_env): Removed.
1630         (grub_command_execute): Likewise.
1631         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
1632         parameter script.
1633         (read_command_list): New function declaration.
1634         (read_fs_list): Likewise.
1636         * include/parser.h: Include <grub/reader.h>.
1637         (grub_parser_split_cmdline): Change type of getline parameter.
1638         (grub_parser): New structure.
1639         (grub_parser_class): New variable.
1640         (grub_parser_execute): New function declaration.
1641         (grub_register_rescue_parser): Likewise.
1642         (grub_parser_register): New inline function.
1643         (grub_parser_unregister): Likewise.
1644         (grub_parser_get_current): Likewise.
1645         (grub_parser_set_current): Likewise.
1647         * include/grub/reader.h: New file.
1648         * kern/reader.c: Likewise.
1649         * kern/rescue_parser.c: Likewise.
1650         * kern/rescue_reader.c: Likewise.
1651         * normal/autofs.c: Likewise.
1652         * normal/dyncmd.c: Likewise.
1654         * include/grub/rescue.h: Removed.
1655         * normal/command.h: Likewise.
1657         * include/grub/script.h: Moved to ...
1658         * include/grub/script_sh.h: ... Moved here.
1659         * normal/execute.c: Moved to ...
1660         * script/sh/execute.c: ... Moved here.
1661         * normal/function.c: Moved to ...
1662         * script/sh/function.c: ... Moved here.
1663         * normal/lexer.c: Moved to ...
1664         * script/sh/lexer.c: ... Moved here.
1665         * normal/parser.y: Moved to ...
1666         * script/sh/parser.y: ... Moved here.
1667         * normal/script.c: Moved to ...
1668         * script/sh/script.c: ... Moved here.
1670         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
1671         <grub/reader.h>.
1672         (grub_exit_env): Removed.
1673         (fs_module_list): Moved to normal/autofs.c.
1674         (grub_file_getline): Don't handle comment here.
1675         (free_menu): Skip removed field entry->commands.
1676         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
1677         script parameter.
1678         (read_config_file): Removed nested parameter, change getline function.
1679         (grub_enter_normal_mode): Removed.
1680         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
1681         (read_command_list): Likewise.
1682         (autoload_fs_module): Moved to normal/autofs.c.
1683         (read_fs_list): Likewise.
1684         (reader_nested): New variable.
1685         (grub_normal_execute): Run parser.sh to switch to sh parser.
1686         (grub_cmd_rescue): Removed.
1687         (cmd_normal): Removed.
1688         (grub_cmd_normal): Unregister itself at the beginning. Don't register
1689         rescue command.
1690         (grub_cmdline_run): New function.
1691         (grub_normal_reader_init): Likewise.
1692         (grub_normal_read_line): Likewise.
1693         (grub_env_write_pager): Likewise.
1694         (cmdline): New variable.
1695         (grub_normal_reader): Likewise.
1696         (GRUB_MOD_INIT): Register normal reader and set as current, register
1697         pager hook, register normal command with grub_register_command_prio,
1698         so that it won't show up in command.lst.
1699         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
1700         grub_fs_autoload_hook.
1702         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
1703         (grub_menu_execute_entry): Replace grub_script_execute with
1704         grub_parser_execute, change parameter to grub_command_execute.
1706         * normal/menu_text.c: Remove <grub/script.h>.
1708         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
1709         and <grub/parser.h>.
1710         (run): Change editor_getline to use new parser interface. Change
1711         parameter to grub_command_execute.
1713         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
1714         <grub/reader.h> and <grub/parser.h>.
1715         (grub_load_normal_mode): Execute normal command.
1716         (grub_main): Call grub_register_core_commands,
1717         grub_register_rescue_parser and grub_register_rescue_reader, use
1718         grub_reader_loop to enter input loop.
1720         * kern/parser.c (grub_parser_split_cmdline): Change type of
1721         getline parameter.
1722         (grub_parser_class): New variable.
1723         (grub_parser_execute): New function.
1725         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
1726         * loader/multiboot2.c: Likewise.
1727         * loader/sparc64/ieee1275/linux.c: Likewise.
1729         * util/grub-emu.c (read_command_list): New dummy function.
1731 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1733         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
1734         count to 16 for CCISS and IDA.
1736 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
1738         * normal/menu_text.c  (grub_wait_after_message): Print a newline
1739         after waiting for user input.
1741         * loader/i386/linux.c: Include `<grub/normal.h>'.
1742         (grub_cmd_linux): Improve the error message about `ask' mode, by
1743         waiting for user input so it's not missed (we can do this, since
1744         user requested interaction).
1746 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
1748         Added missing lst to grub-mkrescue
1750         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
1751         and ${input_dir}/parttool.lst
1753 2009-04-30  David S. Miller  <davem@davemloft.net>
1755         * util/hostdisk.c (device_is_wholedisk): New function.
1756         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
1757         zero only if device_is_wholedisk() returns true.
1759         * util/hostdisk.c (convert_system_partition_to_system_disk):
1760         Handle virtual disk devices named /dev/vdiskX as found on sparc
1761         and powerpc.
1763         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
1764         lettered partition specifier is found, convert to numbered.
1766 2009-04-29  David S. Miller  <davem@davemloft.net>
1768         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
1769         * include/grub/sparc64/ieee1275/memory.h: Likewise.
1771         * normal/command.c: Add missing newline at end of file.
1773         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
1774         warnings.
1775         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
1776         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
1777         grub_ofdisk_read): Likewise, and deal similarly with the fact that
1778         ihandles have a 32-bit type but need to be stored in a "void *".
1780 2009-04-28  Pavel Roskin  <proski@gnu.org>
1782         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
1783         not disk.  Adjust all dependencies.
1784         (grub_fs_uuid_close): Use grub_device_close(), not
1785         grub_disk_close().
1787         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
1788         parent's partition, don't copy it by reference, as it gets freed
1789         on close.
1791 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1793         Preboot hooks support
1795         * commands/boot.c (struct grub_preboot_t): new declaration
1796         (preboots_head): new variable
1797         (preboots_tail): likewise
1798         (grub_loader_register_preboot_hook): new function
1799         (grub_loader_unregister_preboot_hook): likewise
1800         (grub_loader_set): launch preboot hooks
1801         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
1802         (grub_loader_register_preboot_hook): new declaration
1803         (grub_loader_unregister_preboot_hook): likewise
1805 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
1807         Warning fix
1809         * disk/scsi.c (grub_scsi_open): added missing cast when
1810         calling grub_dprintf
1812 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
1814         Bug and warning fixes
1816         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
1817         declaration
1818         * commands/test.c (test_parse): fixed bug with file tests and corrected
1819         declaration of find_file
1821 2009-04-26  Pavel Roskin  <proski@gnu.org>
1823         * Makefile.in: Don't install empty manual pages if help2man is
1824         missing.  Use help2man option for output, not shell redirection.
1826 2009-04-26  David S. Miller  <davem@davemloft.net>
1828         * util/grub-mkdevicemap.c (make_device_map): Add missing
1829         NESTED_FUNC_ATTR to process_device().
1831 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1833         Test command
1835         * commands/test.c: rewritten to use bash-like test
1837 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
1839         Parttool autoloading and improvements
1841         * Makefile.in (pkglib_DATA): add parttool.lst
1842         (parttool.lst): new target
1843         * genmk.rb: generate parttool-*
1844         (CLEANFILES): add #{parttool}
1845         (PARTTOOLFILES): new variable
1846         * genparttoollist.sh: new file
1847         * parttool/pcpart.c (grub_pcpart_boot): more feedback
1848         (grub_pcpart_type): likewise
1849         * commands/parttool.c (helpmsg): new variable
1850         (grub_cmd_parttool): output help if not enough arguments are supplied
1851         autoload modules
1852         (GRUB_MOD_INIT(parttool)): use helpmsg
1854 2009-04-24  David S. Miller  <davem@davemloft.net>
1856         Avoiding opening same device multiple times in device iterator.
1858         * kern/device.c: (grub_device_iterate): Define struct part_ent,
1859         and use it to build a list of partitions in iterate_disk() and
1860         iterate_partition().
1862         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
1863         on disk->data.
1865         * disk/ieee1275/nand.c (grub_nand_iterate): Return
1866         grub_devalias_iterate() result instead of unconditional 0.
1867         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
1868         Also, capture hook return value, either directly or via
1869         grub_children_iterate(), and propagate to caller.
1870         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
1871         grub_children_iterate): Return value is now 'int' instead of
1872         'grub_err_t'.
1873         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
1874         like a proper iterator, stopping when hooks return non-zero.
1875         (grub_devalias_iterate): Likewise.
1877 2009-04-23  David S. Miller  <davem@davemloft.net>
1879         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
1881 2009-04-22  David S. Miller  <davem@davemloft.net>
1883         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
1884         is larger than address_cells, use that value for address_cells too.
1886         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
1887         IEEE1275_MAX_PATH_LEN): Define.
1888         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
1889         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
1890         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
1891         'devtype'.  Explicitly NULL terminate devalias expansion.
1893         * util/sparc64/ieee1275/misc.c: New file.
1894         * util/sparc64/ieee1275/grub-setup.c: New file.
1895         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
1896         * util/sparc64/ieee1275/grub-mkimage.c: New file.
1897         * util/sparc64/ieee1275/grub-install.in: New file.
1898         * util/ieee1275/ofpath.c: New file.
1899         * util/ieee1275/devicemap.c: New file.
1900         * util/devicemap.c: New file.
1901         * util/deviceiter.c: New file.
1902         * kern/sparc64/ieee1275/init.c: New file.
1903         * include/grub/util/ofpath.h: New file.
1904         * include/grub/util/deviceiter.h: New file.
1905         * util/grub-mkdevicemap.c: Include deviceiter.h.
1906         Implement using grub_util_emit_devicemap_entry and
1907         grub_util_iterate_devices.
1908         * conf/i386-corebook.rmk: Build util/deviceiter.c and
1909         util/devicemap.c into grub-mkdevicemap
1910         * conf/i386-efi.rmk: Likewise.
1911         * conf/i386-ieee1275.rmk: Likewise.
1912         * conf/i386-pc.rmk: Likewise.
1913         * conf/powerpc-ieee1275.rmk: Likewise.
1914         * conf/sparc64-ieee1275.rmk: Add rules to build boot block
1915         images and installation utilities.  Build kernel as image
1916         instead of as elf binary.  Use common rules as much as possible.
1918 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
1920         Correct GPT definition
1922         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1923         of "attrib" member
1925 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
1927         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
1929 2009-04-19  David S. Miller  <davem@davemloft.net>
1931         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
1932         (grub_rescue_cmd_linux): Rename to...
1933         (grub_cmd_linux): and fix prototype.
1934         (grub_rescue_cmd_initrd): Rename to...
1935         (grub_cmd_initrd): and fix prototype.
1936         (cmd_linux, cmd_initrd): New.
1937         (GRUB_MOD_INIT(linux)): Use grub_register_command().
1938         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
1940 2009-04-17  Pavel Roskin  <proski@gnu.org>
1942         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
1943         format.
1944         (grub_ohci_transfer): Likewise.
1946         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
1948         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
1949         return without a value.  Fix inconsistent indentation.
1951         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
1952         match struct grub_fs.
1954         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
1955         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
1956         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
1957         * commands/lspci.c (grub_lspci_iter): Likewise.
1959 2009-04-16  Bean  <bean123ch@gmail.com>
1961         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
1962         value.
1964 2009-04-15  Pavel Roskin  <proski@gnu.org>
1966         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
1967         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
1968         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
1969         definitions.
1971 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
1973         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
1974         that no multiple data or metadata areas are supported and `Unknown
1975         metadata header'.
1977 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
1979         Move loader out of the kernel
1981         * kern/loader.c: moved to ...
1982         * commands/boot.c: ... moved here
1983         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
1984         * commands/boot.c (grub_cmd_boot): moved here. All users updated
1985         * include/grub/kernel.h (grub_machine_fini): export
1986         * include/grub/loader.h (grub_loader_is_loaded): update declaration
1987         (grub_loader_set): likewise
1988         (grub_loader_unset): likewise
1989         (grub_loader_boot): likewise
1990         * conf/common.rmk: new module boot.mod
1991         (pkglib_MODULES): add boot.mod
1992         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
1993         (grub_emu_SOURCES): likewise
1994         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
1995         (grub_emu_SOURCES): likewise
1996         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
1997         (grub_emu_SOURCES): likewise
1998         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
1999         (grub_emu_SOURCES): likewise
2000         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2001         (grub_emu_SOURCES): likewise
2002         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2003         (grub_emu_SOURCES): likewise
2004         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2005         (grub_emu_SOURCES): likewise
2007 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2009         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2011         * kern/misc.c (grub_itoa): Removed function
2012         (grub_ltoa): likewise
2013         (grub_vsprintf): use grub_lltoa
2015 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2017         Restore grub-emu
2019         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2020         * conf/i386-coreboot.rmk: likewise
2021         * conf/i386-ieee1275.rmk: likewise
2022         * conf/powerpc-ieee1275.rmk: likewise
2024 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2026         * INSTALL: Add that `./autogen.sh' needs to be run before
2027         `./configure.'.
2029 2009-04-14  Bean  <bean123ch@gmail.com>
2031         * Makefile.in (pkglib_DATA): Add handler.lst.
2032         (handler.lst): New rule.
2034         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2035         * conf/i386-coreboot.rmk: Likewise.
2036         * conf/i386-ieee1275.rmk: Likewise.
2037         * conf/i386-efi.rmk: Likewise.
2038         * conf/x86_64-efi.rmk: Likewise.
2039         * conf/powerpc-ieee1275.rmk: Likewise.
2040         * conf/sparc64-ieee1275.rmk: Likewise.
2042         * genhandlerlist.sh: New file.
2044         * genmk.rb: Add rules to generate handler.lst.
2046         * include/grub/normal.h (grub_file_getline): New function definition.
2047         (read_handler_list): Likewise.
2048         (free_handler_list): Likewise.
2050         * include/grub/term.h (grub_term_register_input): Add name parameter
2051         for auto generation of handler.lst.
2052         (grub_term_register_output): Likewise.
2054         * normal/handler.c: New file.
2056         * normal/main.c (get_line): Renamed to grub_file_getline.
2057         (read_config_file): Use the newly renamed grub_file_getline.
2058         (read_command_list): Likewise.
2059         (read_fs_list): Likewise.
2060         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2061         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2063         * term/efi/console.c (grub_console_init): Add name parameter for auto
2064         generation of handler.lst.
2065         * term/gfxterm.c: Likewise.
2066         * term/i386/pc/at_keyboard.c: Likewise.
2067         * term/i386/pc/console.c: Likewise.
2068         * term/i386/pc/serial.c: Likewise.
2069         * term/i386/pc/vesafb.c: Likewise.
2070         * term/i386/pc/vga.c: Likewise.
2071         * term/i386/pc/vga_text.c: Likewise.
2072         * term/ieee1275/ofconsole.c: Likewise.
2073         * term/usb_keyboard.c: Likewise.
2075 2009-04-14  Bean  <bean123ch@gmail.com>
2077         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2078         properly with null character.
2080 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2082         * configure: Remove.
2083         * config.h.in: Likewise.
2084         * stamp-h.in: Likewise.
2085         * DISTLIST: Likewise.
2086         * conf/common.mk: Likewise.
2087         * conf/i386-coreboot.mk: Likewise.
2088         * conf/i386-efi.mk: Likewise.
2089         * conf/i386-ieee1275.mk: Likewise.
2090         * conf/i386.mk: Likewise.
2091         * conf/i386-pc.mk: Likewise.
2092         * conf/powerpc-ieee1275.mk: Likewise.
2093         * conf/sparc64-ieee1275.mk: Likewise.
2094         * conf/x86_64-efi.mk: Likewise.
2096         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2097         develop on GRUB.
2099 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2100             David S. Miller  <davem@davemloft.net>
2102         * util/hostdisk.c (make_device_name): Fix buffer length
2103         calculations.
2105 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2107         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2108         <sys/param.h> and <sys/sysctl.h>.
2109         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2110         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2111         opening the device and reset them afterwards.
2113 2009-04-13  Pavel Roskin  <proski@gnu.org>
2115         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2116         Reported by John Stanley <jpsinthemix@verizon.net>
2118 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2120         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2121         that name for menuentries when appropriate.
2123 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2125         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2127 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2129         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2130         to Linux, simply abort telling the user it's no longer supported.
2132 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2134         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2135         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2136         `freebsd_loadenv' only when devices.hints exist.
2138 2009-04-13  Pavel Roskin  <proski@gnu.org>
2140         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2142 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2144         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2145         partition number.
2146         (grub_drive): Likewise.
2148 2009-04-13  David S. Miller  <davem@davemloft.net>
2150         * kern/sparc64/ieee1275/ieee1275.c: New file.
2151         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2152         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2153         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2154         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2155         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2156         grub_ieee1275_alloc_physmem): Declare new exported functions.
2158         * include/grub/sparc64/ieee1275/loader.h: New file.
2159         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2160         * include/grub/sparc64/kernel.h: Likewise.
2161         * loader/sparc64/ieee1275/linux.c: Likewise.
2163         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2164         (grub_fstest_SOURCES): Likewise.
2166         * util/hostdisk.c (make_device_name): Do not make any assumptions
2167         about the length of drive names.
2169         * kern/dl.c (grub_dl_load_file): Close file immediately when
2170         we are done using it.
2172 2009-04-12  David S. Miller  <davem@davemloft.net>
2174         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2175         values.  Noticed by Pavel Roskin.
2177         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2178         target compiler.
2180         * genmk.rb: Add more flexible image type specification, also
2181         pass --strip-unneeded to objcopy.
2182         * conf/i386-pc.rmk: Use *_FORMAT.
2183         * conf/i386-pc.mk: Rebuilt.
2185         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2186         (OFDISK_HASH_SZ): Define.
2187         (ofdisk_hash): New hash table.
2188         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2189         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2190         instead of device phandle which is not unique.
2192         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2193         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2194         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2195         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2196         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2197         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2198         GRUB_KERNEL_MACHINE_DATA_END): Define.
2199         (grub_kernel_image_size, grub_total_module_size): Declare.
2201 2009-04-12  Pavel Roskin  <proski@gnu.org>
2203          * configure.ac: Change the logic when we check for target tools.
2204          Do it when the target is specified and it's different from the
2205          specified value of the host.
2207 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2209         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2210         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2211         GNU/kFreeBSD. Check if a device is a character device. Use
2212         DIOCGMEDIASIZE to get the size.
2213         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2214         support for GNU/kFreeBSD.
2215         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2216         is a character device instead of a block device. Add support for
2217         FreeBSD device names.
2219         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2220         is a character device instead of a block device.
2222         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2223         is a character device instead of a block device.
2225 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2227         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2228         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2229         FreeBSD. Check if a device is a character device. Use
2230         DIOCGMEDIASIZE to get the size.
2231         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2232         support for FreeBSD.
2233         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2234         is a character device instead of a block device. Add support for
2235         FreeBSD device names.
2237         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2238         a character device instead of a block device.
2239         (grub_util_check_char_device): New function.
2241         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2242         a character device instead of a block device.
2244         * include/grub/util/getroot.h (grub_util_check_char_device): New
2245         prototype.
2247 2009-04-11  David S. Miller  <davem@davemloft.net>
2249         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2250         static libgcc.
2251         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2252         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2253         function, if present.
2254         (__bswapdi2): Likewise.
2256         * include/grub/sparc64/ieee1275/boot.h: New file.
2257         * boot/sparc64/ieee1275/boot.S: Likewise.
2258         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2260         * kern/misc.c (grub_ltoa): New function.
2261         (grub_vsprintf): Use it to format 'long' integers.
2263 2009-04-10  David S. Miller  <davem@davemloft.net>
2265         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2266         slots are of type grub_ieee1275_cell_t.
2267         (grub_nand_read): Likewise.
2268         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2269         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2270         macros are used to compare values in arg/ret block of the call.
2271         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2272         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2273         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2274         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2275         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2276         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2277         grub_ieee1275_close, grub_ieee1275_set_property,
2278         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2279         grub_ieee1275_cell_t.
2280         * kern/ieee1275/openfw.c (grub_map): Likewise.
2281         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2282         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2284         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2285         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2286         (grub_devalias_iterate): Likewise.
2288 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2290         UFS improvements
2292         * fs/ufs.c (INODE_NBLOCKS): new definition
2293         (struct grub_ufs_dirent): added fields for non-BSD dirents
2294         (grub_ufs_get_file_block): fixed double indirect handling
2295         (grub_ufs_lookup_symlink): use more robust way to determine whether
2296         symlink is inline
2297         (grub_ufs_find_file): support for non-BSD dirents
2298         (grub_ufs_dir): support for non-BSD dirents
2300 2009-04-10  Bean  <bean123ch@gnail.com>
2302         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2303         attribute, otherwise the size would be wrong for i386 platform.
2305         * include/grub/pci.h (grub_pci_read_word): New inline function.
2306         (grub_pci_read_byte): Likewise.
2307         (grub_pci_write): Likewise.
2308         (grub_pci_write_word): Likewise.
2309         (grub_pci_write_byte): Likewise.
2311         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2313         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2314         (find_framebuf): Scan pci to locate the frame buffer address.
2316         * commands/efi/fixvideo.c: New file.
2318         * commands/efi/loadbios.c: Likewise.
2320         * commands/memrw.c: Likewise.
2322         * util/grub-dumpbios.in: Likewise.
2324         * conf/common.rmk (grub-dumpbios): New utility.
2325         (pkglib_MODULES): New module memrw.mod.
2326         (memrw_mod_SOURCE): New macro.
2327         (memrw_mod_CFLAGS): Likewise.
2328         (memrw_mod_LDFLAGS): Likewise.
2330         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2331         fixvideo.mod.
2332         (loadbios_mod_SOURCE): New macro.
2333         (loadbios_mod_CFLAGS): Likewise.
2334         (loadbios_mod_LDFLAGS): Likewise.
2335         (fixvideo_mod_SOURCE): Likewise.
2336         (fixvideo_mod_CFLAGS): Likewise.
2337         (fixvideo_mod_LDFLAGS): Likewise.
2339         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2340         fixvideo.mod.
2341         (loadbios_mod_SOURCE): New macro.
2342         (loadbios_mod_CFLAGS): Likewise.
2343         (loadbios_mod_LDFLAGS): Likewise.
2344         (fixvideo_mod_SOURCE): Likewise.
2345         (fixvideo_mod_CFLAGS): Likewise.
2346         (fixvideo_mod_LDFLAGS): Likewise.
2348 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2350         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2352 2009-04-07  David S. Miller  <davem@davemloft.net>
2354         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2355         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2356         R_SPARC_WDISP30 case.
2357         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2359 2009-04-06  Pavel Roskin  <proski@gnu.org>
2361         * include/grub/misc.h (ARRAY_SIZE): New macro.
2362         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2363         New macro.
2364         * loader/i386/linux.c (allocate_pages): Use free_pages().
2365         (grub_linux_unload): Don't use free_pages().
2366         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2367         wrong index.  Treat all other modes as text modes.
2368         (grub_cmd_linux): Initialize vid_mode unconditionally to
2369         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2371         * commands/help.c (print_command_help): Use cmd->prio, not
2372         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2374 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2376         Parttool
2378         * parttool/pcpart.c: new file
2379         * commands/parttool.c: likewise
2380         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2381         (parttool_mod_SOURCES): new variable
2382         (parttool_mod_CFLAGS): likewise
2383         (parttool_mod_LDFLAGS): likewise
2384         (pcpart_mod_SOURCES): likewise
2385         (pcpart_mod_CFLAGS): likewise
2386         (pcpart_mod_LDFLAGS): likewise
2387         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2388         and parttool/pcpart.c
2389         * conf/i386-efi.rmk: likewise
2390         * conf/i386-ieee1275.rmk: likewise
2391         * conf/i386-pc.rmk: likewise
2392         * conf/powerpc-ieee1275.rmk: likewise
2393         * conf/sparc64-ieee1275.rmk: likewise
2394         * conf/x86_64-ieee1275.rmk: likewise
2396 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2398         Support for mtime and further expandability of dir command
2400         * include/grub/lib/datetime.h: moved to ...
2401         * include/grub/datetime.h: ... moved here and added
2402         declaration of grub_unixtime2datetime. All users updated
2403         * include/grub/fs.h: new syntax for dir and mtime functions in
2404         struct grub_fs
2405         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2406         and GRUB_FSHELP_FLAGS_MASK
2407         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2408         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2409         (grub_ext2_mtime): new function
2410         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2411         (grub_hfsplus_mtime): new function
2412         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2413         (GRUB_UFS_ATTR_FILE): likewise
2414         (GRUB_UFS_ATTR_LNK): likewise
2415         (struct grub_ufs_sblock): new fields mtime
2416         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2417         all users updated
2418         (grub_ufs_dir): mtime support
2419         (grub_ufs_mtime): new function
2420         * fs/affs.c (grub_affs_dir): use new dir syntax
2421         * fs/afs.c (grub_afs_dir): likewise
2422         * fs/cpio.c (grub_cpio_dir): likewise
2423         * fs/fat.c (grub_fat_find_dir): likewise
2424         * fs/hfs.c (grub_hfs_dir): likewise
2425         * fs/iso9660.c (grub_iso9660_dir): likewise
2426         * fs/jfs.c (grub_jfs_dir): likewise
2427         * fs/minix.c (grub_minix_dir): likewise
2428         * fs/ntfs.c (grub_ntfs_dir): likewise
2429         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2430         * fs/sfs.c (grub_sfs_dir): likewise
2431         * fs/xfs.c (grub_xfs_dir): likewise
2432         * util/hostfs.c (grub_hostfs_dir): likewise
2433         * lib/datetime.c: moved to ...
2434         * normal/datetime.c: ... moved here
2435         (grub_unixtime2datetime): new function
2436         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2437         * normal/completion.c (iterate_dir): use new dir syntax
2438         * normal/misc.c (grub_normal_print_device_info): tell the
2439         last modification time of a volume
2440         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2441         * conf/common.rmk: added lib/datetime.c to ls.mod
2442         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2443         (normal_mod_SOURCES): likewise
2444         (datetime_mod_SOURCES): Removed lib/datetime.c
2445         * conf/i386-efi.rmk: likewise
2446         * conf/i386-ieee1275.rmk: likewise
2447         * conf/i386-pc.rmk: likewise
2448         * conf/powerpc-ieee1275.rmk: likewise
2449         * conf/sparc64-ieee1275.rmk: likewise
2450         * conf/x86_64-efi.rmk: likewise
2452 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2454         Trim trailing spaces in FAT label and support mtools-like labels
2456         * fs/fat.c (grub_fat_iterate_dir): New function based
2457         on grub_fat_find_dir
2458         (grub_fat_find_dir): use grub_fat_iterate_dir
2459         (grub_fat_label): likewise
2461 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2463         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2464         and command.h
2465         remove extraneous kernel_elf_HEADERS
2467 2009-04-04  Bean  <bean123ch@gnail.com>
2469         * include/grub/util/misc.h: Add dummy function fsync for mingw.
2471         * util/misc.c: Likewise.
2473 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
2475         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
2476         instead of grub_printf.
2478 2009-04-03  Robert Millan  <rmh@aybabtu.com>
2480         * loader/i386/linux.c (grub_linux_setup_video): Fill
2481         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
2482         values from `mode info' structure instead of hardcoded
2483         values.
2485 2009-04-01  Pavel Roskin  <proski@gnu.org>
2487         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
2488         unused now.
2489         * genmk.rb: Likewise.
2490         * configure.ac: Likewise.
2492 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
2494         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
2495         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
2497 2009-04-01  David S. Miller  <davem@davemloft.net>
2499         * normal/sparc64/setjmp.S: Fix setjmp implementation.
2500         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
2501         (grub_setjmp): Mark with 'returns_twice' attribute.
2502         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
2503         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
2504         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
2506 2009-04-01  Robert Millan  <rmh@aybabtu.com>
2508         Reapply fix from 2008-07-28 which was accidentally reverted; also
2509         perform the same fix to a similar check in same function.
2511         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
2512         with the same number are found, just use issue a warning with
2513         grub_dprintf(), as this error has been reported to be non-fatal.
2515 2009-03-31  Pavel Roskin  <proski@gnu.org>
2517         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
2518         for cross-compilation.
2520 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2522         Fix i386-ieee1275 build.
2524         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
2525         Remove declaration.
2527 2009-03-30  Pavel Roskin  <proski@gnu.org>
2529         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
2530         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
2531         zero-terminated, rely only on the strlen value.  Fix comparison
2532         of strings differing in length.
2534 2009-03-30  Robert Millan  <rmh@aybabtu.com>
2536         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
2537         checking for abi version.  Improve error messages on BIOS to notify
2538         user about `linux16' command.
2540 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
2542         Leak fixes
2544         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
2545         in case of collision
2546         * disk/scsi.c (grub_scsi_open): free scsi in case of error
2548 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2550         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
2551         set `vid_mode' accordingly.
2552         (grub_linux_boot): Process `vid_mode' and set video mode.
2554 2009-03-29  Robert Millan  <rmh@aybabtu.com>
2556         * util/grub.d/10_linux.in (linux_entry): New function.
2557         Factorize generation of Linux boot entries.
2559 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
2561         Make the format of Environment Block plain text. The boot loader
2562         part is not tested well yet.
2564         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
2565         (buffer): Removed.
2566         (envblk): Likewise.
2567         (usage): Remove "info" and "clear". Add "unset". Update the
2568         description of "set", as this does not delete variables any
2569         longer.
2570         (create_envblk_file): Complete rewrite.
2571         (open_envblk_file): Likewise.
2572         (cmd_info): Removed.
2573         (cmd_list): Likewise.
2574         (cmd_set): Likewise.
2575         (cmd_clear): Likewise.
2576         (list_variables): New function.
2577         (write_envblk): Likewise.
2578         (set_variables): Likewise.
2579         (unset_variables): Likewise.
2580         (main): Complete rewrite.
2582         * commands/loadenv.c (buffer): Removed.
2583         (envblk): Likewise.
2584         (open_envblk_file): New function.
2585         (read_envblk_file): Complete rewrite.
2586         (grub_cmd_load_env): Likewise.
2587         (grub_cmd_list_env): Likewise.
2588         (struct blocklist): New struct.
2589         (free_blocklists): New function.
2590         (check_blocklists): Likewise.
2591         (write_blocklists): Likewise.
2592         (grub_cmd_save_env): Complete rewrite.
2594         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
2595         a plain text signature.
2596         (GRUB_ENVBLK_MAXLEN): Removed.
2597         (struct grub_envblk): Complete rewrite.
2598         (grub_envblk_find): Removed.
2599         (grub_envblk_insert): Likewise.
2600         (grub_envblk_open): New prototype.
2601         (grub_envblk_set): Likewise.
2602         (grub_envblk_delete): Put const to VALUE.
2603         (grub_envblk_iterate): Put const to NAME and VALUE.
2604         (grub_envblk_close): New prototype.
2605         (grub_envblk_buffer): New inline function.
2606         (grub_envblk_size): Likewise.
2608         * lib/envblk.c: Include grub/mm.h.
2609         (grub_env_find): Removed.
2610         (grub_envblk_open): New function.
2611         (grub_envblk_close): Likewise.
2612         (escaped_value_len): Likewise.
2613         (find_next_line): Likewise.
2614         (grub_envblk_insert): Removed.
2615         (grub_envblk_set): New function.
2616         (grub_envblk_delete): Complete rewrite.
2617         (grub_envblk_iterate): Likewise.
2619 2009-03-28  Robert Millan  <rmh@aybabtu.com>
2621         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
2622         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
2623         variables.  Use 16-bit loader.
2624         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
2625         loader.
2626         * kern/i386/loader.S (grub_linux_boot): Rename to ...
2627         (grub_linux16_boot): ... this.  Update all users.
2628         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
2629         (grub_linux_boot): ... this.  Update all users.
2631         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
2632         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
2633         commands to `linux16' and `initrd16'.
2634         (GRUB_MOD_FINI(linux)): Rename to ...
2635         (GRUB_MOD_FINI(linux16)): ... this.
2637 2009-03-24  Pavel Roskin  <proski@gnu.org>
2639         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
2640         not just for compilation.
2642 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
2644         Move multiboot helper out of kernel
2646         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
2647         `loader/i386/multiboot_helper.S'.
2648         * conf/i386-coreboot.rmk: Likewise
2649         * conf/i386-ieee1275.rmk: Likewise
2651         * kern/i386/loader.S: Move multiboot helpers from here...
2652         * loader/i386/multiboot_helper.S: ...moved here
2653         * include/grub/i386/loader.h: Move declarations of multiboot
2654         helpers from here...
2655         * include/grub/i386/multiboot.h: ...moved here
2656         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
2658 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2660         * kern/env.c (grub_env_context_open): Added an argument to specify
2661         whether a new context inherits exported variables from current
2662         one. This is useful when making a sandbox to interpret a config
2663         file.
2664         All callers updated.
2666         * include/grub/env.h (grub_env_context_open): Updated the prototype.
2668 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2670         * kern/env.c (grub_env_context_close): Fix memory leaks.
2672 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
2674         * normal/main.c (grub_normal_execute): Added an argument
2675         BATCH to specify if an interactive interface should be provided
2676         after reading a config file.
2677         All callers updated.
2678         (read_command_list): Prevent being executed twice.
2679         (read_fs_list): Likewise.
2681         * include/grub/normal.h (grub_normal_execute): Updated the
2682         prototype.
2684 2009-03-22  Pavel Roskin  <proski@gno.org>
2686         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
2687         _start.
2688         * kern/i386/pc/startup.S: Likewise.
2689         * kern/i386/efi/startup.S: Likewise.
2690         * kern/i386/ieee1275/startup.S: Likewise.
2691         * kern/i386/coreboot/startup.S: Likewise.
2692         * kern/x86_64/efi/startup.S: Likewise.
2694         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
2695         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
2696         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
2698 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
2700         Bugfixes in multiboot for bugs uncovered by solaris kernel.
2702         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
2703         limit detection.
2704         Use vaddr of correct segment for entry_point.
2706 2009-03-21  Bean  <bean123ch@gmail.com>
2708         * commands/blocklist.c: Add include file <grub/command.h>, remove
2709         <grub/normal.h> and <grub/arg.h>.
2710         (grub_cmd_blocklist): Use the new command interface.
2711         (GRUB_MOD_INIT): Likewise.
2712         (GRUB_MOD_FINI): Likewise.
2713         * commands/boot.c: Likewise.
2714         * commands/cat.c: Likewise.
2715         * commands/cmp.c: Likewise.
2716         * commands/configfile.c: Likewise.
2717         * commands/crc.c: Likewise.
2718         * commands/echo.c: Likewise.
2719         * commands/halt.c: Likewise.
2720         * commands/handler.c: Likewise.
2721         * commands/hdparm.c: Likewise.
2722         * commands/help.c: Likewise.
2723         * commands/hexdump.c: Likewise.
2724         * commands/loadenv.c: Likewise.
2725         * commands/ls.c: Likewise.
2726         * commands/lsmmap.c: Likewise.
2727         * commands/lspci.c: Likewise.
2728         * commands/loadenv.c: Likewise.
2729         * commands/read.c: Likewise.
2730         * commands/reboot.c: Likewise.
2731         * commands/search.c: Likewise.
2732         * commands/sleep.c: Likewise.
2733         * commands/test.c: Likewise.
2734         * commands/usbtest.c: Likewise.
2735         * commands/videotest.c: Likewise.
2736         * commands/i386/cpuid.c: Likewise.
2737         * commands/i386/pc/halt.c: Likewise.
2738         * commands/i386/pc/play.c: Likewise.
2739         * commands/i386/pc/pxecmd.c: Likewise.
2740         * commands/i386/pc/vbeinfo.c: Likewise.
2741         * commands/i386/pc/vbetest.c: Likewise.
2742         * commands/ieee1275/suspend.c: Likewise.
2743         * disk/loopback.c: Likewise.
2744         * font/font_cmd.c: Likewise.
2745         * hello/hello.c: Likewise.
2746         * loader/efi/appleloader.c: Likewise.
2747         * loader/efi/chainloader.c: Likewise.
2748         * loader/i386/bsd.c: Likewise.
2749         * loader/i386/efi/linux.c: Likewise.
2750         * loader/i386/ieee1275/linux.c: Likewise.
2751         * loader/i386/linux.c: Likewise.
2752         * loader/i386/pc/chainloader.c: Likewise.
2753         * loader/i386/pc/linux.c: Likewise.
2754         * loader/powerpc/ieee1275/linux.c: Likewise.
2755         * loader/multiboot_loader.c: Likewise.
2756         * term/gfxterm.c: Likewise.
2757         * term/i386/pc/serial.c: Likewise.
2758         * term/terminfo.c: Likewise.
2760         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
2761         * term/i386/pc/vga.c: Likewise.
2762         * video/readers/jpeg.c: Likewise.
2763         * video/readers/png.c: Likewise.
2764         * video/readers/tga.c: Likewise.
2766         * util/grub-fstest (cmd_loopback): Removed.
2767         (cmd_blocklist): Likewise.
2768         (cmd_ls): Likewise.
2769         (grub_register_command): Likewise.
2770         (grub_unregister_command): Likewise.
2771         (execute_command): Use grub_command_find to locate command and execute
2772         it.
2774         * include/grub/efi/chainloader.h: Removed.
2775         * loader/efi/chainloader_normal.c: Likewise.
2776         * loader/i386/bsd_normal.c: Likewise.
2777         * loader/i386/pc/chainloader_normal.c: Likewise.
2778         * loader/i386/pc/multiboot_normal.c: Likewise.
2779         * loader/linux_normal.c: Likewise.
2780         * loader/multiboot_loader_normal.c: Likewise.
2781         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
2783         * gencmdlist.sh: Scan new registration command grub_register_extcmd
2784         and grub_register_command_p1.
2786         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
2787         kern/command.c, lib/arg.c and commands/extcmd.c.
2788         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
2789         (minicmd_mod_SOURCES): New variable.
2790         (minicmd_mod_CFLAGS): Likewise.
2791         (minicmd_mod_LDFLAGS): Likewise.
2792         (extcmd_mod_SOURCES): Likewise.
2793         (extcmd_mod_CFLAGS): Likewise.
2794         (extcmd_mod_LDFLAGS): Likewise.
2795         (boot_mod_SOURCES): Removed.
2796         (boot_mod_CFLAGS): Likewise.
2797         (boot_mod_LDFLAGS): Likewise.
2799         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
2800         kern/corecmd.c.
2801         (kernel_img_HEADERS): Add command.h.
2802         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
2803         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
2804         and lib/arg.c.
2805         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
2806         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
2807         remove the corresponding normal mode command.
2808         (normal_mod_SOURCES): Remove normal/arg.c.
2809         * conf/i386-coreboot.rmk: Likewise.
2810         * conf/i386-efi.rmk: Likewise.
2811         * conf/i386-ieee1275.rmk: Likewise.
2812         * conf/powerpc-ieee1275.rmk: Likewise.
2813         * conf/x86_64-efi.rmk: Likewise.
2815         * include/grub/arg.h: Move from here ...
2816         * include/grub/lib/arg.h: ... to here.
2818         * normal/arg.c: Move from here ...
2819         * lib/arg.c: ... to here.
2821         * commands/extcmd.c: New file.
2822         * commands/minicmd.c: Likewise.
2823         * include/grub/command.h: Likewise.
2824         * include/grub/extcmd.h: Likewise.
2825         * kern/command.c: Likewise.
2826         * kern/corecmd.c: Likewise.
2828         * kern/list.c (grub_list_iterate): Return int instead of void.
2829         (grub_list_insert): New function.
2830         (grub_prio_list_insert): Likewise.
2832         * kern/rescue.c (grub_rescue_command): Removed.
2833         (grub_rescue_command_list): Likewise.
2834         (grub_rescue_register_command): Likewise.
2835         (grub_rescue_unregister_command): Likewise.
2836         (grub_rescue_cmd_boot): Move to minicmd.c
2837         (grub_rescue_cmd_help): Likewise.
2838         (grub_rescue_cmd_info): Likewise.
2839         (grub_rescue_cmd_boot): Likewise.
2840         (grub_rescue_cmd_testload): Likewise.
2841         (grub_rescue_cmd_dump): Likewise.
2842         (grub_rescue_cmd_rmmod): Likewise.
2843         (grub_rescue_cmd_lsmod): Likewise.
2844         (grub_rescue_cmd_exit): Likewise.
2845         (grub_rescue_print_devices): Moved to corecmd.c.
2846         (grub_rescue_print_files): Likewise.
2847         (grub_rescue_cmd_ls): Likewise.
2848         (grub_rescue_cmd_insmod): Likewise.
2849         (grub_rescue_cmd_set): Likewise.
2850         (grub_rescue_cmd_unset): Likewise.
2851         (attempt_normal_mode): Use grub_command_find to get normal module.
2852         (grub_enter_rescue_mode): Use grub_register_core_commands to register
2853         commands, remove grub_rescue_register_command calls.
2855         * normal/command.c (grub_register_command): Removed.
2856         (grub_unregister_command): Likewise.
2857         (grub_command_find): Likewise.
2858         (grub_iterate_commands): Likewise.
2859         (rescue_command): Likewise.
2860         (export_command): Moved to corecmd.c.
2861         (set_command): Removed.
2862         (unset_command): Likewise.
2863         (insmod_command): Likewise.
2864         (rmmod_command): Likewise.
2865         (lsmod_command): Likewise.
2866         (grub_command_init): Likewise.
2868         * normal/completion.c (iterate_command): Use cmd->prio to check for
2869         active command.
2870         (complete_arguments): Use grub_extcmd_t structure to find options.
2871         (grub_normal_do_completion): Change function grub_iterate_commands to
2872         grub_command_iterate.
2874         * normal/execute.c (grub_script_execute_cmd): No need to parse
2875         argument here.
2877         * normal/main.c (grub_dyncmd_dispatcher): New function.
2878         (read_command_list): Register unload commands as dyncmd.
2879         (grub_cmd_normal): Use new command interface, register rescue,
2880         unregister normal at entry, register normal, unregister rescue at exit.
2882         * include/grub/list.h (grub_list_test_t): New type.
2883         (grub_list_iterate): Return int instead of void.
2884         (grub_list_insert): New function.
2885         (GRUB_AS_NAMED_LIST_P): New macro.
2886         (GRUB_AS_PRIO_LIST): Likewise.
2887         (GRUB_AS_PRIO_LIST_P): Likewise.
2888         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
2889         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
2890         (grub_prio_list): New structure.
2891         (grub_prio_list_insert): New function.
2892         (grub_prio_list_remove): New inline function.
2894         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
2895         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
2896         (GRUB_COMMAND_FLAG_MENU): Likewise.
2897         (GRUB_COMMAND_FLAG_BOTH): Likewise.
2898         (GRUB_COMMAND_FLAG_TITLE): Likewise.
2899         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
2900         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
2901         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
2902         (grub_command): Likewise.
2903         (grub_register_command): Likewise.
2904         (grub_command_find): Likewise.
2905         (grub_iterate_commands): Likewise.
2906         (grub_command_init): Likewise.
2907         (grub_arg_parse): Likewise.
2908         (grub_arg_show_help): Likewise.
2910         * include/grub/rescue.h (grub_rescue_register_command): Removed.
2911         (grub_rescue_unregister_command): Likewise.
2913         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
2914         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
2915         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
2917         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
2918         grub_rescue_cmd_initrd.
2919         * include/grub/i386/loader.h: Likewise.
2920         * include/grub/x86_64/loader.h: Likewise.
2922         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2924 2009-03-21  Bean  <bean123ch@gmail.com>
2926         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
2927         instead of stat in mingw environment.
2929         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
2931         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
2933         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
2934         AC_CONFIG_LINKS.
2936 2009-03-21  Bean  <bean123ch@gmail.com>
2938         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
2939         out of range error.
2941 2009-03-18  Michel Dänzer  <michel@daenzer.net>
2943         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
2944         checking inode flags for EXT4_EXTENTS_FLAG.
2946 2009-03-18  Robert Millan  <rmh@aybabtu.com>
2948         * loader/i386/linux.c: Include `<grub/video.h>' and
2949         `<grub/i386/pc/vbe.h>'..
2950         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
2951         (grub_linux32_boot): Attempt to configure video settings with
2952         grub_linux_setup_video().
2953         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
2954         to avoid grub_console_fini() which would step out of graphical mode
2955         unconditionally.
2957 2009-03-14  Robert Millan  <rmh@aybabtu.com>
2959         Fix build on powerpc.
2960         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
2962 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
2964         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
2965         background image command.
2967 2009-03-12  Colin D Bennett  <colin@gibibit.com>
2969         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
2970         (grub_gfxterm_putchar): Extract pairs of identical calls to
2971         draw_cursor out of conditional blocks.
2973 2009-03-11  Pavel Roskin  <proski@gnu.org>
2975         * fs/hfs.c (grub_hfs_strncasecmp): New function.
2976         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
2978 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2980         * loader/i386/multiboot_elfxx.c
2981         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
2983 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
2985         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
2986         `kern/handler.c'.
2988 2009-03-11  Robert Millan  <rmh@aybabtu.com>
2990         * loader/i386/multiboot.c (code_size): New variable.
2991         (grub_multiboot): Define offsets by adding to `code_size' rather
2992         than subtracting from `grub_multiboot_payload_size'.  Provide
2993         4-byte alignment to MBI and others by increasing
2994         `boot_loader_name_length' appropriately.
2996         * loader/i386/multiboot_elfxx.c
2997         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
2999 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3001         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3002         `fs/ext2.c'.
3004 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3006         Make loader/i386/linux.c usable on i386-pc again.
3008         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3009         memory to heap.
3010         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3011         `#error' stanza.
3013 2009-03-07  Bean  <bean123ch@gmail.com>
3015         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3016         allocation.
3018 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3020         Fix display issue on terminals with screen size other than 80x25
3021         (e.g. gfxterm with resolution higher than 640x480).
3023         * normal/main.c (grub_normal_init_page): Display title text in a
3024         position relative to the center of the terminal instead of relying
3025         on a hardcoded offset.
3027 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3029         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3030         installed.
3032         * Makefile.in (host_kernel): New variable.
3033         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3034         scripts instead of just the windows one.
3035         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3037 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3039         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3040         `kern/handler.c'.
3041         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3042         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3043         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3044         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3045         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3046         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3048 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3050         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3051         or if there's no space for the disk label and print the partition number on a
3052         invalid magic.
3054 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3056         * util/misc.c: Include <time.h>.
3057         (grub_millisleep): New function.
3059 2009-03-04  Bean  <bean123ch@gmail.com>
3061         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3062         another option -mno-red-zone.
3064         * commands/handler.c: Change module description.
3066         * kern/handler.c: Add missing space at the end of description line.
3068         * kern/list.c: Likewise.
3070 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3072         Move more components to the relocation area, and fix mbi pointer
3073         handling to use the destination rather than the origin (thanks to
3074         Vladimir Serbinenko for spotting).
3076         * loader/i386/multiboot.c (mbi_dest): New variable.
3077         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3078         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3079         relocation area.
3081 2009-03-01  Bean  <bean123ch@gmail.com>
3083         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3084         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3085         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3086         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3088         * loader/i386/efi/linux.c (acpi_guid): New variable.
3089         (acpi_guid): Likewise.
3090         (EBDA_SEG_ADDR): New constant.
3091         (LOW_MEM_ADDR): Likewise.
3092         (FAKE_EBDA_SEG): Likewise.
3093         (fake_bios_data): New function.
3094         (grub_linux_boot): Call fake_bios_data.
3096 2009-03-01  Bean  <bean123ch@gmail.com>
3098         * commands/terminal.c: Removed.
3100         * commands/handler.c: New file.
3102         * include/grub/list.h: Likewise.
3104         * include/grub/handler.h: Likewise.
3106         * kern/list.c: Likewise.
3108         * kern/handler.c: Likewise.
3110         * kern/term.h: Include header file <grub/handler.h>.
3111         (grub_term_input): Move next field to the beginning.
3112         (grub_term_output): Likewise.
3113         (grub_term_input_class): New variable.
3114         (grub_term_output_class): Likewise.
3115         (grub_term_register_input): Changed to inline function.
3116         (grub_term_register_output): Likewise.
3117         (grub_term_unregister_input): Likewise.
3118         (grub_term_unregister_output): Likewise.
3119         (grub_term_set_current_input): Likewise.
3120         (grub_term_set_current_output): Likewise.
3121         (grub_term_get_current_input): Likewise.
3122         (grub_term_get_current_output): Likewise.
3123         (grub_term_iterate_input): Removed.
3124         (grub_term_iterate_output): Likewise.
3126         * kern/term.c (grub_term_list_input): Removed.
3127         (grub_term_list_output): Likewise.
3128         (grub_term_input_class): New variable.
3129         (grub_term_output_class): Likewise.
3130         (grub_cur_term_input): Change variable as macro.
3131         (grub_cur_term_output): Likewise.
3132         (grub_term_register_input): Removed.
3133         (grub_term_register_output): Likewise.
3134         (grub_term_unregister_input): Likewise.
3135         (grub_term_unregister_output): Likewise.
3136         (grub_term_set_current_input): Likewise.
3137         (grub_term_set_current_output): Likewise.
3138         (grub_term_iterate_input): Likewise.
3139         (grub_term_iterate_output): Likewise.
3140         (grub_term_get_current_input): Likewise.
3141         (grub_term_get_current_output): Likewise.
3143         * util/grub-editenv.c: Include header file <grub/handler.h>.
3144         (grub_term_get_current_input): Removed.
3145         (grub_term_get_current_output): Likewise.
3146         (grub_term_input_class): New variable.
3147         (grub_term_output_class): Likewise.
3149         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3150         (grub_term_get_current_output): Likewise.
3151         (grub_term_input_class): New variable.
3152         (grub_term_output_class): Likewise.
3154         * util/grub-probe.c (grub_term_get_current_input): Removed.
3155         (grub_term_get_current_output): Likewise.
3156         (grub_term_input_class): New variable.
3157         (grub_term_output_class): Likewise.
3159         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3160         (grub_term_get_current_output): Likewise.
3161         (grub_term_input_class): New variable.
3162         (grub_term_output_class): Likewise.
3164         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3165         (terminal_mod_SOURCES): Likewise.
3166         (terminal_mod_CFLAGS): Likewise.
3167         (terminal_mod_LDFLAGS): Likewise.
3169         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3170         handler.c.
3171         (kernel_img_SOURCES): Add list.c and handler.c.
3172         (kernel_img_HEADERS): Add list.h and handler.h.
3174         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3175         handler.c.
3176         (kernel_mod_SOURCES): Add list.c and handler.c.
3177         (kernel_mod_HEADERS): Add list.h and handler.h.
3179         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3180         handler.c.
3181         (kernel_elf_SOURCES): Add list.c and handler.c.
3182         (kernel_elf_HEADERS): Add list.h and handler.h.
3184         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3185         handler.c.
3186         (kernel_elf_SOURCES): Add list.c and handler.c.
3187         (kernel_elf_HEADERS): Add list.h and handler.h.
3189         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3190         handler.c.
3191         (kernel_mod_SOURCES): Add list.c and handler.c.
3192         (kernel_mod_HEADERS): Add list.h and handler.h.
3194         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3195         handler.c.
3196         (kernel_elf_SOURCES): Add list.c and handler.c.
3197         (kernel_elf_HEADERS): Add list.h and handler.h.
3199 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3201         Factorize elf32 / elf64 code in Multiboot loader.  This will
3202         prevent it from getting out of sync again.
3204         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3205         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3206         grub_multiboot_load_elf64): Move from here ...
3207         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3208         grub_multiboot_load_elf): ... to here (new file).
3210 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3212         * util/grub.d/10_linux.in: Rename "single-user mode" to
3213         "recovery mode".
3215 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3217         Don't leak in SCSI code.
3218         * disk/scsi.c (grub_scsi_close): free `scsi'.
3220 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3222         * loader/i386/pc/multiboot.c: Move from here ...
3223         * loader/i386/multiboot.c: ... to here.  Update all users.
3225 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3227         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3228         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3230 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3232         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3233         b-tree.
3235 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3237         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3238         `0x' qualifier as 0 when base is specified as parameter).
3240 2009-02-24  Bean  <bean123ch@gmail.com>
3242         * configure.ac: Check for -mcmodel=large in x86_64 target.
3244         * include/grub/efi/api.h (efi_call_10): New macro.
3245         (efi_wrap_10): New function.
3247         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3248         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3249         (GRUB_PE32_REL_BASED_LOW): Likewise.
3250         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3251         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3252         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3253         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3254         (GRUB_PE32_REL_BASED_REL): Likewise.
3255         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3256         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3257         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3259         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3260         issue.
3262         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3263         (efi_wrap_10): New function.
3265         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3267         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3268         MB/MBP model (NV chipset).
3269         (devdata_devs): Add devpath_5 to the list.
3271         * load/i386/efi/linux.c (video_base): Remove variable.
3272         (RGB_MASK): New macro.
3273         (RGB_MAGIC): Likewise.
3274         (LINE_MIN): Likewise.
3275         (LINE_MAX): Likewise.
3276         (FBTEST_STEP): Likewise.
3277         (FBTEST_COUNT): Likewise.
3278         (fb_list): New variable.
3279         (grub_find_video_card): Remove function.
3280         (find_framebuf): New function.
3281         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3282         line length.
3284         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3285         problem for x86_64.
3287 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3289         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3291         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3292         coding tool name.
3294 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3296         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3297         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3298         in our relocation, instead of using it directly from heap.  Also
3299         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3301 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3303         Implement USB keyboard support (based on patch by Marco Gerards)
3305         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3306         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3307         (usb_keyboard_mod_LDFLAGS): New variables.
3309         * term/usb_keyboard.c: New file.
3311 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3313         Corrected wrong declaration
3315         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3317 2009-02-14  Christian Franke  <franke@computer.org>
3319         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3320         (grub_lspci_iter): Print class code and programming interface byte.
3322 2009-02-14  Christian Franke  <franke@computer.org>
3324         * gendistlist.sh: Ignore `.svn' directories.
3326 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3328         * fs/fat.c: Add 2009 to Copyright line.
3330 2009-02-14  Christian Franke  <franke@computer.org>
3332         * commands/hdparm.c: New file.  Provides `hdparm' command
3333         which sends ATA commands via grub_disk_ata_pass_through ().
3335         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3337         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3338         and <grub/cpu/io.h> to include/grub/ata.h.
3339         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3340         (GRUB_CDROM_SECTOR_SIZE): Remove.
3341         (GRUB_ATA_*): Move to include/grub/ata.h.
3342         (GRUB_ATAPI_*): Likewise.
3343         (enum grub_ata_commands): Likewise.
3344         (enum grub_ata_timeout_milliseconds): Likewise.
3345         (struct grub_ata_device): Likewise.
3346         (grub_ata_regset): Likewise.
3347         (grub_ata_regget): Likewise.
3348         (grub_ata_regset2): Likewise.
3349         (grub_ata_regget2): Likewise.
3350         (grub_ata_check_ready): Likewise.
3351         (grub_ata_wait_not_busy): Remove static, exported in
3352         include/grub/ata.h.
3353         (grub_ata_wait_drq): Likewise.
3354         (grub_ata_pio_read): Likewise.
3356         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3357         function for hdparm.mod.
3359         * include/grub/ata.h: New file, contains declarations from
3360         disk/ata.c.
3361         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3363         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3364         (grub_disk_ata_pass_through): New exported variable.
3366         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3368 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3370         Support multiple fallback entries, and provide an API to support
3371         executing default+fallback menu entries.  Renamed the `terminal' menu
3372         viewer to `text'.
3374         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3375         variable declaration.
3376         (grub_menu_execute_callback): New structure declaration.
3377         (grub_menu_execute_callback_t): New typedef.
3378         (grub_menu_execute_with_fallback): New function declaration.
3379         (grub_menu_get_entry): Likewise.
3380         (grub_menu_get_timeout): Likewise.
3381         (grub_menu_set_timeout): Likewise.
3383         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3385         * normal/menu.c (grub_wait_after_message): Moved to
3386         `normal/menu_text.c'.
3387         (draw_border): Likewise.
3388         (print_message): Likewise.
3389         (print_entry): Likewise.
3390         (print_entries): Likewise.
3391         (grub_menu_init_page): Likewise.
3392         (get_entry_number): Likewise.
3393         (print_timeout): Likewise.
3394         (run_menu): Likewise.
3395         (grub_menu_execute_entry): Likewise.
3396         (show_text_menu): Likewise.
3397         (get_and_remove_first_entry_number): New function.
3398         (grub_menu_execute_with_fallback): Likewise.
3399         (get_entry): Renamed to ...
3400         (grub_menu_get_entry): .. this and made it global.
3401         (get_timeout): Renamed to ...
3402         (grub_menu_get_timeout): ... this and made it global.
3403         (set_timeout): Renamed to ...
3404         (grub_menu_set_timeout): ... this and made it global.
3405         (grub_normal_terminal_menu_viewer): Renamed to ...
3406         (grub_normal_text_menu_viewer): ... this.
3408         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3409         from normal/menu.c.
3411         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3412         (normal_mod_SOURCES): Likewise.
3414         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3415         (normal_mod_SOURCES): Likewise.
3417         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3418         (normal_mod_SOURCES): Likewise.
3420         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3421         (normal_mod_SOURCES): Likewise.
3423         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3424         (normal_mod_SOURCES): Likewise.
3426         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3427         (normal_mod_SOURCES): Likewise.
3429         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3430         (normal_mod_SOURCES): Likewise.
3432 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3434         * util/grub.d/00_header.in: Update old reference to `font' command.
3436 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3438         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3440         Based on patch from Javier Martín.
3442 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3444         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3445         to avoid false positives with FAT.
3446         (grub_fstest_SOURCES): Likewise.
3447         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3448         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3449         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3450         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3451         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3452         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3454 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3456         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3457         bpb.version_specific.fat12_or_fat16.fstype and
3458         bpb.version_specific.fat32.fstype.
3460 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3462         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3464 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3466         * Makefile.in (host_os, host_cpu): New variables.
3467         (target_os): Remove.  Update all users.
3469 2009-02-08  Marco Gerards  <marco@gnu.org>
3471         * Makefile.in (enable_grub_emu_usb): New variable.
3472         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
3473         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
3474         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
3475         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
3476         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
3477         `usbtest.mod' and `usbms.mod'.
3478         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
3479         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
3480         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
3481         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
3482         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
3483         variables.
3485         * disk/usbms.c: New file.
3487         * include/grub/usb.h: Likewise.
3489         * include/grub/usbtrans.h: Likewise.
3491         * include/grub/usbdesc.h: Likewise.
3493         * bus/usb/usbtrans.c: Likewise.
3495         * bus/usb/ohci.c: Likewise.
3497         * bus/usb/uhci.c: Likewise.
3499         * bus/usb/usbhub.c: Likewise.
3501         * bus/usb/usb.c: Likewise.
3503         * commands/usbtest.c: Likewise.
3505         * util/usb.c: Likewise.
3507         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
3509         * configure.ac: Test for libusb presence.
3511         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
3513 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
3515         * kern/mm.c: Add more comments.
3517 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3519         Patch from Javier Martín.
3520         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
3521         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
3523 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3525         * fs/cpio.c: Split tar functionality to ...
3526         * fs/tar.c: ... here (new file).  Update all users.
3528 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3530         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
3531         backward-incompatible features.
3533         Based on patch from Javier Martín, with some adjustments.
3535 2009-02-07  Michael Scherer  <misc@mandriva.org>
3537         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
3539 2009-02-07  Robert Millan  <rmh@aybabtu.com>
3541         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
3542         position of `disk/lvm.c' to ensure grub_init_all() always picks it
3543         after the RAID stuff.
3545 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
3547         Fixes problem when running vbetest command as reported by
3548         Vladimir Serbinenko <phcoder@gmail.com>.
3550         * (grub_vbe_set_video_mode): Fixed problem with text modes.
3552 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
3554         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
3555         /dev/md/NpN style mdraid devices.
3557 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3559         * util/unifont2pff.rb: Remove.
3561 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3563         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
3564         `#'.
3566 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
3568         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
3569         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3570         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3571         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3572         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3573         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3574         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3576 2009-02-02  Christian Franke  <franke@computer.org>
3578         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
3580 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
3582         * INSTALL: Note that we now require at least autoconf 2.59 and
3583         that LZO is optional.
3585 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3587         Base on patch on bug #24154 created by Tomas Tintera
3588         <trosos@seznam.cz>.
3590         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
3592 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
3594         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
3595         <bero@arklinux.org>.
3597         * normal/parser.y (script_init): Add missing semicolon.
3599 2009-01-31  Colin D Bennett  <colin@gibibit.com>
3601         * normal/main.c: Add include to grub/menu_viewer.h.
3602         (free_menu_entry_classes): Added.
3603         (grub_normal_menu_addentry): Added class property handling.
3604         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
3605         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
3607         * normal/menu_viewer.c: New file.
3609         * normal/menu.c (run_menu_entry): Renamed to ...
3610         (grub_menu_execute_entry): ... this and made it as global.
3611         (grub_menu_run): Renamed to ...
3612         (show_text_menu): ... this and made it local.
3613         (show_text_menu): Adapt to new function names.
3614         (grub_normal_terminal_menu_viewer): New global variable.
3616         * include/grub/menu.h: New file.
3618         * include/grub/menu_viewer.h: New file.
3620         * include/grub/normal.h: Added include to grub/menu.h.
3621         (grub_menu_entry): Moved to include/grub/menu.h.
3622         (grub_menu_entry_t): Likewise.
3623         (grub_menu): Likewise.
3624         (grub_menu_t): Likewise.
3625         (grub_normal_terminal_menu_viewer): Added.
3626         (grub_menu_execute_entry): Likewise.
3627         (grub_menu_run): Removed.
3629         * DISTLIST: Added include/grub/menu.h.
3630         Added include/grub/menu_viewer.h.
3631         Added normal/menu_viewer.c.
3633 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
3635         * normal/execute.c (grub_script_execute_menuentry): Changed to use
3636         arglist for menutitle arguments.
3638         * normal/main.c (grub_normal_menu_addentry): Likewise.
3640         * normal/parser.y (menuentry): Likewise.
3642         * normal/script.c (grub_script_create_cmdmenu): Likewise.
3644         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
3645         (grub_script_create_cmdmenu): Likewise.
3647         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
3649         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
3650         changes.
3652         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
3654         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
3656         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
3658         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3660         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3662         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
3664 2009-01-30  Christian Franke  <franke@computer.org>
3666         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
3667         in option help text.
3669 2009-01-27  Pavel Roskin  <proski@gnu.org>
3671         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
3673 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3675         * commands/lsmmap.c: Add include to grub/machine/memory.h.
3677         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
3679         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
3680         unregister function.
3682 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
3684         * disk/scsi.c (grub_scsi_read): Fix sign problem.
3686         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
3688         * util/grub-mkfont.c (usage): Fix typo.
3690         * util/elf/grub-mkimage.c (load_modules): Fix warning.
3692 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
3694         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
3696         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
3698         * kern/misc.c (grub_strcasecmp): New function.
3699         (grub_strcasecmp): Use grub_size_t instead of int for length.
3700         Fix return value.
3701         * include/grub/misc.h: Update function prototypes.
3703 2009-01-26  Robert Millan  <rmh@aybabtu.com>
3705         * configure.ac: Fix cross-compilation check.
3707 2009-01-22  Christian Franke  <franke@computer.org>
3709         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
3710         (precision) digit string.  Allow `.format2' without `format1' (width).
3711         Limit input chars for `%s' output to `format2' if specified.  This is
3712         compatible with standard printf ().
3714 2009-01-22  Christian Franke  <franke@computer.org>
3716         * disk/ata.c (grub_ata_wait_status): Replace by ...
3717         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
3718         other status bits may be invalid while BSY is asserted.
3719         (grub_ata_check_ready): New function.
3720         (grub_ata_cmd): Removed.
3721         (grub_ata_wait_drq): New function.
3722         (grub_ata_strncpy): Remove inline.
3723         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
3724         and error check now done by grub_ata_wait_drq ().
3725         (grub_ata_pio_write): Likewise.
3726         (grub_atapi_identify): Set DEV before check for !BSY.  Use
3727         grub_ata_wait_drq () to wait for data.
3728         (grub_ata_device_initialize): Add status register check to
3729         detect missing SATA slave devices.  Add debug messages.
3730         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
3731         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
3732         transfer loop by grub_ata_pio_write ().
3733         (grub_ata_identify): Set DEV before check for !BSY. Use
3734         grub_ata_wait_drq () to wait for data.
3735         (grub_ata_setaddress): Set DEV before check for !BSY.
3736         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
3737         read/write in one loop.  Fix invalid command on write.  Fix incomplete
3738         command on (size % batch) == 0.  Add missing error check after write of
3739         last block.  Add debug messages.
3740         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
3742 2009-01-19  Christian Franke  <franke@computer.org>
3744         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
3745         (GRUB_ATAPI_IREASON_*): Likewise.
3746         (grub_ata_pio_write): Fix timeout error return.
3747         (grub_atapi_identify): Add grub_ata_wait () after cmd.
3748         (grub_atapi_wait_drq): New function.
3749         (grub_atapi_packet): New parameter `size'.
3750         Use grub_atapi_wait_drq () and direct write instead of
3751         grub_ata_pio_write ().
3752         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
3753         reads the number of bytes requested by the device for each DRQ
3754         assertion.
3755         (grub_atapi_write): Remove old implementation, return not
3756         implemented instead.
3758 2009-01-19  Christian Franke  <franke@computer.org>
3760         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
3761         of 512 to calculate data size.
3762         (grub_scsi_read12): Likewise.
3763         (grub_scsi_write10): Likewise.
3764         (grub_scsi_write12): Likewise.
3765         (grub_scsi_read): Adjust size according to blocksize.
3766         Add checks for invalid blocksize and unaligned transfer.
3768 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
3770         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
3772         * term/gfxterm.c (write_char): Fix background rendering for wide
3773         width glyphs.
3775 2009-01-19  Robert Millan  <rmh@aybabtu.com>
3777         * config.guess: Update to latest version from config git.
3778         * config.sub: Likewise.
3780 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
3782         * Makefile.in: Change font compilation to use new grub-mkfont instead
3783         of java version.
3785         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
3786         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
3787         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3788         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
3789         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
3790         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
3791         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
3792         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
3793         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
3795 2009-01-16  Christian Franke  <franke@computer.org>
3797         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
3798         (enum grub_ata_timeout_milliseconds): New enum.
3799         (grub_ata_wait_status): Add parameter milliseconds.
3800         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
3801         recovery from timed-out commands.
3802         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
3803         return grub_errno instead of REG_ERROR.
3804         (grub_ata_pio_write): Add parameter milliseconds.
3805         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
3806         Pass milliseconds to grub_ata_wait_status () and
3807         grub_ata_pio_read ().
3808         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
3809         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
3810         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
3811         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
3812         It is not suitable for device detection, because DEV bit is ignored,
3813         the command may run too long, and not all devices set the signature
3814         properly.
3815         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
3816         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
3817         Fix device selection, DEV bit must be set first to address the registers
3818         of the correct device.
3819         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
3820         grub_ata_pio_read/write ().
3821         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
3822         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
3824 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
3826         * util/grub-editenv.c (main): Use fseeko(), not fseek().
3828 2009-01-13  Bean  <bean123ch@gmail.com>
3830         * util/grub-mkfont.c (write_font): forget to remove some debug code.
3832 2009-01-13  Bean  <bean123ch@gmail.com>
3834         * Makefile.in: (enable_grub_mkfont): New variable.
3835         (freetype_cflags): Likewise.
3836         (freetype_libs): Likewise.
3838         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
3839         (grub_mkfont_SOURCES): New variable.
3840         (grub_mkfont_CFLAGS): Likewise.
3841         (grub_mkfont_LDFLAGS): Likewise.
3843         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
3844         library if `--enable-grub-mkfont' is requested.
3845         (enable_grub_mkfont): New variable.
3846         (freetype_cflags): Likewise.
3847         (freetype_libs): Likewise.
3849         * util/grub-mkfont.c: New file.
3851 2009-01-12  Christian Franke  <franke@computer.org>
3853         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
3854         mode check.  Fix setting of compat_use[].
3856 2009-01-10  Robert Millan  <rmh@aybabtu.com>
3858         Update a few copyright years which we forgot to do in 2008 (only for
3859         files whose changes made in 2008 were copyright-significant)
3861         * Makefile.in: Add 2008 to Copyright line.
3862         * disk/ieee1275/ofdisk.c: Likewise.
3863         * disk/efi/efidisk.c: Likewise.
3864         * kern/dl.c: Likewise.
3865         * kern/sparc64/ieee1275/init.c: Likewise.
3866         * kern/mm.c: Likewise.
3867         * kern/efi/mm.c: Likewise.
3868         * boot/i386/pc/boot.S: Likewise.
3869         * genfslist.sh: Likewise.
3870         * fs/iso9660.c: Likewise.
3871         * fs/hfs.c: Likewise.
3872         * fs/jfs.c: Likewise.
3873         * fs/minix.c: Likewise.
3874         * fs/ufs.c: Likewise.
3875         * gensymlist.sh.in: Likewise.
3876         * genkernsyms.sh.in: Likewise.
3877         * include/grub/misc.h: Likewise.
3878         * include/grub/types.h: Likewise.
3879         * include/grub/symbol.h: Likewise.
3880         * include/grub/elf.h: Likewise.
3881         * include/grub/kernel.h: Likewise.
3882         * include/grub/disk.h: Likewise.
3883         * include/grub/dl.h: Likewise.
3884         * include/grub/i386/linux.h: Likewise.
3885         * include/grub/i386/pc/biosdisk.h: Likewise.
3886         * include/grub/efi/api.h: Likewise.
3887         * include/grub/efi/pe32.h: Likewise.
3888         * include/grub/util/misc.h: Likewise.
3889         * normal/execute.c: Likewise.
3890         * normal/arg.c: Likewise.
3891         * normal/completion.c: Likewise.
3892         * normal/lexer.c: Likewise.
3893         * normal/parser.y: Likewise.
3894         * normal/misc.c: Likewise.
3895         * commands/i386/pc/vbeinfo.c: Likewise.
3896         * commands/hexdump.c: Likewise.
3897         * commands/terminal.c: Likewise.
3898         * commands/ls.c: Likewise.
3899         * commands/help.c: Likewise.
3900         * partmap/pc.c: Likewise.
3901         * loader/efi/chainloader.c: Likewise.
3902         * loader/multiboot_loader.c: Likewise.
3903         * loader/i386/pc/multiboot2.c: Likewise.
3904         * term/efi/console.c: Likewise.
3905         * term/i386/pc/serial.c: Likewise.
3906         * util/lvm.c: Likewise.
3907         * util/console.c: Likewise.
3908         * util/i386/efi/grub-mkimage.c: Likewise.
3909         * util/raid.c: Likewise.
3911 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
3913         * commands/videotest.c: Removed include to grub/machine/memory.h.
3915         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
3916         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
3917         (video_mod_SOURCES): Removed.
3918         (video_mod_CFLAGS): Likewise.
3919         (video_mod_LDFLAGS): Likewise.
3920         (gfxterm_mod_SOURCES): Likewise.
3921         (gfxterm_mod_CFLAGS): Likewise.
3922         (gfxterm_mod_LDFLAGS): Likewise.
3923         (videotest_mod_SOURCES): Likewise.
3924         (videotest_mod_CFLAGS): Likewise.
3925         (videotest_mod_LDFLAGS): Likewise.
3926         (bitmap_mod_SOURCES): Likewise.
3927         (bitmap_mod_CFLAGS): Likewise.
3928         (bitmap_mod_LDFLAGS): Likewise.
3929         (tga_mod_SOURCES): Likewise.
3930         (tga_mod_CFLAGS): Likewise.
3931         (tga_mod_LDFLAGS): Likewise.
3932         (jpeg_mod_SOURCES): Likewise.
3933         (jpeg_mod_CFLAGS): Likewise.
3934         (jpeg_mod_LDFLAGS): Likewise.
3935         (png_mod_SOURCES): Likewise.
3936         (png_mod_CFLAGS): Likewise.
3937         (png_mod_LDFLAGS): Likewise.
3939         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
3940         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
3941         (video_mod_SOURCES): Added.
3942         (video_mod_CFLAGS): Likewise.
3943         (video_mod_LDFLAGS): Likewise.
3944         (videotest_mod_SOURCES): Likewise.
3945         (videotest_mod_CFLAGS): Likewise.
3946         (videotest_mod_LDFLAGS): Likewise.
3947         (bitmap_mod_SOURCES): Likewise.
3948         (bitmap_mod_CFLAGS): Likewise.
3949         (bitmap_mod_LDFLAGS): Likewise.
3950         (tga_mod_SOURCES): Likewise.
3951         (tga_mod_CFLAGS): Likewise.
3952         (tga_mod_LDFLAGS): Likewise.
3953         (jpeg_mod_SOURCES): Likewise.
3954         (jpeg_mod_CFLAGS): Likewise.
3955         (jpeg_mod_LDFLAGS): Likewise.
3956         (png_mod_SOURCES): Likewise.
3957         (png_mod_CFLAGS): Likewise.
3958         (png_mod_LDFLAGS): Likewise.
3959         (gfxterm_mod_SOURCES): Likewise.
3960         (gfxterm_mod_CFLAGS): Likewise.
3961         (gfxterm_mod_LDFLAGS): Likewise.
3963         * term/gfxterm.c: Removed include to grub/machine/memory.h,
3964         grub/machine/console.h.
3966 2009-01-04  Jerone Young  <jerone@gmail.com>
3968         Make on screen instructions clearer
3970         Based on patch created by Jidanni <jidanni@jidanni.org>
3972         * normal/menu.c: print clearer instructions on the screen
3974 2009-01-02  Colin D Bennett  <colin@gibibit.com>
3976         New font engine.
3978         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
3979         build system and fixed gfxterm.c to work with different sized fonts.
3981         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
3983         * configure: Re-generated.
3985         * DISTLIST: Removed font/manager.c.
3986         Added font/font.c.
3987         Added font/font_cmd.c.
3989         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
3990         compilation.
3992         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
3994         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
3996         * kern/term.c: Changed users of grub_utf8_to_ucs4.
3998         * normal/menu.c: Likewise.
4000         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4001         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4003         * include/grub/font.h: Replaced with new file.
4005         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4006         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4007         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4008         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4009         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4010         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4011         fg_red, fg_green, fg_blue, fg_alpha.
4012         (grub_video_adapter): Removed blit_glyph.
4013         (grub_video_blit_glyph): Removed.
4015         * font/manager.c: Removed file.
4017         * font/font.c: New file.
4019         * font/font_cmd.c: Likewise.
4021         * video/video.c (grub_video_blit_glyph): Removed.
4023         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4024         (grub_video_vbe_map_rgba): Likewise.
4025         (grub_video_vbe_unmap_color_int): Likewise.
4026         (grub_video_vbe_blit_glyph): Removed.
4027         (grub_video_vbe_adapter): Removed blit_glyph.
4029         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4030         (get_pixel): Likewise.
4031         (set_pixel): Likewise.
4033         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4035         * term/gfxterm.c: Adapted to new font engine.
4037         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4039         * term/i386/pc/vga.c: Likewise.
4041         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4043         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4045         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4047         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4049         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4051         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4053         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4055         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4057         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4059         * util/grub.d/00_header.in: Changed to use new loadfont command.
4061         * util/grub-mkconfig_lib.in: Changed font extension.
4063 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4065         * util/getroot.c (grub_util_get_grub_dev): Add support for
4066         /dev/md/dNNpNN style partitionable mdraid devices.
4068 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4070         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4071         at a time limit of the PXE TFTP API correctly.
4072         (grub_pxefs_close): Likewise.
4074 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4076         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4077         grub_ata_device_initialize() calls.
4079 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4081         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4082         iteration failed.
4083         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4085 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4087         Fix build on powerpc-ieee1275.  Based on patch created by
4088         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4089         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4090         `kern/ieee1275/mmap.c'.
4091         * include/grub/powerpc/ieee1275/memory.h: New file.
4093         Provide grub-install on coreboot.
4094         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4095         (grub_install_SOURCES): New variable.
4096         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4097         usable on coreboot.
4099 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4101         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4102         to `grub_term_input_t'.
4103         (grub_term_get_current_output): Change return type to
4104         `grub_term_output_t'.
4106 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4108         Fix breakage on coreboot due to declaration mismatch.
4109         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4110         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4111         grub_vga_text_cls().
4113         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4114         comments.  Avoid copying one more byte than necessary (just in case).
4116         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4117         to 0x200000 (avoids trouble with some OFW implementations, and matches
4118         with the one in Yaboot).
4119         Reported by Manoel Abranches
4121 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4123         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4124         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4126         * util/grub-mkconfig_lib.in (grub_warn): New function.
4127         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4128         warnings, to obtain consistent formatting.
4129         * util/grub.d/00_header.in: Likewise.
4130         * util/update-grub_lib.in: Likewise.
4132         * loader/i386/linux.c (allocate_pages): Fix a warning.
4133         Move comment text to `#error' stanza.
4135         Harmonize ieee1275's grub_available_iterate() with the generic
4136         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4137         build problem on i386-ieee1275):
4138         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4139         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4140         parameter `type'.  Update all users of this function.
4141         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4142         `kern/ieee1275/mmap.c'.
4143         * kern/ieee1275/init.c
4144         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4145         with ...
4146         (grub_machine_mmap_iterate): ... this.
4147         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4148         return type to `grub_err_t'.  Update all implementations of this
4149         function prototype.
4150         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4151         Likewise.
4153         Add `lsmmap' command (lists firmware-provided memory map):
4154         * commands/lsmmap.c: New file.
4155         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4156         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4157         variables.
4158         * conf/powerpc-ieee1275.rmk: Likewise.
4159         * conf/i386-coreboot.rmk: Likewise.
4160         * conf/i386-ieee1275.rmk: Likewise.
4162 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4164         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4165         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4166         constraints to initrd allocation (based on code from
4167         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4168         for Linux to find it.
4170 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4172         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4173         order to cope with duplicate slashes.
4175 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4177         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4178         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4179         don't want to mess with lower memory, because it is used in the Linux
4180         loader.
4182         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4183         an appropriate place in lower memory, between 0x10000 and 0x90000,
4184         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4185         is in our heap (probably as a result of it being corrupted during
4186         decompression).  Add #error instance with comment to explain why this
4187         loader isn't currently usable on PC/BIOS.
4189 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4191         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4192         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4194 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4196         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4198         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4199         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4200         from here ...
4201         * include/grub/i386/pc/memory.h: ... to here.
4203 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4205         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4206         split).
4208         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4209         (grub_console_cur_color, grub_console_real_putchar)
4210         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4211         (grub_console_setcolorstate, grub_console_setcolor)
4212         (grub_console_getcolor): Move from here ...
4213         * include/grub/i386/vga_common.h: ... to here (new file).
4215         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4216         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4217         `<grub/i386/io.h>'.
4218         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4219         `<grub/i386/vga_common.h>'.
4221 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4223         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4224         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4225         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4226         variables.
4227         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4228         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4230         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4231         grub_console_init() with call to grub_vga_text_init().
4232         (grub_machine_fini): Replace call to
4233         grub_console_fini() with call to grub_vga_text_fini() and
4234         grub_at_keyboard_fini().
4236         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4237         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4238         (grub_console_setcolorstate, grub_console_setcolor)
4239         (grub_console_getcolor): New function prototypes.
4241         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4242         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4243         (grub_vga_text_setcursor): Static-ize.
4244         (grub_vga_text_term): New structure.
4245         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4247         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4248         (grub_console_cur_color, grub_console_standard_color)
4249         (grub_console_normal_color, grub_console_highlight_color)
4250         (map_char, grub_console_putchar, grub_console_getcharwidth)
4251         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4252         (grub_console_getcolor): Move from here ...
4253         * term/i386/vga_common.c: ... to here (same function names).
4255 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4257         Use newly-added Multiboot support in coreboot.
4259         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4260         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4262         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4263         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4264         (codestart): Store the MBI in `startup_multiboot_info' when we're
4265         being loaded using Multiboot.
4267         * kern/i386/coreboot/init.c (grub_machine_init): Move
4268         grub_at_keyboard_init() call to beginning of function (useful for
4269         debugging).  Call grub_machine_mmap_init() before attempting to use
4270         grub_machine_mmap_iterate().
4271         (grub_lower_mem, grub_upper_mem): Move from here ...
4272         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4273         here (new file).
4275         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4276         function prototype.
4278 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4280         Fix a regression introduced by the at_keyboard.mod split.  Because
4281         some terminals are default on some platforms and non-default on
4282         others, the first terminal being registered determines which is
4283         going to be default.
4285         * kern/term.c (grub_term_register_input): If this is the first
4286         terminal being registered, set it as the current one.
4287         (grub_term_register_output): Likewise.
4289         * term/efi/console.c (grub_console_init): Do not call
4290         grub_term_set_current_output() or grub_term_set_current_input().
4291         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4292         * term/i386/pc/console.c (grub_console_init): Likewise.
4293         (grub_console_fini): Do not call grub_term_set_current_input()
4294         (but leave grub_term_set_current_output() to restore text mode).
4296 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4298         * util/grub.d/00_header.in: Add backward compatibility check for
4299         versions of terminal.mod that don't understand `terminal_input' or
4300         `terminal_output'.
4302 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4304         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4305         `terminal_input' / `terminal_output', not `terminal'.
4307 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4309         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4310         (DISTCLEANFILES): Add `build_env.mk'.
4312 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4314         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4315         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4316         members.  Update all users.
4317         * util/console.c (grub_ncurses_term): Split in ...
4318         (grub_ncurses_term_input): ... this, and ...
4319         (grub_ncurses_term_output): ... this.  Update all users.
4320         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4322 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4324         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4325         (PKGDATA): Add $(pkgdata_SRCDIR).
4326         (pkglib_BUILDDIR): New variable.
4327         (pkgdata_SRCDIR): New variable.
4328         (build_env.mk): New target.
4329         (include_DATA): New variable.
4330         (install-local): Install $(include_DATA) files in $(includedir).
4332 2008-11-07  Pavel Roskin  <proski@gnu.org>
4334         * gendistlist.sh: Use C locale for sorting to ensure consistent
4335         output on all systems.
4337         * util/grub.d/00_header.in: Remove incorrect space before
4338         "serial".
4340 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4342         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4343         per specification.
4344         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4345         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4346         (based on find_multi_boot1_header).
4347         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4348         using find_multi_boot2_header(), and abort if neither Multiboot or
4349         Multiboot headers were found.
4351 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4353         Modularize at_keyboard.mod:
4355         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4356         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4357         (at_keyboard_mod_LDFLAGS): New variables.
4359         Actual terminal split:
4361         * include/grub/term.h (struct grub_term): Split in ...
4362         (struct grub_term_input): ... this, and ...
4363         (struct grub_term_output): ... this.  Update all users.
4364         (grub_term_set_current): Split in ...
4365         (grub_term_set_current_input): ... this, and ...
4366         (grub_term_set_current_output): ... this.
4367         (grub_term_get_current): Split in ...
4368         (grub_term_get_current_input): ... this, and ...
4369         (grub_term_get_current_output): ... this.
4370         (grub_term_register): Split in ...
4371         (grub_term_register_input): ... this, and ...
4372         (grub_term_register_output): ... this.
4373         (grub_term_unregister): Split in ...
4374         (grub_term_unregister_input): ... this, and ...
4375         (grub_term_unregister_output): ... this.
4376         (grub_term_iterate): Split in ...
4377         (grub_term_iterate_input): ... this, and ...
4378         (grub_term_iterate_output): ... this.
4380         * kern/term.c (grub_term_list): Split in ...
4381         (grub_term_list_input): ... this, and ...
4382         (grub_term_list_output): ... this.  Update all users.
4383         (grub_cur_term): Split in ...
4384         (grub_cur_term_input): ... this, and ...
4385         (grub_cur_term_output): ... this.  Update all users.
4386         (grub_term_set_current): Split in ...
4387         (grub_term_set_current_input): ... this, and ...
4388         (grub_term_set_current_output): ... this.
4389         (grub_term_get_current): Split in ...
4390         (grub_term_get_current_input): ... this, and ...
4391         (grub_term_get_current_output): ... this.
4392         (grub_term_register): Split in ...
4393         (grub_term_register_input): ... this, and ...
4394         (grub_term_register_output): ... this.
4395         (grub_term_unregister): Split in ...
4396         (grub_term_unregister_input): ... this, and ...
4397         (grub_term_unregister_output): ... this.
4398         (grub_term_iterate): Split in ...
4399         (grub_term_iterate_input): ... this, and ...
4400         (grub_term_iterate_output): ... this.
4402         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4403         a check for input and one for output (and only attempt to get keys
4404         from user when input works).
4406         * util/grub-probe.c (grub_term_get_current): Split in ...
4407         (grub_term_get_current_input): ... this, and ...
4408         (grub_term_get_current_output): ... this.
4409         * util/grub-fstest.c: Likewise.
4410         * util/i386/pc/grub-setup.c: Likewise.
4411         * util/grub-editenv.c: Likewise.
4413         Portability adjustments:
4415         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4416         `term/i386/pc/at_keyboard.c'.
4417         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4418         grub_keyboard_controller_init() (now handled by terminal .init).
4419         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4420         grub_at_keyboard_init().
4421         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4422         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4423         at_keyboard.mod via input terminal interface).
4424         * include/grub/i386/coreboot/console.h: Convert into a stub for
4425         `<grub/i386/pc/console.h>'.
4427         Migrate full terminals to new API:
4429         * term/efi/console.c (grub_console_term): Split into ...
4430         (grub_console_term_input): ... this, and ...
4431         (grub_console_term_output): ... this.  Update all users.
4432         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4433         (grub_ofconsole_init): Split into ...
4434         (grub_ofconsole_init_input): ... this, and ...
4435         (grub_ofconsole_init_output): ... this.
4436         (grub_ofconsole_term): Split into ...
4437         (grub_ofconsole_term_input): ... this, and ...
4438         (grub_ofconsole_term_output): ... this.  Update all users.
4439         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4440         (grub_serial_term_input): ... this, and ...
4441         (grub_serial_term_output): ... this.  Update all users.
4442         * term/i386/pc/console.c (grub_console_term): Split into ...
4443         (grub_console_term_input): ... this, and ...
4444         (grub_console_term_output): ... this.  Update all users.
4445         (grub_console_term_input): Only enable it on PC/BIOS platform.
4446         (grub_console_init): Remove grub_keyboard_controller_init() call.
4448         Migrate input terminals to new API:
4450         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4451         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4452         i386-specific anyway).
4453         (grub_console_checkkey): Rename to ...
4454         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4455         users.
4456         (grub_keyboard_controller_orig): New variable.
4457         (grub_console_getkey): Rename to ...
4458         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4459         users.
4460         (grub_keyboard_controller_init): Static-ize.  Save original
4461         controller value so that it can be restored ...
4462         (grub_keyboard_controller_fini): ... here (new function).
4463         (grub_at_keyboard_term): New structure.
4464         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
4465         functions.
4467         Migrate output terminals to new API:
4469         * term/i386/pc/vga.c (grub_vga_term): Change type to
4470         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4471         members.  Update all users.
4472         * term/gfxterm.c (grub_video_term): Change type to
4473         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
4474         members.  Update all users.
4475         * include/grub/i386/pc/console.h (grub_console_checkkey)
4476         (grub_console_getkey): Do not export (no longer needed by gfxterm,
4477         etc).
4479         Migrate `terminal' command and userland tools to new API:
4481         * commands/terminal.c (grub_cmd_terminal): Split into ...
4482         (grub_cmd_terminal_input): ... this, and ...
4483         (grub_cmd_terminal_output): ... this.
4484         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
4485         `terminal_input' and `terminal_output'.
4486         * util/grub.d/00_header.in: Adjust `terminal' calls to new
4487         `terminal_input' / `terminal_output' API.
4488         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
4489         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
4490         provided ${GRUB_TERMINAL}, convert it).
4492 2008-11-04  Robert Millan  <rmh@aybabtu.com>
4494         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
4495         for FreeBSD.
4496         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
4498 2008-11-03  Bean  <bean123ch@gmail.com>
4500         * kern/elf.c (grub_elf32_load): Revert to previous code.
4501         (grub_elf64_load): Likewise.
4503         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
4505 2008-11-01  Robert Millan  <rmh@aybabtu.com>
4507         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
4508         (TARGET_CPPFLAGS): Likewise.
4509         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
4511 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
4513         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
4515 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4517         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
4518         addition of objects until the code is not going to be able to fail.
4520 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
4522         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
4523         (add a missing NULL check, and correct them by moving the pointer
4524         operations after the actual check).
4526 2008-10-29  Robert Millan  <rmh@aybabtu.com>
4528         * util/i386/pc/grub-install.in: Handle empty string as output from
4529         make_system_path_relative_to_its_root().
4531 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
4533         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
4534         circular metadata worst case scenario. If the metadata is circular
4535         then copy the wrap in place.
4536         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
4537         project lib/format_text/layout.h
4538         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
4540 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4542         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
4544 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
4546         * util/update-grub_lib.in: Mention filename in warning message.
4548 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4550         * NEWS: Update for rename of update-grub to grub-mkconfig.
4552 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
4554         * util/update-grub_lib.in: Copy to ...
4555         * util/grub-mkconfig_lib.in: ... this.  Update all users.
4556         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
4557         * util/update-grub.in: Rename to ...
4558         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
4559         option. Add `--output' option to allow users to specify the generated
4560         configuration file.  Default to stdout.
4561         (update_grub_dir): Rename to ...
4562         (grub_mkconfig_dir): ... this.
4563         (grub_cfg): Default to an empty string.
4564         * conf/common.rmk (update-grub): Rename to ...
4565         (grub-mkconfig): ... this.
4566         (update-grub_lib): Copy to ...
4567         (grub-mkconfig_lib): ... this.
4568         (update-grub_SCRIPTS): Copy to ...
4569         (grub-mkconfig_SCRIPTS): ... this. Update all users.
4570         (update-grub_DATA): Rename to ...
4571         (grub-mkconfig_DATA): ... this.
4573 2008-09-28  Robert Millan  <rmh@aybabtu.com>
4575         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
4576         to `modified'.  Add the real `created' field.
4577         (grub_iso9660_uuid): Use `modified' rather than `created' for
4578         constructing the UUID.
4580 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
4582         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
4583         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
4585 2008-09-28  Bean  <bean123ch@gmail.com>
4587         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
4588         Thanks to Christian Franke for finding this bug.
4590 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4592         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
4593         instances of grub_util_get_disk_name() (see previous commit).
4595 2008-09-25  Robert Millan  <rmh@aybabtu.com>
4597         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
4598         `util/i386/get_disk_name.c'.
4599         * conf/i386-efi.rmk: Likewise.
4600         * conf/x86_64-efi.rmk: Likewise.
4601         * conf/i386-coreboot.rmk: Likewise.
4602         * conf/i386-ieee1275.rmk: Likewise.
4603         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
4604         `util/ieee1275/get_disk_name.c'.
4605         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
4606         * util/ieee1275/get_disk_name.c: Remove file.
4607         * util/i386/get_disk_name.c: Remove file.
4608         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
4609         "hd%d" for device.map entries, rather than using
4610         grub_util_get_disk_name().
4612 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4614         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
4615         warning.
4616         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
4618 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
4620         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
4621         Changed to 0x5100.
4622         (GRUB_TERM_PPAGE): Changed to 0x4900.
4624 2008-09-24  Robert Millan  <rmh@aybabtu.com>
4626         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
4627         macros (they were i386-pc specific).
4628         * include/grub/sparc64/ieee1275/console.h: Likewise.
4629         * include/grub/efi/console.h: Likewise.
4631 2008-09-22  Bean  <bean123ch@gmail.com>
4633         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
4634         resident and in attribute list.
4636         * include/grub/ntfs.h (BMP_LEN): Removed.
4638 2008-09-22  Bean  <bean123ch@gmail.com>
4640         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
4641         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
4643         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
4644         error occurs, as grub_disk_open will call grub_disk_close, which will
4645         call p->close (scsi).
4647 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4649         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
4650         (AC_PREREQ): Bumped to 2.59.
4651         (AC_TRY_COMPILE): Replace obsolete macro with ...
4652         (AC_COMPILE_IFELSE): ... this.
4653         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
4654         (AC_LINK_IFELSE): ... this.
4656 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
4658         * autogen.sh: Add a call to `gendistlist.sh'.
4660 2008-09-19  Christian Franke  <franke@computer.org>
4662         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
4663         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
4664         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
4665         Export __enable_execute_stack() to modules.
4666         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
4667         New function.
4669 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4671         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
4672         Sort the list.
4674 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
4676         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
4677         #include <grub/util/hostdisk.h>.
4679 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4681         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
4682         segments when their filesz is zero (grub_file_read() interprets
4683         zero-size as "read until EOF", which results in memory corruption).
4684         Use `lowest_segment' rather than 0 for calculating the current
4685         segment load address.
4687 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4689         * util/hostdisk.c (open_device): Replace a grub_util_info() call
4690         with grub_dprintf("hostdisk", ...), as it was so verbose that it
4691         clobbered useful information.
4693 2008-09-08  Robert Millan  <rmh@aybabtu.com>
4695         * include/grub/util/biosdisk.h: Move to ...
4696         * include/grub/util/hostdisk.h: ... here.  Update all users.
4697         * util/biosdisk.c: Move to ...
4698         * util/hostdisk.c: ... here.  Update all users.
4700 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4702         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
4703         variables.
4704         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
4705         and length can be stored directly in the `mbi->mmap_addr' and
4706         `mbi->mmap_length' struct fields.
4708 2008-09-07  Robert Millan  <rmh@aybabtu.com>
4710         * conf/i386.rmk: New file.  Provides declaration for building
4711         `cpuid.mod'.
4712         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
4713         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
4714         variables.
4715         Include `conf/i386.mk'.
4716         * conf/i386-efi.rmk: Likewise.
4717         * conf/x86_64-efi.rmk: Likewise.
4718         * conf/i386-coreboot.rmk: Likewise.
4719         * conf/i386-ieee1275.rmk: Likewise.
4721 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
4723         Based on patch created by Colin D Bennett <colin@gibibit.com>.
4724         Adds optimization support for BGR based modes.
4726         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
4727         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4728         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4729         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4730         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4731         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4732         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4733         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4734         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4735         (grub_video_i386_vbeblit_index_index): Likewise.
4736         (grub_video_i386_vbeblit_replace_directN): Added.
4737         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4738         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4739         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4740         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4741         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4742         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4743         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4744         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4745         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4746         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4747         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4748         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4749         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4751         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
4752         (grub_video_i386_vbefill_R8G8B8): Likewise.
4753         (grub_video_i386_vbefill_index): Likewise.
4754         (grub_video_i386_vbefill_direct32): Added.
4755         (grub_video_i386_vbefill_direct24): Likewise.
4756         (grub_video_i386_vbefill_direct16): Likewise.
4757         (grub_video_i386_vbefill_direct8): Likewise.
4759         * include/grub/video.h (grub_video_blit_format): Removed
4760         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
4761         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
4762         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
4763         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
4764         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
4766         * video/video.c (grub_video_get_blit_format): Updated to use new
4767         blit formats.  Added handling for 16 bit color modes.
4769         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
4770         fillers.
4771         (common_blitter): Updated to use new blitters.
4773         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
4774         Removed.
4775         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
4776         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
4777         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
4778         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
4779         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
4780         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
4781         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
4782         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
4783         (grub_video_i386_vbeblit_index_index): Likewise.
4784         (grub_video_i386_vbeblit_replace_directN): Added.
4785         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
4786         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
4787         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
4788         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
4789         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
4790         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
4791         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
4792         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
4793         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
4794         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
4795         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
4796         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
4797         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
4799         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
4800         (grub_video_i386_vbefill_R8G8B8): Likewise.
4801         (grub_video_i386_vbefill_index): Likewise.
4802         (grub_video_i386_vbefill_direct32): Added.
4803         (grub_video_i386_vbefill_direct24): Likewise.
4804         (grub_video_i386_vbefill_direct16): Likewise.
4805         (grub_video_i386_vbefill_direct8): Likewise.
4807         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
4808         types.
4810         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
4811         types.
4813         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
4814         blitter types.
4816         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
4817         types.
4819 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4821         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
4822         RAID level 1.
4824 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
4826         * fs/iso9660.c (grub_iso9660_date): New structure.
4827         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
4828         (grub_iso9660_uuid): New function.
4830 2008-09-05  Bean  <bean123ch@gmail.com>
4832         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
4834         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
4835         insensitive bit for names in Win32 and Win32 & DOS namespace.
4837         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
4839         * include/grub/types.h (LONG_MAX): Likewise.
4841 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4843         * util/getroot.c: Include <config.h>.
4844         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
4845         add support for /dev/md/N devices and handle LVM double dash escaping.
4847 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
4849         * config.guess: Update to latest version from config git.
4850         * config.sub: Likewise.
4852 2008-09-03  Robert Millan  <rmh@aybabtu.com>
4854         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
4855         `disk->total_sectors'.
4857 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4859         * include/grub/normal.h: Fixed incorrect comment for
4860         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
4862 2008-09-01  Colin D Bennett  <colin@gibibit.com>
4864         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
4865         values with defines.
4867         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
4868         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
4869         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
4870         (GRUB_VBE_MODEATTR_COLOR): Likewise.
4871         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
4872         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
4873         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
4874         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
4875         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
4876         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
4877         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
4878         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
4879         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
4880         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
4881         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
4882         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
4883         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
4884         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
4885         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
4887 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4889         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
4890         declaration.
4891         (grub_multiboot): Fix a few warnings.
4893 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4895         * loader/i386/pc/multiboot.c: Update comment not to say that
4896         boot_device support is unimplemented.
4898 2008-08-31  Robert Millan  <rmh@aybabtu.com>
4900         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
4901         or memory map support are unimplemented.
4903 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4905         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
4907 2008-08-31  Colin D Bennett  <colin@gibibit.com>
4909         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
4910         total video memory in 'vbeinfo' output; show color format details for
4911         each video mode.
4913 2008-08-30  Pavel Roskin  <proski@gnu.org>
4915         * util/genmoddep.c: Remove for real this time.
4916         * DISTLIST: Remove util/genmoddep.c.
4918 2008-08-30  Robert Millan  <rmh@aybabtu.com>
4920         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
4921         as required by Multiboot spec (it was already 4-byte aligned, but
4922         only by chance).
4924 2008-08-29  Pavel Roskin  <proski@gnu.org>
4926         * kern/powerpc/ieee1275/crt0.S: Rename to ...
4927         * kern/powerpc/ieee1275/startup.S: ... this.
4928         * conf/powerpc-ieee1275.rmk: Adjust for the above.
4929         * DISTLIST: Likewise.
4931         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
4932         grub/cpu/kernel.h.  Add start label for consistency with other
4933         platforms.  Add grub_prefix immediately after start.  Add jump
4934         to the code after grub_prefix.
4935         * include/grub/powerpc/kernel.h: Provide valid values for
4936         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
4938 2008-08-29  Bean  <bean123ch@gmail.com>
4940         * configure.ac: Change host_os to cygwin for mingw.
4941         (asprintf): New check for function.
4943         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
4944         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
4946         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
4947         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
4948         sync, sleep and grub_util_get_disk_size for mingw.
4950         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
4951         to get size in mingw.
4952         (open_device): Use flag O_BINARY if it's defined.
4953         (find_root_device): Add dummy code for mingw.
4955         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
4956         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
4957         (get_scsi_disk_name): Return 0 for mingw.
4959         * util/hostfs.c: #include <grub/util/misc.h>.
4960         (grub_hostfs_open): Use "rb" flag to open file, use
4961         grub_util_get_disk_size to get disk size for mingw.
4963         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
4964         (asprintf): New function if HAVE_ASPRINTF is not set.
4965         (sync): New function for mingw.
4966         (sleep): Likewise.
4967         (grub_util_get_disk_size): Likewise.
4969 2008-08-28  Pavel Roskin  <proski@gnu.org>
4971         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4972         kern/time.c.
4974 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4976         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
4978 2008-08-28  Robert Millan  <rmh@aybabtu.com>
4980         Change find_grub_drive() syntax so it doesn't prevent it from
4981         detecting NULL names as errors.
4983         * util/biosdisk.c (find_grub_drive): Move free slot search code
4984         from here ...
4985         (find_free_slot): ... to here.
4986         (read_device_map): Use find_free_slot() to search for free slots.
4988 2008-08-27  Marco Gerards  <marco@gnu.org>
4990         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
4991         (scsi_mod_SOURCES): New variable.
4992         (scsi_mod_CFLAGS): Likewise
4993         (scsi_mod_LDFLAGS): Likewise.
4995         * disk/scsi.c: New file.
4997         * include/grub/scsi.h: Likewise.
4999         * include/grub/scsicmd.h: Likewise.
5001         * disk/ata.c: Include <grub/scsi.h>.
5002         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5003         instead.
5004         (grub_ata_iterate): Skip ATAPI devices.
5005         (grub_ata_open): Only handle ATAPI devices.
5006         (struct grub_atapi_read): Removed.
5007         (grub_atapi_readsector): Likewise.
5008         (grub_ata_read): No longer handle ATAPI devices.
5009         (grub_ata_write): Likewise.
5010         (grub_atapi_iterate): New function.
5011         (grub_atapi_read): Likewise.
5012         (grub_atapi_write): Likewise.
5013         (grub_atapi_open): Likewise.
5014         (grub_atapi_close): Likewise.
5015         (grub_atapi_dev): New variable.
5016         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5017         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5019         * include/grub/disk.h (enum grub_disk_dev_id): Add
5020         `GRUB_DISK_DEVICE_SCSI_ID'.
5022 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5024         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5025         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5026         descriptive.
5028 2008-08-23  Bean  <bean123ch@gmail.com>
5030         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5031         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5032         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5033         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5034         dm_nv.mod.
5035         (raid5rec_mod_SOURCES): New macro.
5036         (raid5rec_mod_CFLAGS): Likewise.
5037         (raid5rec_mod_LDFLAGS): Likewise.
5038         (raid6rec_mod_SOURCES): Likewise.
5039         (raid6rec_mod_CFLAGS): Likewise.
5040         (raid6rec_mod_LDFLAGS): Likewise.
5041         (mdraid_mod_SOURCES): Likewise.
5042         (mdraid_mod_CFLAGS): Likewise.
5043         (mdraid_mod_LDFLAGS): Likewise.
5044         (dm_nv_mod_SOURCES): Likewise.
5045         (dm_nv_mod_CFLAGS): Likewise.
5046         (dm_nv_mod_LDFLAGS): Likewise.
5048         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5049         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5050         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5052         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5053         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5055         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5057         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5059         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5061         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5063         * disk/raid5_recover.c: New file.
5065         * disk/raid6_recover.c: Likewise.
5067         * disk/mdraid_linux.c: Likewise.
5069         * disk/dmraid_nvidia.c: Likewise.
5071         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5072         ULONG_MAX.
5074         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5075         calculate the size of raid device.
5076         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5077         different layout of raid5.
5078         (grub_raid_scan_device): Remove code specific to mdraid.
5079         (grub_raid_list): New variable.
5080         (free_array): New function.
5081         (grub_raid_register): Likewise.
5082         (grub_raid_unregister): Likewise.
5083         (grub_raid_rescan): Likewise.
5084         (GRUB_MOD_INIT): Don't iterate device here.
5085         (GRUB_MOD_FINI): Use free_array to release resource.
5087         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5088         (grub_raid5_recover_func_t): New function variable type.
5089         (grub_raid6_recover_func_t): Likewise.
5090         (grub_raid5_recover_func): New variable.
5091         (grub_raid6_recover_func): Likewise.
5092         (grub_raid_register): New function.
5093         (grub_raid_unregister): Likewise.
5094         (grub_raid_rescan): Likewise.
5095         (grub_raid_block_xor): Likewise.
5097         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5098         (CMD_CRC): New macro.
5099         (part): Removed.
5100         (read_file): Handle device as well as file.
5101         (cmd_crc): New function.
5102         (fstest): Handle multiple disks.
5103         (options): Remove part, raw and long, add root and diskcount.
5104         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5105         (main): Find the first non option entry and ignore subsequent options,
5106         add handling for the new options, support multiple disks.
5108         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5110 2008-08-23  Bean  <bean123ch@gmail.com>
5112         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5114         * genfslist.sh: Ignore kernel.mod.
5116         * genpartmaplist.sh: Likewise.
5118 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5120         * util/getroot.c (find_root_device): Skip anything that starts with
5121         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5123 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5125         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5126         * util/grub.d/00_header.in: Allow the administrator to change default
5127         gfxmode via ${GRUB_GFXMODE}.
5129 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5131         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5133 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5135         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5136         loader.
5137         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5138         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5140 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5142         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5143         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5145 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5147         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5148         (struct grub_virtual_screen): Remove `cursor_color'.
5149         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5150         initialization.
5151         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5153 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5155         Unify (identical) linux_normal.c files.
5156         * loader/i386/efi/linux_normal.c: Move from here ...
5157         * loader/linux_normal.c: ... to here.  Update all users.
5158         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5159         * loader/i386/ieee1275/linux_normal.c: Likewise.
5161 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5163         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5164         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5165         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5166         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5167         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5168         New macros.
5169         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5170         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5171         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5172         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5173         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5174         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5175         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5176         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5177         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5178         portably using grub_getxy().
5179         Replace `-EFI' with `-bzImage' in boot message.
5181 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5183         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5185 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5187         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5189         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5190         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5191         (grub_machine_mmap_iterate): New function declaration.
5192         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5193         structure.
5194         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5195         macros.
5197         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5198         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5199         Move e820 parsing from here ...
5200         * kern/i386/pc/mmap.c: New file.
5201         (grub_machine_mmap_iterate): ... to here.
5203         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5204         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5205         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5206         (grub_available_iterate): Redeclare to return `void', and redeclare
5207         its hook to use grub_uint64_t as addr and size parameters, and rename
5208         to ...
5209         (grub_machine_mmap_iterate): ... this.  Update all users.
5211         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5212         to make it more readable.  Rename to ...
5213         (grub_machine_mmap_iterate): ... this.
5215         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5216         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5217         (grub_multiboot): Allocate an extra region after the payload, and fill
5218         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5219         with the extra space.
5220         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5221         with the extra space.
5223 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5225         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5227 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5229         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5230         mdate-sh to the list `find' searches for.
5231         * DISTLIST: Regenerated.
5233 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5235         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5236         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5237         genmoddep.awk, gensymlist.sh.in.
5238         (DISTDIRS): Add bus, docs, hook, lib.
5239         * DISTLIST: Regenerated.
5240         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5242 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5244         * disk/raid.c (grub_raid_init): Handle/report errors set by
5245         grub_device_iterate().
5246         * disk/lvm.c (grub_lvm_init): Likewise.
5248 2008-08-15  Bean  <bean123ch@gmail.com>
5250         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5251         and datehook.mod.
5252         (datetime_mod_SOURCES): New macro.
5253         (datetime_mod_CFLAGS): Likewise.
5254         (datetime_mod_LDFLAGS): Likewise.
5255         (date_mod_SOURCES): Likewise.
5256         (date_mod_CFLAGS): Likewise.
5257         (date_mod_LDFLAGS): Likewise.
5258         (datehook_mod_SOURCES): Likewise.
5259         (datehook_mod_CFLAGS): Likewise.
5260         (datehook_mod_LDFLAGS): Likewise.
5262         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5263         and datehook.mod.
5264         (datetime_mod_SOURCES): New macro.
5265         (datetime_mod_CFLAGS): Likewise.
5266         (datetime_mod_LDFLAGS): Likewise.
5267         (date_mod_SOURCES): Likewise.
5268         (date_mod_CFLAGS): Likewise.
5269         (date_mod_LDFLAGS): Likewise.
5270         (datehook_mod_SOURCES): Likewise.
5271         (datehook_mod_CFLAGS): Likewise.
5272         (datehook_mod_LDFLAGS): Likewise.
5274         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5275         and datehook.mod.
5276         (datetime_mod_SOURCES): New macro.
5277         (datetime_mod_CFLAGS): Likewise.
5278         (datetime_mod_LDFLAGS): Likewise.
5279         (date_mod_SOURCES): Likewise.
5280         (date_mod_CFLAGS): Likewise.
5281         (date_mod_LDFLAGS): Likewise.
5282         (datehook_mod_SOURCES): Likewise.
5283         (datehook_mod_CFLAGS): Likewise.
5284         (datehook_mod_LDFLAGS): Likewise.
5286         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5287         and datehook.mod.
5288         (datetime_mod_SOURCES): New macro.
5289         (datetime_mod_CFLAGS): Likewise.
5290         (datetime_mod_LDFLAGS): Likewise.
5291         (date_mod_SOURCES): Likewise.
5292         (date_mod_CFLAGS): Likewise.
5293         (date_mod_LDFLAGS): Likewise.
5294         (datehook_mod_SOURCES): Likewise.
5295         (datehook_mod_CFLAGS): Likewise.
5296         (datehook_mod_LDFLAGS): Likewise.
5298         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5299         and datehook.mod.
5300         (datetime_mod_SOURCES): New macro.
5301         (datetime_mod_CFLAGS): Likewise.
5302         (datetime_mod_LDFLAGS): Likewise.
5303         (date_mod_SOURCES): Likewise.
5304         (date_mod_CFLAGS): Likewise.
5305         (date_mod_LDFLAGS): Likewise.
5306         (datehook_mod_SOURCES): Likewise.
5307         (datehook_mod_CFLAGS): Likewise.
5308         (datehook_mod_LDFLAGS): Likewise.
5310         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5312         * commands/date.c: New file.
5314         * hook/datehook.c: Likewise.
5316         * include/grub/lib/datetime.h: Likewise.
5318         * include/grub/i386/cmos.h: Likewise.
5320         * lib/datetime.c: Likewise.
5322         * lib/i386/datetime.c: Likewise.
5324         * lib/efi/datetime.c: Likewise.
5326 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5328         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5329         (grub_mkelfimage_SOURCES): New variable.
5330         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5332         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5333         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5334         * conf/powerpc-ieee1275.rmk: Likewise.
5335         * conf/i386-ieee1275.rmk: Likewise.
5337         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5338         * kern/i386/coreboot/init.c: Likewise.
5340         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5341         with `<grub/cpu/kernel.h>'.
5342         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5343         to ...
5344         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5345         * kern/i386/coreboot/startup.S: Likewise.
5347         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5348         (GRUB_MOD_GAP): Remove.
5349         * include/grub/powerpc/kernel.h: New file.
5350         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5351         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5352         * include/grub/i386/kernel.h: New file.
5353         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5354         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5355         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5357         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5358         `grub-mkelfimage'.
5359         Use --directory when invoking grub_mkimage.
5361         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5362         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5363         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5364         and GRUB_KERNEL_CPU_PREFIX.
5366 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5368         * include/grub/err.h (grub_err_printf): New function prototype.
5369         * util/misc.c (grub_err_printf): New function.
5370         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5371         grub_printf.
5372         * kern/err.c (grub_print_error): Use grub_err_printf.
5374 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5376         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5378 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5380         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5381         boot entry.
5383 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5385         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5386         of the relocation code from here ...
5387         (grub_multiboot): ... to here.
5388         (forward_relocator, backward_relocator): Move from here ...
5389         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5390         (grub_multiboot_backward_relocator): ... to here.
5391         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5392         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5393         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5394         (grub_multiboot_forward_relocator_end)
5395         (grub_multiboot_backward_relocator)
5396         (grub_multiboot_backward_relocator_end): New variables.
5398 2008-08-12  Bean  <bean123ch@gmail.com>
5400         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5402 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5404         * kern/i386/linuxbios/startup.S: Move from here ...
5405         * kern/i386/coreboot/startup.S: ... to here.
5407         * kern/i386/linuxbios/init.c: Move from here ...
5408         * kern/i386/coreboot/init.c: ... to here.
5410         * kern/i386/linuxbios/table.c: Move from here ...
5411         * kern/i386/coreboot/mmap.c: ... to here.
5413         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5415 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5417         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5418         errors.  Leave it to the upper layer to handle them.
5420 2008-08-09  Christian Franke  <franke@computer.org>
5422         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5423         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5424         Install `grub.d/10_windows' only on Cygwin.
5425         * configure.ac: Add subst of `target_os'.
5426         Check `target_os' also before setting TARGET_OBJ2ELF.
5427         Add `--enable-grub-pe2elf'.
5429 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5431         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5432         (grub_last_time): Change type to grub_uint64_t.
5433         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5434         (grub_disk_close): Likewise.
5436         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5437         (run_menu): Migrate code from to using grub_get_time_ms().
5439         * util/misc.c (grub_get_time_ms): New function.
5441 2008-08-08  Marco Gerards  <marco@gnu.org>
5443         * disk/ata.c (grub_ata_regget): Change return type to
5444         `grub_uint8_t'.
5445         (grub_ata_regget2): Likewise.
5446         (grub_ata_wait_status): New function.
5447         (grub_ata_wait_busy): Removed function, updated all users to use
5448         `grub_ata_wait_status'.
5449         (grub_ata_wait_drq): Likewise.
5450         (grub_ata_cmd): New function.
5451         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5452         error handling.
5453         (grub_ata_pio_write): Add error handling.
5454         (grub_atapi_identify): Likewise.
5455         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5456         handling.
5457         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5458         handling.  Actually use the detected registers.  Reorder the
5459         detection logic such that it is easier to read.
5460         (grub_ata_pciinit): Do not assign the same ID to each controller.
5461         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5462         handling.
5463         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
5465         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
5467 2008-08-08  Marco Gerards  <marco@gnu.org>
5469         * NEWS: Update.
5471 2008-08-07  Bean  <bean123ch@gmail.com>
5473         * include/grub/x86_64/pci.h: New file.
5475 2008-08-07  Christian Franke  <franke@computer.org>
5477         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
5478         (TIMER2_GATE): Likewise.
5479         (grub_pit_wait): Add enable/disable of the timer2 gate
5480         bit of port 0x61.  This fixes a possible infinite loop.
5482 2008-08-07  Bean  <bean123ch@gmail.com>
5484         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
5485         kern/i386/tsc.c and kern/i386/pit.c.
5487         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
5488         x86_64 platform.
5490         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
5491         <grub/i386/tsc.h>.
5493         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
5495 2008-08-07  Bean  <bean123ch@gmail.com>
5497         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
5499         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
5501         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
5502         multiple inclusion. Add #include <grub/types.h>.
5504 2008-08-06  Christian Franke  <franke@computer.org>
5506         * conf/common.rmk: Build and install `10_windows'.
5507         * util/grub.d/10_windows.in: New script.
5509 2008-08-06  Pavel Roskin  <proski@gnu.org>
5511         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
5513 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5515         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
5516         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
5518 2008-08-06  Bean  <bean123ch@gmail.com>
5520         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
5521         (grub_pxefs_fs_int): Remove dummy definition.
5522         (grub_pxefs_open): Use data->block_size to store the current block
5523         size setting.
5524         (grub_pxefs_read): Use block size stored in data->block_size. As the
5525         value of grub_pxe_blksize can be changed after the file is opened.
5527 2008-08-06  Bean  <bean123ch@gmail.com>
5529         * fs/i386/pc/pxe.c (curr_file): new variable.
5530         (grub_pxefs_open): Simply the handling of pxe file system. Don't
5531         require the dummy internal file system anymore.
5532         (grub_pxefs_read): Removed.
5533         (grub_pxefs_close): Likewise.
5534         (grub_pxefs_fs_int): Likewise.
5535         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
5536         connection when we switch file.
5537         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
5539 2008-08-06  Robert Millan  <rmh@aybabtu.com>
5541         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
5542         `halt.mod'.
5543         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
5544         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
5546         * kern/i386/halt.c: New file.
5547         * kern/i386/reboot.c: Likewise.
5548         * include/grub/i386/reboot.h: Likewise.
5549         * include/grub/i386/halt.h: Likewise.
5551         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
5552         Include `<grub/cpu/halt.h>'.
5553         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
5554         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
5556         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
5557         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
5558         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
5559         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
5560         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
5561         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
5562         from here ...
5563         * include/grub/i386/at_keyboard.h: ... to here.
5565 2008-08-05  Robert Millan  <rmh@aybabtu.com>
5567         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
5568         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
5569         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
5570         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5571         `kern/generic/millisleep.c'.
5573         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
5574         instead of grub_get_rtc().
5575         (grub_tsc_init): Initialize `tsc_boot_time'.
5577         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
5578         (grub_machine_init): Use grub_tsc_init() rather than
5579         installing an RTC-based handler via grub_install_get_time_ms().
5581         * kern/i386/pit.c: New file.
5582         * include/grub/i386/pit.h: Likewise.
5584 2008-08-05  Bean  <bean123ch@gmail.com>
5586         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
5588         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
5589         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
5590         (pxe_mod_SOURCES): New macro.
5591         (pxe_mod_CFLAGS): Likewise.
5592         (pxe_mod_LDFLAGS): Likewise.
5593         (pxecmd_mod_SOURCES): Likewise.
5594         (pxecmd_mod_CFLAGS): Likewise.
5595         (pxecmd_mod_LDFLAGS): Likewise.
5597         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
5598         (grub_pxe_call): Likewise.
5600         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
5602         * commands/i386/pc/pxecmd.c: New file.
5604         * fs/i386/pc/pxe.c: Likewise.
5606         * include/grub/i386/pc/pxe.h: Likewise.
5608 2008-08-05  Bean  <bean123ch@gmail.com>
5610         * util/console.c (grub_console_cur_color): New variable.
5611         (grub_console_standard_color): Likewise.
5612         (grub_console_normal_color): Likewise.
5613         (grub_console_highlight_color): Likewise.
5614         (color_map): Likewise.
5615         (use_color): Likewise.
5616         (NUM_COLORS): New macro.
5617         (grub_ncurses_setcolorstate): Handle color properly.
5618         (grub_ncurses_setcolor): Don't change color here, just remember the
5619         settings, color will be set in grub_ncurses_setcolorstate.
5620         (grub_ncurses_getcolor): New function.
5621         (grub_ncurses_init): Initialize color pairs.
5622         (grub_ncurses_term): New member grub_ncurses_getcolor.
5624 2008-08-05  Colin D Bennett  <colin@gibibit.com>
5626         High resolution timer support.  Implemented for x86 CPUs using TSC.
5627         Extracted generic grub_millisleep() so it's linked in only as needed.
5628         This requires a Pentium compatible CPU; if the RDTSC instruction is
5629         not supported, then it falls back on the generic grub_get_time_ms()
5630         implementation that uses the machine's RTC.
5632         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
5633         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
5634         `kern/generic/millisleep.c'.
5636         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
5637         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
5639         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
5640         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
5642         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5644         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5645         `kern/generic/millisleep.c'.
5647         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
5649         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
5651         * kern/generic/rtc_get_time_ms.c: New file.
5653         * kern/generic/millisleep.c: New file.
5655         * kern/misc.c: Don't include
5656         <kern/time.h> anymore.
5657         (grub_millisleep_generic): Removed.
5659         * commands/sleep.c (grub_interruptible_millisleep): Uses
5660         grub_get_time_ms() instead of grub_get_rtc().
5662         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
5663         function.
5664         (grub_cpu_is_cpuid_supported): New inline function.
5665         (grub_cpu_is_tsc_supported): New inline function.
5666         (grub_tsc_init): New function prototype.
5667         (grub_tsc_get_time_ms): New function prototype.
5669         * kern/i386/tsc.c (grub_get_time_ms): New file.
5671         * include/grub/time.h: Include <grub/types.h.
5672         (grub_millisleep_generic): Removed.
5673         (grub_get_time_ms): New prototype.
5674         (grub_install_get_time_ms): New prototype.
5675         (grub_rtc_get_time_ms): New prototype.
5677         * kern/time.c (grub_get_time_ms): New function.
5678         (grub_install_get_time_ms): New function.
5680         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
5681         <grub/time.h> anymore.
5682         (grub_millisleep): Removed.
5683         (grub_machine_init): Call grub_tsc_init.
5685         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
5686         get_time_ms() implementation.
5688         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
5689         (ieee1275_get_time_ms): New function.
5690         (grub_machine_init): Install get_time_ms() implementation.
5692         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
5693         (grub_machine_init): Call grub_tsc_init().
5694         (grub_millisleep): Removed.
5696         * kern/ieee1275/init.c (grub_millisleep): Removed.
5697         (grub_machine_init): Install ieee1275_get_time_ms()
5698         implementation.
5699         (ieee1275_get_time_ms): New function.
5700         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
5701         real work.
5703 2008-08-05  Marco Gerards  <marco@gnu.org>
5705         * disk/ata.c: Include <grub/pci.h>.
5706         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
5707         (grub_ata_initialize): Rewritten.
5708         (grub_ata_device_initialize): New function.
5710 2008-08-04  Pavel Roskin  <proski@gnu.org>
5712         * kern/main.c: Include grub/mm.h.
5714 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5716         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
5717         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
5718         corruption problem).
5720 2008-08-04  Robert Millan  <rmh@aybabtu.com>
5722         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
5723         warnings introduced in my last commit.
5725 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5727         Make PCI available on all i386 architectures.
5729         * include/grub/i386/pc/pci.h: Move from here ...
5730         * include/grub/i386/pci.h: ... to here.
5732         * include/grub/i386/pc/pci.h: Remove.
5733         * include/grub/i386/efi/pci.h: Remove.
5734         * include/grub/x86_64/efi/pci.h: Remove.
5736         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
5737         `<grub/cpu/pci.h>'.
5739         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
5740         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
5741         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
5743         * conf/i386-ieee1275.rmk: Likewise.
5745 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5747         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
5748         (grub_console_setcursor): Make it possible to set cursor off.
5750 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5752         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
5753         of modules instead of assuming which platform provides what.
5754         * util/update-grub.in: Likewise.
5756 2008-08-03  Robert Millan  <rmh@aybabtu.com>
5758         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
5759         instead of `grub_install_dos_part' to determine whether a drive needs
5760         to be prepended to prefix (`grub_install_dos_part' is not reliable,
5761         because it can be overridden when loading GRUB via Multiboot).
5763 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5765         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
5767 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5769         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
5770         of informational grub_dprintf() calls.
5772 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5774         * disk/memdisk.c (memdisk_size): Don't initialize.
5775         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
5777         * include/grub/i386/pc/kernel.h
5778         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
5779         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
5780         (grub_memdisk_image_size, grub_arch_memdisk_addr)
5781         (grub_arch_memdisk_size): Remove.
5783         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
5784         field (was only used to transfer a constant).  Add `type' field to
5785         support multiple module types.
5786         (grub_module_iterate): New function.
5788         * kern/device.c (grub_device_open): Do not hide error messages
5789         when grub_disk_open() fails.  Use grub_print_error() instead.
5791         * kern/i386/pc/init.c (grub_arch_modules_addr)
5792         (grub_arch_memdisk_size): Remove functions.
5793         (grub_arch_modules_addr): Return the module address in high memory
5794         (now that it isn't copied anymore).
5796         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
5797         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
5798         decompression routine (grub_total_module_size already includes that
5799         now).  Don't copy modules back to low memory.
5801         * kern/main.c: Include `<grub/mm.h>'.
5802         (grub_load_modules): Split out (and use) ...
5803         (grub_module_iterate): ... this function, which iterates through
5804         module objects and runs a hook.
5805         Comment out grub_mm_init_region() call, as it would cause non-ELF
5806         modules to be overwritten.
5808         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
5809         the memdisk image in its own region, make it part of the module list.
5810         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
5811         (main): Parse --memdisk|-m option, and pass user-provided path as
5812         parameter to generate_image().
5813         (add_segments): Pass `memdisk_path' down to load_modules().
5814         (load_modules): Embed memdisk image in module section when requested.
5815         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
5816         `header.type' instead of `header.offset'.
5818         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
5819         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
5820         (memdisk_mod_LDFLAGS): New variables.
5821         * conf/i386-coreboot.rmk: Likewise.
5822         * conf/i386-ieee1275.rmk: Likewise.
5824 2008-08-02  Robert Millan  <rmh@aybabtu.com>
5826         * loader/i386/pc/multiboot.c (playground, forward_relocator)
5827         (backward_relocator): New variables.  Used to allocate and relocate
5828         the payload, respectively.
5829         (grub_multiboot_load_elf32): Load into heap instead of requested
5830         address, install the appropriate relocator code in each bound of
5831         the payload, and set the entry point such that
5832         grub_multiboot_real_boot() will jump to one of them.
5834         * kern/i386/loader.S (grub_multiboot_payload_size)
5835         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5836         (grub_multiboot_payload_entry_offset): New variables.
5837         (grub_multiboot_real_boot): Set cpu context to what the relocator
5838         expects, and jump to the relocator instead of the payload.
5840         * include/grub/i386/loader.h (grub_multiboot_payload_size)
5841         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
5842         (grub_multiboot_payload_entry_offset): Export.
5844 2008-08-01  Bean  <bean123ch@gmail.com>
5846         * normal/menu_entry.c (editor_getline): Don't return the original
5847         string as result, as it will be released by lexer once it has done
5848         using it.
5850 2008-08-01  Robert Millan  <rmh@aybabtu.com>
5852         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
5853         within menuentries, not before them.
5854         util/grub.d/10_hurd.in: Likewise.
5856 2008-08-01  Bean  <bean123ch@gmail.com>
5858         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
5859         (bufio_mod_SOURCES): New macro.
5860         (bufio_mod_CFLAGS): Likewise.
5861         (bufio_mod_LDFLAGS): Likewise.
5863         * include/grub/bufio.h: New file.
5865         * io/bufio.c: Likewise.
5867         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
5868         (grub_video_reader_png): Use grub_buffile_open to open file.
5870         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
5871         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
5873         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
5874         (grub_video_reader_tga): Use grub_buffile_open to open file.
5876         * font/manager.c: Include <grub/bufio.h>.
5877         (add_font): Use grub_buffile_open to open file.
5879 2008-07-31  Robert Millan  <rmh@aybabtu.com>
5881         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
5882         ELF segments, use a macro for arbitrarily accessing any of them instead
5883         of preparing a pointer that allows access to one at a time.
5884         (grub_multiboot_load_elf64): Likewise.
5886 2008-07-31  Bean  <bean123ch@gmail.com>
5888         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
5889         GRUB_KERNEL_MACHINE_DATA_END.
5891 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5893         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
5894         Increase from 0x50 to 0x60.
5895         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
5896         use UUIDs to identify the root drive for them.  If that's not
5897         possible, abort.
5898         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
5899         check, for cross-disk installs.
5901 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5903         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
5904         is non-empty, use it to set the `prefix' environment variable instead
5905         of the usual approach.
5906         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
5907         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
5908         environment variable instead of dummy make_install_device().
5910         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
5911         (start): Insert a data section, with `grub_prefix' variable.
5912         * kern/i386/linuxbios/startup.S: Likewise.
5914         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
5915         New variable reference.
5916         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
5917         New macro.  Defines offset of `grub_prefix' within startup.S (relative
5918         to `start').
5919         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
5920         section within startup.S (relative to `start').
5921         * include/grub/i386/coreboot/kernel.h: Likewise.
5923         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
5924         Overwrite grub_prefix with its contents, at the beginning of the
5925         first segment.
5926         (main): Understand -p|--prefix.
5928 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5930         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
5932 2008-07-30  Robert Millan  <rmh@aybabtu.com>
5934         * term/i386/pc/vga_text.c (grub_console_cls): Use
5935         grub_console_gotoxy() to go back to beginning of the screen.
5936         Found by Patrick Georgi <patrick.georgi@coresystems.de>
5938 2008-07-29  Christian Franke  <franke@computer.org>
5940         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
5941         Add conversion of emulated mount points on Cygwin.
5943 2008-07-29  Christian Franke  <franke@computer.org>
5945         * util/update-grub.in: Add a check for admin
5946         group on Cygwin.
5947         Remove old `grub.cfg.new' before creation.
5948         Add `-f' to `mv' to handle the different filesystem
5949         semantics of Windows.
5951 2008-07-29  Bean  <bean123ch@gmail.com>
5953         * normal/main.c (get_line): Fix buffer overflow bug.
5955 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5957         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
5958         (struct grub_apple_header): New struct.  Describes the layout of
5959         the partmap header.
5960         (apple_partition_map_iterate): Check the header magic as well as the
5961         partition magic (which was already being checked).
5963 2008-07-28  Pavel Roskin  <proski@gnu.org>
5965         * genmk.rb: Add a warning to the beginning of the output that
5966         it's a generated file and should not be edited.
5968 2008-07-28  Robert Millan  <rmh@aybabtu.com>
5970         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
5971         with the same number are found, just use issue a warning with
5972         grub_dprintf(), as this error has been reported to be non-fatal.
5974 2008-07-27  Robert Millan  <rmh@aybabtu.com>
5976         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
5977         information.
5979 2008-07-27  Bean  <bean123ch@gmail.com>
5981         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
5982         (grub_fat_find_dir): Ignore case when comparing filename.
5984 2008-07-27  Bean  <bean123ch@gmail.com>
5986         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
5987         smallino, as it's more descriptive, and i8count can be confused with
5988         the other field count.
5989         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
5990         inode type.
5992 2008-07-27  Bean  <bean123ch@gmail.com>
5994         * commands/crc.c: New file.
5996         * lib/crc.c: Likewise.
5998         * include/grub/lib/crc.h: Likewise.
6000         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6002         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6003         (hexdump): Move this function to ...
6005         * lib/hexdump.c: ... here.
6007         * include/grub/hexdump.h: Renamed to ...
6009         * include/grub/lib/hexdump.h: ... this.
6011         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6013         * util/grub-editenv.c: Likewise.
6015         * include/envblk.h: Renamed to ...
6017         * include/lib/envblk.h: ... this.
6019         * util/envblk.c: Renamed to ...
6021         * lib/envblk.c: ... this.
6023         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6024         lib/hexdump.c.
6025         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6026         (pkglib_MODULES): Add crc.mod.
6027         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6028         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6029         (crc_mod_SOURCES): New macro.
6030         (crc_mod_CFLAGS): Likewise.
6031         (crc_mod_LDFLAGS): Likewise.
6033         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6035         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6037         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6039         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6041         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6043 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6045         * commands/help.c: Include <grub/term.h>.
6046         (TERM_WIDTH): Removed.  Updated all users.
6048 2008-07-27  Pavel Roskin  <proski@gnu.org>
6050         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6051         spurious warnings about a comment within a comment.
6053 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6055         * util/getroot.c (find_root_device): Skip devices that match
6056         /dev/dm-[0-9].  This lets the real device be found for any type of
6057         abstraction (LVM, EVMS, RAID..).
6058         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6059         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6060         device is found first, find_root_device() will now skip it.
6062 2008-07-24  Pavel Roskin  <proski@gnu.org>
6064         * include/grub/types.h: Use __builtin_bswap32() and
6065         __builtin_bswap64() with gcc 4.3 and newer.
6067 2008-07-24  Christian Franke  <franke@computer.org>
6069         * util/i386/pc/grub-install.in: If `--debug' is specified,
6070         pass `--verbose' to grub-setup.
6071         Abort script if make_system_path_relative_to_its_root() fails.
6073 2008-07-24  Bean  <bean123ch@gmail.com>
6075         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6076         variable `target_platform' should be `platform'.
6078 2008-07-24  Bean  <bean123ch@gmail.com>
6080         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6081         (grub_png_init_fixed_block): New function.
6082         (grub_png_decode_image_data): Handle fixed huffman code compression.
6084 2008-07-24  Bean  <bean123ch@gmail.com>
6086         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6087         (grub_pe2elf_SOURCES): New macro.
6088         (CLEANFILES): Add grub-pe2elf.
6090         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6091         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6092         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6093         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6094         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6095         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6096         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6097         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6098         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6099         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6100         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6101         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6102         (GRUB_PE32_DT_FUNCTION): Likewise.
6103         (GRUB_PE32_REL_I386_DIR32): Likewise.
6104         (GRUB_PE32_REL_I386_REL32): Likewise.
6105         (grub_pe32_symbol): New structure.
6106         (grub_pe32_reloc): Likewise.
6108         * util/grub-pe2elf.c: New file.
6110         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6111         start symbol in non pc platform.
6113         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6115         The following patches are from Christian Franke.
6117         * include/grub/dl.h: Remove .previous, gas supports this only
6118         for ELF format.
6120         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6121         Remove .type, gas supports this only for ELF format.
6123         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6124         nullbytes in symbol table. This fixes an infinite loop if table is
6125         zero filled.
6127         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6128         TARGET_IMG_LDFLAGS and EXEEXT.
6130         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6131         TARGET_IMG_LDFLAGS_AC.
6132         (grub_CHECK_STACK_ARG_PROBE): New function.
6134         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6136         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6138         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6139         to set TARGET_IMG_LD* accordingly.
6140         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6141         Add call to grub_CHECK_STACK_ARG_PROBE.
6142         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6144         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6146         * genmk.rb: Add EXEEXT to CLEANFILES.
6148 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6150         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6151         define the codes for arrows and lines used for the menu).
6152         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6153         as well.
6155         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6156         fonts, because the latter are too slow.
6158 2008-07-21  Bean  <bean123ch@gmail.com>
6160         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6161         a20. Run keyboard test last, as it will cause macbook to halt.
6163 2008-07-18  Pavel Roskin  <proski@gnu.org>
6165         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6166         load foreign architecture modules correctly anyway.  Keep
6167         support for loading host architecture modules, whether we
6168         compile them or not.
6170 2008-07-17  Pavel Roskin  <proski@gnu.org>
6172         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6173         change target_cpu.  The compiler default can mismatch target_cpu
6174         in any case.
6176         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6177         * kern/efi/efi.c: Likewise.
6179         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6180         target compiler is functional.
6181         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6182         are set up.
6184         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6185         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6186         adjustments from the rest, only do them if target is not
6187         explicitly given.  Merge other adjustments with the final sanity
6188         check.  Remove an extraneous check for supported CPU.  Be
6189         specific which CPU and which platform is not supported.
6191         * configure.ac: Default to pc platform for x86_64.
6193 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6195         Partial LinuxBIOS -> Coreboot rename.
6197         * conf/i386-linuxbios.rmk: Renamed to ...
6198         * conf/i386-coreboot.rmk: ... this.
6199         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6200         * configure.ac: Accept "coreboot" as input platform (but maintain
6201         compatibility with "linuxbios").
6202         * include/grub/i386/linuxbios: Renamed to ...
6203         * include/grub/i386/coreboot: ... this.
6205 2008-07-17  Bean  <bean123ch@gmail.com>
6207         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6208         (appleldr_mod_SOURCE): New variable.
6209         (appleldr_mod_CFLAGS): Likewise.
6210         (appleldr_mod_LDFLAGS): Likewise.
6211         (pci_mod_SOURCES): Likewise.
6212         (pci_mod_CFLAGS): Likewise.
6213         (pci_mod_LDFLAGS): Likewise.
6214         (lspci_mod_SOURCES): Likewise.
6215         (lspci_mod_CFLAGS): Likewise.
6216         (lspci_mod_LDFLAGS): Likewise.
6218         * conf/x86_64-efi.rmk: New file.
6220         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6221         macro.
6222         (grub_efidisk_write): Likewise.
6224         * include/efi/api.h (efi_call_0): New macro.
6225         (efi_call_1): Likewise.
6226         (efi_call_2): Likewise.
6227         (efi_call_3): Likewise.
6228         (efi_call_4): Likewise.
6229         (efi_call_5): Likewise.
6230         (efi_call_6): Likewise.
6232         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6233         grub_rescue_cmd_chainloader.
6235         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6236         (grub_pe32_optional_header): Change some fields based on i386 or
6237         x86_64 platform.
6238         (GRUB_PE32_PE32_MAGIC): Likewise.
6240         * include/grub/efi/uga_draw.h: New file.
6242         * include/grub/elf.h (STN_ABS): New constant.
6243         (R_X86_64_NONE): Relocation constant for x86_64.
6244         (R_X86_64_64): Likewise.
6245         (R_X86_64_PC32): Likewise.
6246         (R_X86_64_GOT32): Likewise.
6247         (R_X86_64_PLT32): Likewise.
6248         (R_X86_64_COPY): Likewise.
6249         (R_X86_64_GLOB_DAT): Likewise.
6250         (R_X86_64_JUMP_SLOT): Likewise.
6251         (R_X86_64_RELATIVE): Likewise.
6252         (R_X86_64_GOTPCREL): Likewise.
6253         (R_X86_64_32): Likewise.
6254         (R_X86_64_32S): Likewise.
6255         (R_X86_64_16): Likewise.
6256         (R_X86_64_PC16): Likewise.
6257         (R_X86_64_8): Likewise.
6258         (R_X86_64_PC8): Likewise.
6260         * include/grub/i386/efi/pci.h: New file.
6262         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6263         Change it value based on platform.
6264         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6265         (GRUB_E820_RAM): Likewise.
6266         (GRUB_E820_RESERVED): Likewise.
6267         (GRUB_E820_ACPI): Likewise.
6268         (GRUB_E820_NVS): Likewise.
6269         (GRUB_E820_EXEC_CODE): Likewise.
6270         (GRUB_E820_MAX_ENTRY): Likewise.
6271         (grub_e820_mmap): New structure.
6272         (linux_kernel_header): Change the efi field according to different
6273         kernel version, also field from linux_kernel_header.
6275         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6277         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6278         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6279         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6280         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6281         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6282         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6283         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6284         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6285         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6286         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6288         * include/grub/x86_64/efi/kernel.h: New file.
6290         * include/grub/x86_64/efi/loader.h: Likewise.
6292         * include/grub/x86_64/efi/machine.h: Likewise.
6294         * include/grub/x86_64/efi/pci.h: Likewise.
6296         * include/grub/x86_64/efi/time.h: Likewise.
6298         * include/grub/x86_64/linux.h: Likewise.
6300         * include/grub/x86_64/setjmp.h: Likewise.
6302         * include/grub/x86_64/time.h: Likewise.
6304         * include/grub/x86_64/types.h: Likewise.
6306         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6307          GRUB_TARGET_SIZEOF_VOID_P.
6309         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6310         (grub_efi_locate_handle): Likewise.
6311         (grub_efi_open_protocol): Likewise.
6312         (grub_efi_set_text_mode): Likewise.
6313         (grub_efi_stall): Likewise.
6314         (grub_exit): Likewise.
6315         (grub_reboot): Likewise.
6316         (grub_halt): Likewise.
6317         (grub_efi_exit_boot_services): Likewise.
6318         (grub_get_rtc): Likewise.
6320         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6321         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6322         (grub_efi_allocate_pages): Wrap efi calls.
6323         (grub_efi_free_pages): Wrap efi calls.
6324         (grub_efi_get_memory_map): Wrap efi calls.
6326         * kern/x86_64/dl.c: New file.
6328         * kern/x86_64/efi/callwrap.S: Likewise.
6330         * kern/x86_64/efi/startup.S: Likewise.
6332         * loader/efi/appleloader.c: Likewise.
6334         * loader/efi/chainloader.c (cmdline): New variable.
6335         (grub_chainloader_unload): Wrap efi calls.
6336         (grub_chainloader_boot): Likewise.
6337         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6338         command line.
6340         * loader/efi/chainloader_normal.c (chainloader_command):
6341         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6342         command line.
6344         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6345         method.
6346         (grub_e820_add_region): New function.
6347         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6348         booting.
6349         (grub_find_video_card): New function.
6350         (grub_linux_setup_video): New function.
6351         (grub_rescue_cmd_linux): Probe for video information.
6353         * normal/x86_64/setjmp.S: New file.
6355         * term/efi/console.c (map_char): New function.
6356         (grub_console_putchar): Map unicode char.
6357         (grub_console_checkkey): Wrap efi calls.
6358         (grub_console_getkey): Likewise.
6359         (grub_console_getwh): Likewise.
6360         (grub_console_gotoxy): Likewise.
6361         (grub_console_cls): Likewise.
6362         (grub_console_setcolorstate): Likewise.
6363         (grub_console_setcursor): Likewise.
6365         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6367 2008-07-16  Pavel Roskin  <proski@gnu.org>
6369         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6370         format strings.
6372         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6373         pointer, not an integer.  This fixes a warning and prevents
6374         precision loss on 64-bit systems.
6375         (relocate_addresses): Remove unneeded cast.
6377 2008-07-15  Pavel Roskin  <proski@gnu.org>
6379         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6381         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6383         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6384         Fix comparison between signed and unsigned.
6386         * include/grub/i386/ieee1275/console.h: Declare
6387         grub_console_init() and grub_console_fini().
6389         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6390         It's empty and unused.
6392         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6393         beginning to avoid warnings with some compilers.
6395         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6396         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6398 2008-07-14  Pavel Roskin  <proski@gnu.org>
6400         * kern/env.c (grub_register_variable_hook): Don't copy empty
6401         string, it leaks memory.  Pass "" to grub_env_set(), it should
6402         handle constant strings.
6404         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6405         * commands/cmp.c (grub_cmd_cmp): Likewise.
6406         * kern/dl.c (grub_dl_flush_cache): Likewise.
6407         (grub_dl_load_core): Likewise.
6408         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6409         (grub_elf64_load_phdrs): Likewise.
6411 2008-07-13  Pavel Roskin  <proski@gnu.org>
6413         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6414         between signed and unsigned.
6415         (LzmaEnc_Finish): Fix warning about an unused parameter.
6417 2008-07-13  Bean  <bean123ch@gmail.com>
6419         * Makefile.in (enable_lzo): New rule.
6421         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6423         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6425         * boot/i386/pc/lnxboot.S: #include <config.h>.
6427         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6428         its value according to the compression algorithm used, lzo or lzma.
6430         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6431         compression algorithm according to configure macro.
6433         * kern/i386/pc/startup.S (codestart): Likewise.
6435         * kern/i386/pc/lzma_decode.S: New file.
6437         * include/grub/lib/LzFind.h: Likewise.
6439         * include/grub/lib/LzHash.h: Likewise.
6441         * include/grub/lib/LzmaDec.h: Likewise.
6443         * include/grub/lib/LzmaEnc.h: Likewise.
6445         * include/grub/lib/LzmaTypes.h: Likewise.
6447         * lib/LzFind.c: Likewise.
6449         * lib/LzmaDec.c: Likewise.
6451         * lib/LzmaEnc.c: Likewise.
6453 2008-07-13  Bean  <bean123ch@gmail.com>
6455         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6456         (grub_ext4_extent_header): New structure.
6457         (grub_ext4_extent): Likewise.
6458         (grub_ext4_extent_idx): Likewise.
6459         (grub_ext4_find_leaf): New function.
6460         (grub_ext2_read_block): Handle extents.
6462 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6464         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
6466 2008-07-11  Robert Millan  <rmh@aybabtu.com>
6468         * util/grub.d/40_custom.in: New file. Example on how to add custom
6469         entries to /etc/grub.d.
6470         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
6471         40_custom (implicitly, by merging all the grub.d rules).
6473 2008-07-11  Pavel Roskin  <proski@gnu.org>
6475         * commands/read.c (grub_getline): Fix invalid memory access.
6476         Don't add newline to the variable value.
6478         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
6479         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
6480         (serial_hw_get_port): Check validity of the port number.
6481         (grub_cmd_serial): Check return value of serial_hw_get_port().
6483 2008-07-07  Pavel Roskin  <proski@gnu.org>
6485         * boot/i386/pc/diskboot.S (notification_string): Replace
6486         "Loading kernel" with just "loading".  This is shorter, less
6487         confusing and saves a few bytes for possible future changes.
6489 2008-07-05  Pavel Roskin  <proski@gnu.org>
6491         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
6492         size for ATAPI devices, they are undefined.  Output sector
6493         number in decimal form.
6495         * disk/ata.c: Use named constants for status bits.
6497 2008-07-04  Pavel Roskin  <proski@gnu.org>
6499         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
6500         grub_addr_t before casting it to the void pointer to fix a
6501         warning.  Non-addressable regions are discarded earlier.
6502         (grub_arch_modules_addr): Cast _end to grub_addr_t.
6503         * kern/i386/linuxbios/table.c: Include grub/misc.h.
6504         (check_signature): Don't shadow table_header.
6505         (grub_linuxbios_table_iterate): Cast numeric constants to
6506         grub_linuxbios_table_header_t.
6507         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
6508         grub_stop().
6510         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
6511         prevent warnings.
6513         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
6514         pointer, which can cause warnings.  Support 64-bit addresses.
6516         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
6517         of sizeof(long).  This fixes PowerPC image generation on x86_64.
6519 2008-07-04  Robert Millan  <rmh@aybabtu.com>
6521         This fixes a performance issue when pc & gpt partmap iterators
6522         didn't abort iteration even after our hook found what it was
6523         looking for (often causing expensive probes of non-existent drives).
6525         Some callers relied on previous buggy behaviour, since they would
6526         raise an error when their own hooks caused early abortion of its
6527         iteration.
6529         * kern/device.c (grub_device_open): Improve error message.
6530         * disk/lvm.c (grub_lvm_open): Likewise.
6531         * disk/raid.c (grub_raid_open): Likewise.
6533         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
6534         when hook requests it, independently of grub_errno.
6535         (pc_partition_map_probe): Do not fail when find_func() caused
6536         early abortion of pc_partition_map_iterate().
6538         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
6539         when hook requests it, independently of grub_errno.
6540         (gpt_partition_map_probe): Do not fail when find_func() caused
6541         early abortion of gpt_partition_map_iterate().
6543         * kern/partition.c (grub_partition_iterate): Abort parent iteration
6544         when hook requests it, independently of grub_errno.  Do not fail when
6545         part_map_iterate_hook() caused early abortion of p->iterate().
6547         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
6548         when grub_partition_iterate() returned with non-zero.
6550 2008-07-03  Pavel Roskin  <proski@gnu.org>
6552         * disk/ata.c (grub_ata_pio_write): Check status before writing,
6553         like we do in grub_ata_pio_read().
6554         (grub_ata_readwrite): Always write individual sectors.  Fix the
6555         sector count for the remainder.
6556         (grub_ata_write): Enable writing to ATA devices.  Correctly
6557         report error for ATAPI devices.
6559 2008-07-02  Pavel Roskin  <proski@gnu.org>
6561         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
6562         warning.
6564         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
6565         for every read sector, we already increment it for the whole
6566         batch.  This fixes reading more than 256 sectors at once.
6568         * util/grub-editenv.c (cmd_info): Cast argument to long
6569         explicitly.  ptrdiff_t reduces to int on i386.
6571         * util/grub-editenv.c (main): Be specific which parameter is
6572         missing.
6574         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
6575         (memdisk): Make memdisk_orig_addr a pointer.
6577         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
6578         for file offsets, use grub_off_t instead.  Fix printf format
6579         warnings.
6581         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
6582         there.  Real unexpected warnings should not drown in the noise
6583         about known problems.
6585         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
6586         grub_disk_addr_t for memory addresses.
6588         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
6589         explicitly to fix a warning.
6591         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
6593         * Makefile.in (MODULE_LDFLAGS): New variable.
6594         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
6595         the linker accepts --build-id=none.
6596         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
6597         MODULE_LDFLAGS.
6598         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
6600         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
6601         those in Linux XFS code.  Provide a way to access 64-bit parent
6602         inode.
6603         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
6604         the end of struct grub_xfs_dir_header.
6606 2008-07-02  Bean  <bean123ch@gmail.com>
6608         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
6609         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6610         and GRUB_IEEE1275_FLAG_NO_ANSI.
6612         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
6613         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
6614         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
6616         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
6617         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
6619         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
6620         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
6622         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
6623         esc sequence on non ANSI terminal.
6624         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
6626         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
6627         beginning of file.
6629 2008-07-02  Bean  <bean123ch@gmail.com>
6631         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
6632         (grub_editenv_SOURCES): New variable.
6633         (pkglib_MODULES): Add loadenv.mod.
6634         (loadenv_mod_SOURCES): New variable.
6635         (loadenv_mod_CFLAGS): Likewise.
6636         (loadenv_mod_LDFLAGS): Likewise.
6638         * include/grub/envblk.h: New file.
6640         * util/envblk.c: New file.
6642         * util/grub-editenv.c: New file.
6644         * commands/loadenv.c: New file.
6646 2008-07-01  Pavel Roskin  <proski@gnu.org>
6648         * include/multiboot2.h (struct multiboot_tag_module): Use char,
6649         not unsigned char.  This fixes warnings and is consistent with
6650         other tags.
6652         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
6654         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
6656         * term/tparm.c (analyze): Always set *popcount.
6658         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
6659         cast to fix a warning.
6661         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
6662         cast to suppress a warning.
6664         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
6665         grub_fshelp_read_file() expects.
6667         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
6668         write uuid as a 32-bit value in CPU byte order, so declare and
6669         use it as such.
6671         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
6672         long if the format specifier expects it.
6673         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
6674         * partmap/pc.c (pc_partition_map_iterate): Likewise.
6675         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
6676         long to fix a warning.
6677         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
6678         grub_dprintf() arguments to fix warnings.
6680 2008-06-30  Pavel Roskin  <proski@gnu.org>
6682         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
6683         install_bsd_part immediately before core.img is embedded or
6684         modified on disk.  This fixes core.img verification if core.img
6685         cannot be embedded.
6687         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
6688         core_path to calculate the blocklist.
6689         Patch from Javier Martín <lordhabbit@gmail.com>
6691 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6693         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
6694         block to disk block.
6695         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
6696         Patch from Niels Böhm <bitbucket@arcor.de>
6698 2008-06-29  Robert Millan  <rmh@aybabtu.com>
6700         * util/update-grub_lib.in (font_path): Search for fonts in
6701         /boot/grub first, which is more likely to be readable (we aren't
6702         deciding where fonts live, just looking for them).
6704 2008-06-26  Pavel Roskin  <proski@gnu.org>
6706         * util/biosdisk.c (read_device_map): Don't leave dead map
6707         entries for devices failing stat() check.
6709         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
6710         core_path_dev for the core.img path on the target device.
6712 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6714         * disk/fs_uuid.c: New file.
6715         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
6716         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
6717         (fs_uuid_mod_LDFLAGS): New variables.
6718         * include/grub/disk.h (grub_disk_dev_id): Add
6719         `GRUB_DISK_DEVICE_UUID_ID'.
6720         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
6721         implement iterate().
6723 2008-06-26  Robert Millan  <rmh@aybabtu.com>
6725         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
6726         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
6727         Linux image includes no initrd.
6729 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
6731         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
6732         call to resolve the core image location that effectively appended the
6733         name twice.
6735 2008-06-21  Robert Millan  <rmh@aybabtu.com>
6737         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
6738         call from here ...
6740         * util/grub.d/10_hurd.in: ... to here ...
6741         * util/grub.d/10_linux.in: ... and here.
6743 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6745         * kern/main.c (grub_main): Export `prefix' variable immediately
6746         after it has been set by grub_machine_set_prefix().
6748 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6750         * commands/search.c (search_label, search_fs_uuid, search_file): Print
6751         search result when not saving to variable, not the other way around.
6752         When saving to variable, abort iteration as soon as a match is found.
6754 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6756         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
6757         check for partition that provides /boot/grub.  Its logic is flawed,
6758         as it prevents prepare_grub_to_access_device() from being called
6759         multiple times.
6761 2008-06-19  Robert Millan  <rmh@aybabtu.com>
6763         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
6764         "insmod" command directly when abstraction modules are needed,
6765         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
6766         since it had already been processed).
6768 2008-06-19  Pavel Roskin  <proski@gnu.org>
6770         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
6771         changed.  This is needed in case GRUB_LIBDIR changes.
6772         * conf/i386-ieee1275.rmk: Likewise.
6773         * conf/i386-linuxbios.rmk: Likewise.
6774         * conf/i386-pc.rmk: Likewise.
6775         * conf/powerpc-ieee1275.rmk: Likewise.
6777 2008-06-18  Pavel Roskin  <proski@gnu.org>
6779         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
6780         kernel_elf_symlist.c to symlist.c for consistency with other
6781         architectures.  Update all users.
6782         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6784 2008-06-18  Robert Millan  <rmh@aybabtu.com>
6786         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
6787         it in prefix.
6789         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
6790         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
6791         a RAID device, run setup() for all members independently on whether
6792         LVM abstraction is being used.
6793         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
6794         If grub-mkimage has set `*install_dos_part == -2', don't override this
6795         value.
6796         Perform *install_dos_part adjustments independently on whether
6797         we're embedding or not.
6798         Clarify error message when image is too big for embedding.
6799         Remove duplicate *install_dos_part stanza.
6801 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6803         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
6804         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
6805         variables.
6806         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
6807         values in grub_ofconsole_normal_color and
6808         grub_ofconsole_highlight_color (they're not directly related to
6809         background and foreground).
6810         (grub_ofconsole_setcolorstate): Extract background and foreground
6811         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
6813 2008-06-17  Robert Millan  <rmh@aybabtu.com>
6815         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
6816         /boot/grub for the check in last commit, not /boot (they could be
6817         different partitions).
6819 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6821         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
6822         asked to setup access for the same partition that provides /boot,
6823         don't bother using UUIDs since our root already has the value we
6824         want.
6826 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6828         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
6829         I2O devices.
6830         Patch from Sven Mueller <sven@debian.org>.
6832 2008-06-16  Robert Millan  <rmh@aybabtu.com>
6834         * util/update-grub.in: Check for $EUID instead of $UID.
6835         Reported by Vincent Zweije.
6837 2008-06-16  Bean  <bean123ch@gmail.com>
6839         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
6840         (grub_ext2_read_block): Likewise.
6841         (grub_ext2_read_inode): Likewise.
6842         (grub_ext2_mount): Likewise.
6843         (grub_ext2_close): Likewise.
6844         (grub_ext3_get_journal): Removed.
6846         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
6847         (grub_reiserfs_read_symlink): Likewise.
6848         (grub_reiserfs_mount): Likewise.
6849         (grub_reiserfs_open): Likewise.
6850         (grub_reiserfs_read): Likewise.
6851         (grub_reiserfs_close): Likewise.
6852         (grub_reiserfs_get_journal): Removed.
6854         * fs/fshelp.c (grub_fshelp_read): Removed.
6855         (grub_fshelp_map_block): Likewise.
6857         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
6858         (grub_fshelp_journal): Likewise.
6859         (grub_fshelp_read): Likewise.
6860         (grub_fshelp_map_block): Likewise.
6862 2008-06-16  Pavel Roskin  <proski@gnu.org>
6864         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
6865         floating point anymore.
6866         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
6868 2008-06-15  Pavel Roskin  <proski@gnu.org>
6870         * commands/ls.c (grub_ls_list_files): Use integer calculations
6871         for human readable format, avoid floating point use.
6872         * kern/misc.c (grub_ftoa): Remove.
6873         (grub_vsprintf): Remove floating point support.
6875 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6877         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
6878         devices.
6879         Reported by Max Vozeler.
6881 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6883         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
6884         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
6885         skipped later.
6886         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
6887         the beginning of the prefix.
6889         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
6890         It is assumed that if we have a memdisk, grub-mkimage has set
6891         grub_prefix to include the "(memdisk)" drive in it.
6893 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6895         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
6896         Initialize keyboard controller after registering the terminal, so that
6897         grub_printf() can be called from grub_keyboard_controller_init().
6899 2008-06-15  Robert Millan  <rmh@aybabtu.com>
6901         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
6902         extent-btree which is written as big endian on disk.
6903         Reported by Alain Greppin  <al@chilibi.org>.
6905 2008-06-14  Robert Millan  <rmh@aybabtu.com>
6907         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
6908         * util/i386/pc/grub-install.in (modules): Likewise.
6910 2008-06-13  Pavel Roskin  <proski@gnu.org>
6912         * commands/ls.c (grub_ls_list_files): Fix format warnings.
6914 2008-06-13  Bean  <bean123ch@gmail.com>
6916         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
6918         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
6920         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
6921         to indicate sparse block.
6923 2008-06-12  Pavel Roskin  <proski@gnu.org>
6925         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
6926         number, grub_fshelp_read() does it for us.
6928         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
6929         linear disk read with journal translation.
6930         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
6931         * include/grub/fshelp.h: Declare grub_fshelp_read().
6933 2008-06-09  Pavel Roskin  <proski@gnu.org>
6935         * fs/minix.c (grub_minix_mount): Handle error reading
6936         superblock.
6938 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6940         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
6941         don't append the RAID prefix afterwards.
6942         Reported by Clint Adams.
6944 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6946         Based on description from Pavel:
6947         * kern/disk.c (grub_disk_check_range): Rename to ...
6948         (grub_disk_adjust_range): ... this.  Add a comment explaining the
6949         tasks performed by this function.
6951 2008-06-08  Robert Millan  <rmh@aybabtu.com>
6953         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
6954         `num_serial' (for consistency with other variables).
6955         (struct grub_ntfs_data): Add `uuid' member.
6956         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
6957         (grub_ntfs_uuid): New function.
6958         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
6960 2008-06-07  Pavel Roskin  <proski@gnu.org>
6962         * util/biosdisk.c (open_device): Revert last change to the
6963         function, it broke installation.  The sector needs to be
6964         different dependent on which device is opened.
6966 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6968         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
6969         rest of GRUB, and breakage doesn't happen if its value were modified.
6971         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
6972         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
6973         a constant (same value).
6974         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
6975         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
6977 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6979         * util/biosdisk.c (open_device): Do not modify sector offset when
6980         accessing a partition.  kern/disk.c already handles this for us.
6982 2008-06-06  Robert Millan  <rmh@aybabtu.com>
6984         * util/grub-emu.c (grub_machine_init): Move code in this function from
6985         here ...
6986         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
6987         segfault in case grub_printf() is called).
6989         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
6990         grub_probe.  Update all users not to explicitly add it again.
6991         (grub_device): New variable; contains corresponding device for grubdir.
6992         (fs_module, partmap_module, devabstraction_module): Pass
6993         `--device ${grub_device}' to grub_probe to avoid traversing /dev
6994         every time.
6996 2008-06-05  Robert Millan  <rmh@aybabtu.com>
6998         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
6999         is found, print it (same layout as with labels).
7001 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7003         * util/biosdisk.c (get_drive): Rename to ...
7004         (find_grub_drive): ... this.  Update all users.
7006         (get_os_disk): Rename to ...
7007         (convert_system_partition_to_system_disk): ... this.  Update all users.
7009         (find_drive): Rename to ...
7010         (find_system_device): ... this.  Update all users.
7012 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7014         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7015         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7016         (make_device_map): Likewise.
7018 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7020         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7021         before dereferencing it.
7023         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7024         union with fat12/fat16-specific ones.  Add some new fields, including
7025         `num_serial' for both versions.
7026         (struct grub_fat_data): Add `uuid' member.
7027         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7028         names.  Initialize `data->uuid' using `num_serial'.
7029         (grub_fat_uuid): New function.
7030         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7032         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7033         (grub_reiserfs_uuid): New function.
7034         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7035         member.
7037         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7038         (grub_xfs_uuid): New function.
7039         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7041 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7043         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7044         code that is backward compatible with pre-uuid search command.
7046 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7048         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7049         floppies after everything else, to ensure floppy drive isn't accessed
7050         unnecessarily (patch from Bean).
7052 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7054         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7055         not print device names when we were asked to set a variable.
7057 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7059         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7060         using "cursor-on" and "cursor-off" commands (understood at least by
7061         the Open Firmware flavour on OLPC).
7063 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7065         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7066         on and off sequences.
7068 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7070         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7071         * util/update-grub.in: Likewise.
7073 2008-05-30  Pavel Roskin  <proski@gnu.org>
7075         * util/biosdisk.c (linux_find_partition): Simplify logic and
7076         make the code more universal.  Keep special processing for
7077         devfs, but use a simple rule for all other devices.  If the
7078         device ends with a number, append 'p' and the partition number.
7079         Otherwise, append only the partition number.
7081 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7083         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7084         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7085         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7086         the `root' parameter to Linux.
7088 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7090         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7091         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7092         --fs_uuid with --fs-uuid.
7093         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7094         all filesystems support them).
7096 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7098         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7099         grub_printf() flags, since we're printing in units of 2 bytes.
7101 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7103         * util/grub.d/00_header.in: Remove obsolete comment referencing
7104         convert_system_path_to_grub_path().
7105         * util/update-grub.in: Likewise.
7106         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7107         (convert_system_path_to_grub_path): Add a warning message explaining
7108         that this function is deprecated.  Rely on is_path_readable_by_grub()
7109         for the readability checks.
7110         (font_path): Use is_path_readable_by_grub() for the readability
7111         check rather than convert_system_path_to_grub_path().
7113 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7115         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7116         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7117         converting it first.
7118         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7119         grub.cfg for access to font file, and afterwards call it again to set
7120         the root device.
7122 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7124         * commands/search.c (options): Add --fs_uuid option.
7125         (search_fs_uuid): New function.
7126         (grub_cmd_search): Fix --set argument passing.
7127         Use search_fs_uuid() when requested via --fs_uuid.
7128         (grub_search_init): Update help message.
7129         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7130         and redeclare it as an array of 16-bit words.
7131         (grub_ext2_uuid): New function.
7132         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7133         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7134         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7135         (GRUB_DEVICE_BOOT_UUID): New variables.
7136         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7137         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7138         whenever possible.
7139         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7140         just assume `root' variable has the right value.
7141         * util/grub.d/10_linux.in: Likewise.
7142         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7143         via PRINT_FS_UUID.
7144         (main): Recognise `-t fs_uuid' argument.
7146 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7148         * util/biosdisk.c (map): Redefine structure to hold information
7149         about GRUB drive name.
7150         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7151         drive names.
7152         (call_hook): Remove.
7153         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7154         member.  Assume drive has partitions.
7155         (grub_util_biosdisk_open): Access device names via `.device' struct
7156         member.
7157         (open_device): Likewise.
7158         (find_drive): Likewise.
7159         (read_device_map): Adjust map[] usage to match the new struct
7160         definition.  Don't check for duplicates (still possible, but not cheap
7161         anymore).
7162         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7163         (make_device_name): Remove assumption of BIOS-like drive names.
7165 2008-05-30  Pavel Roskin  <proski@gnu.org>
7167         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7168         compiling execute.c doesn't need grub_script.tab.h anymore.
7169         (normal/command.c_DEPENDENCIES): Likewise.
7170         (normal/function.c_DEPENDENCIES): Likewise.
7171         * conf/i386-ieee1275.rmk: Likewise.
7172         * conf/i386-linuxbios.rmk: Likewise.
7173         * conf/i386-pc.rmk: Likewise.
7174         * conf/powerpc-ieee1275.rmk: Likewise.
7175         * conf/sparc64-ieee1275.rmk: Likewise.
7177 2008-05-29  Pavel Roskin  <proski@gnu.org>
7179         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7180         when scanning metadata for volume group name.
7182         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7183         a generated file, which may only be included from the files with
7184         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7185         use union YYSTYPE, as the later allows forward declaration.
7186         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7188 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7190         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7191         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7192         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7193         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7194         scan codes.
7196 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7198         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7199         control key combinations.
7201 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7203         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7204         * util/ieee1275/grub-install.in: ... to here.
7205         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7206         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7207         (grub_install_SOURCES): Likewise.
7209 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7211         * fs/affs.c: Update copyright year.
7212         * fs/ext2.c: Likewise.
7213         * fs/fshelp.c: Likewise.
7214         * fs/hfsplus.c: Likewise.
7215         * fs/ntfs.c: Likewise.
7216         * fs/xfs.c: Likewise.
7217         * include/grub/fshelp.h: Likewise.
7218         * util/grub-mkdevicemap.c: Likewise.
7220 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7222         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7223         might need to be fatfs to support some firmware implementations
7224         (e.g. OFW or EFI).
7226 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7228         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7229         devices.
7230         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7231         (make_device_map): Likewise.
7233 2008-05-20  Bean  <bean123ch@gmail.com>
7235         * fs/fshelp.c (grub_fshelp_map_block): New function.
7236         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7237         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7239         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7240         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7241         (grub_fshelp_journal): New structure.
7242         (grub_fshelp_map_block): New function prototype.
7243         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7244         (grub_fshelp_map_block): Likewise.
7246         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7247         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7248         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7249         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7250         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7251         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7252         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7253         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7254         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7255         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7256         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7257         (grub_ext2_sblock): New members for journal support.
7258         (grub_ext3_journal_header): New structure.
7259         (grub_ext3_journal_revoke_header): Likewise.
7260         (grub_ext3_journal_block_tag): Likewise.
7261         (grub_ext3_journal_sblock): Likewise.
7262         (grub_fshelp_node): New members logfile and journal.
7263         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7264         grub_fshelp_map_block to get real block number.
7265         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7266         number.
7267         (grub_ext2_read_inode): Likewise.
7268         (grub_ext3_get_journal): New function.
7269         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7270         (grub_ext2_close): Release memory used by journal.
7272         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7273         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7274         (grub_reiserfs_transaction_header): Renamed to
7275         grub_reiserfs_description_block, replace field data with real_blocks.
7276         (grub_reiserfs_commit_block): New structure.
7277         (grub_reiserfs_data): New member journal.
7278         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7279         number.
7280         (grub_reiserfs_read_symlink): Likewise.
7281         (grub_reiserfs_iterate_dir): Likewise.
7282         (grub_reiserfs_open): Likewise.
7283         (grub_reiserfs_read): Likewise.
7284         (grub_reiserfs_get_journal): New function.
7285         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7286         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7287         using grub_reiserfs_get_journal.
7288         (grub_reiserfs_close): Release memory used by journal.
7290         * fs/affs.c (grub_affs_read_block): Change block type to
7291         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7293         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7295         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7297         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7299         * fs/udf.c (grub_udf_read_block): Change block type to
7300         grub_disk_addr_t. Use type cast to avoid warning.
7302         * fs/xfs.c (grub_xfs_read_block): Likewise.
7304 2008-05-16  Christian Franke  <franke@computer.org>
7306         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7307         to ensure that break with ESC will always work.
7308         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7309         Remove ESC from keyboard queue.
7311 2008-05-16  Christian Franke  <franke@computer.org>
7313         * util/biosdisk.c: [__CYGWIN__] Add includes.
7314         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7315         (get_os_disk): Move variable declarations to OS specific
7316         parts to avoid warning.
7317         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7318         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7319         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7320         Cygwin.
7321         * util/getroot.c: [__CYGWIN__] Add includes.
7322         (strip_extra_slashes): Fix "/" case.
7323         [__CYGWIN__] (get_win32_path): New function.
7324         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7325         [__CYGWIN__] (find_root_device): Disable.
7326         [__CYGWIN__] (get_bootsec_serial): New function.
7327         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7328         [__linux__] (grub_guess_root_device): Add early returns to simplify
7329         structure.
7330         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7331         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7332         check for Linux only.
7334 2008-05-15  Bean  <bean123ch@gmail.com>
7336         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7337         keyboard hang problem in apple's intel mac.
7339 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7341         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7342         devices.
7343         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7344         (make_device_map): Likewise.
7345         Reported by Aurelien Jarno <aurel32@debian.org>
7347 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7349         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7350         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7351         (make_device_map): Output entries for xvd type disks.
7353 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7355         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7356         devices.
7357         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7358         (make_device_map): Likewise.
7359         Reported by Roland Dreier <rdreier@cisco.com>
7361 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7363         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7364         grub_strstr() call.  Correct a few mistakes in failure path handling.
7366 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7368         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7369         Do not print a trailing slash (therefore, the root directory is an
7370         empty string).
7371         (convert_system_path_to_grub_path): Do not remove trailing slash
7372         from make_system_path_relative_to_its_root() output.
7374         * util/i386/pc/grub-install.in: Add trailing slash to output from
7375         make_system_path_relative_to_its_root().
7377 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7379         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7380         ensures that output lines aren't intermangled with those sent to
7381         stderr (via grub_util_info()).
7382         * util/grub-probe.c (grub_refresh): Likewise.
7383         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7385 2008-05-05  Christian Franke  <franke@computer.org>
7387         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7388         Add Cygwin device names.
7389         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7390         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7391         (check_device): Return error instead of success on empty name.
7392         (make_device_map): Move label inside linux specific code to
7393         prevent compiler warning.
7395 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7397         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7398         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7399         first boot option.
7400         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7402 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7404         * docs/grub.cfg: New file (example GRUB configuration).
7406 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7408         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7409         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7410         and `disk/ieee1275/nand.c'.
7412 2008-04-25  Bean  <bean123ch@gmail.com>
7414         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7415         i386-linuxbios.
7417         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7418         change the buffer size to 4096 for cdrom device.
7420         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7421         and nand.mod.
7422         (_linux_mod_SOURCES): New variable.
7423         (_linux_mod_CFLAGS): Likewise.
7424         (_linux_mod_LDFLAGS): Likewise.
7425         (linux_mod_SOURCES): Likewise.
7426         (linux_mod_CFLAGS): Likewise.
7427         (linux_mod_LDFLAGS): Likewise.
7428         (nand_mod_SOURCES): Likewise.
7429         (nand_mod_CFLAGS): Likewise.
7430         (nand_mod_LDFLAGS): Likewise.
7432         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7433         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7434         type property. (nand device in olpc don't have this property)
7436         * include/grub/disk.h (grub_disk_dev_id): New macro
7437         GRUB_DISK_DEVICE_NAND_ID.
7439         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7440         function prototype.
7441         (grub_rescue_cmd_initrd): Likewise.
7443         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7444         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7445         ofw_cif_handler and ofw_idt, adjust padding number.
7447         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7448         GRUB_MACHINE_IEEE1275 is defined.
7450         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7451         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7453         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7454         on nested function heap_init.
7455         (grub_upper_mem): New variable for i386-ieee1275.
7456         (grub_get_extended_memory): New function for i386-ieee1275.
7457         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7459         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7460         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7461         property.
7463         * loader/i386/ieee1275/linux.c: New file.
7465         * loader/i386/ieee1275/linux_normal.c: New file.
7467         * disk/ieee1275/nand.c: New file.
7469 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
7471         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
7472         value.
7473         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
7475 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7477         Restructures early code path on ieee1275 to unify grub_main() as
7478         the first C function that is executed in every platform.
7480         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
7481         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
7482         cmain().
7483         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
7484         * kern/ieee1275/cmain.c (cmain): Rename to ...
7485         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
7486         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
7487         at the beginning.
7489 2008-04-18  Robert Millan  <rmh@aybabtu.com>
7491         * util/update-grub.in: Fix syntax error when setting
7492         `GRUB_PRELOAD_MODULES'.
7493         Reported by Stephane Chazelas <stephane@artesyncp.com>
7495 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
7497         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
7498         section into account, newer toolchains generate unique build ids
7499         * configure.ac: remove the test for --build-id=none acceptance,
7500         we want build ids to be preserved
7501         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
7502         far from other sections don't cause the raw binary images grow
7503         size
7505 2008-04-15  Robert Millan  <rmh@aybabtu.com>
7507         * disk/lvm.c: Update copyright year.
7508         * kern/misc.c: Likewise.
7510 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7512         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
7513         there is no memory left for physical volume name.
7515 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
7517         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
7518         volume name mapping to support bigger than 9 character names properly.
7520 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7522         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
7523         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
7525 2008-04-13  Christian Franke  <franke@computer.org>
7527         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
7528         to create a floppy emulation boot CD when non emulation mode
7529         does not work.
7530         Enable Joliet CD filesystem extension.
7532 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7534         * kern/misc.c (grub_strncat): Fix off-by-one error.
7535         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
7537         * kern/env.c (grub_env_context_close): Clear current context, not
7538         previous one.
7539         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
7541         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
7543 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7545         Improve robustness when handling LVM.
7547         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
7548         (and leave `*p' unmodified).
7549         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
7550         through it.
7551         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
7552         iterating through it.
7553         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
7554         through it.
7555         (grub_lvm_scan_device): Check the return value (and fail gracefully
7556         when due) on each grub_lvm_getvalue() or grub_strstr() call.
7557         Don't assume `vg->pvs != NULL' when iterating through it.
7559 2008-04-13  Robert Millan  <rmh@aybabtu.com>
7561         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
7562         * genmk.rb (partmap): New variable.
7563         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
7564         (#{partmap}): New target rule.
7565         * genpartmaplist.sh: New file.
7566         * Makefile.in (pkglib_DATA): Add partmap.lst.
7567         (partmap.lst): New target rule.
7568         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
7569         modules (including all partition maps), instead of preloading them.
7571 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
7573         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
7574         `linux-boot-prober' (if installed) to detect other operating
7575         systems which are installed on the computer and add them to
7576         the boot menu.
7577         * conf/common.rmk: Build and install 30_os-prober.
7579 2008-04-12  Robert Millan  <rmh@aybabtu.com>
7581         * kern/powerpc/ieee1275/init.c: Move from here ...
7582         * kern/ieee1275/init.c: ... to here.  Update all users.
7584         * kern/powerpc/ieee1275/cmain.c: Move from here ...
7585         * kern/ieee1275/cmain.c: ... to here.  Update all users.
7587         * kern/powerpc/ieee1275/openfw.c: Move from here ...
7588         * kern/ieee1275/openfw.c: ... to here.  Update all users.
7590         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
7591         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
7593 2008-04-10  Pavel Roskin  <proski@gnu.org>
7595         * configure.ac: Always use "_cv_" in cache variables for
7596         compatibility with Autoconf 2.62.
7598 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7600         Revert grub/machine/init.h addition by Pavel (since it breaks on
7601         i386-ieee1275 and others):
7602         * util/i386/pc/misc.c: Remove grub/machine/init.h.
7603         * util/powerpc/ieee1275/misc.c: Likewise.
7605 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7607         * util/grub-probe.c (probe): Improve error message.
7609 2008-04-07  Robert Millan  <rmh@aybabtu.com>
7611         * util/biosdisk.c (read_device_map): Skip devices that don't exist
7612         (this prevents the presence of a bogus entry from ruining the whole
7613         thing).
7615 2008-04-06  Pavel Roskin  <proski@gnu.org>
7617         * util/biosdisk.c: Include grub/util/biosdisk.h.
7618         * util/grub-fstest.c (execute_command): Make static.
7619         * util/grub-mkdevicemap.c (check_device): Likewise.
7620         * util/i386/pc/misc.c: Include grub/machine/init.h.
7621         * util/powerpc/ieee1275/misc.c: Likewise.
7622         * util/lvm.c: Include grub/util/lvm.h.
7623         * util/misc.c: Include grub/kernel.h, grub/misc.h and
7624         grub/cache.h.
7625         * util/raid.c: Include grub/util/raid.h.
7626         (grub_util_getdiskname): Make static.
7628         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
7629         grub_hostfs_fini(), as they are called from grub_init_all() and
7630         grub_fini_all() respectively.  This fixes an infinite loop in
7631         grub-fstest due to double registration of hostfs.
7632         Reported by Christian Franke <Christian.Franke@t-online.de>
7634 2008-04-05  Pavel Roskin  <proski@gnu.org>
7636         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
7637         all 8 functions.  Otherwise, probe function 0 only.
7639 2008-04-04  Pavel Roskin  <proski@gnu.org>
7641         * commands/lspci.c (grub_lspci_iter): Print the bus number
7642         correctly.
7644         * commands/lspci.c (grub_pci_classes): Fix typos.
7645         (grub_lspci_iter): Don't print func twice.  Print vendor ID
7646         before device ID, as it's normally done.
7648         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
7649         Fix signedness warnings.
7650         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
7651         Likewise.
7652         * util/ieee1275/get_disk_name.c: Include config.h so that
7653         _GNU_SOURCE is defined and getline() is declared.  Mark an
7654         unused argument as such.  Fix a signedness warning.
7656 2008-04-02  Pavel Roskin  <proski@gnu.org>
7658         * genkernsyms.sh.in: Use more robust assignments for CC and
7659         srcdir.  Quote srcdir.
7660         * gensymlist.sh.in: Likewise.  Assert at the compile time that
7661         the symbol table is not empty.
7663         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
7664         * fs/cpio.c (grub_cpio_read): Likewise.
7666 2008-04-01  Pavel Roskin  <proski@gnu.org>
7668         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
7669         * disk/host.c (grub_host_open): Likewise.
7670         * disk/loopback.c (grub_loopback_open): Likewise.
7671         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
7672         disk->id as in disk/host.c, not a multi-character constant.
7674         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
7675         later is obsolete, potentially dangerous and sets a bad example.
7676         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
7677         * util/misc.c (grub_util_get_image_size): Likewise.
7679         * disk/loopback.c (options): Improve help for "--partitions".
7681         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
7682         options to align them with the short options, e.g. "echo -e".
7684 2008-03-31  Bean  <bean123ch@gmail.com>
7686         * video/reader/png.c (grub_png_data): New member is_16bit and
7687         image_data.
7688         (grub_png_decode_image_header): Detect 16 bit png image.
7689         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
7690         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
7691         (grub_video_reader_png): Release memory occupied by image_data.
7693         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
7694         4096 bytes.
7695         (grub_nfs_mount): Skip the test for sector per cluster.
7697         * include/grub/ntfs.h (MAX_SPC): Removed.
7699 2008-03-31  Bean  <bean123ch@gmail.com>
7701         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
7702         (grub_probe_SOURCES): Add fs/afs.c.
7703         (grub_fstest_SOURCES): Likewise.
7704         (afs_mod_SOURCES): New variable.
7705         (afs_mod_CFLAGS): Likewise.
7706         (afs_mod_LDFLAGS): Likewise.
7708         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
7709         (grub_emu_SOURCES): Likewise.
7711         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7713         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7715         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7717         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7719         * fs/afs.c: New file.
7721 2008-03-30  Pavel Roskin  <proski@gnu.org>
7723         * disk/host.c: Include grub/misc.h to fix a warning.
7724         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
7725         warnings about implicit declarations.
7727         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
7728         variable.
7729         * include/grub/i386/loader.h: Change declaration of
7730         grub_linux_boot() to match what grub_loader_set() expects.
7731         * util/getroot.c (grub_guess_root_device): Return const char* to
7732         fix a warning.
7733         * util/grub-probe.c (probe): Fix a warning about uninitialized
7734         abstraction_name variable.
7735         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
7736         second argument as unused to fix a warning.
7738         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
7739         missing grub_error() call.
7741         * util/update-grub_lib.in: Define datarootdir, since Autoconf
7742         2.60 and newer uses it to define datadir.
7744         * commands/sleep.c: Fix warning about implicit declaration.
7745         * disk/memdisk.c: Likewise.
7746         * loader/aout.c: Likewise.
7747         * loader/i386/bsd_normal.c: Likewise.
7748         * util/grub-probe.c: Likewise.
7750         * commands/i386/cpuid.c (has_longmode): Make static.
7751         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
7752         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
7754         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
7755         GDT.  This is more robust, as %ds can change.
7756         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
7757         calling real_to_prot().
7758         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
7760 2008-03-28  Pavel Roskin  <proski@gnu.org>
7762         * kern/i386/pc/startup.S: Assert that uncompressed functions
7763         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
7764         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
7765         code, as they push parts of the code (error handlers) beyond
7766         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
7767         code as correctness and size.
7769 2008-03-28  Pavel Roskin  <proski@gnu.org>
7771         * kern/i386/pc/startup.S
7772         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
7773         data block address to the real mode, keep offset minimal.  This
7774         works around a bug in AWARD BIOS on old Athlon systems, which
7775         makes CD detection hang.
7777 2008-03-26  Pavel Roskin  <proski@gnu.org>
7779         * normal/color.c (grub_parse_color_name_pair): Make `name' a
7780         const.
7781         * include/grub/normal.h: Add grub_parse_color_name_pair()
7782         declaration.
7784 2008-03-24  Bean  <bean123ch@gmail.com>
7786         * disk/i386/pc/biosdisk.c (cd_start): Removed.
7787         (cd_count): Removed.
7788         (cd_drive): New variable.
7789         (grub_biosdisk_get_drive): Don't check for (cdN) device.
7790         (grub_biosdisk_call_hook): Likewise.
7791         (grub_biosdisk_iterate): Change cdrom detection method.
7792         (grub_biosdisk_open): Replace cd_start with cd_drive.
7793         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
7794         detect cdrom device.
7796         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
7797         Removed.
7798         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
7799         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
7800         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
7801         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
7802         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
7803         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
7804         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
7805         (grub_biosdisk_cdrp): New structure.
7806         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
7808         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
7810         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
7811         device.
7813         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
7814         New function.
7816 2008-03-20  Robert Millan  <rmh@aybabtu.com>
7818         Remove 2 TiB limit in ata.mod.
7819         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
7820         (grub_ata_dumpinfo): Print sector count with 0x%llx.
7821         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
7822         grub_uint64_t instead of grub_uint32_t.
7824 2008-03-05  Bean  <bean123ch@gmail.com>
7826         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
7827         (grub_multiboot): Set boot device.
7829         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
7831 2008-03-02  Bean  <bean123ch@gmail.com>
7833         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
7834         symlink_buffer.
7836 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
7838         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
7839         texinfo.tex.
7841         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
7842         modified.
7844         * docs/fdl.texi: New file.
7846         * docs/mdate-sh: New file. Copied from gnulib.
7847         * docs/texinfo.tex: Likewise.
7849         * config.guess: Updated from gnulib.
7850         * install-sh: Likewise.
7852 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7854         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
7855         (aout_mod_SOURCES): New variable.
7856         (aout_mod_CFLAGS): Likewise.
7857         (aout_mod_LDFLAGS): Likewise.
7859         * conf/i386-ieee1275.rmk: Likewise.
7861 2008-02-28  Robert Millan  <rmh@aybabtu.com>
7863         * util/update-grub.in: Reorganise terminal validity check.  Accept
7864         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
7865         Based on suggestion by Franklin PIAT.
7867 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
7869         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
7870         function.
7871         * util/getroot.c (grub_util_check_block_device): New function that
7872         returns the given argument if it is a block device and returns NULL else.
7873         * util/grub-probe.c (argument_is_device): New variable.
7874         (probe): Promote device_name from a variable to an argument. Receive
7875         device_name from grub_util_check_block_device() if path is NULL and from
7876         grub_guess_root_device() else. Do not free() device_name anymore.
7877         (options): Introduce new parameter '-d, --device'.
7878         (main): Add description of the new parameter to the help screen.
7879         Rename path variable to argument. Set argument_is_device if the '-d'
7880         option is given. Pass argument to probe() depending on
7881         argument_is_device.
7883 2008-02-24  Bean  <bean123ch@gmail.com>
7885         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
7886         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
7887         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
7888         (GRUB_ISO9660_VOLDESC_PART): Likewise.
7889         (GRUB_ISO9660_VOLDESC_END): Likewise.
7890         (grub_iso9660_primary_voldesc): New member escape.
7891         (grub_iso9660_data): New member joliet.
7892         (grub_iso9660_convert_string): New function.
7893         (grub_iso9660_mount): Detect joliet extension.
7894         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
7895         (grub_iso9660_iso9660_label): Likewise.
7897         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
7898         (grub_setup_SOURCES): Add fs/udf.c.
7899         (grub_fstest_SOURCES): Likewise.
7900         (udf_mod_SOURCES): New variable.
7901         (udf_mod_CFLAGS): Likewise.
7902         (udf_mod_LDFLAGS): Likewise.
7904         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
7905         (grub_emu_SOURCES): Likewise.
7907         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
7909         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7911         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
7913         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
7915         * fs/udf.c: New file.
7917 2008-02-24  Robert Millan  <rmh@aybabtu.com>
7919         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
7920         (normal/lexer.c_DEPENDENCIES): New variables.
7921         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7922         (normal/lexer.c_DEPENDENCIES): Likewise.
7923         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
7924         (normal/lexer.c_DEPENDENCIES): Likewise.
7925         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
7926         (normal/lexer.c_DEPENDENCIES): Likewise.
7927         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7928         (normal/lexer.c_DEPENDENCIES): Likewise.
7929         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
7930         (normal/lexer.c_DEPENDENCIES): Likewise.
7932 2008-02-23  Robert Millan  <rmh@aybabtu.com>
7934         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
7935         since they were intended to be in hex.  This didn't break previously
7936         because of a bug in gpt_partition_map_iterate() (see below).
7938         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
7939         when checking the validity of GPT header.
7940         Remove `partno', since it always provides the same information as `i'.
7942 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
7944         * include/grub/efi/time.h: Fix a wrong comment.
7946 2008-02-19  Pavel Roskin  <proski@gnu.org>
7948         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
7949         message.
7951 2008-02-19  Bean  <bean123ch@gmail.com>
7953         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
7954         (aout_mod_SOURCES): New variable.
7955         (aout_mod_CFLAGS): Likewise.
7956         (aout_mod_LDFLAGS): Likewise.
7957         (_bsd_mod_SOURCES): New variable.
7958         (_bsd_mod_CFLAGS): Likewise.
7959         (_bsd_mod_LDFLAGS): Likewise.
7960         (bsd_mod_SOURCES): New variable.
7961         (bsd_mod_CFLAGS): Likewise.
7962         (bsd_mod_LDFLAGS): Likewise.
7964         * include/grub/aout.h: New file.
7966         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
7968         * include/grub/i386/bsd.h: New file.
7970         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
7971         to make it public.
7973         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
7974         function is called, so that it's possible to change it inside the hook.
7975         (grub_elf64_load): Likewise.
7976         (grub_elf_file): Don't close the file if elf header is not found.
7977         (grub_elf_close): Close the file if grub_elf_file fails (The new
7978         grub_elf_file won't close it).
7979         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
7980         (grub_elf64_size): Likewise.
7982         * kern/i386/loader.S (grub_unix_real_boot): New function.
7984         * loader/aout.c: New file.
7986         * loader/i386/bsd.c: New file.
7988         * loader/i386/bsd_normal.c: New file.
7990         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
7992         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
7993         can test other formats.
7995 2008-02-19  Robert Millan  <rmh@aybabtu.com>
7997         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
7998         (grub_gpt_partition_type_empty): Redefine with macro from
7999         `<grub/gpt_partition.h>'.
8000         (gpt_partition_map_iterate): Adjust partition type comparison.
8002         Export `entry' as partmap-specific `part.data' struct.
8003         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8005         * include/grub/gpt_partition.h (grub_gpt_header)
8006         (grub_gpt_partentry): ... to here (new file).
8008         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8010         (grub_gpt_partition_type_bios_boot): New const variable, defined
8011         with macro from `<grub/gpt_partition.h>'.
8013         (setup): Replace `first_start' with `embed_region', which keeps
8014         track of the embed region (and is partmap-agnostic).
8016         Replace find_first_partition_start() with find_usable_region(),
8017         which finds a usable region for embedding using partmap-specific
8018         knowledge (supports PC/MSDOS and GPT).
8020         Fix all assumptions that the embed region start at sector 1, using
8021         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8022         rather than `first_start' to calculate available size.
8024         In grub_util_info() message, replace "into after the MBR" with an
8025         indication of the specific sector our embed region starts at.
8027 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8029         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8030         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8031         `commands/reboot.c'.
8032         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8033         (halt_mod_SOURCES): Likewise.
8034         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8035         (halt_mod_SOURCES): Likewise.
8037 2008-02-17  Christian Franke  <franke@computer.org>
8039         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8041 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8043         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8044         set `first_start' to 0 for non-PC/MSDOS partition maps.
8046 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8048         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8049         do not assume partition map is PC/MSDOS before performing checks that
8050         are specific to that layout.
8052 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8054         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8055         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8056         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8058 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8060         * configure.ac: Only a cosmetic change on the handling of
8061         -fno-stack-protector.
8063 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8065         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8066         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8067         reboot.c.
8068         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8069         (halt_mod_SOURCES): New variable.
8070         (halt_mod_CFLAGS): Likewise.
8071         (halt_mod_LDFLAGS): Likewise.
8072         (reboot_mod_SOURCES): Likewise.
8073         (reboot_mod_CFLAGS): Likewise.
8074         (reboot_mod_LDFLAGS): Likewise.
8076         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8077         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8078         reboot.c.
8079         (halt_mod_SOURCES): Likewise.
8080         (reboot_mod_SOURCES): Likewise.
8082         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8083         commands/i386/pc/reboot.c by commands/reboot.c.
8084         (reboot_mod_SOURCES): Likewise.
8086         * commands/i386/pc/reboot.c: merge this file ...
8088         * commands/ieee1275/reboot.c: ... and this file ...
8090         * commands/reboot.c: ... to this file.
8091         Add some precompiler directive to include the correct header for
8092         each machine.
8094         * commands/ieee1275/halt.c: move this file ...
8096         * commands/halt.c: ... to here.
8097         Add some precompiler directive to include the correct header for
8098         each machine.
8100         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8101         (grub_halt): Likewise.
8103         * kern/efi/efi.c (grub_reboot): New function.
8104         (grub_halt): Likewise.
8106 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8108         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8109         /dev (like it is done for /dev/mapper).  This doesn't provide support
8110         for EVMS, but at least it is now easy to identify the problem when it
8111         arises.
8113 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8115         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8116         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8117         comparing it with -1, not 0.
8119 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8121         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8122         `disk/lvm.c'.
8123         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8124         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8126         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8127         `disk/lvm.c' to the end of the list.
8128         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8129         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8131 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8133         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8134         grub_print_error() instead.  This will let user know why we're entering
8135         rescue mode.
8136         Based on suggestions from Sam Morris.
8138 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8140         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8141         on remaining N args, instead of "--" arg N times.
8143 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8145         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8146         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8147         pattern for unknown glyphs.
8149 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8151         * configure.ac: Probe for `help2man'.
8152         * Makefile.in (builddir): New variable.
8153         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8154         or otherwise add a few flags/options to it.
8155         (install-local): For every executable utility or script that is
8156         installed, invoke $(HELP2MAN) to install a manpage based on --help
8157         output.
8159         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8160         that it doesn't prevent --help from working in build tree.
8162         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8163         with `bug-grub@gnu.org'.
8164         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8165         * util/update-grub.in (usage): New function.
8166         Implement proper argument check, with support for --help and --version
8167         (as well as existing -y).
8169 2008-02-09  Christian Franke  <franke@computer.org>
8171         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8172         avoid overwriting previous output.
8173         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8175 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8177         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8178         drawing the menu.
8180 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8182         * commands/sleep.c: New file.
8183         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8184         (sleep_mod_SOURCES): New variable.
8185         (sleep_mod_CFLAGS): Likewise.
8186         (sleep_mod_LDFLAGS): Likewise.
8188 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8190         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8191         situations in which we can deduce the RAID size and the superblock
8192         doesn't match it.
8194 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8196         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8197         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8198         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8200         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8201         and return a grub_diskmemberlist_t composed of physical array members.
8202         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8204         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8205         prototype.
8206         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8207         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8208         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8210         * util/grub-probe.c (probe): Move partmap probing code from here ...
8211         (probe_partmap): ... to here.
8212         (probe): Use probe_partmap() once for the disk we're probing, and
8213         additionally, when such disk contains a memberlist() struct member,
8214         once for each disk that is contained in the structure returned by
8215         memberlist().
8217 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8219         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8220         environment variable to 'all' in order to obtain debug output from
8221         non-util/ code.
8222         * util/i386/pc/grub-setup.c (main): Likewise.
8224 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8226         * disk/raid.c (grub_raid_scan_device): Check for
8227         `array->device[sb.this_disk.number]' rather than for
8228         `array->device[sb.this_disk.number]->name', since the latter is not
8229         guaranteed to be accessible.
8231 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8233         * disk/raid.c: Update copyright.
8234         * fs/cpio.c: Likewise.
8235         * include/grub/raid.h: Likewise.
8236         * loader/i386/pc/multiboot.c: Likewise.
8237         * util/hostfs.c: Likewise.
8239 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8241         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8242         to a grub_disk_t array.
8243         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8244         `device[x]'.
8245         (grub_raid_scan_device): Replace `device[x].name' accesses with
8246         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8248 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8250         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8251         grub_dprintf() calls.
8252         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8253         error message.
8255 2008-02-07  Christian Franke  <franke@computer.org>
8257         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8258         instead of fseek and ftell to support large files.
8259         (grub_hostfs_read): Likewise.
8261 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8263         Patch from Jeroen Dekkers.
8264         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8265         failure, since successfully reading all array members might not be
8266         required.
8268 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8270         * util/grub-probe.c (probe): Simplify partmap probing (with the
8271         assumption that the first word up to the underscore equals to
8272         the module name).
8274 2008-02-06  Christian Franke  <franke@computer.org>
8276         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8277         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8278         last block of a cpio or tar stream.
8279         Check for "TRAILER!!!" instead of any empty data
8280         block to detect last block of a cpio stream.
8281         (grub_cpio_dir): Fix constness of variable np.
8282         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8283         cpio or tar trailer is detected.  This fixes a crash
8284         on open of a non existing file.
8286 2008-02-05  Bean  <bean123ch@gmail.com>
8288         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8289         address of entry.
8290         (grub_multiboot_load_elf64): Likewise.
8291         (grub_multiboot): Initialize mbi structure.
8293         * util/grub-fstest.c: Don't include unused header file script.h.
8295         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8296         of file.
8297         (grub_fstest_SOURCES): Likewise.
8299 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8301         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8302         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8303         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8304         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8306         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8307         (translation_table): Replace hardcoded values with macros
8308         provided by `<grub/term.h>'.
8310         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8311         (keyboard_map): Correct/add a few values, with macros provided
8312         by `<grub/term.h>'.
8313         (keyboard_map_shift): Zero values that don't differ from their
8314         `keyboard_map' equivalents.
8315         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8316         Discard the second scan code that is always sent by Caps lock.
8317         Only use `keyboard_map_shift' when it provides a non-zero value,
8318         otherwise fallback to `keyboard_map'.
8320 2008-02-04  Bean  <bean123ch@gmail.com>
8322         * Makefile.in (enable_grub_fstest): New variable.
8324         * conf/common.rmk (grub_fstest_init.lst): New rule.
8325         (grub_fstest_init.h): Likewise.
8326         (grub_fstest_init.c): Likewise.
8327         (util/grub-fstest.c_DEPENDENCIES): New variable.
8328         (grub_fstest_SOURCES): Likewise.
8330         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8332         * util/grub-fstest.c: New file.
8334 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8336         Make grub-setup handle a separate root device.
8338         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8339         so that the root device can be compared with the destination
8340         device.
8341         When embedding the core image, if the root and destination devices
8342         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8343         0xFF.
8344         When not embedding, set ROOT_DRIVE to 0xFF.
8346 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8348         Add support for having a grub directory in a different drive. This
8349         is still only the data handling part.
8351         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8352         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8353         (grub_root_drive): New variable.
8355         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8356         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8357         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8358         as it was.
8360         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8362         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8363         macro.
8364         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8366         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8367         is bogus, because PXE booting does not specify any drive
8368         correctly.
8370         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8371         am not sure if this is really correct.
8373         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8374         is always identical to the boot drive when booting from a CD.
8376         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8377         longer.
8378         (root_drive): New variable.
8379         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8380         (setup_sectors): Push %dx right after popping it, because %dh will
8381         be modified later.
8382         (copy_buffer): Restore %dx.
8384 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8386         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8387         use `cdboot.img' for cdrom images.
8389 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8391         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8392         only setup gfxterm when `font' command has succeeded.
8394 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8396         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8397         (grub_rescue_cmd_multiboot_loader)
8398         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8400 2008-02-03  Pavel Roskin  <proski@gnu.org>
8402         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8403         %edx and %esi from stack only after grub_gate_a20() is called.
8404         grub_gate_a20() clobbers %edx.
8406 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8408         * configure.ac (AC_INIT): Bumped to 1.96.
8410         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8411         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8412         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8413         video/readers/png.c.
8415 2008-02-03  Bean  <bean123ch@gmail.com>
8417         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8418         (cdboot_img_SOURCES): New variable.
8419         (cdboot_img_ASFLAGS): New variable.
8420         (cdboot_img_LDFLAGS): New variable.
8422         * boot/i386/pc/cdboot.S: New file.
8424         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8425         (cd_count): Likewise.
8426         (grub_biosdisk_get_drive): Add support for cd device.
8427         (grub_biosdisk_call_hook): Likewise.
8428         (grub_biosdisk_iterate): Likewise.
8429         (grub_biosdisk_open): Likewise.
8430         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8431         (grub_biosdisk_rw): Support reading from cd device.
8432         (GRUB_MOD_INIT): Iterate cd devices.
8434         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8435         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8436         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8438         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8440 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8442         * commands/read.c: New file.
8443         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8444         (read_mod_SOURCES): New variable.
8445         (read_mod_CFLAGS): Likewise.
8446         (read_mod_LDFLAGS): Likewise.
8448 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8450         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8451         determining whether menu has to be displayed.
8453 2008-02-02  Marco Gerards  <marco@gnu.org>
8455         * bus/pci.c: New file.
8457         * include/grub/pci.h: Likewise.
8459         * include/grub/i386/pc/pci.h: Likewise.
8461         * commands/lspci.c: Likewise.
8463         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8464         `lspci.mod'.
8465         (pci_mod_SOURCES): New variable.
8466         (pci_mod_CFLAGS): Likewise.
8467         (pci_mod_LDFLAGS): Likewise.
8468         (lspci_mod_SOURCES): Likewise.
8469         (lspci_mod_CFLAGS): Likewise.
8470         (lspci_mod_LDFLAGS): Likewise.
8472 2008-02-02  Bean  <bean123ch@gmail.com>
8474         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
8475         (grub_ufs_get_file_block): Fix indirect block calculation problem.
8477         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
8478         (grub_xfs_btree_node): New structure.
8479         (grub_xfs_btree_root): New structure.
8480         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
8481         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
8482         (GRUB_XFS_EXTENT_BLOCK): Likewise.
8483         (GRUB_XFS_EXTENT_SIZE): Likewise.
8484         (grub_xfs_read_block): Support btree format type.
8485         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
8486         Use directory block as basic unit.
8488         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
8490         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
8491         __attribute__ ((__regparm__ (1))).
8493 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8495         Correct a mistake in previous commit.
8497         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
8498         top.
8499         (normal/command.c_DEPENDENCIES): New variable.
8501 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8503         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
8504         top.
8505         (normal/command.c_DEPENDENCIES): New variable.
8506         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
8507         * conf/i386-ieee1275.rmk: Likewise.
8508         * conf/i386-linuxbios.rmk: Likewise.
8509         * conf/i386-pc.rmk: Likewise.
8510         * conf/sparc64-ieee1275.rmk: Likewise.
8511         * conf/powerpc-ieee1275.rmk: Likewise.
8512         (grub_emu_SOURCES): Add `fs/fshelp.c'.
8514         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
8516 2008-02-01  Robert Millan  <rmh@aybabtu.com>
8518         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
8519         call at beginning of function.
8521 2008-01-31  Pavel Roskin  <proski@gnu.org>
8523         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
8524         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
8525         (grub_mkrescue_SOURCES): Likewise.
8526         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
8528 2008-01-30  Robert Millan  <rmh@aybabtu.com>
8530         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
8531         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
8532         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
8533         (grub_probe_SOURCES): ... to here.
8535         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
8536         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
8537         * conf/i386-ieee1275.rmk: Likewise.
8538         * conf/i386-linuxbios.rmk: Likewise.
8539         * conf/powerpc-ieee1275.rmk: Likewise.
8541 2008-01-30  Tristan Gingold  <gingold@free.fr>
8543         * kern/rescue.c: Silently accept empty lines.
8545 2008-01-29  Bean  <bean123ch@gmail.com>
8547         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
8548         (real_code_2): Code cleanup and change comment style.
8549         (move_memory): Avoid using 32-bit address mode.
8551 2008-01-29  Bean  <bean123ch@gmail.com>
8553         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
8554         (png_mod_SOURCES): New variable.
8555         (png_mod_CFLAGS): Likewise.
8556         (png_mod_LDFLAGS): Likewise.
8558         * video/readers/png.c: New file.
8560 2008-01-28  Robert Millan  <rmh@aybabtu.com>
8562         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
8563         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
8564         `ifndef GRUB_MOD_GAP' hack.
8565         * util/elf/grub-mkimage.c (add_segments): Likewise.
8567 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8569         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
8570         `GRUB_MOD_GAP' for platforms in which it's not defined.
8571         * util/elf/grub-mkimage.c (add_segments): Likewise.
8573 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8575         Get grub-emu to build again (including parallel builds).
8577         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
8578         Split into ...
8579         (util/grub-emu.c_DEPENDENCIES): ... this, ...
8580         (normal/execute.c_DEPENDENCIES): ... this, ...
8581         (grub-emu_DEPENDENCIES): ... and this.
8583         * conf/i386-efi.rmk: Likewise.
8584         * conf/i386-linuxbios.rmk: Likewise.
8585         * conf/i386-ieee1275.rmk: Likewise.
8586         * conf/powerpc-ieee1275.rmk: Likewise.
8587         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
8589 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8591         * NEWS: Add a few items.
8593 2008-01-27  Robert Millan  <rmh@aybabtu.com>
8595         Fix parallel builds with grub-emu.  Based on earlier commit for
8596         grub-probe and grub-setup.
8598         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8599         (util/grub-emu.c_DEPENDENCIES): ... this.
8600         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8601         (util/grub-emu.c_DEPENDENCIES): ... this.
8602         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8603         (util/grub-emu.c_DEPENDENCIES): ... this.
8604         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8605         (util/grub-emu.c_DEPENDENCIES): ... this.
8606         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
8607         (util/grub-emu.c_DEPENDENCIES): ... this.
8609 2008-01-27  Pavel Roskin  <proski@gnu.org>
8611         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
8612         to create a gap between _end and the modules added to the image
8613         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
8614         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
8615         * util/elf/grub-mkimage.c (add_segments): Likewise.
8617 2008-01-26  Pavel Roskin  <proski@gnu.org>
8619         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
8620         just return an error.
8622 2008-01-26  Bean  <bean123ch@gmail.com>
8624         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
8625         (grub_reiserfs_get_item): Save offset of the next item.
8626         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
8628 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8630         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
8631         make all filesystem sources appear together (possibly fixing omissions
8632         while at it).
8633         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8634         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8635         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8636         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8638         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
8639         add `kern/file.c'.
8640         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
8641         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8642         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
8643         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
8645         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
8646         (probe): Add a sanity check to make sure of our ability to read
8647         requested files when probing for filesystem type.
8649         * genmk.rb: Update copyright year (2007).
8651         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
8652         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
8653         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
8654         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
8655         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
8656         : Remove function prototypes.
8658 2008-01-25  Robert Millan  <rmh@aybabtu.com>
8660         Revert my previous commits (based on wrong assumption of how grub_errno
8661         works).
8663         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
8664         * kern/file.c (grub_file_open): Likewise.
8666 2008-01-24  Pavel Roskin  <proski@gnu.org>
8668         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
8669         that hang if GRUB tries to setup colors.
8670         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
8671         colors for firmwares that don't support it.
8672         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
8673         Recognize Open Hack'Ware, set flags to work around its
8674         limitations.
8676 2008-01-24  Robert Millan  <rmh@aybabtu.com>
8678         * kern/file.c (grub_file_open): Do not account previous failures of
8679         unrelated functions when grub_errno is checked for.
8680         Reported by Oleg Strikov.
8682 2008-01-24  Bean  <bean123ch@gmail.com>
8684         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
8685         (grub_ufs_sblock): New member volume name.
8686         (grub_ufs_find_file): Fix string copy bug.
8687         (grub_ufs_label): Implement this function properly.
8689         * fs/hfs.c (grub_hfs_cnid_type): New enum.
8690         (grub_hfs_iterate_records): Use the correct file number for extents
8691         and catalog file. Fix problem in next index calculation.
8692         (grub_hfs_find_node): Replace recursive function call with loop.
8693         (grub_hfs_iterate_dir): Replace recursive function call with loop.
8695 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8697         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
8698         `<grub/symbol.h>' and `<grub/multiboot.h>'.
8699         (grub_multiboot2_real_boot): New function prototype.
8701         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
8702         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
8704         * kern/i386/ieee1275/init.c (grub_os_area_addr)
8705         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
8707 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8709         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
8710         #ifdef'ed out grub_printf().
8712 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8714         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
8715         grub_dprintf calls, since they make "debug=all" mode unusable.
8716         (grub_console_checkkey): Likewise.
8718 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8720         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
8721         `term/i386/pc/at_keyboard.c'.
8722         (pkglib_MODULES): Add `serial.mod'.
8723         (serial_mod_SOURCES): New variable.
8724         (serial_mod_CFLAGS): Likewise.
8725         (serial_mod_LDFLAGS): Likewise.
8727         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
8728         `<grub/powerpc/ieee1275/console.h>'.
8729         (grub_keyboard_controller_init): New function prototype.
8730         (grub_console_checkkey): Likewise.
8731         (grub_console_getkey): Likewise.
8733         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
8734         keyboard on i386.
8736         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
8737         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
8739 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8741         * kern/i386/pc/init.c (make_install_device): When memdisk image is
8742         present, "(memdisk)/boot/grub" becomes the default prefix.
8744         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
8745         a memdisk tarball with all the modules.  Add --overlay=DIR option that
8746         allows users to overlay additional files into the image.
8748 2008-01-23  Robert Millan  <rmh@aybabtu.com>
8750         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
8751         and `machine/memory.h'.
8752         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
8753         (_multiboot_mod_SOURCES): New variable.
8754         (_multiboot_mod_CFLAGS): Likewise.
8755         (_multiboot_mod_LDFLAGS): Likewise.
8756         (multiboot_mod_SOURCES): Likewise.
8757         (multiboot_mod_CFLAGS): Likewise.
8758         (multiboot_mod_LDFLAGS): Likewise.
8760         * include/grub/i386/ieee1275/loader.h: New file.
8762         * include/grub/i386/ieee1275/machine.h: Likewise.
8764         * include/grub/i386/ieee1275/memory.h: Likewise.
8766         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
8767         variable declaration.
8768         (grub_os_area_size): Likewise.
8770         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
8771         (grub_lower_mem, grub_upper_mem): New variables.
8772         (grub_stop_floppy): New function (just to make
8773         grub_multiboot2_real_boot() happy).
8775         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
8776         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
8777         (grub_stop): New function.
8778         Include `"../realmode.S"' and `"../loader.S"'.
8780         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
8781         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
8783         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
8784         rely on grub_multiboot2_real_boot() for final boot.
8786 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8788         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
8789         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
8790         device that doesn't look like an SD card.
8791         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
8792         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
8793         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
8794         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
8795         found.
8797 2008-01-22  Robert Millan  <rmh@aybabtu.com>
8799         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
8800         avoid claiming over our own code.
8802 2008-01-22  Bean  <bean123ch@gmail.com>
8804         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
8805         (jpeg_mod_SOURCES): New variable.
8806         (jpeg_mod_CFLAGS): Likewise.
8807         (jpeg_mod_LDFLAGS): Likewise.
8809         * video/readers/jpeg.c : New file.
8811 2008-01-22  Bean  <bean123ch@gmail.com>
8813         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
8814         there are no more items.
8816 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8818         * kern/mm.c (grub_mm_init_region): Improve debug message.
8820 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8822         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
8823         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
8824         address.
8825         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
8826         a C macro.
8827         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
8828         Indicates start of upper memory.
8829         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
8830         (generate_image): Abort when image size is big enough to corrupt
8831         upper memory.
8833         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
8834         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
8835         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8836         instead of hardcoding 0xA0000.
8837         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
8838         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
8839         instead of hardcoding 0xA0000.
8841 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8843         * disk/memdisk.c (memdisk_size): New variable.
8844         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
8845         `memdisk_size'.
8846         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
8847         image to dynamic memory.
8848         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
8849         `memdisk_size'.  Free memdisk block.
8851 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8853         Fix detection of very small filesystems (like tar).
8855         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
8856         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
8857         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
8858         a problem with this disk).
8860 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8862         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
8863         on grub_biosdisk_rw_standard() error.
8865 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8867         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
8868         recent changes.
8869         * kern/elf.c: Likewise.
8870         * kern/ieee1275/ieee1275.c: Likewise.
8871         * kern/powerpc/ieee1275/openfw.c: Likewise.
8872         * term/ieee1275/ofconsole.c: Likewise.
8874 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8876         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
8878         * include/grub/kernel.h (grub_arch_memdisk_addr)
8879         (grub_arch_memdisk_size): Moved from here ...
8881         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
8882         (grub_arch_memdisk_size): ... to here.
8884 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8886         Mostly based on bugfix from Bean.
8888         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
8889         attribute with hook() parameter.
8890         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
8891         declaration.
8892         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
8893         attribute with hook() parameter.
8894         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
8895         declaration.
8897 2008-01-21  Robert Millan  <rmh@aybabtu.com>
8899         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
8900         (pkglib_MODULES): Add `memdisk.mod'.
8901         (memdisk_mod_SOURCES): New variable.
8902         (memdisk_mod_CFLAGS): Likewise.
8903         (memdisk_mod_LDFLAGS): Likewise.
8905         * disk/memdisk.c: New file.
8907         * include/grub/disk.h (grub_disk_dev_id): Add
8908         `GRUB_DISK_DEVICE_MEMDISK_ID'.
8910         * include/grub/i386/pc/kernel.h
8911         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
8912         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
8913         (grub_kernel_image_size): New variable declaration.
8914         (grub_total_module_size): Likewise.
8915         (grub_memdisk_image_size): Likewise.
8917         * include/grub/i386/pc/memory.h
8918         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
8920         * include/grub/kernel.h: Include `<grub/symbol.h>'.
8921         (grub_arch_memdisk_addr): New variable declaration.
8922         (grub_arch_memdisk_size): Likewise.
8924         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
8925         (grub_arch_memdisk_size): Likewise.
8927         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
8928         (codestart): Replace hardcoded `0x100000' with
8929         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
8931         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
8932         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
8933         not NULL, append the contents of the file it refers to, at the end of
8934         the compressed kernel image.  Initialize `grub_memdisk_image_size'
8935         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
8936         (options): Add "memdisk"|'m' option.
8937         (main): Parse --memdisk|-m option, and pass user-provided path as
8938         parameter to generate_image().
8940 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8942         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
8943         grub_dprintf() calls from here ...
8944         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
8946 2008-01-20  Robert Millan  <rmh@aybabtu.com>
8948         Fix detection of "real mode" when /options/real-mode? doesn't exist.
8950         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
8951         declaration.
8952         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
8953         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
8954         `GRUB_IEEE1275_FLAG_REAL_MODE'.
8955         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
8956         property).
8957         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
8958         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
8960 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8962         Get rid of confusing function (superseded by
8963         `grub_ieee1275_get_integer_property')
8964         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
8965         prototype.
8966         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
8967         function.
8968         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
8969         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
8970         in native endianness from grub_ieee1275_get_integer_property().
8972 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8974         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
8975         command after "shut-down", since implementations differ on which
8976         the command for halt is.
8978 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8980         * include/grub/i386/linuxbios/console.h: Add header protection.
8981         (grub_keyboard_controller_init): New function prototype.
8982         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
8983         (KEYBOARD_COMMAND_READ): Likewise.
8984         (KEYBOARD_COMMAND_WRITE): Likewise.
8985         (KEYBOARD_SCANCODE_SET1): Likewise.
8986         (grub_keyboard_controller_write): New function.
8987         (grub_keyboard_controller_read): Likewise.
8988         (grub_keyboard_controller_init): Likewise.
8990         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
8991         (grub_console_init): On coreboot/LinuxBIOS, call
8992         grub_keyboard_controller_init().
8994 2008-01-19  Robert Millan  <rmh@aybabtu.com>
8996         PowerPC changes provided by Pavel Roskin.
8998         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
8999         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9000         don't rely on cmain() doing it.
9001         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9002         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9004 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9006         * include/grub/i386/linuxbios/memory.h
9007         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9008         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9009         receive `table_header' as argument.  Instead, probe for it in the
9010         known memory ranges where it can be present.
9011         (grub_available_iterate): Do not pass a fixed `table_header' address
9012         to grub_linuxbios_table_iterate().
9014 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9016         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9017         * conf/i386-ieee1275.rmk: New file.
9018         * include/grub/i386/ieee1275/console.h: Likewise.
9019         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9020         * include/grub/i386/ieee1275/kernel.h: Likewise.
9021         * include/grub/i386/ieee1275/time.h: Likewise.
9022         * kern/i386/ieee1275/init.c: Likewise.
9023         * kern/i386/ieee1275/startup.S: Likewise.
9025 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9027         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9028         when pointers are 32-bit (but still do set it to one when they are
9029         64-bit).
9031 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9033         * include/grub/ieee1275/ieee1275.h
9034         (grub_ieee1275_get_integer_property): New function prototype.
9036         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9037         (grub_ieee1275_get_integer_property): New function.  Wraps around
9038         grub_ieee1275_get_property() to handle endianness.
9040         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9041         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9042         where appropriate.
9043         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9044         (grub_map): Likewise.
9045         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9047 2008-01-15  Bean  <bean123ch@gmail.com>
9049         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9050         (grub_script_execute_cmdline): Reset grub_errno.
9052         * normal/main.c (read_config_file): Reset grub_errno.
9054         * normal/parse.y (script_init): New.
9055         (script): Move function and menuentry here.
9056         (delimiter): New.
9057         (command): Add delimiter at the end of command.
9058         (commands): Adjust to match the new command.
9059         (commandblock): Remove grub_script_lexer_record_start.
9060         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9061         (if): Use the new commands.
9063         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9065 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9067         * normal/menu.c (run_menu): Move timeout message from here ...
9068         (print_timeout): ... to here.
9069         (run_menu): Use print_timeout() once during initial draw to print
9070         the whole message, and again in every clock tick to update only
9071         the number of seconds.
9073 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9075         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9076         actual size of `available' from grub_ieee1275_get_property(), and
9077         restrict parsing to that bound.
9079 2008-01-15  Christian Franke  <franke@computer.org>
9081         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9082         (argp_program_version): Remove variable.
9083         (argp_program_bug_address): Likewise.
9084         (options): Convert from struct argp_option to struct option.
9085         (struct arguments): Remove.
9086         (parse_opt): Remove.
9087         (usage): New function.
9088         (main): Replace struct args members by simple variables.
9089         Replace argp_parse() by getopt_long().
9090         Add switch to evaluate options.
9091         Add missing "(...)" around root_dev in prefix string.
9093 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9095         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9096         for grub_ieee1275_exit(), in order to improve portability.
9098 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9100         * util/grub.d/10_linux.in (prefix): Define.
9101         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9103 2008-01-13  Pavel Roskin  <proski@gnu.org>
9105         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9106         grub_errno if no errors have been detected.
9108 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9110         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9111         (grub_util_get_dev_abstraction): New function prototype.
9113         * util/getroot.c: Include `<grub/util/getroot.h>'
9114         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9115         (grub_util_get_dev_abstraction): ... here (new function).
9117         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9118         `PRINT_ABSTRACTION'.
9119         (probe): Probe for abstraction type when requested.
9120         (main): Understand `--target=abstraction'.
9122         * util/i386/efi/grub-install.in: Add abstraction module to core
9123         image when it is found to be necessary.
9124         * util/i386/pc/grub-install.in: Likewise.
9125         * util/powerpc/ieee1275/grub-install.in: Likewise.
9127         * util/update-grub_lib.in (font_path): Return system path without
9128         converting to GRUB path.
9129         * util/update-grub.in: Convert system path returned by font_path()
9130         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9131         abstraction module is needed for loading fonts (if any).  Export
9132         that as `GRUB_PRELOAD_MODULES'.
9133         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9134         insmod commands).
9136 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9138         Remove some unused code from reiserfs.
9140         * fs/reiserfs.c (struct grub_reiserfs_key)
9141         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9142         (struct grub_reiserfs_node_body): Removed.
9143         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9144         Likewise.
9145         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9146         Likewise.
9147         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9148         Likewise.
9149         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9150         Likewise.
9151         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9152         Likewise.
9153         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9154         Likewise.
9155         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9156         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9157         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9159 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9161         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9162         Determines if a file is garbage left by packaging systems, etc.
9163         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9164         for processing /etc/grub.d scripts.
9165         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9166         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9167         as a condition for processing Linux images.
9169 2008-01-10  Pavel Roskin  <proski@gnu.org>
9171         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9172         to compile reiserfs.c on PowerPC.
9174 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9176         * kern/device.c (grub_device_iterate): Do not abort device iteration
9177         when one of the devices cannot be opened.
9178         * kern/disk.c (grub_disk_open): Do not account previous failures of
9179         unrelated functions when grub_errno is checked for.
9181 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9183         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9184         `! grub_linux_is_bzimage', change order of address comparison to make
9185         it more intuitive, and improve "too big zImage" error message.
9187 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9189         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9190         `$(update-grub_DATA)'.
9191         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9192         targets.
9194 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9196         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9197         which instruction is modified by grub-setup during installation
9198         (since it wasn't obvious by only looking at this file).
9200 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9202         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9203         listing actual TODO items.
9205 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9207         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9208         correctly.
9209         (grub_reiserfs_get_key_offset): Likewise.
9210         (grub_reiserfs_set_key_offset): Likewise.
9211         (grub_reiserfs_set_key_type): Likewise.
9212         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9214         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9215         better to remove the bitfield version completely.
9217 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9219         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9220         allocated from the heap, due to the fshelp implementation.
9221         (grub_reiserfs_dir): Free NODE, due to the same reason.
9223 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9225         Mostly from Vincent Pelletier:
9227         * fs/reiserfs.c: New file.
9229         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9230         (reiserfs_mod_SOURCES): New variable.
9231         (reiserfs_mod_CFLAGS): Likewise.
9232         (reiserfs_mod_LDFLAGS): Likewise.
9234         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9235         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9236         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9237         normal/color.c.
9239 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9241         * normal/color.c: Remove `<grub/env.h>'.
9243 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9245         * include/grub/normal.h: Include <grub/env.h>.
9247 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9249         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9250         usage example with `(hd0,1)'.
9251         Reported by Samuel Thibault.
9253 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9255         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9256         (grub_linux_boot_zimage): Rename to ...
9257         (grub_linux_boot): ... this.
9258         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9259         (grub_linux_boot_zimage): Conditionalize zImage copy.
9261         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9262         (grub_linux_boot_bzimage): Remove prototype.
9263         (grub_linux_boot_zimage): Rename to ...
9264         (grub_linux_boot): ... this.
9266         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9267         (grub_linux_boot): Remove function.
9269 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9271         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9272         (grub_env_write_color_highlight): Likewise.
9273         (grub_wait_after_message): Likewise.
9275         * normal/color.c: New file.
9277         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9278         (normal_mod_DEPENDENCIES): Likewise.
9280         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9281         (normal_mod_DEPENDENCIES): Likewise.
9283         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9284         (normal_mod_DEPENDENCIES): Likewise.
9286         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9287         (normal_mod_DEPENDENCIES): Likewise.
9289         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9290         for waiting after a message is printed.
9291         * normal/main.c (read_config_file): Likewise.
9292         (grub_normal_init): Register grub_env_write_color_normal() and
9293         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9294         `color_highlight' variables as global.
9296         * normal/menu.c (grub_wait_after_message): New function.
9297         (grub_color_menu_normal): New variable.  Replaces ...
9298         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9299         (grub_color_menu_highlight): New variable.  Replaces ...
9300         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9301         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9302         `GRUB_TERM_COLOR_STANDARD'.
9303         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9304         `normal_code' and `highlight_code' to `old_color_normal' and
9305         `old_color_highlight', respectively.
9306         (grub_menu_init_page): Update colors when drawing the menu, based on
9307         `menu_color_normal' and `menu_color_highlight' variables.
9308         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9309         a message is printed.
9311 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9313         * kern/env.c (grub_env_context_open): Propagate hooks for global
9314         variables to new context.
9316         * kern/main.c (grub_set_root_dev): Export `root' variable.
9318 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9320         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9321         discs unconditionally, since udev and others have options to provide
9322         them.
9324 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9326         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9328 2008-01-04  Christian Franke  <franke@computer.org>
9330         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9331         of eisa_mmap.
9333 2008-01-03  Pavel Roskin  <proski@gnu.org>
9335         * kern/i386/linuxbios/init.c: Put "void" to all function
9336         declarations with no arguments.
9337         * kern/powerpc/ieee1275/init.c: Likewise.
9338         * term/i386/pc/at_keyboard.c: Likewise.
9339         * term/i386/pc/vga_text.c: Likewise.
9340         * util/grub-mkdevicemap.c: Likewise.
9342 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9344         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9345         message when loaded image is out of bounds.
9346         (grub_multiboot_load_elf64): Likewise.
9348 2008-01-02  Pavel Roskin  <proski@gnu.org>
9350         * util/grub.d/10_linux.in: Try version without ".old" when
9351         looking for initrd.  It's better to use initrd from the newer
9352         kernel of the same version than no initrd at all.
9354 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9356         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9358 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9360         * include/grub/video.h: Added grub_video_unmap_color and
9361         grub_video_get_active_render_target.
9362         (grub_video_adapter): Added unmap_color and get_active_render_target.
9364         * video/video.c: Added grub_video_unmap_color and
9365         grub_video_get_active_render_target.
9366         (grub_video_get_info): Changed method to accept NULL pointer as an
9367         argument to allow detection of active video adapter.
9369         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9370         grub_video_vbe_unmap_color_int.
9371         Added grub_video_vbe_unmap_color and
9372         grub_video_vbe_get_active_render_target.
9373         (grub_video_vbe_adapter): Added unmap_color and
9374         get_active_render_target.
9376         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9377         with grub_video_vbe_unmap_color_int.
9379         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9380         (DEFAULT_NORMAL_COLOR): Likewise.
9381         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9382         (DEFAULT_FG_COLOR): Removed.
9383         (DEFAULT_BG_COLOR): Likewise.
9384         (DEFAULT_CURSOR_COLOR): Changed value.
9385         (grub_virtual_screen): Added standard_color_setting,
9386         normal_color_setting, highlight_color_setting and term_color.
9387         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9388         (bitmap_width): Added.
9389         (bitmap_height): Likewise.
9390         (bitmap): Likewise.
9391         (set_term_color): Likewise.
9392         (grub_virtual_screen_setup): Changed to use new terminal coloring
9393         settings.
9394         (grub_gfxterm_init): Added init for bitmap.
9395         (grub_gfxterm_fini): Added destroy for bitmap.
9396         (redraw_screen_rect): Updated to use background bitmap and new
9397         terminal coloring.
9398         (scroll_up): Added optimization for case when there is no bitmap.
9399         (grub_gfxterm_cls): Fixed to use correct background color.
9400         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9401         coloring.
9402         (grub_virtual_screen_setcolor): Likewise.
9403         (grub_virtual_screen_getcolor): Added.
9404         (grub_gfxterm_background_image_cmd): Likewise.
9405         (grub_video_term): Added setcolor and getcolor.
9406         (MOD_INIT): Added registration of background_image command.
9407         (MOD_TERM): Added unregistration for background_image command.
9409 2007-12-30  Pavel Roskin  <proski@gnu.org>
9411         * loader/multiboot_loader.c: Fix multiboot command
9412         unregistration.  Fix all typos in the word "multiboot".
9414 2007-12-29  Pavel Roskin  <proski@gnu.org>
9416         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9417         support for initrd names used in Fedora.
9419 2007-12-26  Bean  <bean123ch@gmail.com>
9421         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9422         (cpio_mod_SOURCES): New variable.
9423         (cpio_mod_CFLAGS): Likewise.
9424         (cpio_mod_LDFLAGS): Likewise.
9426         * fs/cpio.c: New file.
9428         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9430         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9432         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9434         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9436 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9438         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9439         (grub_getcolor): New function.
9441         * kern/term.c (grub_getcolor): New function.
9442         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9443         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9444         (print_entry): Set normal and highlight colors to
9445         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9446         respectively, before printing and restore them to old
9447         values afterwards.
9448         (grub_menu_init_page): Likewise.  Fill an additional colored space
9449         that would otherwise be left blank.
9451         * term/efi/console.c (grub_console_getcolor): New function.
9452         (struct grub_console_term.getcolor): New variable.
9453         * term/i386/pc/console.c (grub_console_getcolor): New function.
9454         (struct grub_console_term.getcolor): New variable.
9455         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9456         (struct grub_console_term.getcolor): New variable.
9458         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9459         (struct grub_console_term.setcolor): Remove variable.
9460         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9461         (struct grub_console_term.setcolor): Remove variable.
9462         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9463         (struct grub_console_term.setcolor): Remove variable.
9464         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
9465         (struct grub_console_term.setcolor): Remove variable.
9467 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9469         * configure.ac: Search for possible unifont.hex locations, and
9470         define UNIFONT_HEX if found.
9472         * Makefile.in (UNIFONT_HEX): Define variable.
9473         (DATA): Rename to ...
9474         (PKGLIB): ... this.  Update all users.
9475         (PKGDATA): New variable.
9476         (pkgdata_IMAGES): Rename to ...
9477         (pkglib_IMAGES): ... this. Update all users.
9478         (pkgdata_MODULES): Rename to ...
9479         (pkglib_MODULES): ... this. Update all users.
9480         (pkgdata_PROGRAMS): Rename to ...
9481         (pkglib_PROGRAMS): ... this. Update all users.
9482         (pkgdata_DATA): Rename to ...
9483         (pkglib_DATA): ... this. Update all users.
9484         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
9485         (unicode.pff, ascii.pff): New rules.
9486         (all-local): Add `$(PKGDATA)' dependency.
9487         (install-local): Process `$(PKGDATA)'.
9489         * util/update-grub_lib.in (font_path): Search for *.pff files in
9490         a few more locations, including `${pkgdata}'.
9492 2007-12-23  Robert Millan  <rmh@aybabtu.com>
9494         Patch from Bean  <bean123ch@gmail.com>:
9495         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
9496         `size'.
9498 2007-12-21  Bean  <bean123ch@gmail.com>
9500         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
9501         (ntfscomp_mod_SOURCES): New variable.
9502         (ntfscomp_mod_CFLAGS): Likewise.
9503         (ntfscomp_mod_LDFLAGS): Likewise.
9505         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
9506         (grub_probe_SOURCES): Likewise.
9507         (grub_emu_SOURCES): Likewise.
9509         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9510         (grub_emu_SOURCES): Likewise.
9512         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9513         (grub_emu_SOURCES): Likewise.
9515         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
9516         (grub_emu_SOURCES): Likewise.
9518         * fs/ntfs.c (grub_ntfscomp_func): New variable.
9519         (read_run_list): Renamed to grub_ntfs_read_run_list.
9520         (decomp_nextvcn): Moved to ntfscomp.c.
9521         (decomp_getch): Likewise.
9522         (decomp_get16): Likewise.
9523         (decomp_block): Likewise.
9524         (read_block): Likewise.
9525         (read_data): Partially moved to ntfscomp.c.
9526         (fixup): Change unsigned to grub_uint16_t.
9527         (read_mft): Change unsigned long to grub_uint32_t.
9528         (read_attr): Likewise.
9529         (read_data): Likewise.
9530         (read_run_data): Likewise.
9531         (read_run_list): Likewise.
9532         (read_mft): Likewise.
9534         * fs/ntfscomp.c: New file.
9536         * include/grub/ntfs.h: New file.
9538 2007-12-16  Robert Millan  <rmh@aybabtu.com>
9540         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
9541         IDE disk check, since Linux is known to support 20 IDE disks.
9542         Reported by Colin Watson.
9544 2007-12-15  Bean  <bean123ch@gmail.com>
9546         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
9547         (lnxboot_img_SOURCES): New variable.
9548         (lnxboot_img_ASFLAGS): Likewise.
9549         (lnxboot_img_LDFLAGS): Likewise.
9551         * boot/i386/pc/lnxboot.S: New file.
9553 2007-11-24  Pavel Roskin  <proski@gnu.org>
9555         * configure.ac: Test if '--build-id=none' is supported by the
9556         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
9557         objcopy to generate incorrect binary files (binutils
9558         2.17.50.0.18-1 as shipped by Fedora 8).
9559         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
9560         linking, so that build ID doesn't break the test.
9562 2007-11-24  Pavel Roskin  <proski@gnu.org>
9564         * include/grub/i386/time.h: use "void" in the argument list
9565         of grub_cpu_idle().
9566         * include/grub/powerpc/time.h: Likewise.
9567         * include/grub/sparc64/time.h: Likewise.
9569 2007-11-18  Christian Franke  <franke@computer.org>
9571         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
9572         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
9573         This fixes the problem that function keys did not work in grub-emu.
9575 2007-11-18  Christian Franke  <franke@computer.org>
9577         * disk/host.c (grub_host_open): Remove attribute unused from
9578         name parameter. Add check for "host". This fixes the problem
9579         that grub-emu does not find partitions.
9581 2007-11-18  Christian Franke  <franke@computer.org>
9583         * util/hostfs.c (is_dir): New function.
9584         (grub_hostfs_dir):  Handle missing dirent.d_type case.
9585         (grub_hostfs_read): Add missing fseek().
9586         (grub_hostfs_label): Clear label pointer.  This fixes a crash
9587         of grub-emu on "ls (host)".
9589 2007-11-18  Christian Franke  <franke@computer.org>
9591         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
9592         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
9593         to 64 bit boundary by default.
9595 2007-11-18  Bean  <bean123ch@gmail.com>
9597         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
9598         (hexdump_mod_SOURCES): New variable.
9599         (hexdump_mod_CFLAGS): Likewise.
9600         (hexdump_mod_LDFLAGS): Likewise.
9602         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9604         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9606         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9608         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
9610         * include/grub/hexdump.h: New file.
9612         * commands/hexdump.c: New file.
9614 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9616         * commands/i386/pc/play.c (beep_off): Switch order of arguments
9617         in grub_outb() calls.
9618         (beep_on): Likewise.
9620 2007-11-10  Christian Franke  <franke@computer.org>
9622         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
9623         (grub_menu_run): Likewise.
9625 2007-11-10  Robert Millan  <rmh@aybabtu.com>
9627         * include/grub/i386/efi/machine.h: New file.
9628         * include/grub/i386/linuxbios/machine.h: Likewise.
9629         * include/grub/i386/pc/machine.h: Likewise.
9630         * include/grub/powerpc/ieee1275/machine.h: Likewise.
9631         * include/grub/sparc64/ieee1275/machine.h: Likewise.
9633         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
9634         (serial_hw_io_addr): New variable.
9635         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
9636         instead of `(unsigned short *) 0x400'.
9638 2007-11-10  Bean  <bean123ch@gmail.com>
9640         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
9642 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9644         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
9645         (vga_mod_SOURCES): Added.
9646         (vga_mod_CFLAGS): Likewise.
9647         (vga_mod_LDFLAGS): Likewise.
9649         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
9650         grub_outb() calls.
9651         (set_map_mask): Likewise.
9652         (set_read_map): Likewise.
9653         (set_read_address): Likewise.
9654         (vga_font): Removed variable.
9655         (get_vga_glyph): Removed function.
9656         (invalidate_char): Likewise.
9657         (write_char): Changed to use grub_font_get_glyph() for font
9658         information.
9659         (grub_vga_putchar): Likewise.
9660         (grub_vga_getcharwidth): Likewise.
9662 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
9664         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
9665         flags.
9666         (pxeboot_img_LDFLAGS): Likewise.
9667         (diskboot_img_LDFLAGS): Likewise.
9668         (kernel_img_LDFLAGS): Likewise.
9670 2007-11-06  Robert Millan  <rmh@aybabtu.com>
9672         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
9673         in grub_outb() calls.
9674         (serial_hw_init): Likewise.
9676 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9678         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
9679         spaces.  Skip non-regular files.
9681 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9683         * kern/disk.c (grub_disk_firmware_fini)
9684         (grub_disk_firmware_is_tainted): New variables.
9686         * include/grub/disk.h (grub_disk_firmware_fini)
9687         (grub_disk_firmware_is_tainted): Likewise.
9689         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
9690         (grub_disk_biosdisk_fini): ... to here.
9691         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
9692         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
9693         is set.  Register grub_disk_biosdisk_fini() in
9694         `grub_disk_firmware_fini'.
9696         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
9697         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
9698         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
9699         to finish existing firmware disk interface.
9701         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
9702         (ata_mod_SOURCES): New variable.
9703         (ata_mod_CFLAGS): Likewise.
9704         (ata_mod_LDFLAGS): Likewise.
9706 2007-11-05  Robert Millan  <rmh@aybabtu.com>
9708         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
9709         (grub_ata_wait): Reimplement using grub_millisleep().
9711         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
9712         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
9714 2007-11-03  Marco Gerards  <marco@gnu.org>
9716         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
9717         (CRTC_ADDR_PORT): New macro.
9718         (CRTC_DATA_PORT): Likewise.
9719         (CRTC_CURSOR): Likewise.
9720         (CRTC_CURSOR_ADDR_HIGH): Likewise.
9721         (CRTC_CURSOR_ADDR_LOW): Likewise.
9722         (update_cursor): New function.
9723         (grub_console_real_putchar): Call `update_cursor'.
9724         (grub_console_gotoxy): Likewise.
9725         (grub_console_cls): Set the default color when clearing the
9726         screen.
9727         (grub_console_setcursor): Implemented.
9729 2007-11-03  Marco Gerards  <marco@gnu.org>
9731         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
9732         become activate.
9733         (grub_ata_pio_write): Likewise.
9735         (grub_atapi_identify): Wait after issuing an ATA command.
9736         (grub_atapi_packet): Likewise.
9737         (grub_ata_identify): Likewise.
9738         (grub_ata_readwrite): Likewise.
9740 2007-11-03  Marco Gerards  <marco@gnu.org>
9742         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
9743         (grub_ata_pio_write): Likewise.
9744         (grub_ata_readwrite): Use `grub_error', instead of
9745         returning `grub_errno'.
9747 2007-11-03  Marco Gerards  <marco@gnu.org>
9749         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
9750         grub_ata_pio_write once for every single sector, instead of for
9751         multiple sectors.
9753 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9755         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
9757         * conf/i386-linuxbios.rmk: New file.
9759         * kern/i386/pc/hardware.c: Likewise.
9760         * term/i386/pc/at_keyboard.c: Likewise.
9761         * term/i386/pc/vga_text.c: Likewise.
9763         * include/grub/i386/linuxbios/boot.h: Likewise.
9764         * include/grub/i386/linuxbios/console.h: Likewise.
9765         * include/grub/i386/linuxbios/init.h: Likewise.
9766         * include/grub/i386/linuxbios/kernel.h: Likewise.
9767         * include/grub/i386/linuxbios/loader.h: Likewise.
9768         * include/grub/i386/linuxbios/memory.h: Likewise.
9769         * include/grub/i386/linuxbios/serial.h: Likewise.
9770         * include/grub/i386/linuxbios/time.h: Likewise.
9772         * kern/i386/linuxbios/init.c: Likewise.
9773         * kern/i386/linuxbios/startup.S: Likewise.
9774         * kern/i386/linuxbios/table.c: Likewise.
9776 2007-10-31  Marco Gerards  <marco@gnu.org>
9778         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
9779         (ata_mod_SOURCES): New variable.
9780         (ata_mod_CFLAGS): Likewise.
9781         (ata_mod_LDFLAGS): Likewise.
9783         * disk/ata.c: New file.
9785         * include/grub/disk.h (grub_disk_dev_id): Add
9786         `GRUB_DISK_DEV_ATA_ID'.
9788 2007-10-31  Robert Millan  <rmh@aybabtu.com>
9790         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
9791         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
9793         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
9794         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
9796         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
9797         `<grub/types.h>'.
9799         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
9801 2007-10-27  Robert Millan  <rmh@aybabtu.com>
9803         * include/grub/types.h (ULONG_MAX): Define macro.
9805 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9807         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
9808         `"../realmode.S"'.
9809         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
9811 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9813         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
9814         (pkgdata_MODULES): Add `biosdisk.mod'.
9815         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
9816         variables.
9818         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
9819         (grub_biosdisk_init): Replace with ...
9820         (GRUB_MOD_INIT(biosdisk)): ... this.
9821         (grub_biosdisk_fini): Replace with ...
9822         (GRUB_MOD_FINI(biosdisk)): ... this.
9824         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
9825         (grub_machine_init): Remove call to grub_biosdisk_init().
9826         (grub_machine_fini): Remove call to grub_machine_fini().
9828         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
9830 2007-10-22  Robert Millan  <rmh@aybabtu.com>
9832         * include/grub/time.h: New file.
9833         * include/grub/i386/time.h: Likewise.
9834         * include/grub/powerpc/time.h: Likewise.
9835         * include/grub/sparc64/time.h: Likewise.
9837         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
9838         instances to ...
9839         (KERNEL_MACHINE_TIME_HEADER): ... this.
9840         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9841         instances to ...
9842         (KERNEL_MACHINE_TIME_HEADER): ... this.
9843         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
9844         instances to ...
9845         (KERNEL_MACHINE_TIME_HEADER): ... this.
9847         * kern/i386/efi/init.c: Include `<grub/time.h>'.
9848         (grub_millisleep): New function.
9849         * kern/i386/pc/init.c: Include `<grub/time.h>'.
9850         (grub_millisleep): New function.
9851         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
9852         Remove `grub/machine/time.h' include.
9853         (grub_millisleep): New function.
9854         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
9855         Remove `grub/machine/time.h' include.
9856         (grub_millisleep): New function.
9858         * include/grub/misc.h (grub_div_roundup): New function.
9860         * kern/misc.c: Include `<grub/time.h>'.
9861         (grub_millisleep_generic): New function.
9863         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
9864         Add `time.h'.
9865         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
9866         Add `time.h'.
9867         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
9868         `machine/time.h'.  Add `time.h'.
9869         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
9871 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9873         * include/grub/misc.h (grub_max): New function.
9875 2007-10-21  Robert Millan  <rmh@aybabtu.com>
9877         * util/misc.c (grub_util_info): Call fflush() before returning.
9879 2007-10-20  Robert Millan  <rmh@aybabtu.com>
9881         * genmk.rb (Image): Copy `extra_flags' from here ...
9882         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
9884         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
9885         to `argc' and `args' arguments.
9887 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9889         * kern/i386/loader.S: New file.
9891         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
9892         * kern/i386/loader.S (grub_linux_prot_size)... to here.
9893         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
9894         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
9895         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
9896         * kern/i386/loader.S (grub_linux_real_addr)... to here.
9897         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
9898         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
9899         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
9900         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
9901         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
9902         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
9903         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
9904         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
9906         * kern/i386/realmode.S: New file.
9908         * kern/i386/pc/startup.S (protstack): Moved from here ...
9909         * kern/i386/realmode.S (protstack)... to here.
9910         * kern/i386/pc/startup.S (gdt): Moved from here ...
9911         * kern/i386/realmode.S (gdt)... to here.
9912         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
9913         * kern/i386/realmode.S (prot_to_real)... to here.
9915         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
9916         `kern/i386/realmode.S'.
9918 2007-10-17  Robert Millan  <rmh@aybabtu.com>
9920         * include/grub/i386/loader.h: New file.
9922         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
9923         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9924         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9925         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9926         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
9927         * include/grub/i386/loader.h (grub_linux_prot_size)
9928         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
9929         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
9930         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
9931         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
9933         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
9935 2007-10-15  Robert Millan  <rmh@aybabtu.com>
9937         * normal/misc.c (grub_normal_print_device_info): Do not probe for
9938         filesystem when dev->disk is unset.
9939         Do probe for filesystem even when dev->disk->has_partitions is set.
9940         In case a filesystem is found, always report it.
9941         In case it isn't, if dev->disk->has_partitions is set, report that
9942         a partition table was found instead of reporting that no filesystem
9943         could be identified.
9945 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9947         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
9948         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
9950         * include/grub/types.h (grub_host_to_target16): New macro.
9951         (grub_host_to_target32): Likewise.
9952         (grub_host_to_target64): Likewise.
9953         (grub_target_to_host16): Likewise.
9954         (grub_target_to_host32): Likewise.
9955         (grub_target_to_host64): Likewise.
9957         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
9958         Renamed from to ...
9959         (GRUB_MOD_ALIGN): ...this.  Update all users.
9961         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
9962         grub_host_to_target32.
9963         Replace grub_be_to_cpu32 with grub_target_to_host32.
9964         (load_modules): Likewise.
9965         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
9966         Replace grub_be_to_cpu32 with grub_target_to_host32.
9967         Replace grub_cpu_to_be16 with grub_host_to_target16.
9968         Replace grub_cpu_to_be32 grub_host_to_target32.
9970 2007-10-12  Robert Millan  <rmh@aybabtu.com>
9972         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
9973         * util/elf/grub-mkimage.c: ... here.
9975         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
9976         `util/powerpc/ieee1275/grub-mkimage.c'.
9978 2007-10-07  Robert Millan  <rmh@aybabtu.com>
9980         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
9981         and make it easier to figure out.
9982         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
9983         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
9984         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
9985         leave us with less than HEAP_MIN_SIZE total heap.
9986         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
9988 2007-10-03  Robert Millan  <rmh@aybabtu.com>
9990         * include/grub/i386/io.h: New file.
9991         * commands/i386/pc/play.c (inb): Removed.
9992         (outb): Removed.
9993         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9994         with grub_outb().
9995         * term/i386/pc/serial.c  (inb): Removed.
9996         (outb): Removed.
9997         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
9998         with grub_outb().
9999         * term/i386/pc/vga.c  (inb): Removed.
10000         (outb): Removed.
10001         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10002         with grub_outb().
10004 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10006         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10007         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10008         Reported by Marcin Kurek.
10010 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10012         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10013         SmartFirmware version updates (as released by Sven Luther), and avoid
10014         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10015         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10016         known broken.
10018 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10020         From Hitoshi Ozeki:
10021         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10022         when merging two regions.
10024 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10026         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10027         * normal/completion.c (grub_normal_do_completion): Likewise.
10028         Reported by Hitoshi Ozeki.
10030 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10032         Do not use devices at boot in chainloading.
10034         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10035         (boot_part_addr): Likewise.
10036         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10037         with BOOT_DRIVE and BOOT_PART_ADDR.
10038         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10039         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10041 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10043         Patch from Simon Peter <dn.tlp@gmx.net>:
10044         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10045         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10046         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10047         util/i386/pc/grub-setup.c_DEPENDENCIES.
10048         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10049         util/grub-probe.c_DEPENDENCIES.
10050         * conf/powerpc-ieee1275.rmk: Likewise.
10052 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10054         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10055         to tell grub-mkdevicemap how to name devices.
10056         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10057         feature).
10059         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10060         util/i386/get_disk_name.c.
10061         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10062         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10063         util/ieee1275/get_disk_name.c.
10065         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10067         * DISTLIST: Add util/i386/get_disk_name.c and
10068         util/ieee1275/get_disk_name.c.
10070         * util/grub-mkdevicemap.c: Replace device naming logic with
10071         grub_util_get_disk_name() calls.
10073 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10075         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10076         (so that it works for both plural and singular quantities).
10078 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10080         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10081         so that [xz] isn't taken into account when determining order.
10083 2007-08-02  Marco Gerards  <marco@gnu.org>
10085         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10086         `include/multiboot2.h', `include/grub/elfload.h',
10087         `include/multiboot.h', `include/grub/multiboot.h',
10088         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10089         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10090         `kern/elf.c', `loader/multiboot_loader.c',
10091         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10092         `loader/i386/pc/multiboot2.c',
10093         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10094         `util/i386/pc/grub-mkrescue.in'.  Remove
10095         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10096         `include/grub/i386/pc/util/biosdisk.h' and
10097         `include/grub/powerpc/ieee1275/multiboot.h'.
10099 2007-08-02  Bean  <bean123ch@gmail.com>
10101         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10102         (ntfs_mod_SOURCES): New variable.
10103         (ntfs_mod_CFLAGS): Likewise.
10104         (ntfs_mod_LDFLAGS): Likewise.
10106         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10107         (grub_probe_SOURCES): Likewise.
10108         (grub_emu_SOURCES): Likewise.
10110         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10111         (grub_emu_SOURCES): Likewise.
10113         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10114         (grub_emu_SOURCES): Likewise.
10116         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10118         * fs/ntfs.c: New file.
10120 2007-08-02  Bean  <bean123ch@gmail.com>
10122         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10124         * file.h (grub_file): Likewise.
10126         * fshelp.h (grub_fshelp_read_file): Likewise.
10128         * util/i386/pc/grub-setup.c (setup): Likewise.
10129         (save_first_sector): Likewise.
10130         (save_blocklists): Likewise.
10132         * fs/affs.c (grub_affs_read_file): Likewise.
10134         * fs/ext2.c (grub_ext2_read_file): Likewise.
10136         * fs/fat.c (grub_fat_read_data): Likewise.
10138         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10140         * fs/hfs.c (grub_hfs_read_file): Likewise.
10142         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10144         * fs/jfs.c (grub_jfs_read_file): Likewise.
10146         * fs/minix.c (grub_minix_read_file): Likewise.
10148         * fs/sfs.c (grub_sfs_read_file): Likewise.
10150         * fs/ufs.c (grub_ufs_read_file): Likewise.
10152         * fs/xfs.c (grub_xfs_read_file): Likewise.
10154         * command/blocklist.c (read_blocklist): Likewise.
10155         (print_blocklist): Likewise.
10157 2007-08-02  Marco Gerards  <marco@gnu.org>
10159         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10160         `util/hostfs.c'.
10162         * disk/host.c: New file.
10164         * util/hostfs.c: Likewise.
10166         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10167         return `GRUB_ERR_BAD_FS'.
10168         * fs/sfs.c (grub_sfs_mount): Likewise.
10169         * fs/xfs.c (grub_xfs_mount): Likewise.
10171         * include/grub/disk.h (enum grub_disk_dev_id): Add
10172         `GRUB_DISK_DEVICE_HOST_ID'.
10174         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10176 2007-07-24  Jerone Young  <jerone@gmail.com>
10178         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10179         modules for compilation.
10180         * conf/powerpc-ieee1275.rmk: Likewise.
10182         * include/multiboot.h: Move multiboot definitions to one file. Rename
10183         many definitions to not get grub specific.
10184         * include/multiboot2.h: Create header with multiboot 2 definitions.
10185         * include/grub/multiboot.h: Header for grub specific function
10186         prototypes and definitions.
10187         * include/grub/multiboot2.h: Likewise.
10188         * include/grub/multiboot_loader.h: Likewise.
10189         * include/grub/i386/pc/multiboot.h: Removed.
10190         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10192         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10193         and 2 to allow for one multiboot and module commands.
10194         * loader/multiboot2.c: Add multiboot2 functionality.
10195         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10196         and definition names.
10197         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10198         2 functions.
10199         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10200         ieee1275 specific multiboot2 code.
10202         * kern/i386/pc/startup.S: Change headers and definition names for
10203         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10205 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10207         * geninitheader.sh: Process file specified in first parameter rather
10208         than hardcoding grub_modules_init.lst.
10209         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10210         than hardcoding grub_modules_init.h.
10212         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10213         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10214         grub_probe_init.[ch] and grub_setup_init.[ch].
10216         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10217         grub_modules_init.h with grub_emu_init.h.
10218         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10219         grub_probe_init.[ch] files.
10220         * conf/i386-efi.rmk: Likewise.
10221         * conf/i386-pc.rmk: Likewise.
10222         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10223         grub_setup_init.[ch] files.
10225         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10226         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10227         to initialize modules rather than a list of hardcoded functions.
10228         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10229         grub_init_all() to initialize modules rather than a list of hardcoded
10230         functions.
10232 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10234         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10235         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10237 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10239         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10240         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10241         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10242         flag when running on SmartFirmware.
10243         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10244         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10245         was set.
10247         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10248         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10249         rather than decreasing it.
10251         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10252         there's not enough space to do it, fail in the same way as when it
10253         can't be done because there are no partitions.
10255         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10256         when nvsetenv failed.
10258 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10260         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10261         because this rule is automatically generated.
10262         (grub-mkrescue): Removed for the same reason as above.
10264 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10266         Migrate to GNU General Public License Version 3.
10268         * COPYING: Replaced with the plain text version of GPLv3.
10270         * config.guess: Updated from gnulib.
10271         * config.sub: Likewise.
10273         * geninit.sh: Output a GPLv3 copyright notice.
10274         * geninitheader.sh: Likewise.
10275         * genmodsrc.sh: Likewise.
10276         * gensymlist.sh.in: Likewise.
10278         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10279         * boot/i386/pc/diskboot.S: Likewise.
10280         * boot/i386/pc/pxeboot.S: Likewise.
10281         * commands/blocklist.c: Likewise.
10282         * commands/boot.c: Likewise.
10283         * commands/cat.c: Likewise.
10284         * commands/cmp.c: Likewise.
10285         * commands/configfile.c: Likewise.
10286         * commands/echo.c: Likewise.
10287         * commands/help.c: Likewise.
10288         * commands/ls.c: Likewise.
10289         * commands/search.c: Likewise.
10290         * commands/terminal.c: Likewise.
10291         * commands/test.c: Likewise.
10292         * commands/videotest.c: Likewise.
10293         * commands/i386/cpuid.c: Likewise.
10294         * commands/i386/pc/halt.c: Likewise.
10295         * commands/i386/pc/play.c: Likewise.
10296         * commands/i386/pc/reboot.c: Likewise.
10297         * commands/i386/pc/vbeinfo.c: Likewise.
10298         * commands/i386/pc/vbetest.c: Likewise.
10299         * commands/ieee1275/halt.c: Likewise.
10300         * commands/ieee1275/reboot.c: Likewise.
10301         * commands/ieee1275/suspend.c: Likewise.
10302         * disk/loopback.c: Likewise.
10303         * disk/lvm.c: Likewise.
10304         * disk/raid.c: Likewise.
10305         * disk/efi/efidisk.c: Likewise.
10306         * disk/i386/pc/biosdisk.c: Likewise.
10307         * disk/ieee1275/ofdisk.c: Likewise.
10308         * font/manager.c: Likewise.
10309         * fs/affs.c: Likewise.
10310         * fs/ext2.c: Likewise.
10311         * fs/fat.c: Likewise.
10312         * fs/fshelp.c: Likewise.
10313         * fs/hfs.c: Likewise.
10314         * fs/hfsplus.c: Likewise.
10315         * fs/iso9660.c: Likewise.
10316         * fs/jfs.c: Likewise.
10317         * fs/minix.c: Likewise.
10318         * fs/sfs.c: Likewise.
10319         * fs/ufs.c: Likewise.
10320         * fs/xfs.c: Likewise.
10321         * hello/hello.c: Likewise.
10322         * include/grub/acorn_filecore.h: Likewise.
10323         * include/grub/arg.h: Likewise.
10324         * include/grub/bitmap.h: Likewise.
10325         * include/grub/boot.h: Likewise.
10326         * include/grub/cache.h: Likewise.
10327         * include/grub/device.h: Likewise.
10328         * include/grub/disk.h: Likewise.
10329         * include/grub/dl.h: Likewise.
10330         * include/grub/elfload.h: Likewise.
10331         * include/grub/env.h: Likewise.
10332         * include/grub/err.h: Likewise.
10333         * include/grub/file.h: Likewise.
10334         * include/grub/font.h: Likewise.
10335         * include/grub/fs.h: Likewise.
10336         * include/grub/fshelp.h: Likewise.
10337         * include/grub/gzio.h: Likewise.
10338         * include/grub/hfs.h: Likewise.
10339         * include/grub/kernel.h: Likewise.
10340         * include/grub/loader.h: Likewise.
10341         * include/grub/lvm.h: Likewise.
10342         * include/grub/misc.h: Likewise.
10343         * include/grub/mm.h: Likewise.
10344         * include/grub/net.h: Likewise.
10345         * include/grub/normal.h: Likewise.
10346         * include/grub/parser.h: Likewise.
10347         * include/grub/partition.h: Likewise.
10348         * include/grub/pc_partition.h: Likewise.
10349         * include/grub/raid.h: Likewise.
10350         * include/grub/rescue.h: Likewise.
10351         * include/grub/script.h: Likewise.
10352         * include/grub/setjmp.h: Likewise.
10353         * include/grub/symbol.h: Likewise.
10354         * include/grub/term.h: Likewise.
10355         * include/grub/terminfo.h: Likewise.
10356         * include/grub/tparm.h: Likewise.
10357         * include/grub/types.h: Likewise.
10358         * include/grub/video.h: Likewise.
10359         * include/grub/efi/api.h: Likewise.
10360         * include/grub/efi/chainloader.h: Likewise.
10361         * include/grub/efi/console.h: Likewise.
10362         * include/grub/efi/console_control.h: Likewise.
10363         * include/grub/efi/disk.h: Likewise.
10364         * include/grub/efi/efi.h: Likewise.
10365         * include/grub/efi/pe32.h: Likewise.
10366         * include/grub/efi/time.h: Likewise.
10367         * include/grub/i386/linux.h: Likewise.
10368         * include/grub/i386/setjmp.h: Likewise.
10369         * include/grub/i386/types.h: Likewise.
10370         * include/grub/i386/efi/kernel.h: Likewise.
10371         * include/grub/i386/efi/loader.h: Likewise.
10372         * include/grub/i386/efi/time.h: Likewise.
10373         * include/grub/i386/pc/biosdisk.h: Likewise.
10374         * include/grub/i386/pc/boot.h: Likewise.
10375         * include/grub/i386/pc/chainloader.h: Likewise.
10376         * include/grub/i386/pc/console.h: Likewise.
10377         * include/grub/i386/pc/init.h: Likewise.
10378         * include/grub/i386/pc/kernel.h: Likewise.
10379         * include/grub/i386/pc/loader.h: Likewise.
10380         * include/grub/i386/pc/memory.h: Likewise.
10381         * include/grub/i386/pc/multiboot.h: Likewise.
10382         * include/grub/i386/pc/serial.h: Likewise.
10383         * include/grub/i386/pc/time.h: Likewise.
10384         * include/grub/i386/pc/vbe.h: Likewise.
10385         * include/grub/i386/pc/vbeblit.h: Likewise.
10386         * include/grub/i386/pc/vbefill.h: Likewise.
10387         * include/grub/i386/pc/vbeutil.h: Likewise.
10388         * include/grub/i386/pc/vga.h: Likewise.
10389         * include/grub/ieee1275/ieee1275.h: Likewise.
10390         * include/grub/ieee1275/ofdisk.h: Likewise.
10391         * include/grub/powerpc/libgcc.h: Likewise.
10392         * include/grub/powerpc/setjmp.h: Likewise.
10393         * include/grub/powerpc/types.h: Likewise.
10394         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10395         * include/grub/powerpc/ieee1275/console.h: Likewise.
10396         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10397         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10398         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10399         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10400         * include/grub/powerpc/ieee1275/time.h: Likewise.
10401         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10402         * include/grub/sparc64/libgcc.h: Likewise.
10403         * include/grub/sparc64/setjmp.h: Likewise.
10404         * include/grub/sparc64/types.h: Likewise.
10405         * include/grub/sparc64/ieee1275/console.h: Likewise.
10406         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10407         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10408         * include/grub/sparc64/ieee1275/time.h: Likewise.
10409         * include/grub/util/biosdisk.h: Likewise.
10410         * include/grub/util/getroot.h: Likewise.
10411         * include/grub/util/lvm.h: Likewise.
10412         * include/grub/util/misc.h: Likewise.
10413         * include/grub/util/raid.h: Likewise.
10414         * include/grub/util/resolve.h: Likewise.
10415         * io/gzio.c: Likewise.
10416         * kern/device.c: Likewise.
10417         * kern/disk.c: Likewise.
10418         * kern/dl.c: Likewise.
10419         * kern/elf.c: Likewise.
10420         * kern/env.c: Likewise.
10421         * kern/err.c: Likewise.
10422         * kern/file.c: Likewise.
10423         * kern/fs.c: Likewise.
10424         * kern/loader.c: Likewise.
10425         * kern/main.c: Likewise.
10426         * kern/misc.c: Likewise.
10427         * kern/mm.c: Likewise.
10428         * kern/parser.c: Likewise.
10429         * kern/partition.c: Likewise.
10430         * kern/rescue.c: Likewise.
10431         * kern/term.c: Likewise.
10432         * kern/efi/efi.c: Likewise.
10433         * kern/efi/init.c: Likewise.
10434         * kern/efi/mm.c: Likewise.
10435         * kern/i386/dl.c: Likewise.
10436         * kern/i386/efi/init.c: Likewise.
10437         * kern/i386/efi/startup.S: Likewise.
10438         * kern/i386/pc/init.c: Likewise.
10439         * kern/i386/pc/lzo1x.S: Likewise.
10440         * kern/i386/pc/startup.S: Likewise.
10441         * kern/ieee1275/ieee1275.c: Likewise.
10442         * kern/powerpc/cache.S: Likewise.
10443         * kern/powerpc/dl.c: Likewise.
10444         * kern/powerpc/ieee1275/cmain.c: Likewise.
10445         * kern/powerpc/ieee1275/crt0.S: Likewise.
10446         * kern/powerpc/ieee1275/init.c: Likewise.
10447         * kern/powerpc/ieee1275/openfw.c: Likewise.
10448         * kern/sparc64/cache.S: Likewise.
10449         * kern/sparc64/dl.c: Likewise.
10450         * kern/sparc64/ieee1275/init.c: Likewise.
10451         * kern/sparc64/ieee1275/openfw.c: Likewise.
10452         * loader/efi/chainloader.c: Likewise.
10453         * loader/efi/chainloader_normal.c: Likewise.
10454         * loader/i386/efi/linux.c: Likewise.
10455         * loader/i386/efi/linux_normal.c: Likewise.
10456         * loader/i386/pc/chainloader.c: Likewise.
10457         * loader/i386/pc/chainloader_normal.c: Likewise.
10458         * loader/i386/pc/linux.c: Likewise.
10459         * loader/i386/pc/linux_normal.c: Likewise.
10460         * loader/i386/pc/multiboot.c: Likewise.
10461         * loader/i386/pc/multiboot_normal.c: Likewise.
10462         * loader/powerpc/ieee1275/linux.c: Likewise.
10463         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10464         * normal/arg.c: Likewise.
10465         * normal/cmdline.c: Likewise.
10466         * normal/command.c: Likewise.
10467         * normal/completion.c: Likewise.
10468         * normal/execute.c: Likewise.
10469         * normal/function.c: Likewise.
10470         * normal/lexer.c: Likewise.
10471         * normal/main.c: Likewise.
10472         * normal/menu.c: Likewise.
10473         * normal/menu_entry.c: Likewise.
10474         * normal/misc.c: Likewise.
10475         * normal/parser.y: Likewise.
10476         * normal/script.c: Likewise.
10477         * normal/i386/setjmp.S: Likewise.
10478         * normal/powerpc/setjmp.S: Likewise.
10479         * normal/sparc64/setjmp.S: Likewise.
10480         * partmap/acorn.c: Likewise.
10481         * partmap/amiga.c: Likewise.
10482         * partmap/apple.c: Likewise.
10483         * partmap/gpt.c: Likewise.
10484         * partmap/pc.c: Likewise.
10485         * partmap/sun.c: Likewise.
10486         * term/gfxterm.c: Likewise.
10487         * term/terminfo.c: Likewise.
10488         * term/efi/console.c: Likewise.
10489         * term/i386/pc/console.c: Likewise.
10490         * term/i386/pc/serial.c: Likewise.
10491         * term/i386/pc/vesafb.c: Likewise.
10492         * term/i386/pc/vga.c: Likewise.
10493         * term/ieee1275/ofconsole.c: Likewise.
10494         * util/biosdisk.c: Likewise.
10495         * util/console.c: Likewise.
10496         * util/genmoddep.c: Likewise.
10497         * util/getroot.c: Likewise.
10498         * util/grub-emu.c: Likewise.
10499         * util/grub-mkdevicemap.c: Likewise.
10500         * util/grub-probe.c: Likewise.
10501         * util/lvm.c: Likewise.
10502         * util/misc.c: Likewise.
10503         * util/raid.c: Likewise.
10504         * util/resolve.c: Likewise.
10505         * util/update-grub.in: Likewise.
10506         * util/update-grub_lib.in: Likewise.
10507         * util/grub.d/00_header.in: Likewise.
10508         * util/grub.d/10_hurd.in: Likewise.
10509         * util/grub.d/10_linux.in: Likewise.
10510         * util/i386/efi/grub-install.in: Likewise.
10511         * util/i386/efi/grub-mkimage.c: Likewise.
10512         * util/i386/pc/grub-install.in: Likewise.
10513         * util/i386/pc/grub-mkimage.c: Likewise.
10514         * util/i386/pc/grub-mkrescue.in: Likewise.
10515         * util/i386/pc/grub-setup.c: Likewise.
10516         * util/i386/pc/misc.c: Likewise.
10517         * util/powerpc/ieee1275/grub-install.in: Likewise.
10518         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
10519         * util/powerpc/ieee1275/misc.c: Likewise.
10520         * video/bitmap.c: Likewise.
10521         * video/video.c: Likewise.
10522         * video/i386/pc/vbe.c: Likewise.
10523         * video/i386/pc/vbeblit.c: Likewise.
10524         * video/i386/pc/vbefill.c: Likewise.
10525         * video/i386/pc/vbeutil.c: Likewise.
10526         * video/readers/tga.c: Likewise.
10528 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10530         * conf/i386-efi.rmk: Replace obsolete reference to
10531         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
10532         with util/getroot.c.
10533         * conf/powerpc-ieee1275.rmk: Likewise.
10534         * conf/sparc64-ieee1275.rmk: Likewise.
10536         * util/grub-emu.c (main): Fix unchecked pointer handling.
10538 2007-07-02  Robert Millan  <rmh@aybabtu.com>
10540         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
10541         invocation to fail, in order to support partition-less media.
10543         * util/i386/pc/grub-install.in: Likewise.
10545         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
10546         which fs or partmap modules are needed (akin to its sister scripts).
10548         Also use grub-probe to get rid of unportable /proc/mounts check.
10550         Print the same informational message that the other scripts do, before
10551         exiting.
10553 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10555         * util/update-grub_lib.in (font_path): New function.  Determine whether
10556         a font file can be found and, if so, echo the GRUB path to it.
10558         * util/update-grub.in: Handle multiple terminals depending on user
10559         input, platform availability and font file presence.  Propagate
10560         variables of our findings to /etc/grub.d/ children.
10562         * util/grub.d/00_header.in: Handle multiple terminals, based on
10563         environment setup by update-grub.
10565 2007-06-23  Robert Millan  <rmh@aybabtu.com>
10567         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
10569 2007-06-21  Robert Millan  <rmh@aybabtu.com>
10571         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
10572         indicate end of data section in kernel image.
10573         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
10574         GRUB_KERNEL_MACHINE_DATA_END.
10576         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
10577         space for it.
10578         * kern/i386/efi/startup.S: Likewise.
10580         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
10581         during image generation.  Implement --prefix option to override this
10582         patch.
10583         * util/i386/efi/grub-mkimage.c: Likewise.
10585         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
10586         code to make path relative to its root into a separate function.
10588         * util/i386/pc/grub-install.in: Use newly provided
10589         make_system_path_relative_to_its_root() to convert ${grubdir}, then
10590         pass the result to grub-install --prefix.
10592 2007-06-13  Robert Millan  <rmh@aybabtu.com>
10594         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
10595         DEFAULT_DEVICE_MAP.
10596         * util/grub-emu.c: Use above definitions from misc.h instead of
10597         defining them.
10598         * util/grub-mkdevicemap.c: Likewise.
10599         * util/i386/pc/grub-setup.c: Likewise.
10600         * util/grub-probe.c: Likewise.
10601         (probe): Abort with grub_util_error() when either
10602         grub_guess_root_device or grub_util_get_grub_dev fails.
10604 2007-06-12  Robert Millan  <rmh@aybabtu.com>
10606         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
10607         "pager" assignment.
10608         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
10609         "pcdata".
10610         * util/grub-probe.c (probe): Likewise for "drive_name".
10612 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10614         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
10615         not just the cdrom one.
10617 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10619         * util/i386/pc/grub-mkrescue.in: Add "set -e".
10620         Add --pkglibdir=DIR option to override pkglibdir.
10621         Mention --image-type=TYPE in help output.
10622         Fix --grub-mkimage (it was a no-op).
10623         Abort gracefully when no parameter is given.
10625 2007-06-11  Robert Millan  <rmh@aybabtu.com>
10627         * util/i386/pc/grub-mkrescue.in: New file.
10628         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
10629         * Makefile.in: Handle bin_SCRIPTS.
10631 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
10633         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
10634         list of video modes.
10636 2007-06-06  Robert Millan  <rmh@aybabtu.com>
10638         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
10639         file doesn't exist, or if it is in a filesystem grub can't read.
10641         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
10642         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
10643         header comment to fit in 80 columns when the variables are resolved.
10645         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
10646         could be identified by update-grub.  Remove redundant check for
10647         unifont.pff existence (since convert_system_path_to_grub_path now
10648         handles that).
10650 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10652         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
10654         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
10656         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
10658 2007-06-04  Robert Millan  <rmh@aybabtu.com>
10660         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
10662         * include/grub/partition.h: Declare grub_apple_partition_map_init and
10663         grub_apple_partition_map_fini.
10665         * util/biosdisk.c
10666         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
10667         to access >2 TiB disks).
10669         Print disk->total_sectors with %llu instead of %lu, since this
10670         variable is always 64-bit (prevents wrong disk size from being displayed
10671         on either >2 TiB disk or big-endian CPU).
10673         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
10674         into a generic case that supports all (sane) partition maps.
10676         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
10677         breaks big-endian.
10679         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
10680         and grub_apple_partition_map_fini() after that.
10682 2007-06-01  Robert Millan  <rmh@aybabtu.com>
10684         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
10686         * util/grub.d/00_header.in: Only enable gfxterm when
10687         convert_system_path_to_grub_path() succeeds.
10689 2007-05-20  Robert Millan  <rmh@aybabtu.com>
10691         * util/update-grub_lib.in: New file.
10692         * DISTLIST: Add update-grub_lib.in.
10693         * conf/common.rmk: Generate update-grub_lib and install it in
10694         $(lib_DATA).
10695         * Makefile.in: Add install routine for $(lib_DATA).
10697         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
10698         function provided by update-grub_lib to support arbitrary paths of
10699         unifont.pff.
10700         * util/update-grub.in: Use convert_system_path_to_grub_path() to
10701         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
10703 2007-05-19  Robert Millan  <rmh@aybabtu.com>
10705         * commands/i386/cpuid.c: New module.
10706         * DISTLIST: Add it.
10707         * conf/i386-efi.rmk: Enable cpuid.mod.
10708         * conf/i386-pc.rmk: Likewise.
10710 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10712         * kern/disk.c (grub_disk_read): Check return value of
10713         grub_realloc().
10715 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
10717         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
10718         arrays.
10719         * disk/raid.c (grub_raid_open): Likewise.
10721 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10723         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
10724         stack instead of on the heap.
10726         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
10727         before doing a read on it.
10729         * configure.ac: Only use -fno-stack-protector for the target
10730         environment.
10732 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
10734         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
10735         __attribute_ ((unused)) to mode_type argument.
10737         * util/getroot.c (grub_guess_root_device): Fix #endif.
10739         * kern/misc.c (memcmp): Fix prototype.
10741         * include/grub/partition.h [GRUB_UTIL]
10742         (grub_gpt_partition_map_init): Add prototype.
10743         (grub_gpt_partition_map_fini): Likewise.
10745         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
10746         at the right place.
10748         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
10749         (grub_fat_read_data): Likewise.
10750         (grub_fat_find_dir): Likewise.
10752         * font/manager.c (find_glyph): Make table a const.
10753         (grub_font_get_glyph): Remove bitmap from if statement.
10755 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
10757         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
10758         code, first search for device in /dev/mapper, then in /dev.
10759         (grub_util_get_grub_dev): New function.
10760         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
10761         prototype.
10762         * util/grub-probe.c (probe): Remove check for RAID, call
10763         grub_util_get_grub_dev() instead of
10764         grub_util_biosdisk_get_grub_dev().
10765         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
10766         grub_util_biosdisk_get_grub_dev().
10767         * util/i386/pc/grub-setup.c (main): Likewise.
10769 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10771         * DISTLIST: Update for the latest changes.
10772         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
10773         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
10774         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
10775         grub/util/biosdisk.h.
10776         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
10777         grub/util/biosdisk.h.
10779 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10781         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
10783 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10785         * util/i386/efi/grub-install.in: New.
10786         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
10787         newly added grub-install.
10788         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
10789         include.
10790         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
10791         grub/util/biosdisk.h.
10792         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
10793         grub/util/biosdisk.h.
10795 2007-05-16  Robert Millan  <rmh@aybabtu.com>
10797         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
10798         * include/grub/util/biosdisk.h: ... here.
10799         * util/i386/pc/biosdisk.c: Moved to ...
10800         * util/biosdisk.c: ... here.
10801         * util/i386/pc/getroot.c: Moved to ...
10802         * util/getroot.c: ... here.
10803         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
10804         * util/grub-mkdevicemap.c: ... here.
10805         * util/i386/pc/grub-probe.c: Moved to ...
10806         * util/grub-probe.c: ... here.
10808 2007-05-15  Robert Millan  <rmh@aybabtu.com>
10810         * util/update-grub.in: Remove duplicated line in grub.cfg header
10811         message.
10813 2007-05-13  Robert Millan  <rmh@aybabtu.com>
10815         * util/update-grub.in: Fix a few assumptions about the devices holding
10816         /, /boot and /boot/grub being the same.
10817         * util/grub.d/00_header.in: Likewise.
10818         * util/grub.d/10_hurd.in: Likewise.
10819         * util/grub.d/10_linux.in: Likewise.
10821         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
10822         patterns.  Use that to define the `.old' suffix as older than `'.
10824         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
10826         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
10827         the grub.cfg header message.
10829 2007-05-11  Robert Millan  <rmh@aybabtu.com>
10831         * util/update-grub.in: Create device.map if it doesn't already exist,
10832         before attempting to run grub-probe.
10833         Check for grub-probe and grub-mkdevicemap with the same code
10834         grub-install is using.
10835         Remove test mode.
10837 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
10839         * Makefile.in: Add the datarootdir autoconf variable.
10841 2007-05-09  Robert Millan  <rmh@aybabtu.com>
10843         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
10844         fail gracefully if dev->disk->partition == NULL.
10846 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10848         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
10849         determine partition map module.
10850         * util/i386/pc/grub-install.in: Use this feature to decide which
10851         partition module to load, instead of hardcoding pc and gpt.
10853 2007-05-07  Robert Millan  <rmh@aybabtu.com>
10855         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
10856         source directory differs from build directory.
10858 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10860         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
10861         initialisation.
10863 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10865         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
10867 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10869         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
10870         command-line arguments via ${GRUB_CMDLINE_LINUX}.
10872 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10874         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
10875         (grub_probe_SOURCES): Likewise.
10876         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
10877         GPT and initialize dos_part and bsd_part accordingly.
10878         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
10879         install_bsd_part.
10880         (main): Activate gpt module for use during partition identification,
10881         and deactivate it afterwards.
10882         * util/i386/pc/grub-install.in: Add gpt module to core.img.
10883         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
10884         partition identification, and deactivate it afterwards.
10886 2007-05-05  Robert Millan  <rmh@aybabtu.com>
10888         * term/i386/pc/console.c (grub_console_fini): Call
10889         grub_term_set_current() before grub_term_unregister().
10891 2007-05-04  Robert Millan  <rmh@aybabtu.com>
10893         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
10894         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
10895         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
10896         and update-grub_DATA.
10897         * conf/common.rmk: Build and install update-grub components.
10898         * conf/common.mk: Regenerate.
10899         * util/update-grub.in: New.  Core of update-grub.
10900         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
10901         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
10902         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
10903         * util/grub.d/README: New.  Document grub.d directory layout.
10905 2007-05-01  Robert Millan  <rmh@aybabtu.com>
10907         * util/grub-emu.c: Move initialization functions
10908         grub_util_biosdisk_init() and grub_init_all() before
10909         grub_util_biosdisk_get_grub_dev(), which relies on them.
10911 2007-04-19  Robert Millan  <rmh@aybabtu.com>
10913         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
10914         it is used later.
10916 2007-04-18  Jerone Young  <jerone@gmail.com>
10918         * kernel/elf.c: Add missing parenthesis for conditional statement
10919         stanza.
10921 2007-04-10  Jerone Young  <jerone@gmail.com>
10923         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
10924         continue on and look for device node with real device name.
10926 2007-04-10  Jerone Young  <jerone@gmail.com>
10928         * configure.ac: Add argument for autoconf to use transformation
10929         ability.
10930         * Makefile.in: Add autoconf package transformation code.
10931         * util/i386/pc/grub-install.in: Likewise.
10932         * util/powerpc/ieee1275/grub-install.in: Likewise.
10934 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
10936         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
10937         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
10938         (EXT2_REVISION): Likewise.
10939         (EXT2_INODE_SIZE): Likewise.
10940         (struct grub_ext2_block_group): Added a missing member
10941         "used_dirs".
10942         (grub_ext2_read_inode): Divide by the inode size in a superblock
10943         instead of 128 to obtain INODES_PER_BLOCK.
10944         Use the macro EXT2_INODE_SIZE instead of directly using
10945         SBLOCK->INODE_SIZE.
10947 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
10949         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
10950         superblock instead of the structure size to compute an
10951         offset. This fixes the problem that GRUB could not read a
10952         filesystem when inode size is different from 128-byte.
10954 2007-03-05  Marco Gerards  <marco@gnu.org>
10956         * normal/main.c (read_config_file): When "menu" is not set, create
10957         an initial context.
10959 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10961         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
10962         (HEAP_LIMIT): New macro.
10963         (grub_claim_heap): Claim memory up to `heaplimit'.
10965 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
10967         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
10968         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
10969         (_start): Likewise.
10970         (grub_arch_modules_addr): Return address after `_end'.
10971         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
10972         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
10973         (add_segments): Calculate `_end' from phdr size and location.
10974         (ALIGN_UP): Moved to ...
10975         * include/grub/misc.h: here.
10976         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10977         New macro.
10978         (GRUB_IEEE1275_MODULE_BASE): Removed.
10980 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10982         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
10983         loop boundary.
10985 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10987         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
10988         All users updated.
10989         (grub_elf64_load_hook_t): Likewise.
10990         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
10991         debug output.
10993 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
10995         * kern/mm.c: Update copyright.
10996         (grub_mm_debug): Correct syntax error.
10997         (grub_mm_dump_free): New function.
10998         (grub_debug_free): Call `grub_free'.
10999         * include/grub/mm.h: Update copyright.
11000         (grub_mm_dump_free): Add declaration.
11002 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11004         * include/grub/ieee1275/ieee1275.h: Update copyright.
11005         * kern/powerpc/ieee1275/init.c: Likewise.
11006         * kern/powerpc/ieee1275/openfw.c: Likewise.
11008         * loader/powerpc/ieee1275/linux.c: Likewise.
11009         * include/grub/elfload.h: Likewise.
11010         * kern/elf.c: Likewise.
11011         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11012         callers.
11013         (grub_elf64_load): Likewise.
11014         (grub_elf32_load_segment): Move to a nested function.
11015         (grub_elf64_load_segment): Likewise.
11017 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11019         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11020         prototype.
11021         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11022         (grub_heap_len): Likewise.
11023         (HEAP_SIZE): New macro.
11024         (grub_claim_heap): New function.
11025         (grub_machine_init): Don't claim heap directly.  Call
11026         `grub_claim_heap'.
11027         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11028         (grub_available_iterate): New function.
11030 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11032         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11033         * configure.ac: Use it for testing the HOST and TARGET compilers.
11035 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11037         * Makefile.in (enable_grub_emu): New variable.
11038         * configure.ac (--enable-grub-emu): New option.
11039         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11040         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11041         * conf/i386-pc.rmk: Likewise.
11042         * conf/powerpc-ieee1275.rmk: Likewise.
11043         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11045 2006-12-12  Marco Gerards  <marco@gnu.org>
11047         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11049         * kern/env.c (grub_env_unset): Don't free the member `value' when
11050         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11051         pointer.
11053         * normal/main.c (current_menu): Removed.
11054         (free_menu): Unset the `menu' environment variable.
11055         (grub_normal_menu_addentry): Make use of the environment variable
11056         `menu', instead of using the global `current_menu'.  Allocate
11057         memory for the sourcecode of this entry.
11058         (read_config_file): New argument `nested', changed all callers.
11059         Only in the case of a new context, initialize a new menu.  Set the
11060         `menu' environment variable.
11061         (grub_normal_execute): Don't set and unset the environment
11062         variable `menu' here anymore.  Only free the menu when leaving the
11063         context.
11065         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11066         leak.
11068 2006-12-11  Marco Gerards  <marco@gnu.org>
11070         * normal/menu_entry.c (run): Fix off by one bug so the last line
11071         is executed.  Move the loader check to outside the loop.
11073 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11075         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11077 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11079         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11080         the number of sectors.  Reported by Andrey Shuvikov
11081         <mr_hyro@yahoo.com>.
11083 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11085         * kern/disk.c (grub_disk_read): When there is a read error, always
11086         try to read only the necessary data.
11088         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11089         disk/raid.c.
11090         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11091         prototype.
11092         [GRUB_UTIL] (grub_raid_fini): Likewise.
11093         [GRUB_UTIL] (grub_lvm_init): Likewise.
11094         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11095         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11096         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11097         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11098         and grub_raid_fini().
11100 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11102         * include/grub/types.h (__unused): Rename to UNUSED.
11103         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11104         (grub_elf64_size): Likewise.
11106 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11108         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11109         grub_error_push and grub_error_pop in the error-handling path.
11110         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11111         length.
11113 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11115         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11116         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11117         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11118         (kernel_elf_SOURCES): Likewise.
11119         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11120         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11121         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11122         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11123         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11124         (elf_mod_SOURCES): New variable.
11125         (elf_mod_CFLAGS): Likewise.
11126         (elf_mod_LDFLAGS): Likewise.
11127         * include/grub/types.h (__unused): New macro.
11128         * include/grub/elfload.h: New file.
11129         * kern/elf.c: Likewise.
11130         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11131         (ELF32_LOADMASK): New macro.
11132         (ELF64_LOADMASK): Likewise.
11133         (vmlinux): Removed.
11134         (grub_linux_load32): New function.
11135         (grub_linux_load64): Likewise.
11136         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11137         Use grub_elf_t instead of grub_file_t.
11139 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11141         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11142         `catch_result' to struct set_color_args.
11144 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11146         * normal/menu.c: Include grub/script.h.
11147         * normal/menu_entry.c: Likewise.
11148         * include/grub/normal.h: Do not include grub/script.h.
11150 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11152         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11154 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11156         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11157         disk.
11158         (grub_disk_close): Print debug messages when closing a disk.
11159         (grub_disk_read): Print debug messages when disk read fails.
11160         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11161         filesystem type.
11162         * kern/partition.c: Include misc.h.
11163         (grub_partition_iterate): Print debug messages when detecting
11164         partition type.
11166 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11168         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11169         is negative.
11170         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11172 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11174         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11175         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11177 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11179         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11180         instead of sizeof(lv). Patch by Michael Guntsche.
11182 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11184         * disk/lvm.c: Rename VGS to VG_LIST.
11185         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11186         (grub_lvm_open): Likewise.
11187         Thanks to Michael Guntsche for finding this bug.
11189 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11191         * configure.ac (AC_INIT): Bumped to 1.95.
11193 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11195         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11196         with "/dev/.static/dev/md".
11198 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11200         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11201         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11202         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11203         DRIVE_NAME are always freed.
11205         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11206         DOS_PART, as a DOS partition is counted from one instead of zero
11207         now. Reported by Robert Millan.
11209 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11211         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11212         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11213         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11214         string returned by grub_guess_root_device.
11215         * util/i386/pc/grub-setup.c: Likewise.
11216         * util/i386/pc/grub-probefs.c: Likewise.
11218         * util/i386/pc/grub-probefs.c: Rename to ...
11219         * util/i386/pc/grub-probe.c: ... this.
11220         * DISTLIST: Remove grub-probefs, add grub-probe.
11221         * conf/i386-efi.rmk: Likewise.
11222         * conf/i386-pc.rmk: Likewise.
11223         * util/i386/pc/grub-install.in: Likewise.
11225         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11226         choose which information we want to print.
11228 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11230         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11231         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11232         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11233         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11234         video/readers/tga.c and video/i386/pc/vbeutil.c.
11236 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11238         Added support for RAID and LVM.
11240         * disk/lvm.c: New file.
11241         * disk/raid.c: Likewise.
11242         * include/grub/lvm.h: Likewise.
11243         * include/grub/raid.h: Likewise.
11244         * include/grub/util/lvm.h: Likewise.
11245         * include/grub/util/raid.h: Likewise.
11246         * util/lvm.c: Likewise.
11247         * util/raid.c: Likewise.
11249         * include/grub/disk.h (grub_disk_dev_id): Add
11250         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11251         (grub_disk_get_size): New prototype.
11252         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11253         returns a partition.
11254         (grub_disk_get_size): New function.
11256         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11257         verbatim if grub_install_dos_part is -2.
11259         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11260         and LVM devices.
11262         * util/i386/pc/grub-setup.c (setup): New argument
11263         MUST_EMBED. Force embedding of GRUB when the argument is
11264         true. Close FILE before returning.
11265         (main): Add support for RAID and LVM.
11267         * conf/common.rmk: Add RAID and LVM modules.
11268         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11269         util/lvm.c.
11270         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11272         * kern/misc.c (grub_strstr): New function.
11273         * include/grub/misc.h (grub_strstr): New prototype.
11275 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11277         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11279 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11281         * kern/misc.c (grub_strtoull): Guess the base only if not
11282         specified.
11284 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11286         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11287         PowerMac support.
11289 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11291         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11293         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11294         Remove `flags' argument.  All callers changed.
11295         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11296         (IEEE1275_IHANDLE_INVALID): New variable.
11297         (IEEE1275_CELL_INVALID): New variable.
11298         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11299         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11300         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11301         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11302         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11303         codes from Open Firmware.  All callers updated.
11304         (grub_ieee1275_next_property): Directly return Open Firmware return
11305         code.
11306         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11307         Standardize error checking from `grub_ieee1275_get_property'.
11308         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11309         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11311 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11313         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11314         `instance_to_package_args' to `instance_to_path_args'.
11316         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11317         `grub_ieee1275_chosen'.
11319         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11320         `grub_ieee1275_interpret'.
11322 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11324         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11326 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11328         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11329         (__cmpdi): Likewise.
11331         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11332         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11333         `grub_ssize_t'.
11335         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11337         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11338         to type `grub_ssize_t'.
11339         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11341 2006-09-22  Marco Gerards  <marco@gnu.org>
11343         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11344         newlines.
11346 2006-09-22  Marco Gerards  <marco@gnu.org>
11348         * commands/echo.c: New file.
11350         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11352         * conf/common.rmk (echo_mod_SOURCES): New variable.
11353         (echo_mod_CFLAGS): Likewise.
11354         (echo_mod_LDFLAGS): Likewise.
11356 2006-09-22  Marco Gerards  <marco@gnu.org>
11358         * normal/main.c (get_line): Malloc memory instead of using
11359         preallocated memory.  Removed the arguments `cmdline' and
11360         `max_len'.  Updated all callers.
11362 2006-09-22  Marco Gerards  <marco@gnu.org>
11364         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11365         (normal_mod_DEPENDENCIES): Likewise.
11367         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11368         (normal_mod_DEPENDENCIES): Likewise.
11370         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11372 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11374         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11375         programs.
11376         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11377         (normal_mod_DEPENDENCIES): Likewise.
11378         * conf/i386-pc.mk: Regenerate.
11379         * conf/i386-efi.mk: Likewise
11380         * conf/common.mk: Likewise.
11381         * conf/powerpc-ieee1275.mk: Likewise.
11382         * conf/sparc64-ieee1275.mk: Likewise.
11384 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11386         Sync with i386 version.
11387         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11388         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11390 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11392         Import from GRUB Legacy (lib/device.c):
11393         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11394         (init_device_map) [__linux__]: Add support for I2O devices.
11396 2006-09-14  Marco Gerards  <marco@gnu.org>
11398         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11399         `-melf_i386'.
11401 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11403         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11404         /boot/grub/*.lst.
11406         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11408         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11409         before adding it to device.map.
11411 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11413         * genmk.rb: Let GCC generate dependencies the first time it
11414         compiles a file; using the -MD option.
11415         * conf/common.mk: Regenerate.
11416         * conf/i386-pc.mk: Likewise.
11417         * conf/i386-efi.mk: Likewise.
11418         * conf/powerpc-ieee1275.mk: Likewise.
11419         * conf/sparc64-ieee1275.mk: Likewise.
11421 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11423         Move the prototypes of grub_setjmp and grub_longjmp to
11424         cpu/setjmp.h, so that each architecture may specify different
11425         attributes.
11427         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11428         (grub_longjmp): Likewise.
11429         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11430         (grub_longjmp): Likewise.
11431         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11432         (grub_longjmp): Likewise.
11434         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11435         [!GRUB_UTIL] (grub_longjmp): Removed.
11437 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11439         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11440         "color!" method does not return any value.
11442 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11444         * include/grub/bitmap.h: New file.
11446         * include/grub/i386/pc/vbeutil.h: Likewise.
11448         * video/bitmap.c: Likewise.
11450         * video/readers/tga.c: Likewise.
11452         * video/i386/pc/vbeutil.c: Likewise.
11454         * commands/videotest.c: Code cleanup and updated to reflect to new
11455         video API.
11457         * term/gfxterm.c: Likewise.
11459         * video/video.c: Likewise.
11461         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11462         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11463         (bitmap_mod_SOURCES): New entry.
11464         (bitmap_mod_CFLAGS): Likewise.
11465         (bitmap_mod_LDFLAGS): Likewise.
11466         (tga_mod_SOURCES): Likewise.
11467         (tga_mod_CFLAGS): Likewise.
11468         (tga_mod_LDFLAGS): Likewise.
11470         * include/grub/video.h (grub_video_blit_operators): New enum type.
11471         (grub_video_render_target): Changed as forward declaration and moved
11472         actual definition to be video driver specific.
11473         (grub_video_adapter.blit_bitmap): Added blitting operator.
11474         (grub_video_adapter.blit_render_target): Likewise.
11475         (grub_video_blit_bitmap): Likewise.
11476         (grub_video_blit_render_target): Likewise.
11478         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
11479         driver specific render target definition.
11480         (grub_video_vbe_map_rgba): Added driver internal helper.
11481         (grub_video_vbe_unmap_color): Updated to use
11482         grub_video_i386_vbeblit_info.
11483         (grub_video_vbe_get_video_ptr): Likewise.
11485         * include/grub/i386/pc/vbeblit.h
11486         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
11487         grub_video_i386_vbeblit_info.
11488         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
11489         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
11490         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
11491         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
11492         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
11493         (grub_video_i386_vbeblit_index_index): Likewise.
11494         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
11495         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
11496         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
11497         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
11498         operator.
11499         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
11500         operator.
11502         * video/i386/pc/vbeblit.c: Updated to reflect changes on
11503         include/grub/i386/pc/vbeblit.h.
11505         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
11506         Updated to use grub_video_i386_vbeblit_info.
11507         (grub_video_i386_vbefill_R8G8B8): Likewise.
11508         (grub_video_i386_vbefill_index): Likewise.
11509         (grub_video_i386_vbefill): Added generic filler.
11511         * video/i386/pc/vbefill.c: Updated to reflect changes on
11512         include/grub/i386/pc/vbefill.h.
11514         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
11515         grub_video_i386_vbeblit_info.
11516         (grub_video_vbe_unmap_color): Likewise.
11517         (grub_video_vbe_blit_glyph): Likewise.
11518         (grub_video_vbe_scroll): Likewise.
11519         (grub_video_vbe_draw_pixel): Removed function.
11520         (grub_video_vbe_get_pixel): Likewise.
11521         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
11522         updated code to use it.
11523         (common_blitter): Added common blitter for render target and bitmap.
11524         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
11525         (grub_video_vbe_blit_render_target): Likewise.
11527 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
11529         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
11530         is in text mode if there is no console control protocol instance
11531         available.
11533 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11535         * include/grub/video.h: Code cleanup.
11537         * include/grub/i386/pc/vbe.h: Likewise.
11539         * video/i386/pc/vbe.c: Likewise.
11541         * video/i386/pc/vbeblit.c: Likewise.
11543         * video/i386/pc/vbefill.c: Likewise.
11545         * video/video.c: Likewise.  Also added more comments.
11547 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11549         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
11550         (struct grub_biosdisk_dap): Likewise.
11552         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
11553         linkage settings for all functions.
11555 2006-07-12  Marco Gerards  <marco@gnu.org>
11557         * configure.ac (--enable-mm-debug): Fix typo.
11559         * genkernsyms.sh.in: Use proper quoting for `CC'.
11561 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
11563         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
11564         (normal_mod_ASFLAGS): Remove "-m32".
11566 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
11568         * util/misc.c: Include config.h.
11569         [!HAVE_MEMALIGN]: Do not include malloc.h.
11570         (grub_memalign): Use posix_memalign, if present. Then, use
11571         memalign, if present. Otherwise, emit an error.
11573         * util/grub-emu.c: Do not include malloc.h.
11575         * include/grub/util/misc.h: Include unistd.h. This is required for
11576         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
11577         D. Eades III <hde@foobar-qux.org>.
11579         * configure.ac (AC_GNU_SOURCE): Added.
11580         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
11581         type.
11583 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
11585         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
11586         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
11588 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
11590         * include/grub/types.h (grub_host_addr_t): Rename to
11591         grub_target_addr_t.
11592         (grub_host_off_t): Rename to grub_target_off_t.
11593         (grub_host_size_t): Rename to grub_target_size_t.
11594         (grub_host_ssize_t): Rename to grub_target_ssize_t.
11595         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
11597         * include/grub/kernel.h (struct grub_module_header): Change type
11598         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
11599         (grub_module_info): Likewise.
11601 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11603         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
11604         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
11605         Velazquez <jesus.velazquez@gmail.com>.
11607 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
11609         Count partitions from 1 instead of 0 in the string representation
11610         of partitions. Still use 0-based internally.
11612         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
11613         (sun_partition_map_iterate): Use grub_partition_t instead of
11614         struct grub_partition *. Cast DESC->START_CYLINDER to
11615         grub_uint64_t after converting the endian.
11616         (sun_partition_map_probe): Subtract 1 for PARTNUM.
11617         (sun_partition_map_get_name): Add 1 to P->INDEX.
11619         * partmap/pc.c (grub_partition_parse): Subtract 1 for
11620         PCDATA->DOS_PART.
11621         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
11623         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
11624         zero instead of one.
11625         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
11626         (gpt_partition_map_get_name): Add 1 into P->INDEX.
11628         * partmap/apple.c (apple_partition_map_iterate): Change the type
11629         of POS to unsigned.
11630         (apple_partition_map_probe): Subtract 1 for PARTNUM.
11631         (apple_partition_map_get_name): Add 1 into P->INDEX.
11633         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
11634         of POS to unsigned.
11635         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
11636         calculate the offset of a partition.
11637         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
11638         (amiga_partition_map_get_name): Add 1 into P->INDEX.
11640         * partmap/acorn.c (acorn_partition_map_find): Change the type of
11641         SECTOR to grub_disk_addr_t.
11642         (acorn_partition_map_iterate): Likewise.
11643         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
11644         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
11645         top.
11646         (acorn_partition_map_get_name): Add 1 into P->INDEX.
11648         * kern/i386/pc/init.c (make_install_device): Add 1 into
11649         GRUB_INSTALL_DOS_PART.
11651         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
11652         conditional.
11654 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11656         Clean up the code to support 64-bit addressing in disks and
11657         files. This change is not enough for filesystems yet.
11659         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
11660         type of "start" to grub_uint64_t.
11661         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
11662         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
11663         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
11664         convert addresses.
11666         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
11667         to grub_disk_addr_t.
11669         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
11670         string.
11672         * partmap/pc.c (pc_partition_map_iterate): Likewise.
11674         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
11675         to char *.
11677         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
11679         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
11681         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
11683         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
11684         to grub_off_t, to detect an error from grub_file_seek.
11685         (grub_multiboot_load_elf32): Likewise.
11687         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
11688         maximum unsigned long value when an overflow is detected.
11689         (grub_strtoull): New function.
11690         (grub_divmod64): Likewise.
11691         (grub_lltoa): use grub_divmod64.
11693         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
11694         grub_disk_addr_t.
11695         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
11696         the pointer to next character. Use grub_strtoull instead of
11697         grub_strtoul.
11698         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
11699         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
11700         respectively.
11702         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
11703         return value is signed.
11704         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
11705         test if OFFSET is less than zero, as OFFSET is unsigned now.
11707         * kern/disk.c (struct grub_disk_cache): Change the type of
11708         "sector" to grub_disk_addr_t.
11709         (grub_disk_cache_get_index): Change the type of SECTOR to
11710         grub_disk_addr_t. Calculate the hash with SECTOR casted to
11711         unsigned after shifting.
11712         (grub_disk_cache_invalidate): Change the type of SECTOR to
11713         grub_disk_addr_t.
11714         (grub_disk_cache_unlock): Likewise.
11715         (grub_disk_cache_store): Likewise.
11716         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
11717         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
11718         grub_disk_addr_t and grub_uint64_t, respectively.
11719         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
11720         body, as the value of OFFSET is tweaked by
11721         grub_disk_check_range. Change the types of START_SECTOR, LEN and
11722         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
11723         respectively.
11724         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
11725         body, as the value of OFFSET is tweaked by
11726         grub_disk_check_range. Change the types of LEN and N to
11727         grub_size_t.
11729         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
11730         and "saved_offset" to grub_off_t.
11731         (test_header): Cast BUF to char *.
11732         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
11733         to char *.
11734         (grub_gzio_read): Change the types of OFFSET and SIZE to
11735         grub_off_t and grub_size_t, respectively.
11737         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
11738         Removed.
11739         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
11740         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
11741         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
11742         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
11743         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
11745         * include/grub/types.h (grub_off_t): Unconditionally set to
11746         grub_uint64_t.
11747         (grub_disk_addr_t): Changed to grub_uint64_t.
11749         * include/grub/partition.h (struct grub_partition): Change the
11750         types of "start", "len" and "offset" to grub_disk_addr_t,
11751         grub_uint64_t and grub_disk_addr_t, respectively.
11752         (grub_partition_get_start): Return grub_disk_addr_t.
11753         (grub_partition_get_len): Return grub_uint64_t.
11755         * include/grub/misc.h (grub_strtoull): New prototype.
11756         (grub_divmod64): Likewise.
11758         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
11759         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
11760         grub_off_t, respectively.
11761         All callers and references changed.
11763         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
11764         grub_size_t in "read".
11765         All callers and references changed.
11767         * include/grub/file.h (struct grub_file): Change the types of
11768         "offset" and "size" to grub_off_t and grub_off_t,
11769         respectively. Change the type of SECTOR to grub_disk_addr_t in
11770         "read_hook".
11771         (grub_file_read): Change the type of LEN to grub_size_t.
11772         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
11773         grub_off_t.
11774         (grub_file_size): Return grub_off_t.
11775         (grub_file_tell): Likewise.
11776         All callers and references changed.
11778         * include/grub/disk.h (struct grub_disk_dev): Change the types of
11779         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
11780         "write".
11781         (struct grub_disk): Change the type of "total_sectors" to
11782         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
11783         "read_hook".
11784         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
11785         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
11786         (grub_disk_write): Likewise.
11787         All callers and references changed.
11789         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
11790         char * for grub_strncmp to silence gcc.
11791         (grub_iso9660_mount): Likewise.
11792         (grub_iso9660_mount): Likewise.
11793         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
11794         return statement.
11795         (grub_iso9660_iterate_dir): Likewise.
11796         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
11798         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
11799         LEN to grub_disk_addr_t and grub_size_t, respectively.
11801         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
11803         * fs/jfs.c (grub_jfs_read_file): Likewise.
11805         * fs/minix.c (grub_jfs_read_file): Likewise.
11807         * fs/sfs.c (grub_jfs_read_file): Likewise.
11809         * fs/ufs.c (grub_jfs_read_file): Likewise.
11811         * fs/xfs.c (grub_jfs_read_file): Likewise.
11813         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
11814         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
11815         respectively.
11817         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
11818         BLKNR to -1 instead of returning GRUB_ERRNO.
11819         (grub_ext2_read_file): Change the types of SECTOR and
11820         LEN to grub_disk_addr_t and grub_size_t, respectively.
11822         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
11823         LEN to grub_disk_addr_t and grub_size_t, respectively.
11825         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
11826         grub_file_read.
11828         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
11829         string. Do not cast SECTOR explicitly.
11831         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
11832         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
11833         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
11834         grub_disk_addr_t and grub_size_t, respectively. If the sector is
11835         over 2TB and LBA mode is not supported, raise an error.
11836         (get_safe_sectors): New function.
11837         (grub_biosdisk_read): Use get_safe_sectors.
11838         (grub_biosdisk_write): Likewise.
11840         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
11841         (grub_efidisk_write): Likewise.
11843         * disk/loopback.c (delete_loopback): Cosmetic changes.
11844         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
11845         correctly.
11846         (grub_loopback_open): Likewise.
11847         (grub_loopback_read): Likewise. Also, change the type of POS to
11848         grub_off_t, and fix the usage of grub_memset.
11850         * commands/i386/pc/play.c: Include grub/machine/time.h.
11852         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
11853         print FILE->SIZE.
11855         * commands/configfile.c: Include grub/env.h.
11857         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
11858         GRUB_ERRNO directly instead. Change the type of POS to
11859         grub_off_t. Follow the coding standard.
11861         * commands/blocklist.c: Include grub/partition.h.
11862         (grub_cmd_blocklist): Return an error if the underlying device is
11863         not a disk. Take the starting sector of a partition into account,
11864         if a partition is used.
11866         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
11867         a length field.
11868         (lba_mode): Support 64-bit addresses.
11869         (chs_mode): Likewise.
11870         (copy_buffer): Adapted to the new offsets of a length field and a
11871         segment field.
11872         (blocklist_default_start): Allocate 64-bit space.
11874         * boot/i386/pc/boot.S (force_lba): Removed.
11875         (boot_drive): Moved to under KERNEL_SECTOR.
11876         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
11877         space.
11878         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
11879         is useless.
11880         (lba_mode): Refactored to support a 64-bit address. More size
11881         optimization.
11882         (setup_sectors): Likewise.
11884 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
11886         * DISTLIST: Added include/grub/i386/linux.h. Removed
11887         include/grub/i386/pc/linux.h
11889         * configure.ac (AC_INIT): Bumped to 1.94.
11891         * config.guess: Updated from gnulib.
11892         * config.sub: Likewise.
11893         * install-sh: Likewise.
11894         * mkinstalldirs: Likewise.
11896 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11898         * conf/common.rmk (grub_modules_init.lst): Depended on
11899         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
11900         MODSRCFILES.
11902         * genmk.rb (PModule::rule): Reverted the previous change.
11904 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
11906         * conf/common.rmk (grub_modules_init.lst): Depends on
11907         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
11908         that the target does not exist before producing.
11909         (grub_modules_init.h): Remove the target before generating.
11910         (grub_emu_init.c): Likewise.
11912         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
11914 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
11916         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
11917         for the target-specific tests. Make sure that we also have the
11918         up-to-date target variables for those tests.
11920 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11922         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
11923         (PModule::rule): Likewise.
11925 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
11927         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
11928         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
11929         target-specific flags should be prefixed.
11930         (PModule::rule): Likewise.
11932 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
11934         * configure.ac (CMP): Check if cmp is available explicitly.
11936 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
11938         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
11939         (target_cpu): New variable.
11940         (pkglibdir): Use target_cpu instead of host_cpu.
11942         * util/i386/pc/grub-install.in (host_cpu): Removed.
11943         (target_cpu): New variable.
11944         (pkglibdir): Use target_cpu instead of host_cpu.
11946         * util/genmoddep.c: Removed.
11948         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
11949         instead of GRUB_HOST_SIZEOF_VOID_P.
11950         * kern/dl.c: Likewise.
11952         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
11953         ...
11954         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11955         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11956         (GRUB_TARGET_SIZEOF_LONG): ... this.
11957         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11958         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11959         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11960         to ...
11961         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11962         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11963         (GRUB_TARGET_SIZEOF_LONG): ... this.
11964         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11965         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11966         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
11967         to ...
11968         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
11969         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
11970         (GRUB_TARGET_SIZEOF_LONG): ... this.
11971         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
11972         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
11974         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
11975         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
11976         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
11977         instead of GRUB_HOST_SIZEOF_LONG.
11978         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
11979         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
11980         GRUB_CPU_WORDS_BIGENDIAN.
11981         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
11982         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
11983         grub_host_ssize_t.
11985         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
11986         (genmoddep_SOURCES): Likewise.
11987         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
11988         (genmoddep_SOURCES): Likewise.
11989         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
11990         (genmoddep_SOURCES): Likewise.
11991         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
11992         Likewise.
11993         (genmoddep_SOURCES): Likewise.
11995         * genmoddep.awk: New file.
11997         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
11998         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
11999         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12000         (PModule::rule): Likewise.
12001         (Program::rule): Likewise.
12002         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12003         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12004         respectively.
12006         * configure.ac: Rewritten intensively to use host and target
12007         instead of build and host, respectively.
12009         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12010         (host_cpu): Removed.
12011         (target_cpu): New variable.
12012         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12013         (BUILD_CC): Removed.
12014         (BUILD_CFLAGS): Likewise.
12015         (BUILD_CPPFLAGS): Likewise.
12016         (TARGET_CC): New variable.
12017         (TARGET_CFLAGS): Likewise.
12018         (TARGET_CPPFLAGS): Likewise.
12019         (TARGET_LDFLAGS): Likewise.
12020         (AWK): Likewise.
12021         (include): Use target_cpu instead of host_cpu.
12022         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12024         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12026 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12028         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12029         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12030         field 'false' to 'exec_on_false'.
12031         (grub_script_create_cmdif): Renamed argument names to reflect above
12032         changes.
12034         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12036         * normal/script.c (grub_script_create_cmdif): Likewise.
12038 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12040         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12041         top.
12042         (grub_hfsplus_btree_recptr): Likewise.
12043         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12044         FILEBLOCK both to pass a block number and store next block
12045         number.
12046         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12047         overflow file correctly. Specify errors appropriately, because
12048         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12049         grub_hfsplus_btree_recptr to get the pointer to a found key.
12050         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12051         is found.
12053         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12054         linux.mod.
12055         (_linux_mod_SOURCES): New variable.
12056         (_linux_mod_CFLAGS): Likewise.
12057         (_linux_mod_LDFLAGS): Likewise.
12058         (linux_mod_SOURCES): Likewise.
12059         (linux_mod_CFLAGS): Likewise.
12060         (linux_mod_LDFLAGS): Likewise.
12062         * DISTLIST: Added loader/i386/efi/linux.c,
12063         loader/i386/efi/linux_normal.c and
12064         include/grub/i386/efi/loader.h.
12066         * loader/i386/efi/linux.c: New file.
12067         * loader/i386/efi/linux_normal.c: Likewise.
12068         * include/grub/i386/efi/loader.h: Likewise.
12070 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12072         * commands/blocklist.c: New file.
12074         * DISTLIST: Added commands/blocklist.c.
12076         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12077         color for the background, and a darker color for the foreground.
12078         (grub_console_checkkey): Return READ_KEY.
12079         (grub_console_cls): Set the background to
12080         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12082         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12084         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12085         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12087         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12088         prototype.
12090         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12091         BG. The spec is wrong again.
12093         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12094         prototype.
12095         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12097         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12098         commands/blocklist.c.
12099         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12101         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12102         (blocklist_mod_SOURCES): New variable.
12103         (blocklist_mod_CFLAGS): Likewise.
12104         (blocklist_mod_LDFLAGS): Likewise.
12106 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12108         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12109         duplication.
12110         (lba_mode): Use %eax more intensively to reduce the code size.
12112 2006-05-20  Marco Gerards  <marco@gnu.org>
12114         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12116         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12117         for `menuentry'.
12118         (script): Accept leading newlines.
12119         (newlines): New rule to describe 0 or more newlines.
12120         (commands): Accept `command' with trailing newline.  Fixed the
12121         order in which arguments were passed to `grub_script_add_cmd'.
12122         Accept commands separated by newlines.
12123         (function): Changed to accept newlines.
12124         (menuentry) Rewritten.
12126         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12127         front of the list, instead of to the end.
12129 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12131         * util/i386/pc/grub-install.in (bindir): New variable.
12132         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12133         Shaver <lbgwjl@gmail.com>.
12135 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12137         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12138         grub/machine/linux.h
12139         * loader/i386/pc/linux.c: Likewise.
12141         * include/grub/i386/pc/linux.h: Moved to ...
12142         * include/grub/i386/linux.h: ... here.
12144         * include/grub/i386/linux.h (struct linux_kernel_params): New
12145         struct.
12147 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12149         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12150         checking.
12151         (grub_video_vbe_blit_glyph): Likewise.
12152         (grub_video_vbe_blit_bitmap): Likewise.
12153         (grub_video_vbe_blit_render_target): Likewise.
12155 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12157         * configure.ac (--with-platform): Properly quote the square
12158         brackets.
12160 2006-05-08  Marco Gerards  <marco@gnu.org>
12162         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12163         this...
12164         (kernel_elf_HEADERS): ...to this.  Updated all users.
12165         (grubof_symlist.c): Renamed from this...
12166         (kernel_elf_symlist.c): ...to this.  Updated all users.
12167         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12168         (grubof_SOURCES): Renamed from this...
12169         (kernel_elf_SOURCES): ...to this.
12170         (grubof_HEADERS): Renamed from this...
12171         (kernel_elf_HEADERS): ...to this.
12172         (grubof_CFLAGS): Renamed from this...
12173         (kernel_elf_CFLAGS): ...to this.
12174         (grubof_ASFLAGS): Renamed from this...
12175         (kernel_elf_ASFLAGS): ...to this.
12176         (grubof_LDFLAGS): Renamed from this...
12177         (kernel_elf_LDFLAGS): ...to this.
12179         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12180         this...
12181         (kernel_elf_HEADERS): ...to this.  Updated all users.
12182         (grubof_symlist.c): Renamed from this...
12183         (kernel_elf_symlist.c): ...to this.  Updated all users.
12184         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12185         (grubof_SOURCES): Renamed from this...
12186         (kernel_elf_SOURCES): ...to this.
12187         (grubof_HEADERS): Renamed from this...
12188         (kernel_elf_HEADERS): ...to this.
12189         (grubof_CFLAGS): Renamed from this...
12190         (kernel_elf_CFLAGS): ...to this.
12191         (grubof_ASFLAGS): Renamed from this...
12192         (kernel_elf_ASFLAGS): ...to this.
12193         (grubof_LDFLAGS): Renamed from this...
12194         (kernel_elf_LDFLAGS): ...to this.
12196         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12197         `kernel.elf' instead of `grubof'.
12199 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12201         Add --with-platform to configure. Use pkglibdir instead of
12202         pkgdatadir. This is reported by Roger Leigh.
12204         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12205         (host_vendor): Likewise.
12206         (host_os): Likewise.
12207         (pkgdatadir): Likewise.
12208         (platform): New variable.
12209         (pkglibdir): Likewise.
12210         Use PKGLIBDIR instead of PKGDATADIR.
12212         * util/i386/pc/grub-install.in (datadir): Removed.
12213         (host_vendor): Likewise.
12214         (host_os): Likewise.
12215         (pkgdatadir): Likewise.
12216         (platform): New variable.
12217         (pkglibdir): Likewise.
12218         Use PKGLIBDIR instead of PKGDATADIR.
12220         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12221         instead of GRUB_DATADIR.
12222         (main): Likewise.
12223         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12224         (main): Likewise.
12225         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12226         (main): Likewise.
12228         * configure.ac (--with-platform): New option.
12229         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12231         * Makefile.in: Include a makefile based on PLATFORM instead of
12232         HOST_VENDOR.
12233         (pkgdatadir): Not appended by the machine type.
12234         (pkglibdir): Appended by the machine type.
12235         (host_vendor): Removed.
12236         (platform): New variable.
12237         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12238         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12239         (uninstall): Likewise.
12241 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12243         Use the environment context in the menu. Remove the commands
12244         "default" and "timeout", and use variables instead.
12246         * normal/menu.c: Include grub/env.h.
12247         (print_entry): Cast TITLE to silence gcc.
12248         (get_timeout): New function.
12249         (set_timeout): Likewise.
12250         (get_entry_number): Likewise.
12251         (run_menu): Use a default entry, a fallback entry and a timeout
12252         in the environment variables "default", "fallback" and
12253         "timeout". Also, tweak the default entry if it is not within the
12254         current menu entries.
12255         (grub_menu_run): Use a fallback entry in the environment variable
12256         "fallback".
12258         * normal/main.c (read_config_file): Do not initialize
12259         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12260         NEWMENU->TIMEOUT.
12261         (grub_normal_execute): Use a data slot to store the menu.
12263         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12264         fallback_entry and timeout.
12265         (struct grub_menu_list): Removed.
12266         (grub_menu_list_t): Likewise.
12267         (struct grub_context): Likewise.
12268         (grub_context_t): Likewise.
12269         (grub_context_get): Likewise.
12270         (grub_context_get_current_menu): Likewise.
12271         (grub_context_push_menu): Likewise.
12272         (grub_context_pop_menu): Likewise.
12273         (grub_default_init): Likewise.
12274         (grub_default_fini): Likewise.
12275         (grub_timeout_init): Likewise.
12276         (grub_timeout_fini): Likewise.
12278         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12279         and timeout.mod.
12280         (normal_mod_SOURCES): Removed normal/context.c.
12282         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12283         commands/default.c, commands/timeout.c and normal/context.c.
12284         (normal_mod_SOURCES): Removed normal/context.c.
12286         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12287         commands/timeout.c and normal/context.c.
12288         (normal_mod_SOURCES): Removed normal/context.c.
12290         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12291         commands/default.c, commands/timeout.c and normal/context.c.
12292         (normal_mod_SOURCES): Removed normal/context.c.
12294         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12295         timeout.mod.
12296         (default_mod_SOURCES): Removed.
12297         (default_mod_CFLAGS): Likewise.
12298         (default_mod_LDFLAGS): Likewise.
12299         (timeout_mod_SOURCES): Removed.
12300         (timeout_mod_CFLAGS): Likewise.
12301         (timeout_mod_LDFLAGS): Likewise.
12303         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12304         normal/context.c.
12306         * commands/default.c: Removed.
12307         * commands/timeout.c: Likewise.
12308         * normal/context.c: Likewise.
12310 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12312         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12314 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12316         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12317         "next" to "prev" for readability.
12318         (struct grub_env_sorted_var): New struct.
12319         (grub_env_context): Renamed to ...
12320         (initial_context): ... this.
12321         (grub_env_var_context): Renamed to ...
12322         (current_context): ... this.
12323         (grub_env_find): Look only at CURRENT_CONTEXT.
12324         (grub_env_context_open): Rewritten to copy exported variables from
12325         previous context.
12326         (grub_env_context_close): Rewritten according to the new
12327         scheme. Also, add an assertion to prevent the initial context from
12328         removed.
12329         (grub_env_insert): Removed the code for the sorted list.
12330         (grub_env_remove): Likewise.
12331         (grub_env_export): Simply mark the variable with
12332         GRUB_ENV_VAR_GLOBAL.
12333         (grub_env_set): A cosmetic change for naming consistency.
12334         (grub_env_get): Likewise.
12335         (grub_env_unset): Likewise.
12336         (grub_env_iterate): Rewritten to sort variables within this
12337         function.
12338         (grub_register_variable_hook): Fixed for naming consistency. Call
12339         grub_env_find again, only if NAME is not found at the first time.
12340         (mangle_data_slot_name): New function.
12341         (grub_env_set_data_slot): Likewise.
12342         (grub_env_get_data_slot): Likewise.
12343         (grub_env_unset_data_slot): Likewise.
12345         * include/grub/env.h (grub_env_var_type): New enum.
12346         (GRUB_ENV_VAR_LOCAL): New constant.
12347         (GRUB_ENV_VAR_GLOBAL): Likewise.
12348         (GRUB_ENV_VAR_DATA): Likewise.
12349         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12350         "type".
12351         (grub_env_set): Replace VAR with NAME for consistency.
12352         (grub_register_variable_hook): Likewise.
12353         (grub_env_export): Specify the name of the argument.
12354         (grub_env_set_data_slot): New prototype.
12355         (grub_env_get_data_slot): Likewise.
12356         (grub_env_unset_data_slot): Likewise.
12358 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12360         Extend the loader so that GRUB can accept a loader which comes
12361         back to GRUB when a loaded image exits. Also, this change adds
12362         support for a chainloader on EFI.
12364         * term/efi/console.c: Include grub/misc.h.
12365         (grub_console_checkkey): Display a scan code on the top for
12366         debugging. This will be removed once the EFI port gets stable.
12367         Correct the scan code mapping.
12369         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12370         allocate memory from larger regions, in order to reduce the number
12371         of allocated regions. Otherwise, the MacOSX loader panics.
12372         (filter_memory_map): Avoid less than 1MB for compatibility with
12373         other loaders.
12374         (add_memory_regions): Allocate from the tail of a region, if
12375         possible, to avoid allocating a region near to 1MB, for the MacOSX
12376         loader.
12378         * kern/efi/init.c (grub_efi_set_prefix): Specify
12379         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12381         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12382         argument IMAGE_HANDLE and specify it to get a loaded image.
12383         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12384         grub_efi_get_loaded_image.
12385         (grub_efi_get_filename): Divide the length by the size of
12386         grub_efi_char16_t.
12387         (grub_efi_get_device_path): New function.
12388         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12389         the length by the size of grub_efi_char16_t for a file path device
12390         path node.
12392         * kern/loader.c (grub_loader_noreturn): New variable.
12393         (grub_loader_set): Accept a new argument NORETURN. Set
12394         GRUB_LOADER_NORETURN to NORETURN.
12395         All callers changed.
12396         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12397         grub_machine_fini.
12399         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12400         prototype.
12401         (grub_efi_get_loaded_image): Take an argument to specify an image
12402         handle.
12404         * include/grub/loader.h (grub_loader_set): Added one more argument
12405         NORETURN.
12407         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12408         instead of grub_efi_open_protocol.
12409         (grub_efidisk_get_device_name): Likewise.
12410         (grub_efidisk_close): Print a newline.
12411         (grub_efidisk_get_device_handle): Fixed to use
12412         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12413         GRUB_EFI_DEVICE_PATH_TYPE.
12415         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12416         * kern/efi/efi.c (device_path_guid): ... here.
12418         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12419         chain.mod.
12420         (kernel_mod_HEADERS): Added efi/disk.h.
12421         (_chain_mod_SOURCES): New variable.
12422         (_chain_mod_CFLAGS): Likewise.
12423         (_chain_mod_LDFLAGS): Likewise.
12424         (chain_mod_SOURCES): Likewise.
12425         (chain_mod_CFLAGS): Likewise.
12426         (chain_mod_LDFLAGS): Likewise.
12428         * DISTLIST: Added include/grub/efi/chainloader.h,
12429         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12431         * include/grub/efi/chainloader.h: New file.
12432         * loader/efi/chainloader.c: Likewise.
12433         * loader/efi/chainloader_normal.c: Likewise.
12435 2006-04-30  Marco Gerards  <marco@gnu.org>
12437         * commands/configfile.c (grub_cmd_source): New function.
12438         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12439         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12441 2006-04-30  Marco Gerards  <marco@gnu.org>
12443         * normal/execute.c (grub_script_execute_cmd): Change the return
12444         type to `grub_err_t'.  Correctly return the error.
12445         (grub_script_execute_cmdline): In case a command line is not a
12446         command or a function, try to interpret it as an assignment.
12448 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12450         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12451         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12452         skip a node whose name is obviously invalid as UTF-16,
12453         i.e. contains a NUL character. Stop the iteration when the last
12454         directory entry is found. Instead of using the return value of
12455         grub_hfsplus_btree_iterate_node, store the value in RET and use
12456         it, because the iterator can be stopped by the last directory
12457         entry.
12459 2006-04-30  Marco Gerards  <marco@gnu.org>
12461         * include/grub/env.h (grub_env_export): New prototype.  Reported
12462         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12464 2006-04-30  Marco Gerards  <marco@gnu.org>
12466         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
12467         size of the extents in a catalog file record.
12469 2006-04-29  Marco Gerards  <marco@gnu.org>
12471         * commands/configfile.c (grub_cmd_configfile): Execute the
12472         configfile within its own context.
12474         * include/grub/env.h (grub_env_context_open): New prototype.
12475         (grub_env_context_close): Likewise.
12477         * kern/env.c (grub_env): Removed.
12478         (grub_env_sorted): Likewise.
12479         (grub_env_context): New variable.
12480         (grub_env_var_context): Likewise.
12481         (grub_env_find): Search both the active context and the global
12482         context.
12483         (grub_env_context_open): New function.
12484         (grub_env_context_close): Likewise.
12485         (grub_env_insert): Likewise.
12486         (grub_env_remove): Likewise.
12487         (grub_env_export): Likewise.
12488         (grub_env_set): Changed to use helper functions to avoid code
12489         duplication.
12490         (grub_env_iterate): Rewritten so both the current context and the
12491         global context are being used.
12493         * normal/command.c (export_command): New function.
12494         (grub_command_init): Register the `export' function.
12496 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
12498         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
12499         explicitly to suppress gcc's warnings.
12500         * fs/fat.c (grub_fat_find_dir): Likewise.
12501         (grub_fat_label): Likewise.
12502         * fs/xfs.c (grub_xfs_read_inode): Likewise.
12503         (grub_xfs_mount): Likewise.
12504         (grub_xfs_label): Likewise.
12505         * fs/affs.c (grub_affs_mount): Likewise.
12506         (grub_affs_label): Likewise.
12507         (grub_affs_iterate_dir): Likewise.
12508         * fs/sfs.c (grub_sfs_mount): Likewise.
12509         (grub_sfs_iterate_dir): Likewise.
12510         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
12511         * fs/hfs.c (grub_hfs_mount): Likewise.
12512         (grub_hfs_cmp_catkeys): Likewise.
12513         (grub_hfs_find_dir): Likewise.
12514         (grub_hfs_dir): Likewise.
12515         (grub_hfs_label): Likewise.
12516         * fs/jfs.c (grub_jfs_mount): Likewise.
12517         (grub_jfs_opendir): Likewise.
12518         (grub_jfs_getent): Likewise.
12519         (grub_jfs_lookup_symlink): Likewise.
12520         (grub_jfs_label): Likewise.
12521         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
12522         (grub_hfsplus_iterate_dir): Likewise.
12523         (grub_hfsplus_btree_iterate_node): Made static.
12525         * util/grub-emu.c (prefix): New variable.
12526         (grub_machine_set_prefix): New function.
12527         (main): Do not set the environment variable "prefix" here. Only
12528         set PREFIX, which is used later by grub_machine_set_prefix.
12530         * include/grub/video.h: Do not include grub/symbol.h.
12531         (grub_video_register): Not exported. This symbol is not defined in
12532         the kernel.
12533         (grub_video_unregister): Likewise.
12534         (grub_video_iterate): Likewise.
12535         (grub_video_setup): Likewise.
12536         (grub_video_restore): Likewise.
12537         (grub_video_get_info): Likewise.
12538         (grub_video_get_blit_format): Likewise.
12539         (grub_video_set_palette): Likewise.
12540         (grub_video_get_palette): Likewise.
12541         (grub_video_set_viewport): Likewise.
12542         (grub_video_get_viewport): Likewise.
12543         (grub_video_map_color): Likewise.
12544         (grub_video_map_rgb): Likewise.
12545         (grub_video_map_rgba): Likewise.
12546         (grub_video_fill_rect): Likewise.
12547         (grub_video_blit_glyph): Likewise.
12548         (grub_video_blit_bitmap): Likewise.
12549         (grub_video_blit_render_target): Likewise.
12550         (grub_video_scroll): Likewise.
12551         (grub_video_swap_buffers): Likewise.
12552         (grub_video_create_render_target): Likewise.
12553         (grub_video_delete_render_target): Likewise.
12554         (grub_video_set_active_render_target): Likewise.
12556         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
12557         Undefined.
12558         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
12560         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
12561         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12562         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12563         instead of $(srcdir)/genkernsyms.sh.
12565         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
12566         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12567         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12568         instead of $(srcdir)/genkernsyms.sh.
12570         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
12571         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12572         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12573         instead of $(srcdir)/genkernsyms.sh.
12575         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
12576         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
12577         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
12578         instead of $(srcdir)/genkernsyms.sh.
12580         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
12581         genkernsyms.sh.
12583         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
12584         genkernsyms.sh.
12585         (gensymlist.sh): New target.
12586         (genkernsyms.sh): Likewise.
12588         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
12589         genkernsyms.sh.in and gensymlist.sh.in.
12591         * genkernsyms.sh: Removed.
12592         * gensymlist.sh: Likewise.
12594         * genkernsyms.sh.in: New file.
12595         * gensymlist.sh.in: Likewise.
12597 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12599         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
12600         clobber "prefix", since we may have already set it manually.
12602 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
12604         * kern/misc.c (abort): New alias for grub_abort.
12606 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
12608         A new machine-specific function "grub_machine_set_prefix" is
12609         defined. This is called after loading modules, so that a prefix
12610         initialization can use modules. Also, this change adds an
12611         intensive debugging feature for the memory manager via the
12612         configure option "--enable-mm-debug".
12614         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
12615         PART.LEN.
12617         * kern/sparc64/ieee1275/init.c (abort): Removed.
12618         (grub_stop): Likewise.
12619         (grub_exit): New function.
12620         (grub_set_prefix): Renamed to ...
12621         (grub_machine_set_prefix): ... this.
12622         (grub_machine_init): Do not call grub_set_prefix.
12624         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
12625         (grub_machine_set_prefix): ... this.
12626         (grub_machine_init): Do not call grub_set_prefix.
12628         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
12629         (grub_machine_init): Do not set the prefix here.
12631         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
12633         * kern/efi/init.c: Include grub/mm.h.
12634         (grub_efi_set_prefix): New function.
12636         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
12637         (grub_efi_get_filename): New function.
12638         (grub_print_device_path): Renamed to ...
12639         (grub_efi_print_device_path): ... this.
12641         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
12642         [MM_DEBUG] (grub_realloc): Likewise.
12643         [MM_DEBUG] (grub_free): Likewise.
12644         [MM_DEBUG] (grub_memalign): Likewise.
12645         [MM_DEBUG] (grub_mm_debug): New variable.
12646         [MM_DEBUG] (grub_debug_malloc): New function.
12647         [MM_DEBUG] (grub_debug_free): New function.
12648         [MM_DEBUG] (grub_debug_realloc): New function.
12649         [MM_DEBUG] (grub_debug_memalign): New function.
12651         * kern/misc.c (grub_abort): Print a newline to distinguish
12652         the message.
12654         * kern/main.c (grub_main): Call grub_machine_set_prefix and
12655         grub_set_root_dev after loading modules. This is necessary when
12656         setting a prefix depends on modules.
12658         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
12659         (grub_efi_print_device_path): ... this.
12660         (grub_efi_get_filename): New prototype.
12661         (grub_efi_set_prefix): Likewise.
12663         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
12664         and grub/disk.h.
12665         (grub_efidisk_get_device_handle): New prototype.
12666         (grub_efidisk_get_device_name): Likewise.
12668         * include/grub/mm.h: Include config.h.
12669         (MM_DEBUG): Removed.
12670         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
12671         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
12672         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
12673         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
12674         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
12675         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
12676         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
12677         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
12678         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
12680         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
12682         * disk/efi/efidisk.c: Include grub/partition.h.
12683         (iterate_child_devices): New function.
12684         (add_device): First, compare only last device path nodes, so that
12685         devices are sorted by the types.
12686         (grub_efidisk_get_device_handle): New function.
12687         (grub_efidisk_get_device_name): Likewise.
12689         * configure.ac (--enable-mm-debug): New option to enable the
12690         memory manager debugging feature. This makes the binary much
12691         bigger, so is disabled by default.
12693 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
12695         Use grub_abort instead of grub_stop, and grub_exit must be
12696         define in each architecture now. Also, this change adds support
12697         for EFI disks.
12699         * util/i386/pc/grub-probefs.c: Include grub/term.h.
12700         (grub_getkey): New function.
12701         (grub_term_get_current): Likewise.
12703         * util/i386/pc/grub-setup.c: Include grub/term.h.
12704         (grub_getkey): New function.
12705         (grub_term_get_current): Likewise.
12707         * util/misc.c (grub_stop): Renamed to ...
12708         (grub_exit): ... this.
12710         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
12711         (grub_exit): ... this.
12712         (grub_machine_init): Use grub_abort instead of abort.
12713         (grub_stop): Removed.
12715         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
12716         abort.
12718         * kern/i386/pc/startup.S (grub_exit): New function.
12719         (cold_reboot): New label.
12721         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
12722         (grub_efi_init): Call grub_efidisk_init.
12723         (grub_efi_fini): Call grub_efidisk_fini.
12725         * kern/efi/efi.c: Include grub/mm.h.
12726         (grub_efi_console_control_guid): Renamed to ...
12727         (console_control_guid): ... this.
12728         (grub_efi_loaded_image_guid): Renamed to ...
12729         (loaded_image_guid): ... this.
12730         (grub_efi_locate_handle): New function.
12731         (grub_efi_open_protocol): Likewise.
12732         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
12733         GRUB_EFI_CONSOLE_CONTROL_GUID.
12734         (grub_efi_exit): Removed.
12735         (grub_stop): Likewise.
12736         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
12737         (grub_exit): New function.
12738         (grub_print_device_path): Likewise.
12740         * kern/rescue.c (grub_rescue_cmd_exit): New function.
12741         (grub_enter_rescue_mode): Register "exit".
12743         * kern/misc.c (grub_real_dprintf): A cosmetic change.
12744         (grub_abort): New function.
12746         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
12748         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
12750         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
12752         * include/grub/efi/efi.h (grub_efi_exit): Removed.
12753         (grub_print_device_path): New prototype.
12754         (grub_efi_locate_handle): Likewise.
12755         (grub_efi_open_protocol): Likewise.
12757         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
12758         * disk/efi/efidisk.c: Likewise.
12760         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
12762         * include/grub/efi/console_control.h
12763         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
12765         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
12766         last 8 bytes as an array.
12767         (GRUB_EFI_DISK_IO_GUID): New macro.
12768         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
12769         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
12770         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
12771         grub_uint8_t.
12772         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
12773         (struct grub_efi_device_path): Rename the member "sub_type" to
12774         "subtype".
12775         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
12776         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
12777         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
12778         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
12779         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
12780         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
12781         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
12782         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
12783         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
12784         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
12785         (struct grub_efi_pci_device_path): New structure.
12786         (grub_efi_pci_device_path_t): New type.
12787         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
12788         (struct grub_efi_pccard_device_path): New structure.
12789         (grub_efi_pccard_device_path_t): New type.
12790         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
12791         (struct grub_efi_memory_mapped_device_path): New structure.
12792         (grub_efi_memory_mapped_device_path_t): New type.
12793         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
12794         (struct grub_efi_vendor_device_path): New structure.
12795         (grub_efi_vendor_device_path_t): New type.
12796         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
12797         (struct grub_efi_controller_device_path): New structure.
12798         (grub_efi_controller_device_path_t): New type.
12799         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
12800         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
12801         (struct grub_efi_acpi_device_path): New structure.
12802         (grub_efi_acpi_device_path_t): New type.
12803         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
12804         (struct grub_efi_expanded_acpi_device_path): New structure.
12805         (grub_efi_expanded_acpi_device_path_t): New type.
12806         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
12807         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
12808         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
12809         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
12810         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
12811         (struct grub_efi_atapi_device_path): New structure.
12812         (grub_efi_atapi_device_path_t): New type.
12813         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
12814         (struct grub_efi_fibre_channel_device_path): New structure.
12815         (grub_efi_fibre_channel_device_path_t): New type.
12816         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
12817         (struct grub_efi_1394_device_path): New structure.
12818         (grub_efi_1394_device_path_t): New type.
12819         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
12820         (struct grub_efi_usb_device_path): New structure.
12821         (grub_efi_usb_device_path_t): New type.
12822         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
12823         (struct grub_efi_usb_class_device_path): New structure.
12824         (grub_efi_usb_class_device_path_t): New type.
12825         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
12826         (struct grub_efi_i2o_device_path): New structure.
12827         (grub_efi_i2o_device_path_t): New type.
12828         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
12829         (struct grub_efi_mac_address_device_path): New structure.
12830         (grub_efi_mac_address_device_path_t): New type.
12831         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
12832         (struct grub_efi_ipv4_device_path): New structure.
12833         (grub_efi_ipv4_device_path_t): New type.
12834         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
12835         (struct grub_efi_ipv6_device_path): New structure.
12836         (grub_efi_ipv6_device_path_t): New type.
12837         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
12838         (struct grub_efi_infiniband_device_path): New structure.
12839         (grub_efi_infiniband_device_path_t): New type.
12840         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
12841         (struct grub_efi_uart_device_path): New structure.
12842         (grub_efi_uart_device_path_t): New type.
12843         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
12844         (struct grub_efi_vendor_messaging_device_path): New structure.
12845         (grub_efi_vendor_messaging_device_path_t): New type.
12846         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
12847         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
12848         (struct grub_efi_hard_drive_device_path): New structure.
12849         (grub_efi_hard_drive_device_path_t): New type.
12850         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
12851         (struct grub_efi_cdrom_device_path): New structure.
12852         (grub_efi_cdrom_device_path_t): New type.
12853         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
12854         (struct grub_efi_vendor_media_device_path): New structure.
12855         (grub_efi_vendor_media_device_path_t): New type.
12856         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
12857         (struct grub_efi_file_path_device_path): New structure.
12858         (grub_efi_file_path_device_path_t): New type.
12859         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
12860         (struct grub_efi_protocol_device_path): New structure.
12861         (grub_efi_protocol_device_path_t): New type.
12862         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
12863         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
12864         (struct grub_efi_bios_device_path): New structure.
12865         (grub_efi_bios_device_path_t): New type.
12866         (struct grub_efi_disk_io): New structure.
12867         (grub_efi_disk_io_t): New type.
12868         (struct grub_efi_block_io_media): New structure.
12869         (grub_efi_block_io_media_t): New type.
12870         (struct grub_efi_block_io): New structure.
12871         (grub_efi_block_io_t): New type.
12873         * include/grub/misc.h (grub_stop): Removed.
12874         (grub_exit): New prototype.
12875         (grub_abort): Likewise.
12877         * include/grub/disk.h (enum grub_disk_dev_id): Added
12878         GRUB_DISK_DEVICE_EFIDISK_ID.
12880         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
12881         disk/efi/efidisk.c.
12882         (kernel_syms.lst): Remove the target if an error occurs.
12884 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
12886         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
12887         as it was simply too buggy.
12889 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
12891         * kern/misc.c (grub_lltoa): New function.
12892         (grub_vsprintf): Added support for the long long suffix,
12893         i.e. "ll".
12895 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
12897         * Makefile.in (LDFLAGS): Add variable.
12898         (LD): Remove variable.
12899         * configure.ac: Add -m32 to LDFLAGS.
12900         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
12901         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
12902         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
12903         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
12904         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
12905         variables.
12906         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
12907         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
12908         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
12910 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
12912         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
12913         length for unknown glyph.
12915 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12917         Add support for pre-loaded modules into the EFI port.
12919         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
12920         completely. Accept one more argument DIR. The caller has changed.
12922         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
12924         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
12925         (grub_efi_loaded_image_guid): New variable.
12926         (grub_efi_get_loaded_image): New function.
12927         (grub_arch_modules_addr): Likewise.
12929         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
12930         prototype.
12932         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
12933         (struct grub_efi_loaded_image): New structure.
12934         (grub_efi_loaded_image_t): New type.
12936 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
12938         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
12939         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
12940         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
12942 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
12944         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
12946 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
12948         * DISTLIST: Added include/grub/efi/console.h,
12949         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
12950         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
12952         * include/grub/efi/console.h: New file.
12953         * include/grub/efi/time.h: Likewise.
12954         * include/grub/i386/efi/kernel.h: Likewise.
12955         * kern/efi/init.c: Likewise.
12956         * kern/efi/mm.c: Likewise.
12957         * term/efi/console.c: Likewise.
12959         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
12960         (grub_stop): Removed.
12961         (grub_get_rtc): Likewise.
12962         (grub_machine_init): Simply call grub_efi_init.
12963         (grub_machine_fini): Call grub_efi_fini.
12965         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
12966         (grub_efi_output_string): Removed.
12967         (grub_efi_stall): New function.
12968         (grub_stop): Likewise.
12969         (grub_get_rtc): Likewise.
12971         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
12972         (grub_efi_stall): New prototype.
12973         (grub_efi_allocate_pages): Likewise.
12974         (grub_efi_free_pages): Likewise.
12975         (grub_efi_get_memory_map): Likewise.
12976         (grub_efi_mm_init): Likewise.
12977         (grub_efi_mm_fini): Likewise.
12978         (grub_efi_init): Likewise.
12979         (grub_efi_fini): Likewise.
12981         * include/grub/i386/efi/time.h: Do not include
12982         grub/symbol.h. Include grub/efi/time.h.
12983         (GRUB_TICKS_PER_SECOND): Removed.
12984         (grub_get_rtc): Likewise.
12986         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
12987         Added padding. The EFI spec is buggy.
12988         (GRUB_EFI_BLACK): New macro.
12989         (GRUB_EFI_BLUE): Likewise.
12990         (GRUB_EFI_GREEN): Likewise.
12991         (GRUB_EFI_CYAN): Likewise.
12992         (GRUB_EFI_RED): Likewise.
12993         (GRUB_EFI_MAGENTA): Likewise.
12994         (GRUB_EFI_BROWN): Likewise.
12995         (GRUB_EFI_LIGHTGRAY): Likewise.
12996         (GRUB_EFI_BRIGHT): Likewise.
12997         (GRUB_EFI_DARKGRAY): Likewise.
12998         (GRUB_EFI_LIGHTBLUE): Likewise.
12999         (GRUB_EFI_LIGHTGREEN): Likewise.
13000         (GRUB_EFI_LIGHTCYAN): Likewise.
13001         (GRUB_EFI_LIGHTRED): Likewise.
13002         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13003         (GRUB_EFI_YELLOW): Likewise.
13004         (GRUB_EFI_WHITE): Likewise.
13005         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13006         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13007         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13008         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13009         (GRUB_EFI_BACKGROUND_RED): Likewise.
13010         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13011         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13012         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13013         (GRUB_EFI_TEXT_ATTR): Likewise.
13015         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13016         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13017         (kernel_mod_HEADERS): Added efi/time.h.
13019 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13021         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13022         include/grub/efi/api.h, include/grub/efi/console_control.h,
13023         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13024         include/grub/i386/efi/time.h, kern/efi/efi.c,
13025         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13026         and util/i386/efi/grub-mkimage.c.
13028         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13030         * genmk.rb (PModule#rule): Do not export symbols if
13031         #{prefix}_EXPORTS is set to "no".
13033         * conf/i386-efi.mk: New file.
13034         * conf/i386-efi.rmk: Likewise.
13035         * include/grub/efi/api.h: Likewise.
13036         * include/grub/efi/console_control.h: Likewise.
13037         * include/grub/efi/efi.h: Likewise.
13038         * include/grub/efi/pe32.h: Likewise.
13039         * include/grub/i386/efi/time.h: Likewise.
13040         * kern/efi/efi.c: Likewise.
13041         * kern/i386/efi/init.c: Likewise.
13042         * kern/i386/efi/startup.S: Likewise.
13043         * util/i386/efi/grub-mkimage.c: Likewise.
13045 2006-04-17  Marco Gerards  <marco@gnu.org>
13047         * include/grub/script.h: Include <grub/parser.h> and
13048         "grub_script.tab.h".
13049         (struct grub_lexer_param): New struct.
13050         (struct grub_parser_param): Likewise.
13051         (grub_script_create_arglist): Pass the state in an argument.
13052         (grub_script_add_arglist): Likewise.
13053         (grub_script_create_cmdline): Likewise.
13054         (grub_script_create_cmdblock): Likewise.
13055         (grub_script_create_cmdif): Likewise.
13056         (grub_script_create_cmdmenu): Likewise.
13057         (grub_script_add_cmd): Likewise.
13058         (grub_script_arg_add): Likewise.
13059         (grub_script_lexer_ref): Likewise.
13060         (grub_script_lexer_deref): Likewise.
13061         (grub_script_lexer_record_start): Likewise.
13062         (grub_script_lexer_record_stop): Likewise.
13063         (grub_script_mem_record): Likewise.
13064         (grub_script_mem_record_stop): Likewise.
13065         (grub_script_malloc): Likewise.
13066         (grub_script_yylex): Likewise.
13067         (grub_script_yyparse): Likewise.
13068         (grub_script_yyerror): Likewise.
13069         (grub_script_yylex): Likewise.
13070         (grub_script_lexer_init): Return the state.
13072         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13073         (grub_script_lexer_done): Likewise.
13074         (grub_script_lexer_getline): Likewise.
13075         (grub_script_lexer_refs): Likewise.
13076         (script): Likewise.
13077         (newscript): Likewise.
13078         (record): Likewise.
13079         (recording): Likewise.
13080         (recordpos): Likewise.
13081         (recordlen): Likewise.
13082         (grub_script_lexer_init): Return the state instead of setting
13083         global variables.
13084         (grub_script_lexer_ref): Use the newly added argument for state
13085         instead of globals.
13086         (grub_script_lexer_deref): Likewise.
13087         (grub_script_lexer_record_start): Likewise.
13088         (grub_script_lexer_record_stop): Likewise.
13089         (recordchar): Likewise.
13090         (nextchar): Likewise.
13091         (grub_script_yylex2): Likewise.
13092         (grub_script_yylex): Likewise.
13093         (grub_script_yyerror): Likewise.
13095         * normal/parser.y (func_mem): Removed variable.
13096         (menu_entry): Likewise.
13097         (err): Likewise.
13098         (%lex-param): New parser option.
13099         (%parse-param): Likewise.
13100         (script): Always return the AST.
13101         (argument): Pass the state around.
13102         (arguments): Likewise.
13103         (grubcmd): Likewise.
13104         (commands): Likewise.
13105         (function): Likewise.
13106         (menuentry): Likewise.
13107         (if_statement): Likewise.
13108         (if): Likewise.
13110         * normal/script.c (grub_script_memused): Removed variable.
13111         (grub_script_parsed): Likewise.
13112         (grub_script_malloc): Added a state argument.  Use that instead of
13113         global variables.
13114         (grub_script_mem_record): Likewise.
13115         (grub_script_mem_record_stop): Likewise.
13116         (grub_script_arg_add): Likewise.
13117         (grub_script_add_arglist): Likewise.
13118         (grub_script_create_cmdline): Likewise.
13119         (grub_script_create_cmdif): Likewise.
13120         (grub_script_create_cmdmenu): Likewise.
13121         (grub_script_add_cmd): Likewise.
13122         (grub_script_parse): Setup the state before calling the parser.
13124 2006-04-16  Marco Gerards  <marco@gnu.org>
13126         * normal/command.c (grub_command_init): Remove the title command.
13128         * normal/lexer.c (grub_script_yylex): Renamed from this...
13129         (grub_script_yylex2): ... to this.
13130         (grub_script_yylex): New function.  Temporary
13131         introduced to filter some tokens.
13132         (grub_script_yyerror): Print a newline.
13134         * normal/main.c (read_config_file): Output information about the
13135         lines that contain errors.  Wait for a key after all lines have
13136         been processed.  Don't return an empty menu.
13138         * normal/parser.y (func_mem): Don't initialize.
13139         (menu_entry): Likewise.
13140         (err): New variable.
13141         (script): Don't return anything when an error was encountered.
13142         (ws, returns): Removed rules.
13143         (argument): Disabled concatenated variable support.
13144         (arguments): Remove explicit separators.
13145         (grubcmd): Likewise.
13146         (function): Likewise.
13147         (menuentry): Likewise.
13148         (if): Likewise.
13149         (commands): Likewise.  Add error handling.
13151         * normal/script.c (grub_script_create_cmdline): If
13152         `grub_script_parsed' is 0, assume the parser encountered an error.
13154 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13156         * configure.ac: Add support for EFI. Fix the typo
13157         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13159 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13161         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13162         foreign multibyte characters should be shown correctly.
13164 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13166         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13167         calculation.
13168         (read_config_file): Made it to close file before returning.
13170 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13172         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13173         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13174         video/i386/pc/vbefill.c.
13176         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13177         video/i386/pc/vbefill.c.
13179         * include/grub/video.h (grub_video_blit_format): New enum.
13180         (grub_video_mode_info): Added new member blit_format.
13181         (grub_video_get_blit_format): New function prototype.
13183         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13184         function prototype.
13185         (grub_video_vbe_map_rgb): Likewise.
13186         (grub_video_vbe_unmap_color): Likewise.
13188         * include/grub/i386/pc/vbeblit.h: New file.
13190         * include/grub/i386/pc/vbefill.h: New file.
13192         * video/video.c (grub_video_get_blit_format): New function.
13193         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13194         (grub_video_vbe_map_rgb): Likewise.
13195         (grub_video_vbe_unmap_color): Likewise.
13197         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13198         optimized fills.
13199         (grub_video_vbe_blit_render_target): Changed to use more optimized
13200         blits.
13201         (grub_video_vbe_setup): Added detection for optimized settings.
13202         (grub_video_vbe_create_render_target): Likewise.
13204         * video/i386/pc/vbeblit.c: New file.
13206         * video/i386/pc/vbefill.c: New file.
13208 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13210         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13211         here...
13213         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13214         parsing to support both hex and dec ranges.  If filename was missing
13215         show usage information.
13217 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13219         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13220         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13222         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13223         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13224         (video_mod_SOURCES): Added.
13225         (video_mod_CFLAGS): Likewise.
13226         (video_mod_LDFLAGS): Likewise.
13227         (gfxterm_mod_SOURCES): Likewise.
13228         (gfxterm_mod_CFLAGS): Likewise.
13229         (gfxterm_mod_LDFLAGS): Likewise.
13230         (videotest_mod_SOURCES): Likewise.
13231         (videotest_mod_CFLAGS): Likewise.
13232         (videotest_mod_LDFLAGS): Likewise.
13233         (vesafb_mod_SOURCES): Removed.
13234         (vesafb_mod_CFLAGS): Likewise.
13235         (vesafb_mod_LDFLAGS): Likewise.
13236         (vga_mod_SOURCES): Likewise.
13237         (vga_mod_CFLAGS): Likewise.
13238         (vga_mod_LDFLAGS): Likewise.
13240         * commands/videotest.c: New file.
13242         * font/manager.c (fill_with_default_glyph): Modified to use
13243         grub_font_glyph.
13244         (grub_font_get_glyph): Likewise.
13245         (fontmanager): Renamed from this...
13246         (font_manager): ... to this.
13248         * include/grub/font.h (grub_font_glyph): Added new structure.
13249         (grub_font_get_glyph): Modified to use grub_font_glyph.
13251         * include/grub/misc.h (grub_abs): Added as inline function.
13253         * include/grub/video.h: New file.
13255         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13256         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13257         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13258         (grub_vbe_get_controller_info): Renamed from this...
13259         (grub_vbe_bios_get_controller_info): ... to this.
13260         (grub_vbe_get_mode_info): Renamed from this...
13261         (grub_vbe_bios_get_mode_info): ... to this.
13262         (grub_vbe_set_mode): Renamed from this...
13263         (grub_vbe_bios_set_mode): ... to this.
13264         (grub_vbe_get_mode): Renamed from this...
13265         (grub_vbe_bios_get_mode): ... to this.
13266         (grub_vbe_set_memory_window): Renamed from this...
13267         (grub_vbe_bios_set_memory_window): ... to this.
13268         (grub_vbe_get_memory_window): Renamed from this...
13269         (grub_vbe_bios_get_memory_window): ... to this.
13270         (grub_vbe_set_scanline_length): Renamed from this...
13271         (grub_vbe_set_scanline_length): ... to this.
13272         (grub_vbe_get_scanline_length): Renamed from this...
13273         (grub_vbe_bios_get_scanline_length): ... to this.
13274         (grub_vbe_set_display_start): Renamed from this...
13275         (grub_vbe_bios_set_display_start): ... to this.
13276         (grub_vbe_get_display_start): Renamed from this...
13277         (grub_vbe_bios_get_display_start): ... to this.
13278         (grub_vbe_set_palette_data): Renamed from this...
13279         (grub_vbe_bios_set_palette_data): ... to this.
13280         (grub_vbe_set_pixel_rgb): Removed.
13281         (grub_vbe_set_pixel_index): Likewise.
13283         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13284         from this...
13285         (grub_vbe_bios_get_controller_info): ... to this.
13286         (grub_vbe_get_mode_info): Renamed from this...
13287         (grub_vbe_bios_get_mode_info): ... to this.
13288         (grub_vbe_set_mode): Renamed from this...
13289         (grub_vbe_bios_set_mode): ... to this.
13290         (grub_vbe_get_mode): Renamed from this...
13291         (grub_vbe_bios_get_mode): ... to this.
13292         (grub_vbe_set_memory_window): Renamed from this...
13293         (grub_vbe_bios_set_memory_window): ... to this.
13294         (grub_vbe_get_memory_window): Renamed from this...
13295         (grub_vbe_bios_get_memory_window): ... to this.
13296         (grub_vbe_set_scanline_length): Renamed from this...
13297         (grub_vbe_set_scanline_length): ... to this.
13298         (grub_vbe_get_scanline_length): Renamed from this...
13299         (grub_vbe_bios_get_scanline_length): ... to this.
13300         (grub_vbe_set_display_start): Renamed from this...
13301         (grub_vbe_bios_set_display_start): ... to this.
13302         (grub_vbe_get_display_start): Renamed from this...
13303         (grub_vbe_bios_get_display_start): ... to this.
13304         (grub_vbe_set_palette_data): Renamed from this...
13305         (grub_vbe_bios_set_palette_data): ... to this.
13306         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13307         getting corrupted after calling it.  Added more pushes and pops.
13308         (grub_vbe_bios_set_mode): Likewise.
13309         (grub_vbe_bios_get_mode): Likewise.
13310         (grub_vbe_bios_get_memory_window): Likewise.
13311         (grub_vbe_bios_set_scanline_length): Likewise.
13312         (grub_vbe_bios_get_scanline_length): Likewise.
13313         (grub_vbe_bios_get_display_start): Likewise.
13314         (grub_vbe_bios_set_palette_data): Likewise.
13316         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13317         (cl_insert): Likewise.
13318         (cl_delete): Likewise.
13320         * term/gfxterm.c: New file.
13322         * term/i386/pc/vesafb.c: Removed file.
13324         * video/video.c: New file.
13326         * video/i386/pc/vbe.c (real2pm): Added new function.
13327         (grub_video_vbe_draw_pixel): Likewise.
13328         (grub_video_vbe_get_video_ptr): Likewise.
13329         (grub_video_vbe_get_pixel): Likewise
13330         (grub_video_vbe_init): Likewise.
13331         (grub_video_vbe_fini): Likewise.
13332         (grub_video_vbe_setup): Likewise.
13333         (grub_video_vbe_get_info): Likewise.
13334         (grub_video_vbe_set_palette): Likewise.
13335         (grub_video_vbe_get_palette): Likewise.
13336         (grub_video_vbe_set_viewport): Likewise.
13337         (grub_video_vbe_get_viewport): Likewise.
13338         (grub_video_vbe_map_color): Likewise.
13339         (grub_video_vbe_map_rgb): Likewise.
13340         (grub_video_vbe_map_rgba): Likewise.
13341         (grub_video_vbe_unmap_color): Likewise.
13342         (grub_video_vbe_fill_rect): Likewise.
13343         (grub_video_vbe_blit_glyph): Likewise.
13344         (grub_video_vbe_blit_bitmap): Likewise.
13345         (grub_video_vbe_blit_render_target): Likewise.
13346         (grub_video_vbe_scroll): Likewise.
13347         (grub_video_vbe_swap_buffers): Likewise.
13348         (grub_video_vbe_create_render_target): Likewise.
13349         (grub_video_vbe_delete_render_target): Likewise.
13350         (grub_video_vbe_set_active_render_target): Likewise.
13351         (grub_vbe_set_pixel_rgb): Remove function.
13352         (grub_vbe_set_pixel_index): Likewise.
13353         (index_color_mode): Remove static variable.
13354         (active_mode): Likewise.
13355         (framebuffer): Likewise.
13356         (bytes_per_scan_line): Likewise.
13357         (grub_video_vbe_adapter): Added new static variable.
13358         (framebuffer): Likewise.
13359         (render_target): Likewise.
13360         (initial_mode): Likewise.
13361         (mode_in_use): Likewise.
13362         (mode_list): Likewise.
13364 2006-03-10  Marco Gerards  <marco@gnu.org>
13366         * configure.ac (AC_INIT): Bumped to 1.93.
13368         * DISTLIST: Added `include/grub/hfs.h'.
13370 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13372         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13373         18H, which might help the BIOS falling back to next boot media.
13375 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13377         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13378         Poe Chen <poe.poechen@gmail.com>.
13380 2006-01-17  Marco Gerards  <marco@gnu.org>
13382         * include/grub/normal.h: Include <grub/script.h>.
13383         (grub_command_list): Removed struct.
13384         (grub_command_list_t): Removed type.
13385         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13386         members `commands' and `sourcecode'.
13387         * include/grub/script.h: Add inclusion guards.
13388         (grub_script_cmd_menuentry): New struct.
13389         (grub_script_execute_menuentry): New prototype.
13390         (grub_script_lexer_record_start): Likewise.
13391         (grub_script_lexer_record_stop): Likewise.
13392         * normal/execute.c (grub_script_execute_menuentry): New function.
13393         * normal/lexer.c (record, recording, recordpos, recordlen): New
13394         variables.
13395         (grub_script_lexer_record_start): New function.
13396         (grub_script_lexer_record_stop): Likewise.
13397         (recordchar): Likewise.
13398         (nextchar): Likewise.
13399         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13400         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13401         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13402         (current_menu): New variable.
13403         (free_menu): Mainly rewritten.
13404         (grub_normal_menu_addentry): New function.
13405         (read_config_file): Rewritten.
13406         * normal/menu.c (run_menu_entry): Mainly rewritten.
13407         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13408         the menu entry.
13409         (run): Mainly rewritten.
13410         * normal/parser.y (menu_entry): New variable.
13411         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13412         (menuentry): New rule.
13413         (command): Add `menuentry'.
13414         (if_statement): Allow additional returns before `fi'.
13415         * normal/script.c (grub_script_create_cmdmenu): New function.
13417 2006-01-03  Marco Gerards  <marco@gnu.org>
13419         * INSTALL: GNU Bison is required.
13420         * configure.ac: Rewritten the test to detect Bison.
13421         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13422         <xun.sun.cn@gmail.com>.
13424 2006-01-03  Marco Gerards  <marco@gnu.org>
13426         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13427         the HFS+ filesystem to filesystem blocks.
13428         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13429         GCC warning is silenced.
13431 2006-01-03  Marco Gerards  <marco@gnu.org>
13433         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13434         read from disk from big endian to host byte order.
13436 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13438         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13439         documentation.
13440         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13441         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13442         embedded HFS+ filesystem.
13443         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13444         (grub_hfs_sblock): Move from here...
13445         * include/grub/hfs.h: To here...  New file.
13446         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13447         documentation.
13448         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13449         New macros.
13450         (grub_hfsplus_volheader): Change type of member `magic' to
13451         `grub_uint16_t'.
13452         (grub_hfsplus_data): Add new member `embedded_offset'.
13453         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13454         returned block.
13455         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13456         Calculate the offset.
13458 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13460         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13461         Removed.
13462         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13464 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13466         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
13467         ENV->NAME is NULL after allocating ENV->VALUE.
13469 2005-12-25  Marco Gerards  <marco@gnu.org>
13471         * kern/env.c (grub_env_set): Rewritten the error handling code.
13473 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13475         * geninit.sh: Made more robust, and more portable.
13477 2005-12-25  Marco Gerards  <marco@gnu.org>
13479         Add support for Apple HFS+ filesystems.
13481         * fs/hfsplus.c: New file.
13483         * DISTLIST: Added `fs/hfsplus.c'.
13485         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
13486         (hfsplus_mod_SOURCES): New variable.
13487         (hfsplus_mod_CFLAGS): Likewise.
13488         (hfsplus_mod_LDFLAGS): Likewise.
13489         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
13490         (grub_setup_SOURCES): Likewise.
13491         (grub_mkdevicemap_SOURCES): Likewise.
13492         (grub_emu_SOURCES): Likewise.
13493         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
13495         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
13497         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
13499 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13501         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
13502         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
13503         include/grub/parser.h, include/grub/script.h, kern/parser.c,
13504         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
13505         normal/lexer.c, normal/parser.y, normal/script.c, and
13506         partmap/gpt.c.
13507         Removed kern/sparc64/cache.c.
13509         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
13510         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
13511         grub_emu_init.c.
13513         * configure.ac (AC_INIT): Bumped to 1.92.
13515 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
13517         * kern/err.c (grub_error_push): Added new function to support error
13518         stacks.
13519         (grub_error_pop): Likewise.
13520         (grub_error_stack_items): New local variable to support error stacks.
13521         (grub_error_stack_pos): Likewise.
13522         (grub_error_stack_assert): Likewise.
13523         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
13524         stack depth.
13525         (grub_print_error): Added support to print errors from error stack.
13527         * include/grub/err.h (grub_error_push): Added function prototype.
13528         (grub_error_pop): Likewise.
13530 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
13532         * configure.ac: Accept `powerpc64' as host_cpu.
13533         (amd64): Rename to `biarch32'.
13535         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
13536         non-cacheline-aligned addresses.
13538         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
13539         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
13540         if `size' is non-zero.
13542 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
13544         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
13545         and `cd' to make sure the filename is not prefixed with a
13546         directory name.
13547         (pkgdata_MODULES): Add `gpt.mod'.
13548         (gpt_mod_SOURCES): New variable.
13549         (gpt_mod_CFLAGS): Likewise.
13550         (gpt_mod_LDFLAGS): Likewise.
13552         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
13554         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
13555         New macro.
13557         * partmap/gpt.c: New file.
13559         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
13560         GPT partition map is detected.
13562 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
13564         * commands/i386/pc/play.c: New file.
13565         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
13566         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
13567         macros.
13569 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
13571         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
13572         ((unused))' to silence gcc warning.
13574 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
13576         * configure.ac: Correct `AC_PROG_YACC' test.
13578 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13580         * util/powerpc/ieee1275/grub-install.in: Run the mount point
13581         check before installing files.
13583 2005-11-22  Mike Small  <smallm@panix.com>
13585         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
13586         number regex so multidigit numbers are recognized correctly.
13588 2005-11-22  Mike Small  <smallm@panix.com>
13590         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
13591         debugging message before attempting to claim memory.
13592         (grub_rescue_cmd_initrd): Add a claim debugging message and try
13593         multiple addresses in case of failure.
13595 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13597         * term/tparm.c (get_space): Remove empty `if' statement.
13599         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
13601         * kern/parser.c (check_varstate): Rename `state' to 's'.
13603 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13605         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
13606         variable definitions to the beginning of each function.  Sort stack
13607         variables by size.
13608         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
13609         `buf' argument to `char *'.
13611 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
13613         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
13614         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13615         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13616         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13617         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13618         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13619         configfile.mod, search.mod, gzio.mod and test.mod.
13620         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13621         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13622         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13623         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13624         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13625         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13626         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13627         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13628         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13629         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13630         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13631         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13632         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13633         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13634         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13635         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13636         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13637         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13638         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13639         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13640         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13641         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13642         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
13644         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
13645         `grep --include'.
13646         (pkgdata_MODULES): Add test.mod.
13648 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13650         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
13651         appending to variables with "+=".
13652         (PModule): Use full pathname to generate *.lst filenames.
13654         * Makefile.in: Fixed list rules moved from genmk.rb.
13655         (.DELETE_ON_ERROR): New special target.
13656         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
13658         * conf/i386-pc.rmk: Include conf/common.mk.
13659         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
13660         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
13661         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
13662         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
13663         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
13664         configfile.mod, search.mod, gzio.mod and test.mod.
13665         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
13666         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
13667         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
13668         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
13669         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
13670         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
13671         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
13672         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
13673         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
13674         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
13675         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
13676         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
13677         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
13678         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
13679         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
13680         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
13681         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
13682         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
13683         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
13684         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
13685         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
13686         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
13687         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
13688         here...
13689         * conf/common.rmk: ... to here.  New file.
13691         * conf/common.mk: New file.
13693 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
13695         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
13696         (grub_script.tab.c): ... here.
13698         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
13699         (grub_script.tab.c): ... here.
13701         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
13702         (grub_script.tab.c): ... here.
13704         * normal/command.c (grub_command_find): Fixed a memory leak of
13705         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
13707 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13709         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
13710         "@" which marks the start of a comment on ARM.
13711         (VARIABLE): Likewise.
13713 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
13715         Add support for Linux/ADFS partition tables.
13717         * partmap/acorn.c: New file.
13719         * include/grub/acorn_filecore.h: Likewise.
13721         * DISTLIST: Added `partmap/acorn.c' and
13722         `include/grub/acorn_filecore.h'.
13724         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13725         `partmap/acorn.c'.
13726         (pkgdata_MODULES): Add `acorn.mod'.
13727         (acorn_mod_SOURCES): New variable.
13728         (acorn_mod_CFLAGS): Likewise.
13730         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13731         `partmap/acorn.c'.
13732         (pkgdata_MODULES): Add `acorn.mod'.
13733         (acorn_mod_SOURCES): New variable.
13734         (acorn_mod_CFLAGS): Likewise.
13736         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
13737         (pkgdata_MODULES): Add `acorn.mod'.
13738         (acorn_mod_SOURCES): New variable.
13739         (acorn_mod_CFLAGS): Likewise.
13740         (acorn_mod_LDFLAGS): Likewise.
13742         * include/types.h (grub_disk_addr_t): New typedef.
13744 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
13746         * geninit.sh: New file.
13748         * geninitheader.sh: Likewise.
13750         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
13751         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
13752         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
13753         * commands/configfile.c (grub_configfile_init)
13754         (grub_configfile_fini): Likewise.
13755         * commands/default.c (grub_default_init, grub_default_fini):
13756         Likewise.
13757         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
13758         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
13759         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
13760         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
13761         Likewise.
13762         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
13763         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
13764         Likewise.
13765         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
13766         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
13767         Likewise.
13768         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
13769         Likewise.
13770         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
13771         Likewise.
13772         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
13773         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
13774         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
13775         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
13776         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
13777         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
13778         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
13779         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
13780         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
13781         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
13782         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
13783         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
13784         * partmap/amiga.c (grub_amiga_partition_map_init)
13785         (grub_amiga_partition_map_fini): Likewise.
13786         * partmap/apple.c (grub_apple_partition_map_init)
13787         (grub_apple_partition_map_fini): Likewise.
13788         * partmap/pc.c (grub_pc_partition_map_init)
13789         (grub_pc_partition_map_fini): Likewise.
13790         * partmap/sun.c (grub_sun_partition_map_init,
13791         grub_sun_partition_map_fini): Likewise.
13792         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
13793         Likewise.
13795         * util/grub-emu.c: Include <grub_modules_init.h>.
13796         (main): Don't initialize and de-initialize any modules directly,
13797         use `grub_init_all' and `grub_fini_all' instead.
13799         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
13800         `grub_vesafb_mod_init'.
13801         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
13802         all users.
13803         * term/i386/pc/vga.c (grub_vga_init): Renamed to
13804         `grub_vga_mod_init'.  Updated all users.
13805         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
13807         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
13808         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
13809         rules.
13811         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
13812         Generate a function to initialize the module in utilities.
13813         Updated all callers.
13814         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
13815         initialize the module in utilities.  Updated all callers.
13817 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13819         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
13820         escape sequence and a literal ^L to clear the screen.
13822         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
13823         when returning from Open Firmware.
13825 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
13827         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
13828         (grub_ofconsole_height): Likewise.
13829         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
13830         manually insert a '\n'.
13831         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
13832         `grub_ofconsole_height'.  Return early if these are already set.
13834 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
13836         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
13837         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
13838         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
13839         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
13840         and `normal/script.c'.
13841         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13842         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13843         (test_mod_SOURCES): New variable.
13844         (test_mod_CFLAGS): Likewise.
13845         (test_mod_LDFLAGS): Likewise.
13846         (pkgdata_MODULES): Add `test.mod'.
13847         (grub_script.tab.c): New rule.
13848         (grub_script.tab.h): Likewise.
13850 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
13852         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
13853         `commands/test.c', `normal/execute.c', `normal/lexer.c',
13854         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13855         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13856         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13857         (test_mod_SOURCES): New variable.
13858         (test_mod_CFLAGS): Likewise.
13859         (pkgdata_MODULES): Add `test.mod'.
13860         (grub_script.tab.c): New rule.
13861         (grub_script.tab.h): Likewise.
13863 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
13865         Add initial scripting support.
13867         * commands/test.c: New file.
13868         * include/grub/script.h: Likewise.
13869         * normal/execute.c: Likewise.
13870         * normal/function.c: Likewise.
13871         * normal/lexer.c: Likewise.
13872         * normal/parser.y: Likewise.
13873         * normal/script.c: Likewise.
13875         * configure.ac: Add `AC_PROG_YACC' test.
13877         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
13878         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
13879         `normal/function.c' and `normal/script.c'.
13880         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
13881         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
13882         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
13883         variables.
13884         (pkgdata_MODULES): Add `test.mod'.
13885         (grub_script.tab.c): New rule.
13886         (grub_script.tab.h): Likewise.
13888         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
13890         * include/grub/normal.h (grub_test_init): New prototype.
13891         (grub_test_fini): Likewise.
13893         * normal/command.c: Include <grub/script.h>.
13894         (grub_command_execute): Rewritten.
13896         * util/grub-emu.c (main): Call `grub_test_init' and
13897         `grub_test_fini'.
13899 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13901         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
13902         to 0.
13903         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
13904         there are no pending characters.
13906 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13908         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
13909         `grub_strndup' to drop device arguments. Replace unnecessary
13910         `grub_strndup' with `grub_strdup'.
13912 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
13914         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
13915         `debug' environment variable has been set.
13917 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
13919         * Makefile.in (install-local): Use $(DATA).
13920         (uninstall): Likewise.
13921         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
13922         (sbin_UTILITIES): ... to here.
13923         (sbin_SCRIPTS): New variable.
13924         (grub_install_SOURCES): New variable.
13925         * util/powerpc/ieee1275/grub-install.in: New file.
13926         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
13927         variable.
13928         (add_segments): Call `grub_util_get_path'.
13930 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
13932         From Timothy Baldwin:
13933         * commands/ls.c (grub_ls_list_files): Close FILE with
13934         grub_file_close.
13935         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
13937 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
13939         * include/grub/parser.h: New file.
13941         * kern/parser.c: Likewise.
13943         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
13944         (grub_setup_SOURCES): Likewise.
13945         (grub_probefs_SOURCES): Likewise.
13946         (grub_emu_SOURCES): Likewise.
13947         (kernel_img_HEADERS): Add `parser.h'.
13949         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13950         (grub_emu_SOURCES): Add `kern/parser.c'.
13951         (grubof_SOURCES): Likewise.
13953         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
13954         (grubof_SOURCES): Add `kern/parser.c'.
13956         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
13958         * kern/misc.c (grub_split_cmdline): Removed function.
13960         * kern/rescue.c: Include <grub/parser.h>.
13961         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
13962         of `grub_split_cmdline'.
13964         * normal/command.c: Include <grub/parser.h>.
13965         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
13966         of `grub_split_cmdline'.
13968         * normal/completion.c: Include <grub/parser.h>.
13969         (cmdline_state): New variable.
13970         (iterate_dir): End the filename with a quote depending on the
13971         command line state.
13972         (get_state): new function.
13973         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
13974         split the arguments and determine the current argument.  When the
13975         argument string is not quoted, escape all spaces.
13977 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13979         * normal/sparc64/setjmp.S: New file.
13981 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13983         * include/grub/sparc64/libgcc.h: New file.
13984         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
13985         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
13986         normal/sparc64/setjmp.c.
13988 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
13990         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
13991         * kern/sparc64/cache.S: New file.
13992         * kern/sparc64/cache.c: Removed.
13993         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
13994         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
13995         -mtune=ultrasparc.
13996         (COMMON_LDFLAGS): Add -melf64_sparc.
13997         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
13998         (grubof_SOURCES): Use cache.S instead of cache.c.
13999         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14000         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14001         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14002         commented though.
14003         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14004         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14005         (linux_mod_CFLAGS): Commented out.
14006         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14007         out because module isn't built.
14008         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14009         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14010         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14011         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14012         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14013         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14014         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14015         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14016         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14017         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14018         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14019         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14020         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14021         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14023 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14025         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14026         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14027         longer, because HFS should not be used on PC.
14029 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14031         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14032         consistently within the loop.
14034 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14036         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14037         directory can not be read.
14039 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14041         * configure.ac (AC_INIT): Increase the version number to 1.91.
14043         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14044         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14045         term/i386/pc/serial.c.
14047 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14049         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14050         file size must be permitted.
14052         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14053         between %ah and %al.
14055 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14057         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14058         grub_uint64_t.
14059         Call the hook with a NUL-terminated filename.
14060         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14061         grub_cpu_to_be32.
14063         * kern/term.c (cursor_state): New variable.
14064         (grub_term_set_current): Reset the cursor state on a new
14065         terminal.
14066         (grub_setcursor): Rewritten to use CURSOR_STATE.
14067         (grub_getcursor): New function.
14069         * include/grub/term.h (grub_getcursor): New prototype.
14071         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14072         integers on ARM. Reported by Timothy Baldwin
14073         <T.E.Baldwin99@members.leeds.ac.uk>.
14075 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14077         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14078         allocated.
14079         (grub_sfs_dir): Likewise.
14081 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14083         Add support for the SFS filesystem.
14085         * fs/sfs.c: New file.
14087         * DISTLIST: Added `fs/sfs.c'.
14089         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14090         (grub_probefs_SOURCES): Likewise.
14091         (grub_emu_SOURCES): Likewise.
14092         (pkgdata_MODULES): Add `sfs.mod'.
14093         (sfs_mod_SOURCES): New variable.
14094         (sfs_mod_CFLAGS): Likewise.
14095         (sfs_mod_LDFLAGS): Likewise.
14097         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14098         (pkgdata_MODULES): Add `sfs.mod'.
14099         (sfs_mod_SOURCES): New variable.
14100         (sfs_mod_CFLAGS): Likewise.
14102         * util/grub-emu.c (main): Call `grub_sfs_init' and
14103         `grub_sfs_fini'.
14105         * include/grub/fs.h (grub_sfs_init): New prototype.
14106         (grub_sfs_fini): Likewise.
14108 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14110         Add support for the AFFS filesystem.
14112         * fs/affs.c: New file.
14114         * DISTLIST: Added `fs/affs.c'.
14116         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14117         (grub_probefs_SOURCES): Likewise.
14118         (grub_emu_SOURCES): Likewise.
14119         (pkgdata_MODULES): Add `affs.mod'.
14120         (affs_mod_SOURCES): New variable.
14121         (affs_mod_CFLAGS): Likewise.
14122         (affs_mod_LDFLAGS): Likewise.
14124         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14125         (pkgdata_MODULES): Add `affs.mod'.
14126         (affs_mod_SOURCES): New variable.
14127         (affs_mod_CFLAGS): Likewise.
14129         * util/grub-emu.c (main): Call `grub_affs_init' and
14130         `grub_affs_fini'.
14132         * include/grub/fs.h (grub_affs_init): New prototype.
14133         (grub_affs_fini): Likewise.
14135 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14137         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14139 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14141         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14142         `-m32' to CFLAGS.
14144         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14145         linking.
14147         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14148         (COMMON_LDFLAGS): New variable.
14149         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14150         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14151         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14152         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14153         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14154         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14155         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14156         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14157         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14158         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14159         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14160         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14161         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14162         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14163         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14164         variables.
14165         (normal_mod_ASFLAGS): Add `-m32'.
14167         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14168         (grub_host_size_t, grub_host_ssize_t): New types.
14169         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14170         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14171         `GRUB_HOST_SIZEOF_VOID_P'.
14173         * include/grub/kernel.h (struct grub_module_header): Type of
14174         member offset changed to `grub_host_off_t'.  Type of member size
14175         changed to `grub_host_size_t'.
14176         (struct grub_module_info): Type of member offset changed to
14177         `grub_host_off_t'.  Type of member size changed to
14178         `grub_host_size_t'.
14180 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14182         Make GRUB's kernel compliant to Multiboot Specification.
14184         * kern/i386/pc/startup.S (multiboot_header): New label.
14185         (multiboot_entry): Likewise.
14186         (multiboot_trampoline): Likewise.
14188         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14189         Increased to 0x4A0.
14191         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14192         put parentheses after a question mark.
14193         [!GRUB_UTIL] (my_mod): New variable.
14195         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14197 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14199         Adds support for the XFS filesystem.  Btrees are not supported
14200         yet.
14202         * fs/xfs.c: New file.
14204         * DISTLIST: Added `fs/xfs.c'.
14206         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14207         (grub_probefs_SOURCES): Likewise.
14208         (grub_emu_SOURCES): Likewise.
14209         (pkgdata_MODULES): Add `xfs.mod'.
14210         (xfs_mod_SOURCES): New variable.
14211         (xfs_mod_CFLAGS): Likewise.
14213         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14214         (pkgdata_MODULES): Add `xfs.mod'.
14215         (xfs_mod_SOURCES): New variable.
14216         (xfs_mod_CFLAGS): Likewise.
14218         * util/grub-emu.c (main): Call `grub_xfs_init' and
14219         `grub_xfs_fini'.
14221         * include/grub/fs.h (grub_xfs_init): New prototype.
14222         (grub_xfs_fini): Likewise.
14225 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14227         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14228         color modes, allow greater than 16 colors to be configured as
14229         a default palette.
14231 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14233         * normal/completion.c (complete_arguments): Add the qualifier
14234         const into OPTIONS.
14236         From Omniflux <omniflux+lists@omniflux.com>:
14237         * include/grub/terminfo.h: New file.
14238         * include/grub/tparm.h: Likewise.
14239         * include/grub/i386/pc/serial.h: Likewise.
14240         * term/terminfo.c: Likewise.
14241         * term/tparm.c: Likewise.
14242         * term/i386/pc/serial.c: Likewise.
14243         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14244         serial.mod.
14245         (terminfo_mod_SOURCES): New variable.
14246         (terminfo_mod_CFLAGS): Likewise.
14247         (serial_mod_SOURCES): Likewise.
14248         (serial_mod_CFLAGS): Likewise.
14250 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14252         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14253         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14254         and kern/powerpc/ieee1275/cmain.c, respectively.
14256         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14257         * kern/powerpc/ieee1275/crt0.S: ... here.
14259         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14260         * kern/powerpc/ieee1275/cmain.c: ... here.
14262         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14263         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14264         instead of boot/powerpc/ieee1275/crt0.S and
14265         boot/powerpc/ieee1275/cmain.c, respectively.
14267         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14268         sectors. It was not used anyway.
14270 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14272         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14273         `unused parameter' warning.
14275 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14277         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14278         function.
14279         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14280         getcharwidth.
14282 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14284         * include/grub/normal.h (enum grub_completion_type): Added
14285         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14287         * normal/cmdline.c (print_completion): Handle
14288         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14289         * normal/menu_entry.c (store_completion): Likewise.
14291         * normal/completion.c (complete_arguments): New function.
14292         (grub_normal_do_completion): Call `complete_arguments' when the
14293         current words start with a dash.
14295 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14297         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14298         `gzio.mod' instead of `io.mod').
14300 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14302         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14303         (DISTDIRS): Added io and video.
14304         Rewrite the search routine to make an output consistently.
14306         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14307         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14308         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14309         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14310         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14311         util/powerpc/ieee1275/misc.c.
14313         * include/grub/gzio.h: New file.
14314         * io/gzio.c: Likewise.
14316         * kern/file.c (grub_file_close): Call grub_device_close only if
14317         FILE->DEVICE is not NULL.
14319         * include/grub/mm.h [!NULL] (NULL): New macro.
14321         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14323         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14324         (pkgdata_MODULES): Added gzio.mod.
14325         (gzio_mod_SOURCES): New variable.
14326         (gzio_mod_CFLAGS): Likewise.
14328         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14329         (pkgdata_MODULES): Added gzio.mod.
14330         (gzio_mod_SOURCES): New variable.
14331         (gzio_mod_CFLAGS): Likewise.
14333         * commands/cat.c: Include grub/gzio.h.
14334         (grub_cmd_cat): Use grub_gzfile_open instead of
14335         grub_file_open.
14337         * commands/cmp.c: Include grub/gzio.h.
14338         (grub_cmd_cmp): Use grub_gzfile_open instead of
14339         grub_file_open.
14341         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14342         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14343         grub_file_open.
14344         (grub_rescue_cmd_module): Likewise.
14346 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14348         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14349         kern/sparc64/ieee1275/init.c because it contains _start.
14350         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14352 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14354         * configure.ac: Add support for sparc64 host with ieee1275
14355         firmware.
14356         * configure: Generated from configure.ac.
14357         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14358         instead of int.
14359         (grub_ofdisk_read): Likewise.
14360         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14361         pointers as (void *) to remove a warning.
14362         (grub_ofdisk_close): Likewise.
14363         (grub_ofdisk_read): Likewise.
14364         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14365         returns, so make it return void to remove a warning.
14366         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14367         Corresponding prototype change.
14368         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14369         values, and cast the pointers as (void *) to remove a warning.
14370         (grub_mm_dump): Likewise.
14371         * conf/sparc64-ieee1275.mk: New file.
14372         * conf/sparc64-ieee1275.rmk: Likewise.
14373         * include/grub/sparc64/setjmp.h: Likewise.
14374         * include/grub/sparc64/types.h: Likewise.
14375         * include/grub/sparc64/ieee1275/console.h: Likewise.
14376         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14377         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14378         * include/grub/sparc64/ieee1275/time.h: Likewise.
14379         * kern/sparc64/cache.c: Likewise.
14380         * kern/sparc64/dl.c: Likewise.
14381         * kern/sparc64/ieee1275/init.c: Likewise.
14382         * kern/sparc64/ieee1275/openfw.c: Likewise.
14384 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14386         * util/console.c (grub_ncurses_putchar): If C is greater than
14387         0x7f, set C to a question mark.
14388         (grub_ncurses_getcharwidth): New function.
14389         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14390         getcharwidth.
14392         * normal/menu.c (print_entry): Made aware of Unicode. First,
14393         convert TITLE to UCS-4, and predict the cursor position by
14394         grub_getcharwidth.
14396         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14397         const to SRC.
14398         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14400 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14402         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14403         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14404         grub_strcat.
14406         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14407         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14408         grub_strcpy and grub_strlen. Take it into account that a space
14409         character is inserted as a delimiter.
14411 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14413         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14414         invalid magic in the error.
14416         * commands/search.c: New file.
14418         * util/grub-emu.c (main): Call grub_search_init and
14419         grub_search_fini.
14421         * kern/rescue.c (grub_rescue_print_disks): Removed.
14422         (grub_rescue_print_devices): New function.
14423         (grub_rescue_cmd_ls): Use grub_device_iterate with
14424         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14425         grub_rescue_print_disks.
14427         * kern/partition.c (grub_partition_iterate): Return the result of
14428         PARTMAP->ITERATE instead of GRUB_ERRNO.
14430         * kern/device.c: Include grub/partition.h.
14431         (grub_device_iterate): New function.
14433         * include/grub/partition.h (grub_partition_iterate): Return int
14434         instead of grub_err_t.
14436         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14437         prototype.
14438         [GRUB_UTIL] (grub_search_fini): Likewise.
14440         * include/grub/device.h (grub_device_iterate): New prototype.
14442         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14443         commands/search.c.
14444         (pkgdata_MODULES): Added search.mod.
14445         (search_mod_SOURCES): New variable.
14446         (search_mod_CFLAGS): Likewise.
14448         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14449         (pkgdata_MODULES): Added search.mod.
14450         (search_mod_SOURCES): New variable.
14451         (search_mod_CFLAGS): Likewise.
14453         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14454         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14455         All callers changed.
14457         * DISTLIST: Added commands/search.c.
14459 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14461         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14462         conversion.
14463         (grub_getcharwidth): New function.
14465         * kern/misc.c (grub_utf8_to_ucs4): New function.
14467         * include/grub/term.h (struct grub_term): Added a new member
14468         "getcharwidth".
14469         (grub_getcharwidth): New prototype.
14471         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
14473         * term/i386/pc/console.c (map_char): New function. Segregated from
14474         grub_console_putchar.
14475         (grub_console_putchar): Use map_char.
14476         (grub_console_getcharwidth): New function.
14477         (grub_console_term): Specified grub_console_getcharwidth as
14478         getcharwidth.
14480         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
14481         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
14483         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
14484         GRUB_ERRNO.
14485         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
14486         on grub_strtoul completely.
14487         (write_char): Declare local variables in the beginning of the
14488         function.
14489         (grub_vesafb_getcharwidth): New function.
14490         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
14491         getcharwidth.
14493 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
14495         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
14496         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
14497         commands/i386/pc/vbetest.c.
14499         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
14500         call grub_vbe_get_controller_info again, because the returned
14501         information is volatile.
14502         (grub_vbe_set_video_mode): Mostly rewritten.
14503         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
14504         grub_vbe_status_t correctly.
14505         (grub_vbe_get_video_mode_info): Likewise.
14506         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
14507         several if statements.
14509         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
14510         * commands/i386/pc/vbeinfo.c: ... this.
14512         * commands/i386/pc/vbe_test.c: Renamed to ...
14513         * commands/i386/pc/vbetest.c: ... this.
14515         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
14516         ...
14517         (grub_cmd_vbeinfo): ... this. Save video modes before
14518         iterating. Skip a video mode, if it is not available, not enough
14519         information is given or it is monochrome. Show the memory
14520         model. Leave the interpretation of MODEVAR to grub_strtoul
14521         completely.
14522         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
14523         (GRUB_MOD_FINI): Likewise.
14525         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
14526         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
14527         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
14528         duplicated grub_env_get. Leave the interpretation of MODEVAR to
14529         grub_strtoul completely.
14530         (real2pm): Removed.
14531         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
14532         (GRUB_MOD_FINI): Likewise.
14534         * normal/misc.c: Include grub/mm.h.
14536         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
14537         vbe_list_modes with vbetest.mod and vbeinfo.mod.
14538         (vbe_list_modes_mod_SOURCES): Removed.
14539         (vbe_list_modes_mod_CFLAGS): Likewise.
14540         (vbe_test_mod_SOURCES): Likewise.
14541         (vbe_test_mod_CFLAGS): Likewise.
14542         (vbeinfo_mod_SOURCES): New variable.
14543         (vbeinfo_mod_CFLAGS): Likewise.
14544         (vbetest_mod_SOURCES): Likewise.
14545         (vbetest_mod_CFLAGS): Likewise.
14547 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
14549         * normal/misc.c: New file.
14551         * DISTLIST: Added normal/misc.c.
14553         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
14554         DISK to HOOK. Call HOOK with DISK.
14555         * partmap/apple.c (apple_partition_map_iterate): Likewise.
14556         * partmap/pc.c (pc_partition_map_iterate): Likewise.
14557         * partmap/sun.c (sun_partition_map_iterate): Likewise.
14559         * normal/menu_entry.c (struct screen): Added a new member
14560         "completion_shown".
14561         (completion_buffer): New global variable.
14562         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
14563         (store_completion): New function.
14564         (complete): Likewise.
14565         (clear_completions): Likewise.
14566         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
14567         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
14568         a tab, call complete.
14570         * normal/completion.c (disk_dev): Removed.
14571         (print_simple_completion): Likewise.
14572         (print_partition_completion): Likewise.
14573         (print_func): New global variable.
14574         (add_completion): Do not take the arguments WHAT or PRINT any
14575         longer. Added a new argument TYPE. Instead of printing directly,
14576         call PRINT_FUNC if not NULL.
14577         All callers changed.
14578         (complete_device): Use a local variable DEV instead of
14579         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
14580         (grub_normal_do_completion): Take a new argument HOOK. Do not
14581         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
14582         empty string, return NULL instead.
14583         All callers changed.
14585         * normal/cmdline.c (print_completion): New function.
14587         * kern/partition.c (grub_partition_iterate): Add an argument DISK
14588         to HOOK.
14589         All callers changed.
14591         * kern/disk.c (grub_print_partinfo): Removed.
14593         * include/grub/partition.h (struct grub_partition_map): Add a new
14594         argument DISK into HOOK of ITERATE.
14595         (grub_partition_iterate): Add a new argument DISK to HOOK.
14597         * include/grub/normal.h (enum grub_completion_type): New enum.
14598         (grub_completion_type_t): New type.
14599         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
14600         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
14601         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
14602         (GRUB_COMPLETION_TYPE_FILE): Likewise.
14603         (grub_normal_do_completion): Added a new argument HOOK.
14604         (grub_normal_print_device_info): New prototype.
14606         * include/grub/disk.h (grub_print_partinfo): Removed.
14608         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
14609         (normal_mod_SOURCES): Likewise.
14610         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14611         (normal_mod_SOURCES): Likewise.
14613         * commands/ls.c (grub_ls_list_disks): Use
14614         grub_normal_print_device_info instead of grub_print_partinfo. Free
14615         PNAME.
14616         (grub_ls_list_files): Use grub_normal_print_device_info instead of
14617         duplicating the code.
14619 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14621         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
14622         follow GCS more precisely.
14623         * commands/i386/pc/vbe_test.c: Likewise.
14624         * include/grub/i386/pc/vbe.h: Likewise.
14625         * term/i386/pc/vesafb.c: Likewise.
14626         * video/i386/pc/vbe.c: Likewise.
14628 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
14630         * DISTLIST: Added term/i386/pc/vesafb.c
14631         DISTLIST: Added video/i386/pc/vbe.c
14632         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
14633         DISTLIST: Added commands/i386/pc/vbe_test.c.
14634         * commands/i386/pc/vbe_list_modes.c: New file.
14635         * commands/i386/pc/vbe_test.c: Likewise.
14636         * term/i386/pc/vesafb.c: Likewise.
14637         * video/i386/pc/vbe.c: Likewise.
14638         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
14639         (grub_vbe_probe) Added prototype.
14640         (grub_vbe_set_video_mode) Likewise.
14641         (grub_vbe_get_video_mode) Likewise.
14642         (grub_vbe_get_video_mode_info) Likewise.
14643         (grub_vbe_set_pixel_rgb) Likewise.
14644         (grub_vbe_set_pixel_index) Likewise.
14645         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
14646         (pkgdata_MODULES): Added vesafb.mod.
14647         (pkgdata_MODULES): Added vbe_list_modes.mod.
14648         (pkgdata_MODULES): Added vbe_test.mod.
14649         (vbe_mod_SOURCES): Added.
14650         (vbe_mod_CFLAGS): Likewise.
14651         (vesafb_mod_SOURCES): Likewise.
14652         (vesafb_mod_CFLAGS): Likewise.
14653         (vbe_list_modes_mod_SOURCES): Likewise.
14654         (vbe_list_modes_mod_CFLAGS): Likewise.
14655         (vbe_test_mod_SOURCES): Likewise.
14656         (vbe_test_mod_CFLAGS): Likewise.
14658 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
14660         * normal/command.c (grub_command_execute): If INTERACTIVE is
14661         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
14662         CMDLINE. Disable the pager if INTERACTIVE is true.
14663         All callers are changed.
14665         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
14666         before reading a config file.
14667         * normal/main.c (read_config_file): Even if a command is not
14668         found, register it if it is within an entry.
14670         * util/grub-emu.c: Include sys/types.h and unistd.h.
14671         (options): Added --hold.
14672         (struct arguments): Added a new member "hold".
14673         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
14674         missing.
14675         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
14676         cleared by a debugger, if it is not zero.
14678         * include/grub/normal.h (grub_command_execute): Add an argument
14679         INTERACTIVE.
14681 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
14683         * DISTLIST: Added include/grub/i386/pc/vbe.h.
14685 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
14687         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
14688         program with another one, because the old one didn't detect a bug
14689         in gcc-3.4. Always use regparm 2, because the new test is still
14690         not enough for gcc-4.0. Someone must investigate a simple test
14691         case which detects a bug in gcc-4.0.
14693 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
14695         * DISTLIST: Added normal/completion.c.
14697         * normal/completion.c: New file.
14699         * term/i386/pc/console.c (grub_console_getwh): New function.
14700         (grub_console_term): Assign grub_console_getwh to getwh.
14702         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
14703         function is defined in normal/completion.c as
14704         grub_normal_do_completion.
14705         (grub_cmdline_get): Use grub_normal_do_completion instead of
14706         grub_tab_complete.
14708         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
14709         returns non-zero, otherwise return 0.
14710         (grub_partition_iterate): First, probe the partition map. Then,
14711         call ITERATE only for this partition map.
14713         * kern/misc.c (grub_strncmp): Rewritten.
14715         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
14716         returns non-zero. Otherwise return 0.
14718         * include/grub/partition.h (grub_partition_map_iterate): Return
14719         int instead of void.
14721         * include/grub/normal.h (grub_normal_do_completion): New prototype.
14723         * include/grub/misc.h (grub_strncmp): Change the type of N to
14724         grub_size_t.
14726         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
14727         of void.
14729         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
14730         unsigned explicitly before comparing it with I.
14732         * kern/main.c (grub_env_write_root): Add the attribute unused into
14733         VAR.
14735         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14736         normal/completion.c.
14737         (normal_mod_SOURCES): Likewise.
14738         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
14739         (normal_mod_SOURCES): Likewise.
14741         * normal/command.c (grub_iterate_commands): If ITERATE returns
14742         non-zero, return one immediately.
14744 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
14746         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
14747         * kern/i386/pc/startup.S: Updated Global Descriptor table's
14748         descriptions.
14749         (grub_vbe_get_controller_info): New function.
14750         (grub_vbe_get_mode_info): Likewise.
14751         (grub_vbe_set_mode): Likewise.
14752         (grub_vbe_get_mode): Likewise.
14753         (grub_vbe_set_memory_window): Likewise.
14754         (grub_vbe_get_memory_window): Likewise.
14755         (grub_vbe_set_scanline_length): Likewise.
14756         (grub_vbe_get_scanline_length): Likewise.
14757         (grub_vbe_set_display_start): Likewise.
14758         (grub_vbe_get_display_start): Likewise.
14759         (grub_vbe_set_palette_data): Likewise.
14760         * include/grub/i386/pc/vbe.h: New file.
14762 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14764         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14765         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
14766         * DISTLIST: Likewise.
14767         * kern/ieee1275/of.c: Moved to ...
14768         * kern/ieee1275/ieee1275.c: ... here.
14770 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14772         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
14773         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
14774         Pass 0 as `end' parameter to grub_strtoul().
14776 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
14778         * include/grub/powerpc/ieee1275/console.h: Do not include
14779         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
14780         ifdef.
14781         (grub_console_cur_color): Remove i386-specific prototype.
14782         (grub_console_real_putchar): Likewise.
14783         (grub_console_checkkey): Likewise.
14784         (grub_console_getkey): Likewise.
14785         (grub_console_getxy): Likewise.
14786         (grub_console_gotoxy): Likewise.
14787         (grub_console_cls): Likewise.
14788         (grub_console_setcursor): Likewise.
14789         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
14790         Include <grub/machine/console.h>.
14791         * term/ieee1275/ofconsole.c: Likewise.
14793 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
14795         * Makefile.in (LIBLZO): New variable.
14797         * configure.ac: Check for LZO version 2.
14799         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
14800         lzo/lzo1x.h instead of lzo1x.h.
14802         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
14803         of -llzo.
14805         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
14806         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
14808         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
14809         copying the data from PARTITION to P.
14811 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14813         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
14814         negative, unload the module.
14816         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
14817         map is "pc_partition_map" but not "pc".
14818         (usage): Fix the description. The options are --boot-image and
14819         --core-image but not --boot-file or --core-file.
14820         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
14821         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
14822         DEFAULT_DIRECTORY.
14824         * util/i386/pc/grub-install.in: Do not specify --boot-file or
14825         --core-file. Specify INSTALL_DEVICE as an argument.
14827         * util/console.c: Include config.h.
14828         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
14829         [HAVE_NCURSES_H]: Include ncurses.h.
14830         [HAVE_CURSES_H]: Include curses.h.
14831         [!A_NORMAL] (A_NORMAL): Defined as zero.
14832         [!A_STANDOUT] (A_STANDOUT): Likewise.
14834         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
14835         -lncurses.
14836         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
14838         * configure.ac: Check for curses libraries and headers.
14840         * Makefile.in (LIBCURSES): New variable.
14842         * genmk.rb (Script::rule): Set the executable bits.
14844         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
14845         name of the PC partition map is "pc_partition_map" but not "pc".
14847 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14849         * util/i386/pc/grub-install.in (grub_probefs): New variable.
14850         (modules): Likewise.
14851         (usage): Added descriptions for --modules and --grub-probefs.
14852         Handle --modules and --grub-probefs. Save the arguments in MODULES
14853         and GRUB_PROBEFS, respectively.
14854         Auto-detect a filesystem module against GRUBDIR. If the result is
14855         empty and modules are not specified explicitly, abort the
14856         installation. Add the result to MODULES.
14858         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
14859         disk/powerpc/ieee1275/ofdisk.c,
14860         include/grub/powerpc/ieee1275/init.h and
14861         term/powerpc/ieee1275/ofconsole.c.
14862         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
14863         term/ieee1275/ofconsole.c.
14865         * include/grub/powerpc/ieee1275/console.h: Resurrected.
14867         * COPYING: Upgraded to the latest version. Only the address of the
14868         FSF office has changed.
14870 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
14872         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
14873         kern/ieee1275.c with kern/ieee1275/of.c.
14875         * kern/ieee1275.c: Moved to ...
14876         * kern/ieee1275/of.c: ... here.
14878 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
14880         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
14881         readability.
14883         * config.guess: Updated to the latest version from gnulib.
14884         * config.sub: Likewise.
14885         * install.sh: Likewise.
14886         * mkinstalldirs: Likewise.
14888         * include/grub/console.h: Removed. This file is arch-specific. Do
14889         not put this in include/grub.
14891         * include/grub/i386/pc/console.h: Resurrected.
14893         * util/console.c: Include grub/machine/console.h instead of
14894         grub/console.h.
14895         * util/grub-emu.c: Likewise.
14897 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
14899         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
14900         hardcoded value.
14902         From Vincent Pelletier  <subdino2004@yahoo.fr>
14903         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
14904         Redefined to use grub_getwh.
14905         (grub_term): New member named getwh.
14906         (grub_getwh): New prototype.
14907         * kern/term.c (grub_getwh): New function.
14908         * term/i386/pc/console.c (grub_console_getwh): New function.
14909         (grub_console_term): New member `getwh'.
14910         * term/i386/pc/vga.c (grub_vga_getwh): New function.
14911         (grub_vga_term): New member `getwh'.
14912         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
14913         grub_ssize_t.
14914         (grub_ofconsole_getw): New function.
14915         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
14916         (grub_ofconsole_term): New field named getwh and new initial
14917         value.
14919 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
14921         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
14922         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
14923         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
14924         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
14925         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
14926         of <grub/machine/ieee1275.h>.
14927         * commands/ieee1275/reboot.c: Likewise.
14928         * boot/powerpc/ieee1275/ieee1275.c: Move ...
14929         * kern/ieee1275.c: ... to here.  All users updated.  Change all
14930         parameter structs to use new type `grub_ieee1275_cell_t'.
14931         * term/powerpc/ieee1275/ofconsole.c: Move ...
14932         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
14933         * disk/powerpc/ieee1275/ofdisk.c: Move ...
14934         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
14935         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
14936         to return int.
14937         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
14938         Remove unused prototypes.  All users updated.
14939         * include/grub/powerpc/ieee1275/console.h: Removed.
14940         * include/grub/powerpc/ieee1275/ieee1275.h: Define
14941         `grub_ieee1275_cell_t'.
14942         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
14943         Cast comparisons with -1 to the correct type.
14944         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
14945         type to match `grub_ieee1275_entry_fn'.
14947 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
14949         * DISTLIST: Added util/i386/pc/grub-probefs.c.
14951         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
14952         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
14953         partmap/sun.c.
14954         (grub_probefs_SOURCES): New variable.
14956         * util/i386/pc/grub-probefs.c: New file.
14958         * util/i386/pc/grub-setup.c (main): Call
14959         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
14960         grub_hfs_init and grub_jfs_init to initialize the system. Call
14961         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
14962         grub_pc_partition_map_fini to finish the system.
14964 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
14966         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
14967         function.
14968         (grub_multiboot_load_elf32): Likewise.
14969         (grub_multiboot_is_elf64): Likewise.
14970         (grub_multiboot_load_elf64): Likewise.
14971         (grub_multiboot_load_elf): Likewise.
14972         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
14973         an ELF32 or ELF64 file.
14974         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
14976         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
14977         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
14978         NULL before calling FS->LABEL.
14979         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
14980         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
14981         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
14982         before calling FS->LABEL.
14984 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
14986         * util/i386/pc/grub-install.in (datadir): New variable.
14987         (libdir): Removed.
14988         (pkgdatadir): New variable.
14989         (pkglibdir): Removed.
14991 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
14993         * DISTLIST: Added util/i386/pc/grub-install.in.
14995         * util/i386/pc/grub-install.in: New file.
14997         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
14998         (grub_install_SOURCES): Likewise.
15000         * genmk.rb: Added support for scripts.
15001         (Script): New class.
15002         (scripts): New variable.
15004         * Makefile.in (install-local): Install sbin_SCRIPTS by
15005         INSTALL_SCRIPT.
15006         (uninstall): Remove sbin_SCRIPTS.
15008         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15009         device, try to get a GRUB device by
15010         grub_util_biosdisk_get_grub_dev.
15011         Free DEST_DEV.
15013         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15014         description for --device-map.
15016 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15018         Change the semantics of variable hooks. They now return strings
15019         instead of error values.
15021         * util/i386/pc/grub-setup.c: Include grub/env.h.
15022         (setup): Use grub_device_set_root instead of grub_env_set.
15024         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15025         grub_env_get instead of grub_device_set_root and
15026         grub_device_get_root, respectively.
15028         * kern/main.c (grub_env_write_root): New function.
15029         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15030         grub_env_set instead of grub_device_set_root.
15032         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15033         many variables.
15034         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15035         rather than calling ENV->WRITE_HOOK afterwards.
15036         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15037         passing a pointer of a pointer.
15038         (grub_register_variable_hook): Change the types of "read_hook" and
15039         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15040         respectively.
15041         Allocate the default empty string on the heap, because this string
15042         may be freed later.
15044         * kern/device.c: Include grub/env.h.
15045         (grub_device_set_root): Removed.
15046         (grub_device_get_root): Likewise.
15047         (grub_device_open): Use grub_env_get instead of
15048         grub_device_get_root.
15050         * include/grub/env.h (grub_env_read_hook_t): New type.
15051         (grub_env_write_hook_t): Likewise.
15052         (grub_env_var): Change the types of "read_hook" and "write_hook"
15053         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15054         (grub_register_variable_hook): Likewise.
15056         * include/grub/device.h (grub_device_set_root): Removed.
15057         (grub_device_set_root): Likewise.
15059         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15060         make sure that DIRNAME terminates with '/', so that
15061         grub_fat_find_dir will fail if PATH is not a directory.
15063         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15064         from DIRNAME.
15065         Use the qualifier auto for print_files and print_files_long.
15066         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15067         as a regular file.
15068         Put a newline only if there is no error.
15069         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15070         used.
15072 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15074         * kern/partition.c (grub_partition_probe): Initialize PART to
15075         NULL. Otherwise, when no partition map is registered, this returns
15076         a garbage.
15078 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15080         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15081         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15082         valid.
15084 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15086         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15087         information on each device, if it does not have partitions. Print
15088         "Device" instead of "Disk", because this function is not specific
15089         to disk devices.
15091         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15092         static to ensure that it is put on the memory rather than a
15093         register.
15095 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15097         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15098         (grub_cat_init): Likewise.
15099         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15100         (options): Likewise.
15101         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15102         (grub_configfile_init): Likewise.
15103         * font/manager.c (GRUB_MOD_INIT): Likewise.
15104         * commands/help.c (GRUB_MOD_INIT): Likewise.
15105         (grub_help_init): Likewise.
15106         * normal/command.c (grub_command_init): Likewise.
15107         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15108         * disk/loopback.c (grub_loop_init): Likewise.
15109         (GRUB_MOD_INIT): Likewise.
15110         * commands/ls.c (grub_ls_init): Likewise.
15111         (GRUB_MOD_INIT): Likewise.
15112         (options): Likewise.
15113         * commands/boot.c (grub_boot_init): Likewise.
15114         (GRUB_MOD_INIT): Likewise.
15115         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15116         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15117         (GRUB_MOD_INIT): Likewise.
15118         * commands/cmp.c (grub_cmp_init): Likewise.
15119         (GRUB_MOD_INIT): Likewise.
15121         * normal/arg.c: Use <> instead of "" to include header files.
15122         (SHORT_ARG_HELP): New macro.
15123         (SHORT_ARG_USAGE): Likewise.
15124         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15125         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15126         descriptions.
15127         (find_short): Check if C is 'h' or 'u' explicitly.
15128         (grub_arg_show_help): Use space characters instead of tabs. Treat
15129         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15130         are shown with --help and --usage only if they are not used for
15131         the command itself.
15132         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15133         'h' and 'u'.
15135         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15136         const into "longarg". Change the type of "shortarg" to int.
15138 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15140         * boot/i386/pc/boot.S (boot_drive_check): New label.
15142         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15143         macro.
15145         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15146         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15148 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15150         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15151         When turning off Gate A20, skip the check and return immediately,
15152         because this is not fatal usually.
15154 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15156         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15157         be 0x7C00 instead of 0x8000.
15159         * boot/i386/pc/pxeboot.S: Rewritten.
15161         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15162         EXT_C.
15163         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15164         result.
15166 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15168         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15169         robustness. This routine now supports a BIOS call and System
15170         Control Port A to modify the gate A20.
15172         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15173         Increased to 0x440.
15175 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15177         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15178         device path and resulting ihandle.
15179         (grub_ofdisk_close): dprintf the ihandle being closed.
15180         (grub_ofdisk_read): dprintf function parameters.
15181         * kern/mm.c (grub_mm_init_region): Likewise.
15182         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15183         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15184         size, and boot arguments.
15185         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15186         before loading into memory.
15187         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15188         before loading into memory.
15190 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15192         * kern/mm.c: Added much documentation.
15193         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15194         8, set to 5 instead of 8.
15196 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15198         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15200         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15201         (grub_mkdevicemap_SOURCES): New variable.
15203         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15204         lib/device.c of GRUB Legacy.
15206 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15208         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15209         instead of PATH is NULL.
15211 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15213         * commands/cmp.c (BUFFER_SIZE): New macro.
15214         (grub_cmd_cmp): Close the right file at the right time.  Compare
15215         only data just read.  Don't report files of different  size as
15216         identical.  Dynamically allocate buffers.  Move variable
15217         declarations at the beginning of function.
15219 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15221         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15222         reverse.
15224 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15226         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15227         when backspace is pressed at beginning of line.
15229 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15231         * DISTLIST: Added genfslist.sh.
15233         * normal/main.c (fs_module_list): New variable.
15234         (autoload_fs_module): New function.
15235         (read_fs_list): Likewise.
15236         (grub_normal_execute): Call read_fs_list.
15238         * kern/fs.c (grub_fs_autoload_hook): New variable.
15239         (grub_fs_probe): Added support for auto-loading.
15241         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15242         (grub_fs_module_list_t): New type.
15244         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15245         (grub_fs_autoload_hook): New prototype.
15247         * genfslist.sh: New file.
15249         * genmk.rb: Added a rule to generate a filesystem list.
15251 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15253         * configure.ac: Fix the test for cross-compiling.
15255         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15256         define GRUB_UTIL anymore.
15258         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15259         so this function works on other systems than just big endian.
15260         (load_modules): Likewise.
15261         (add_segments): Likewise.
15263 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15265         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15266         contains `l' modifier, get a long from va_arg().
15268 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15270         * kern/mm.c (grub_free): If the next free block which is being
15271         merged is the first free block, set the first block to the block
15272         being freed.
15273         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15275 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15277         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15278         `grub_ieee1275_chosen'.
15280 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15282         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15283         (grub_ieee1275_chosen): New variable.
15284         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15285         `chosen'.
15286         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15287         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15288         Rename first argument to `phandle' for consistency.
15289         (grub_ieee1275_get_property_length): Likewise.
15290         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15291         to grub_ieee1275_phandle_t.
15292         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15293         Move export next to declaration.
15294         (grub_ieee1275_chosen): New variable.
15295         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15296         Correct cosmetic typo.
15297         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15298         `grub_ieee1275_chosen'.
15299         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15300         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15301         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15302         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15303         `grub_ieee1275_chosen'.
15305 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15307         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15308         /chosen/bootargs.
15309         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15310         /chosen/bootargs as "variable=value" pairs.
15312 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15314         * include/grub/misc.h (grub_dprintf): New macro.
15315         (grub_real_dprintf): New prototype.
15316         (grub_strword): Likewise.
15317         (grub_iswordseparator): Likewise.
15318         * kern/misc.c (grub_real_dprintf): New function.
15319         (grub_strword): Likewise.
15320         (grub_iswordseparator): Likewise.
15322 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15324         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15325         (roundup): Remove macro.
15326         (grub_ieee1275_flags): Make static.
15327         (grub_ieee1275_realmode): Remove.
15328         (grub_ieee1275_test_flag): New function.
15329         (grub_ieee1275_set_flag): Likewise.
15330         (find_options): Rename to `grub_ieee1275_find_options'; update
15331         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15332         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15333         (cmain): New prototype.
15334         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15335         `grub_ieee1275_flags' directly.
15336         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15337         machine/biosdisk.h.
15338         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15339         Don't include grub/machine/init.h.
15340         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15341         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15342         Remove prototype.
15343         (grub_ieee1275_realmode): Likewise.
15344         (grub_ieee1275_flag): New enum.
15345         (grub_ieee1275_test_flag): New prototype.
15346         (grub_ieee1275_set_flag): New prototype.
15347         * include/grub/powerpc/ieee1275/init.h: Remove file.
15348         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15349         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15350         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15351         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15352         comment.
15353         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15354         `grub_ieee1275_test_flag'.
15355         (grub_ieee1275_encode_devname): Likewise.
15357 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15359         * include/grub/powerpc/ieee1275/ieee1275.h
15360         (grub_ieee1275_encode_devname): New prototype.
15361         (grub_ieee1275_get_filename): Likewise.
15362         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15363         function.
15364         (grub_set_prefix): Likewise.
15365         (grub_machine_init): Call grub_set_prefix.
15366         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15367         (grub_parse_type): New enum.
15368         (grub_ieee1275_get_devargs): New function.
15369         (grub_ieee1275_get_devname): Likewise.
15370         (grub_ieee1275_parse_args): Likewise.
15371         (grub_ieee1275_get_filename): Likewise.
15372         (grub_ieee1275_encode_devname): Likewise.
15374 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15376         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15377         `grub_loader_unset'.
15379 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15381         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15382         instead of grub_ieee1275_interpret.
15383         (grub_halt_init): New function.
15384         (grub_halt_fini): Likewise.
15385         (GRUB_MOD_INIT): Correct message grammar.
15386         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15387         instead of grub_ieee1275_interpret.
15388         (grub_reboot_init): New function.
15389         (grub_reboot_fini): Likewise.
15390         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15391         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15392         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15393         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15394         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15395         function.
15396         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15397         Add prototype.
15398         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15399         prototype.
15400         (grub_halt): Likewise.
15401         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15402         (cmain): Remove __attribute__((unused)).
15403         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15404         (grub_heap_len): Likewise.
15405         (grub_machine_fini): New function.
15406         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15407         (grub_halt): Likewise.
15408         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15409         function.
15410         * util/powerpc/ieee1275/misc.c: New file.
15412 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15414         * DISTLIST: New file.
15415         * gendistlist.sh: Likewise.
15417         * Makefile.in (COMMON_DISTFILES): Removed.
15418         (BOOT_DISTFILES): Likewise.
15419         (CONF_DISTFILES): Likewise.
15420         (DISK_DISTFILES): Likewise.
15421         (FS_DISTFILES): Likewise.
15422         (INCLUDE_DISTFILES): Likewise.
15423         (KERN_DISTFILES): Likewise.
15424         (LOADER_DISTFILES): Likewise.
15425         (TERM_DISTFILES): Likewise.
15426         (UTIL_DISTFILES): Likewise.
15427         (DISTFILES): Likewise.
15428         (uninstall): Uninstall files in $(pkgdata_DATA).
15429         (DISTLIST): New target.
15430         (distdir): Use the contents of the file DISTLIST to get a list of
15431         distributed files.
15433 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15435         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15436         descriptor. This is ported from GRUB Legacy.
15438         * gencmdlist.sh: Added an extra semicolon to make it work with
15439         old sed versions. Reported by Robert Bihlmeyer
15440         <robbe@orcus.priv.at>.
15442 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15444         Automatic loading of commands is supported.
15446         * normal/main.c (read_command_list): New function.
15447         (grub_normal_execute): Call read_command_list.
15449         * normal/command.c (grub_register_command): Return zero or CMD.
15450         Allocate CMD->NAME from the heap.
15451         Initialize CMD->MODULE_NAME to zero.
15452         Find the same name as well. If the same command is found and it is
15453         a dummy command, overwrite members. If it is not a dummy command,
15454         return zero.
15455         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15456         (grub_command_find): If a dummy command is found, load a module
15457         and retry to find a command only once.
15459         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15460         make sure that each command is loaded.
15462         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15463         macro.
15464         (struct grub_command): Remove const from the member `name'.
15465         Add a new member `module_name'.
15466         (grub_register_command): Return grub_command_t.
15468         * commands/help.c (grub_cmd_help): Call grub_command_find to make
15469         sure that each command is loaded.
15471         * genmk.rb (PModule::rule): Specify a module name without the
15472         suffix ".mod" to gencmdlist.sh.
15474 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15476         * gencmdlist.sh: New file.
15478         * genmk.rb (PModule::rule): Generate a rule for a command list.
15479         Clean command.lst.
15480         Generate command.lst from $(COMMANDFILES).
15482         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
15483         (DATA): Added $(pkgdata_DATA).
15484         (install-local): Install files in $(pkgdata_DATA).
15486 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
15488         * term/i386/pc/vga.c (debug_command): Removed.
15489         (GRUB_MOD_INIT): Do not register the command "debug".
15491         From Hollis Blanchard:
15492         * commands/configfile.c: New file.
15493         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15494         commands/configfile.c.
15495         (pkgdata_MODULES): Added configfile.mod.
15496         (configfile_mod_SOURCES): New variable.
15497         (configfile_mod_CFLAGS): Likewise.
15498         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15499         commands/configfile.c.
15500         (pkgdata_MODULES): Added configfile.mod.
15501         (configfile_mod_SOURCES): New variable.
15502         (configfile_mod_CFLAGS): Likewise.
15503         * util/grub-emu.c (main): Call grub_configfile_init and
15504         grub_configfile_fini.
15505         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
15506         prototype.
15507         [GRUB_UTIL] (grub_configfile_fini): Likewise.
15509 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15511         * normal/arg.c (grub_arg_show_help): Do not show the bug report
15512         address.
15514         * commands/help.c (grub_cmd_help): Do not print newlines after
15515         the last command in print_command_help.
15517 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
15519         * commands/default.h: New file.
15520         * commands/timeout.h: Likewise.
15521         * normal/context.c: Likewise.
15523         * util/misc.c: Do not include sys/times.h.
15524         Include sys/time.h and grub/machine/time.h.
15525         (grub_get_rtc): Rewritten with gettimeofday.
15527         * util/grub-emu.c (main): Call grub_default_init and
15528         grub_timeout_init before grub_normal_init, and call
15529         grub_timeout_fini and grub_default_fini after grub_main.
15531         * util/console.c (grub_ncurses_checkkey): Return the read
15532         character or -1.
15534         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
15535         timeouts.
15537         * normal/main.c (read_config_file): Push MENU. If this fails,
15538         print an error and wait for a user input.
15539         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
15540         If a menu is empty or an error occurs, pop MENU.
15541         (grub_normal_execute): Pop and free MENU after grub_menu_run
15542         returns.
15544         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
15546         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
15547         include time.h.
15548         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15549         without GRUB_UTIL.
15550         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
15551         time.h.
15552         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
15553         without GRUB_UTIL.
15555         * include/grub/normal.h (struct grub_menu_list): New struct.
15556         (grub_menu_list_t): New type.
15557         (struct grub_context): New struct.
15558         (grub_context_t): New type.
15559         (grub_register_command): Got rid of EXPORT_FUNC.
15560         (grub_unregister_command): Likewise.
15561         (grub_context_get): New prototype.
15562         (grub_context_get_current_menu): Likewise.
15563         (grub_context_push_menu): Likewise.
15564         (grub_context_pop_menu): Likewise.
15565         [GRUB_UTIL] (grub_default_init): Likewise.
15566         [GRUB_UTIL] (grub_default_fini): Likewise.
15567         [GRUB_UTIL] (grub_timeout_init): Likewise.
15568         [GRUB_UTIL] (grub_timeout_fini): Likewise.
15570         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
15571         commands/timeout.c and normal/context.c.
15572         (pkgdata_MODULES): Added default.mod and timeout.mod.
15573         (normal_mod_SOURCES): Added normal/context.c.
15574         (default_mod_SOURCES): New variable.
15575         (default_mod_CFLAGS): Likewise.
15576         (timeout_mod_SOURCES): Likewise.
15577         (timeout_mod_CFLAGS): Likewise.
15578         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
15579         conf/i386-pc.rmk.
15580         (pkgdata_MODULES): Added default.mod and timeout.mod.
15581         (normal_mod_SOURCES): Added normal/context.c.
15582         (default_mod_SOURCES): New variable.
15583         (default_mod_CFLAGS): Likewise.
15584         (timeout_mod_SOURCES): Likewise.
15585         (timeout_mod_CFLAGS): Likewise.
15587         * Makefile.in (all-local): Added $(MKFILES).
15589 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
15591         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
15592         (grub_emu_SOURCES): Likewise.
15593         (pkgdata_MODULES): Add `sun.mod'.
15594         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15595         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15596         `partmap/sun.c'.
15597         (pkgdata_MODULES): Add `sun.mod'.
15598         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
15599         * include/grub/partition.h (grub_sun_partition_map_init): New
15600         prototype.
15601         (grub_sun_partition_map_fini): Likewise.
15602         * partmap/sun.c: New file.
15603         * util/grub-emu.c (main): Initialize and de-initialize the sun
15604         partitionmap support.
15606 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
15608         This implements an Emacs-like menu entry editor.
15610         * normal/menu_entry.c: New file.
15612         * util/console.c (grub_ncurses_putchar): Translate some Unicode
15613         characters to ASCII.
15614         (saved_char): New variable.
15615         (grub_ncurses_checkkey): Rewritten completely.
15616         (grub_ncurses_getkey): Likewise.
15617         (grub_ncurses_init): Call raw instead of cbreak.
15619         * normal/menu.c (print_entry): Do not put a space.
15620         (init_page): Renamed to ...
15621         (grub_menu_init_page): ... this. All callers changed.
15622         (edit_menu_entry): Removed.
15623         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
15625         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
15627         * kern/misc.c (grub_vprintf): Call grub_refresh.
15629         * normal/menu.c (DISP_LEFT): Renamed to ...
15630         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
15631         * normal/menu.c (DISP_UP): Renamed to ...
15632         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
15633         * normal/menu.c (DISP_RIGHT): Renamed to ...
15634         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
15635         * normal/menu.c (DISP_DOWN): Renamed to ...
15636         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
15637         * normal/menu.c (DISP_HLINE): Renamed to ...
15638         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
15639         * normal/menu.c (DISP_VLINE): Renamed to ...
15640         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
15641         * normal/menu.c (DISP_UL): Renamed to ...
15642         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
15643         * normal/menu.c (DISP_UR): Renamed to ...
15644         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
15645         * normal/menu.c (DISP_LL): Renamed to ...
15646         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
15647         * normal/menu.c (DISP_LR): Renamed to ...
15648         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
15649         * normal/menu.c (TERM_WIDTH): Renamed to ...
15650         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
15651         * normal/menu.c (TERM_HEIGHT): Renamed to ...
15652         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
15653         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
15654         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
15655         * normal/menu.c (TERM_MARGIN): Renamed to ...
15656         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
15657         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
15658         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
15659         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
15660         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
15661         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
15662         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
15663         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
15664         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
15665         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
15666         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
15667         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
15668         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
15669         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
15670         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
15671         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
15672         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
15673         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
15674         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
15675         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
15676         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
15677         All callers changed.
15679         * include/grub/normal.h: New prototype.
15681         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15682         normal/menu_entry.c.
15683         (normal_mod_SOURCES): Likewise.
15684         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15685         (normal_mod_SOURCES): Likewise.
15687 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
15689         * include/grub/normal.h (grub_halt_init): New prototype.
15690         (grub_halt_fini): Likewise.
15691         (grub_reboot_init): Likewise.
15692         (grub_reboot_fini): Likewise.
15694         * util/grub-emu.c: Include signal.h.
15695         (main_env): New global variable.
15696         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
15697         catch C-c.
15698         (grub_machine_fini): New function.
15699         (main): Call grub_halt_init and grub_reboot_init before
15700         grub_main, and grub_reboot_fini and grub_halt_fini after it.
15701         Call setjmp with MAIN_ENV to go back afterwards.
15702         Call grub_machine_fini right before return.
15704         * include/grub/util/misc.h: Include setjmp.h.
15705         (main_env): New prototype.
15707         * include/grub/kernel.h (grub_machine_fini): New prototype.
15708         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
15709         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
15711         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
15712         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
15713         * term/i386/pc/console.c (grub_console_fini): Likewise.
15715         * util/i386/pc/misc.c: New file.
15717         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
15718         util/i386/pc/misc.c, commands/i386/pc/halt.c and
15719         commands/i386/pc/reboot.c.
15721 2005-02-14  Guillem Jover  <guillem@hadrons.org>
15723         * include/grub/dl.h (grub_dl_check_header): New prototype.
15724         (grub_arch_dl_check_header): Change return type to grub_err_t,
15725         remove size parameter and export function.  Update all callers.
15726         * kern/dl.c (grub_dl_check_header): New function.
15727         (grub_dl_load_core): Use `grub_dl_check_header' instead of
15728         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
15729         are inside the core.
15730         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
15731         independent ELF header checks.
15732         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15733         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
15734         `grub_dl_check_header' instead of explicit checks.  Check for the
15735         ELF type.
15736         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
15737         `grub_dl_check_header' instead of explicit checks.  Remove arch
15738         specific ELF header checks.
15740         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
15741         argument SIZE.
15743 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
15745         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
15746         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
15748 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
15750         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
15751         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
15752         (part_map_iterate): Clear `grub_errno' and return 0 if
15753         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
15754         * partmap/amiga.c (amiga_partition_map_iterate): Return
15755         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
15756         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15758 2005-02-01  Guillem Jover  <guillem@hadrons.org>
15760         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
15761         help info.
15763 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15765         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
15766         Removed prototype.
15767         (grub_rescue_cmd_linux): New prototype.
15768         (grub_rescue_cmd_initrd): Likewise.
15769         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
15770         `bi_rec'.
15771         (grub_linux_release_mem): Release the memory for the initrd.
15772         (grub_load_linux): Renamed from this...
15773         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
15774         Changed `entry' not to be static.  Loop over memory regions to
15775         find another one when the default fails.
15776         (grub_rescue_cmd_initrd): New function.
15777         (grub_linux_init): Remove function.
15778         (grub_linux_fini): Likewise.
15779         (GRUB_MOD_INIT): Register `initrd'.
15780         (GRUB_MOD_FINI): Unregister `initrd'.
15781         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
15782         Function removed.
15783         (grub_linux_normal_fini): Likewise.
15784         (GRUB_MOD_INIT): Register `initrd'.
15785         (GRUB_MOD_FINI): Unregister `initrd'.
15787 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15789         * commands/help.c: New file.
15790         * normal/arg.c (show_help): Renamed to...
15791         (grub_arg_show_help): ... this.
15792         * commands/i386/pc/halt.c: New file.
15793         * commands/i386/pc/reboot.c: Likewise.
15794         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
15795         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
15796         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
15797         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
15798         variables.
15799         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15800         `commands/help.c'.
15801         (pkgdata_MODULES): Add `help.mod'.
15802         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
15803         * grub/i386/pc/init.h (grub_reboot): New prototype.
15804         (grub_halt): Likewise.
15805         * include/grub/normal.h (grub_arg_show_help): New prototype.
15806         (grub_help_init): Likewise.
15807         (grub_help_fini): Likewise.
15808         * util/grub-emu.c (main): Initialize and deinitialize the help
15809         command.
15811         * normal/cmdline.c (grub_cmdline_get): Doc fix.
15813         * normal/command.c (grub_command_init): Fixed the description of
15814         the `set' and `unset' commands.
15816 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
15818         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
15819         function.
15820         * commands/ieee1275/halt.c: New file.
15821         * commands/ieee1275/reboot.c: Likewise.
15822         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
15823         `__attribute__ ((unused))'.  Some GCS related fixed.
15824         (grub_suspend_init) [GRUB_UTIL]: Function removed.
15825         (grub_suspend_fini): Likewise.
15826         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
15827         and `halt.mod'.
15828         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
15829         (halt_mod_CFLAGS): New variables.
15830         * include/grub/powerpc/ieee1275/ieee1275.h
15831         (grub_ieee1275_interpret): New prototype.
15833 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
15835         * include/grub/misc.h (memmove): New prototype.
15836         (memcpy): Likewise.
15838 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
15840         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
15841         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
15843 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
15845         * kern/misc.c (grub_strndup): Function rewritten.
15847 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
15849         * normal/menu.c (TERM_WIDTH): Macro redefined.
15850         (TERM_TOP_BORDER_Y): Likewise.
15851         (draw_border): Replaced while-loop by a for-loop.  Make the number
15852         of lines consistent with the number of lines displayed in
15853         print_entries.  Added a margin below the rectangle.
15854         (print_entry): Make the entry fit in the rectangle.
15855         (print_entries): Display the scroll arrows next to the right
15856         border.
15858 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15860         * fs/minix.c (grub_minix_find_file): Reserve more space for
15861         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
15862         `grub_strncpy' to copy `path' into it.
15864 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
15866         Add the loopback device, a device via which files can be accessed
15867         as devices.
15869         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
15870         (pkgdata_MODULES): Add loopback.mod.
15871         (loopback_mod_SOURCES): New variable.
15872         (loopback_mod_CFLAGS): Likewise.
15873         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
15874         `disk/loopback.c'.
15875         (pkgdata_MODULES): Add loopback.mod.
15876         (loopback_mod_SOURCES): New variable.
15877         (loopback_mod_CFLAGS): Likewise.
15878         * disk/loopback.c: new file.
15879         * include/grub/normal.h (grub_loop_init): New prototype.
15880         (grub_loop_fini): New prototype.
15881         * util/grub-emu.c (main): Initialize and de-initialize loopback
15882         support.
15883         * include/grub/disk.h (grub_disk_dev_id): Add
15884         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
15886 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
15888         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
15889         function.
15890         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
15891         (suspend_mod_SOURCES): New variable.
15892         (suspend_mod_CFLAGS): Likewise.
15893         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
15894         New prototype.
15895         * commands/ieee1275/suspend.c: New file.
15897 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
15899         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
15900         ((unused))' to `__attribute__ ((used))'.
15901         (GRUB_MOD_FINI): Likewise.
15902         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
15903         * genmk.rb (PModule): Assign space to common symbols when linking
15904         modules.
15906 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
15908         * include/grub/mm.h (grub_mm_init_region): Change the type of the
15909         `unsigned' arguments to `grub_size_t'.
15910         (grub_malloc): Likewise.
15911         (grub_realloc): Likewise.
15912         (grub_memalign): Likewise.
15913         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
15914         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
15915         * util/misc.c (grub_malloc): Likewise.
15916         (grub_realloc): Likewise.
15917         * kern/mm.c (get_header_from_pointer): Change the casts to
15918         `unsigned' into a cast to `grub_size_t'.
15920         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
15921         point to `currnode' when `currnode' is changed.
15923         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
15924         Schottelius <nico-linux@schottelius.org>.
15926 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
15928         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
15929         (note_path): Remove variable.
15930         (GRUB_IEEE1275_NOTE_NAME): New macro.
15931         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
15932         (grub_ieee1275_note_hdr): New structure.
15933         (grub_ieee1275_note_desc): Likewise.
15934         (grub_ieee1275_note): Likewise.
15935         (load_note): Remove `dir' argument.  All callers updated.  Remove
15936         `note_img' and `path'.  Do not load a file from `note_path'.
15937         Initialize a struct grub_ieee1275_note and write that to `out'.
15938         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
15940 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
15942         * util/misc.c (grub_util_read_image): Revert last change.  It
15943         called `grub_util_read_at', which seeks from the beginning of the
15944         file.
15946 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
15948         * TODO: Add note about endianness in grub-mkimage.
15949         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
15950         section.
15951         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
15952         (grub_mkimage_SOURCES): New target.
15953         * include/grub/kernel.h (grub_start_addr): Remove variable.
15954         (grub_end_addr): Likewise.
15955         (grub_total_module_size): Likewise.
15956         (grub_kernel_image_size): Likewise.
15957         (GRUB_MODULE_MAGIC): New constant.
15958         (grub_module_info): New structure.
15959         (grub_arch_modules_addr): New prototype.
15960         (grub_get_end_addr): Remove prototype.
15961         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
15962         * include/grub/powerpc/ieee1275/kernel.h: New file.
15963         * include/grub/util/misc.h (grub_util_get_fp_size): New
15964         prototype.
15965         (grub_util_read_at): Likewise.
15966         (grub_util_write_image_at): Likewise.
15967         * kern/main.c (grub_get_end_addr): Remove function.
15968         (grub_load_modules): Call grub_arch_modules_addr instead of using
15969         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
15970         the grub_module_info fields instead of calling grub_get_end_addr
15971         as loop conditions.  Move grub_add_unused_region code here.
15972         (grub_add_unused_region): Remove function.
15973         * kern/i386/pc/init.c: Include grub/cache.h.
15974         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
15975         one call to add_mem_region.
15976         (grub_arch_modules_addr): New function.
15977         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
15978         (grub_total_module_size): Likewise.
15979         Include grub/machine/kernel.h.
15980         (grub_arch_modules_addr): New function.
15981         * util/grub-emu.c (grub_end_addr): Remove variable.
15982         (grub_total_module_size): Likewise.
15983         (grub_arch_modules_addr): New function.
15984         * util/misc.c: Include unistd.h.
15985         (grub_util_get_fp_size): New function.
15986         (grub_util_read_at): Likewise.
15987         (grub_util_write_image_at): Likewise.
15988         (grub_util_read_image): Call grub_util_read_at.
15989         (grub_util_write_image): Call grub_util_write_image_at.
15990         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
15991         additional memory in kernel_img for a struct grub_module_info.
15992         Fill in that grub_module_info.
15993         * util/powerpc/ieee1275/grub-mkimage.c: New file.
15995 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
15997         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
15998         New function.
15999         * include/grub/powerpc/ieee1275/ieee1275.h
16000         (grub_ieee1275_milliseconds): New prototype.
16001         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16002         Change to 1000.
16003         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16004         grub_ieee1275_milliseconds.
16006 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16008         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16009         variable.
16010         (find_options): New function.
16011         (cmain): Call find_options.
16012         * include/grub/powerpc/ieee1275/ieee1275.h
16013         (grub_ieee1275_realmode): New extern variable.
16014         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16015         grub_map if grub_ieee1275_realmode is false.
16017 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16019         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16020         lines are inserted and make it work like readline.  Reported by
16021         Vincent Pelletier <subdino2004@yahoo.fr>.
16023 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16025         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16027         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16028         `kern/powerpc/cache.S'.
16030 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16032         * genmk.rb: Handle the `Program' class in the main loop.  Written
16033         by Johan Rydberg <jrydberg@gnu.org>.
16034         (Program): New class.
16035         (programs): New variable.
16036         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16037         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16038         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16039         (help_arch): Function removed.
16040         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16041         `powerpc/libgcc.h' and `loader.h'.
16042         (pkgdata_PROGRAMS): New variable.
16043         (sbin_UTILITIES): Variable removed.
16044         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16045         (grubof_SOURCES): Variable re-defined so it only includes the
16046         core functionality.
16047         (grubof_CFLAGS): Remove `-DGRUBOF'.
16048         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16049         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16050         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16051         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16052         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16053         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16054         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16055         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16056         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16057         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16058         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16059         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16060         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16061         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16062         (pc_mod_CFLAGS): New variables.
16063         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16064         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16065         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16066         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16067         Moved from here...
16068         * include/grub/i386/pc/init.h (grub_os_area_addr)
16069         (rub_os_area_size): ... to here.
16070         * include/grub/powerpc/ieee1275/ieee1275.h
16071         (grub_ieee1275_entry_fn): Export symbol.
16072         * include/grub/powerpc/ieee1275/init.h: New file.
16073         * include/grub/powerpc/libgcc.h: Likewise.
16074         * include/grub/cache.h: Likewise.
16075         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16076         <hollis@penguinppc.org>.
16077         * kern/dl.c: Include <grub/cache.h>.
16078         (grub_dl_flush_cache): New function.
16079         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16080         for this module.
16081         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16082         (grub_console_init): Removed prototypes.
16083         (grub_machine_init): Don't initialize the modules anymore.
16084         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16085         static.
16086         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16087         Macro undef removed.
16088         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16089         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16090         relocation `R_PPC_REL32'.  Return an error when the relocation is
16091         unknown.
16092         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16093         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16094         * util/misc.c (grub_arch_sync_caches): Likewise.
16096 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16098         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16099         `symlist.c', add `grubof_symlist.c'.
16100         (symlist.c): Variable removed.
16101         (grubof_HEADERS): Variable added.
16102         (grubof_symlist.c): New target.
16103         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16104         `kernel_img_HEADERS'.
16105         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16106         * kern/powerpc/dl.c: New file.
16107         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16108         Function removed.
16109         (grub_arch_dl_relocate_symbols): Likewise.
16110         (grub_register_exported_symbols): Likewise.
16112 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16114         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16115         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16116         to fail instead.  Reported by Vincent Pelletier
16117         <subdino2004@yahoo.fr>.
16119         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16120         it is not allocated.  Reported by Vincent Pelletier
16121         <subdino2004@yahoo.fr>.
16123         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16124         output so the output looks better.
16126 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16128         Modulize the partition map support and add support for the amiga
16129         partition map.
16131         * commands/ls.c: Include <grub/partition.h> instead of
16132         <grub/machine/partition.h>.
16133         * kern/disk.c: Likewise.
16134         * kern/rescue.c: Likewise.
16135         * loader/i386/pc/chainloader.c: Likewise.
16136         * normal/cmdline.c: Likewise.
16137         * kern/powerpc/ieee1275/init.c: Likewise.
16138         (grub_machine_init): Call `grub_pc_partition_map_init',
16139         `grub_amiga_partition_map_init' and
16140         `grub_apple_partition_map_init'.
16141         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16142         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16143         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16144         `partition.h' and `pc_partition.h'.
16145         (grub_setup_SOURCES): Remove
16146         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16147         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16148         (grub_emu_SOURCES): Likewise.
16149         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16150         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16151         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16152         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16153         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16154         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16155         (grubof_SOURCES): Likewise.
16156         * disk/i386/pc/partition.c: File removed.
16157         * disk/powerpc/ieee1275/partition.c: Likewise.
16158         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16159         * include/grub/i386/pc/partition.h: Likewise.
16160         * kern/partition.c: New file.
16161         * partmap/amiga.c: Likewise.
16162         * partmap/apple.c: Likewise.
16163         * partmap/pc.c: Likewise.
16164         * include/grub/partition.h: Likewise..
16165         * include/grub/pc_partition.h: Likewise.
16166         * util/grub-emu.c: Include <grub/partition.h> instead of
16167         <grub/machine/partition.h>.
16168         (main): Call `grub_pc_partition_map_init',
16169         `grub_amiga_partition_map_init' and
16170         `grub_apple_partition_map_init' and deinitialize afterwards.
16171         * util/i386/pc/biosdisk.c: Include `#include
16172         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16173         `<grub/machine/partition.h>'.
16174         * util/i386/pc/grub-setup.c: Likewise.
16175         * util/i386/pc/biosdisk.c: Likewise.
16176         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16177         partition information in case of a PC partition.
16178         * util/i386/pc/grub-setup.c: Include `#include
16179         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16180         `<grub/machine/partition.h>'.
16181         (setup): Only access the PC specific partition information in case
16182         of a PC partition.
16184 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16186         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16187         (grub_longjmp): Likewise.
16188         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16189         20.
16190         * normal/powerpc/setjmp.S: New file.
16191         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16192         `normal/powerpc/setjmp.S'.
16193         (grubof_CFLAGS): Add `-DGRUBOF'.
16194         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16195         [GRUB_UTIL && !GRUBOF].
16197 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16199         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16200         property named `name'.  Correctly handle the error returned by
16201         `grub_ieee1275_finddevice' if a device can not be opened.
16203 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16205         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16206         `actual' for negativity.
16207         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16208         kern/fshelp.c.
16210 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16212         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16213         (PAGE_OFFSET): New macro.
16214         (CRTC_ADDR_PORT): Likewise.
16215         (CRTC_DATA_PORT): Likewise.
16216         (START_ADDR_HIGH_REGISTER): Likewise.
16217         (START_ADDR_LOW_REGISTER): Likewise.
16218         (GRAPHICS_ADDR_PORT): Likewise.
16219         (GRAPHICS_DATA_PORT): Likewise.
16220         (READ_MAP_REGISTER): Likewise.
16221         (INPUT_STATUS1_REGISTER): Likewise.
16222         (INPUT_STATUS1_VERTR_BIT): Likewise.
16223         (page): New variable.
16224         (wait_vretrace): New function.
16225         (set_read_map): Likewise.
16226         (set_start_address): Likewise.
16227         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16228         the right page.
16229         (check_vga_mem): Take the page into account.
16230         (write_char): Likewise.
16231         (write_cursor): Likewise.
16232         (scroll_up): Likewise.  Copy the page to the page that is not
16233         shown and switch between both pages.
16234         (grub_vga_putchar): Fix off by one error.
16235         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16236         account.
16238 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16240         Add support for iso9660 (including rockridge).
16242         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16243         (iso9660_mod_SOURCES): New variable.
16244         (iso9660_mod_CFLAGS): Likewise.
16245         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16246         * include/grub/fs.h (grub_iso9660_init): New prototype.
16247         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16248         * fs/iso9660.c: New file.
16250         * include/grub/misc.h (grub_strncat): New prototype.
16251         * kern/misc.c (grub_strncat): New function.
16253         * fs/hfs.c (grub_hfs_mount): Translate the error
16254         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16255         * fs/jfs.c (grub_jfs_mount): Likewise.
16256         * fs/ufs.c (grub_ufs_mount): Likewise.
16258 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16260         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16261         which initialized BAT registers.
16262         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16263         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16264         Move from here...
16265         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16266         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16267         ... to here.
16268         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16269         (grub_mapclaim): Likewise.
16270         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16271         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16272         hand.
16274 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16276         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16277         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16278         -ffreestanding and -msoft-float.
16280 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16282         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16283         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16284         set in grub_ieee1275_flags.
16286 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16288         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16289         prototype.
16290         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16291         grub_console_init first.
16292         Change the memory range used for grub_ieee1275_claim and
16293         grub_mm_init_region.
16294         Print an error message if the claim fails.
16295         Include <grub/misc.h>.
16297 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16299         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16300         Call grub_children_iterate for device nodes of type `scsi',
16301         `ide', or `ata'.
16302         (grub_ofdisk_open): Remove manual device alias resolution.
16303         Fix memory leak when device cannot be opened.
16304         * include/grub/powerpc/ieee1275/ieee1275.h
16305         (grub_children_iterate): New prototype.
16306         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16307         New function.
16308         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16309         Return -1 if args.size was -1.
16311 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16313         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16314         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16315         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16316         Open Firmware's memory for it; claim memory from _start to _end.
16317         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16318         (_end): New extern.
16319         (_start): Zero BSS from __bss_start to _end.
16320         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16321         New extern.
16322         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16324 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16326         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16327         -1 if args.base was -1.
16329 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16331         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16332         escape sequence instead of a literal ^L. Also call
16333         grub_ofconsole_gotoxy.
16335 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16337         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16338         void *  arguments to grub_addr_t.  All callers updated.  Also make
16339         the `result' argument optional.
16340         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16341         All callers updated.
16343 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16345         * commands/ls.c (grub_ls_list_files): Use the string following the
16346         initial ')', if present, as the filesystem path.
16347         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16349         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16351 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16353         Make the source code of the menu interface more readable.
16355         * normal/menu.c: Include grub/mm.h.
16356         (TERM_WIDTH): New macro.
16357         (TERM_HEIGHT): Likewise.
16358         (TERM_INFO_HEIGHT): Likewise.
16359         (TERM_MARGIN): Likewise.
16360         (TERM_SCROLL_WIDTH): Likewise.
16361         (TERM_TOP_BORDER_Y): Likewise.
16362         (TERM_LEFT_BORDER_X): Likewise.
16363         (TERM_BORDER_WIDTH): Likewise.
16364         (TERM_MESSAGE_HEIGHT): Likewise.
16365         (TERM_BORDER_HEIGHT): Likewise.
16366         (TERM_NUM_ENTRIES): Likewise.
16367         (TERM_FIRST_ENTRY_Y): Likewise.
16368         (TERM_ENTRY_WIDTH): Likewise.
16369         (TERM_CURSOR_X): Likewise.
16370         (draw_border): Use macros instead of magic numbers.
16371         (print_entry): Likewise.
16372         (print_entries): Likewise.
16373         (run_menu): Likewise. Also, handle the key 'e'.
16374         (run_menu_entry): Ignore empty command lines.
16375         (print_message): Added a new argument EDIT. If EDIT is true,
16376         print a different message.
16377         (init_page): Likewise.
16378         (edit_menu_entry): New function. Not implemented yet.
16380 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16382         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16383         can be loaded from normal mode.
16385         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16386         `multiboot.mod'.
16387         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16388         (multiboot_mod_CFLAGS): New variables.
16389         * loader/i386/pc/linux_normal.c: New file.
16390         * loader/i386/pc/multiboot_normal.c: Likewise.
16392         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16393         attribute `unused'.
16395         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16396         `fdiro' to read the mode information from instead of `diro'.
16398         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16399         looking up a symlink.
16401         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16402         macro.
16403         * normal/command.c (grub_command_execute): Don't parse the
16404         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16405         flags of the command.
16407         * normal/menu.c (grub_menu_run): Fix typo.
16409 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16411         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16413         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16414         `y + 1' instead of `y - 1'.
16416         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16418 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16420         From Hollis Blanchard <hollis@penguinppc.org>:
16421         * kern/misc.c (memmove): New alias for grub_memmove.
16422         (memcmp): New alias for grub_memcmp.
16423         (memset): New alias for grub_memset.
16424         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16425         Change "int handle" to "grub_ieee1275_phandle_t handle".
16426         * include/grub/powerpc/ieee1275/ieee1275.h
16427         (grub_ieee1275_get_property): Likewise.
16429 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16431         Added normal mode command `chainloader' as module chain.mod, which
16432         depends on normal.mod and _chain.mod.
16434         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16435         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16436         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16437         Deleted prototype.
16438         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16439         but arguments parsing moved to ...
16440         (grub_chainloader_cmd): ... here.  New function.
16441         * include/grub/i386/pc/chainloader.h: New file.
16442         * loader/i386/pc/chainloader_normal.c: Likewise.
16444 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16446         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16447         (grub_mkimage_LDFLAGS): Likewise.
16448         (grub_emu_SOURCES): Likewise.
16449         (kernel_img_HEADERS): Added fshelp.h.
16450         * fs/ext2.c: Include <grub/fshelp.h>.
16451         (FILETYPE_REG): New macro.
16452         (FILETYPE_INO_REG): Likewise.
16453         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16454         Changed all users.
16455         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16456         all users.
16457         (grub_fshelp_node): New struct.
16458         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16459         to a pointer.
16460         (grub_ext2_get_file_block): Removed function.
16461         (grub_ext2_read_block): New function.
16462         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16463         This function was written.
16464         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
16465         (grub_ext2_find_file): Removed function.
16466         (grub_ext2_read_symlink): New function.
16467         (grub_ext2_iterate_dir): Likewise.
16468         (grub_ext2_open): Rewritten.
16469         (grub_ext2_dir): Rewritten.
16470         * include/grub/fshelp.h: New file.
16471         * fs/fshelp.c: Likewise.
16473 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
16475         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
16476         (print_message): Add a missing newline.
16477         (run_menu): Added timeout support.
16478         (run_menu_entry): New local function.
16479         (grub_menu_run): Added support for booting.
16481         * kern/loader.c (grub_loader_is_loaded): New function.
16483         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
16484         (grub_get_rtc): Exported.
16486         * include/grub/i386/pc/time.h: Include grub/symbol.h.
16487         (grub_get_rtc): Exported.
16489         * include/grub/normal.h (struct grub_command_list): Remove
16490         constant from the member `command'.
16492         * include/grub/loader.h (grub_loader_is_loaded): Declared.
16494         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
16496         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
16498 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
16500         Add support for the JFS filesystem.
16502         * fs/jfs.c: New file.
16503         * include/grub/fs.h (grub_jfs_init): New prototype.
16504         (grub_jfs_fini): New prototype.
16505         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
16506         (grub_emu_SOURCES): Likewise.
16507         (pkgdata_MODULES): Add jfs.mod.
16508         (jfs_mod_SOURCES): New variable.
16509         (jfs_mod_CFLAGS): Likewise.
16510         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
16511         (grubof_SOURCES): Likewise.
16512         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
16514         * fs/fat.c (grub_fat_find_dir): Convert the filename little
16515         endian to the host endian.
16516         (grub_fat_utf16_to_utf8): Move function from there...
16517         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
16518         the endianness of the source string anymore.
16519         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
16521 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
16523         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
16524         (grub_boot_fini) [GRUB_UTIL]: Likewise.
16525         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
16526         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
16528         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
16529         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
16530         for `node_found' and `it_dir'.
16531         (grub_hfs_dir): Add prototype for `dir_hook'.
16533         * fs/minix.c (grub_minix_get_file_block): Add prototype for
16534         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
16535         and `indir32' to silence a gcc warning.
16537         * include/grub/fs.h (grub_hfs_init): New prototype.
16538         (grub_hfs_fini): Likewise.
16541 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
16543         Each disk device has its own id now. This is useful to make use
16544         of multiple disk devices.
16546         * include/grub/disk.h (grub_disk_dev_id): New enum.
16547         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
16548         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
16550         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
16551         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16553         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
16554         GRUB_DISK_DEVICE_OFDISK_ID as an id.
16556         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
16557         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
16559         * include/grub/disk.h (struct grub_disk_dev): Added a new member
16560         "id" which is used by the cache manager.
16562         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
16563         of just "GRUB".
16565 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
16567         * fs/hfs.c: New file.
16568         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
16569         (grub_emu_SOURCES): Likewise.
16570         (pkgdata_MODULES): Add hfs.mod.
16571         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
16572         (grubof_SOURCES): Likewise.
16573         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
16575         * include/grub/misc.h (grub_strncasecmp): Add prototype.
16576         * kern/misc.c (grub_strncasecmp): Add function.
16578 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
16580         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
16581         with parentheses.
16583         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
16584         (grub_ext2_dir): In case the directory entry type is unknown, read
16585         it from the inode.
16587 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
16589         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
16590         grub_load_linux instead of grub_rescue_cmd_linux as second
16591         argument of grub_rescue_register_command.
16593         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
16595 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
16597         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
16598         function.
16599         * commands/boot.c: Remove the check for `GRUB_UTIL'.
16600         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16601         `loader/powerpc/ieee1275/linux.c',
16602         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
16603         * include/grub/powerpc/ieee1275/ieee1275.h
16604         (grub_ieee1275_release): New prototype.
16605         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
16606         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
16607         normal, boot, linux and linux_normal.
16608         * loader/powerpc/ieee1275/linux.c: New file.
16609         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
16611 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
16613         * normal/arg.c (grub_arg_parse): Correct error handling after
16614         reallocating the argumentlist (check if `argl' is not null instead
16615         of checking if `args' is not null).
16616         * kern/mm.c (grub_realloc): Return the same pointer when using the
16617         same region, instead of returning the header address.
16619 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16621         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
16622         one block instead of two when looking for the initial partition.
16623         (grub_partition_probe): Initialize the local variable `p' with 0.
16624         Use base 10 for the grub_strtoul call.
16625         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
16626         need for one local variable.
16627         (grub_strtoul): Don't add the new value to `num', instead of that
16628         just assign it.
16630 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
16632         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
16633         (pxeboot_img_SOURCES): New variable.
16634         (pxeboot_img_ASFLAGS): Likewise.
16635         (pxeboot_img_LDFLAGS): Likewise.
16636         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
16637         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
16638         <lode_leroy@hotmail.com>.
16640 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16642         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
16643         there was no input.
16645 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16647         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
16648         the history buffer logic.
16650 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
16652         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
16653         (FILETYPE_INO_SYMLINK): New macros.
16654         (grub_ext2_find_file): Check if the node is a directory using the
16655         inode stat information instead of using the filetype in the
16656         dirent.  Exclude the first character of an absolute symlink.
16657         (grub_ext2_dir): Mask out the filetype part of the mode member of
16658         the inode.
16660 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
16662         Add support for UFS version 1 and 2.  Add support for the minix
16663         filesystem version 1 and 2, both the variants with 14 and 30 long
16664         filenames.
16666         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
16667         fs/minix.c.
16668         (grub_emu_SOURCES): Likewise.
16669         (pkgdata_MODULES): Add ufs.mod and minix.mod.
16670         (ufs_mod_SOURCES): New variable.
16671         (ufs_mod_CFLAGS): Likewise.
16672         (minix_mod_SOURCES): Likewise.
16673         (minix_mod_CFLAGS): Likewise.
16674         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
16675         fs/minix.c.
16676         (grubof_SOURCES): Likewise.
16677         * fs/ufs.c: New file.
16678         * fs/minix.c: New file.
16679         * include/grub/fs.h (grub_ufs_init): New prototype.
16680         (grub_ufs_fini): Likewise.
16681         (grub_minix_init): Likewise.
16682         (grub_minix_fini): Likewise.
16683         * util/grub-emu.c (main): Initialize and deinitialize UFS and
16684         minix fs.
16686 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
16688         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
16689         commands/ls.c, commands/terminal.c, commands/boot.c,
16690         commands/cmp.c and commands/cat.c.
16691         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
16693         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
16694         "env.h"
16696 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16698         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
16699         and grub_, respectively. Because the conversion is trivial and
16700         mechanical, I omit the details here. Please refer to the CVS
16701         if you need more information.
16703 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
16705         * include/pupa: Renamed to ...
16706         * include/grub: ... this.
16707         * util/i386/pc/pupa-mkimage.c: Renamed to ...
16708         * util/i386/pc/grub-mkimage.c: ... this.
16709         * util/i386/pc/pupa-setup.c: Renamed to ...
16710         * util/i386/pc/grub-setup.c: ... this.
16711         * util/pupa-emu.c: Renamed to ...
16712         * util/grub-emu.c: ... this.
16714 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
16716         Add support for the newworld apple macintosh (PPC).  This has been
16717         tested on the powerbook 2000 only.  It only adds support for
16718         generic ieee1275 functions, console and disk support.  This should
16719         be easy to port to other architectures with support for Open
16720         Firmware.
16722         * configure.ac: Accept the powerpc as host_cpu.  In the case of
16723         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
16724         specific tests are only executed while building for the i386.
16725         Inverse test for crosscompile.
16726         * genmk.rb (Utility): Allow assembler files.
16727         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
16728         * conf/powerpc-ieee1275.rmk: New file.
16729         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
16730         * disk/powerpc/ieee1275/partition.c: Likewise.
16731         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
16732         * include/pupa/powerpc/ieee1275/console.h: Likewise.
16733         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
16734         * include/pupa/powerpc/ieee1275/time.h: Likewise.
16735         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
16736         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
16737         * include/pupa/powerpc/ieee1275/loader.h
16738         * include/pupa/powerpc/setjmp.h: Likewise.
16739         * include/pupa/powerpc/types.h: Likewise.
16740         * kern/powerpc/ieee1275/init.c: Likewise.
16741         * kern/powerpc/ieee1275/openfw.c: Likewise.
16742         * term/powerpc/ieee1275/ofconsole.c: Likewise.
16744         These files were written by Johan Rydberg
16745         (jrydberg@night.trouble.net) and I only modified them slightly.
16747         * boot/powerpc/ieee1275/cmain.c: New file.
16748         * boot/powerpc/ieee1275/crt0.S: Likewise.
16749         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
16750         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
16752 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
16754         * Makefile.in: Update copyright.
16755         * genmodsrc.sh: Likewise.
16756         * gensymlist.sh: Likewise.
16757         * term/i386/pc/vga.c: Indent correctly.
16759         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
16760         bugreporting address.
16761         * util/i386/pc/pupa-setup.c (usage): Likewise,
16762         (main): Call pupa_ext2_init and pupa_ext2_fini.
16764         * fs/fat.c (log2): Renamed to ...
16765         (fat_log2): ... this.
16766         All callers changed.
16767         * kern/misc.c (memcpy): Alias to pupa_memmove.
16768         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
16769         lvalue cast.
16770         * util/console.c (pupa_ncurses_fini): Return 0.
16772         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
16773         Move fail label here.
16774         [__GNU__]: Don't warn when using stat.
16775         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
16776         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
16777         long int. Use strtol instead of strtoul.
16779 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
16781         * commands/boot.c: New file.
16782         * commands/cat.c: Likewise.
16783         * commands/cmp.c: Likewise.
16784         * commands/ls.c: Likewise.
16785         * commands/terminal.c: Likewise.
16786         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
16787         (pupa_register_command): Changed interface to match the new
16788         argument parser.
16789         (pupa_command_execute): Changed (almost rewritten) so it uses
16790         pupa_split_command.  Added support for setting variables using the
16791         syntax `foo=bar'.
16792         (rescue_command): Changed to work with the new argument parser.
16793         (terminal_command): Moved from here to commands/terminal.c.
16794         (set_command): New function.
16795         (unset_command): New function.
16796         (insmod_command): New function.
16797         (rmmod_command): New function.
16798         (lsmod_command): New function.
16799         (pupa_command_init): Don't initialize the command terminal
16800         anymore.  Initialize the commands set, unset, insmod, rmmod and
16801         lsmod.
16802         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
16803         (kernel_img_HEADERS): Add arg.h and env.h.
16804         (pupa_mkimage_LDFLAGS): Add kern/env.c.
16805         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
16806         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
16807         normal/arg.c.
16808         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
16809         terminal.mod.
16810         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
16811         (boot_mod_SOURCES): New variable.
16812         (terminal_mod_SOURCES): Likewise.
16813         (ls_mod_SOURCES): Likewise.
16814         (cmp_mod_SOURCES): Likewise.
16815         (cat_mod_SOURCES): Likewise.
16817         * normal/arg.c: New file.
16818         * kern/env.c: Likewise.
16819         * include/pupa/arg.h: Likewise.
16820         * include/pupa/env.h: Likewise.
16821         * font/manager.c (font_command): Changed to match argument parsing
16822         interface changes.
16823         (PUPA_MOD_INIT): Likewise.
16824         * hello/hello.c (pupa_cmd_hello): Likewise.
16825         (PUPA_MOD_INIT): Likewise.
16826         * include/pupa/disk.h: Include <pupa/device.h>.
16827         (pupa_print_partinfo): New prototype.
16828         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
16829         (pupa_dl_get_prefix): Likewise.
16830         * include/pupa/misc.h: Include <pupa/err.h>.
16831         (pupa_isgraph): New prototype.
16832         (pupa_isdigit): Likewise.
16833         (pupa_split_cmdline): Likewise.
16834         * include/pupa/normal.h: Include <pupa/arg.h>.
16835         (pupa_command): Changed the prototype of the member `func' to
16836         match the argument parsing interface.  Added member `options'.
16837         (pupa_register_command): Updated to match function.
16838         (pupa_arg_parse): New prototype.
16839         (pupa_hello_init) [PUPA_UTIL]: New prototype.
16840         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
16841         (pupa_ls_init) [PUPA_UTIL]: Likewise.
16842         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
16843         (pupa_cat_init) [PUPA_UTIL]: Likewise.
16844         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
16845         (pupa_boot_init) [PUPA_UTIL]: Likewise.
16846         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
16847         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
16848         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
16849         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
16850         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
16851         * kern/disk.c: Include <pupa/file.h>.
16852         (pupa_print_partinfo): New function.
16853         * kern/dl.c: Include <pupa/env.h>.
16854         (pupa_dl_dir): Variable removed.
16855         (pupa_dl_load): Use the environment variable `prefix' instead of
16856         the variable pupa_dl_dir.
16857         (pupa_dl_set_prefix): Function removed.
16858         (pupa_dl_get_prefix): Likewise.
16859         * kern/i386/pc/init.c: Include <pupa/env.h>.
16860         (pupa_machine_init): Use the environment variable `prefix' instead of
16861         using pupa_dl_set_prefix to set the prefix.
16862         * kern/main.c: Include <pupa/env.h>.
16863         (pupa_set_root_dev): Use the environment variable `prefix' instead of
16864         using pupa_dl_get_prefix to get the prefix.
16865         * kern/misc.c: Include <pupa/env.h>.
16866         (pupa_isdigit): New function.
16867         (pupa_isgraph): Likewise.
16868         (pupa_ftoa): Likewise.
16869         (pupa_vsprintf): Added support for printing values of the type
16870         `double'.  Make it possible to format variable output when using
16871         formatting like `%1.2%f'.
16872         (pupa_split_cmdline): New function.
16873         * kern/rescue.c: Include <pupa/env.h>.
16874         (next_word): Removed function.
16875         (pupa_rescue_cmd_prefix): Likewise.
16876         (pupa_rescue_cmd_set): New function.
16877         (pupa_rescue_cmd_unset): New function.
16878         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
16879         split the command line instead of splitting it here.  Added
16880         support for setting variables using the syntax `foo=bar'.  Don't
16881         initialize the prefix command anymore.  Initialized the set and
16882         unset commands.
16883         * normal/cmdline.c: Include <pupa/env.h>.
16884         (pupa_tab_complete): Added prototypes for print_simple_completion,
16885         print_partition_completion, add_completion, iterate_commands,
16886         iterate_dev, iterate_part and iterate_dir. Moved code to print
16887         partition information from here to kern/disk.c.
16888         (pupa_cmdline_run): Don't check if the function exists anymore.
16889         * normal/main.c: Include <pupa/env.h>.
16890         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
16891         instead of using pupa_dl_get_prefix to get the prefix.
16892         * term/i386/pc/vga.c: Include <pupa/arg.h>.
16893         (check_vga_mem): Cast pointers to `void *' to silence a gcc
16894         warning.
16895         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
16896         (pupa_vga_setcolor): Declare unused variables with `__attribute__
16897         ((unused))' to silence a gcc warning.
16898         (pupa_vga_setcolor): Likewise.
16899         (debug_command): Changed to match argument parsing
16900         interface changes.
16901         * util/pupa-emu.c: Include <pupa/env.h>.
16902         (options): Added 0's for unused fields to silence a gcc warning.
16903         (argp): Likewise.
16904         (main): Use the environment variable `prefix' instead of using
16905         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
16906         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
16907         and terminal.
16909         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
16910         * util/misc.c: Include <malloc.h>.
16911         (pupa_malloc): Rewritten so errors are correctly reported.
16912         (pupa_realloc): Likewise.
16913         (pupa_memalign): Likewise.
16914         (pupa_mm_init_region): Declare unused variables with
16915         `__attribute__ ((unused))' to silence a gcc warning.
16916         * normal/i386/setjmp.S: Remove tab at the end of the file to
16917         silence a gcc warning.
16918         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
16919         variables with `__attribute__ ((unused))' to silence a gcc
16920         warning.
16921         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
16922         local variable i unsigned to silence a gcc warning.
16924         * kern/term.c: Include <pupa/misc.h>.
16925         (pupa_more_lines): New variable.
16926         (pupa_more): Likewise.
16927         (pupa_putcode): When the pager is active pause at the end of every
16928         screen.
16929         (pupa_set_more): New function.
16930         * include/pupa/term.h (pupa_set_more): New prototype.
16933 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
16935         Now this project is GRUB 2 rather than PUPA. The location of
16936         the CVS repository was moved to GRUB's.
16938         * configure.ac: Use bug-grub as the reporting address.
16939         Use GRUB instead of PUPA.
16940         Change the version number to 1.90.
16942 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
16944         * genkernsyms.sh: Updated copyright information.
16945         * genmk.rb: Likewise.
16946         * genmodsrc.sh: Likewise.
16947         * gensymlist.sh: Likewise.
16948         * boot/i386/pc/boot.S: Likewise.
16949         * boot/i386/pc/diskboot.S: Likewise.
16950         * disk/i386/pc/biosdisk.c: Likewise.
16951         * disk/i386/pc/partition.c: Likewise.
16952         * font/manager.c: Likewise.
16953         * fs/ext2.c: Likewise.
16954         * fs/fat.c: Likewise.
16955         * include/pupa/boot.h: Likewise.
16956         * include/pupa/device.h: Likewise.
16957         * include/pupa/disk.h: Likewise.
16958         * include/pupa/dl.h: Likewise.
16959         * include/pupa/elf.h: Likewise.
16960         * include/pupa/err.h: Likewise.
16961         * include/pupa/file.h: Likewise.
16962         * include/pupa/font.h: Likewise.
16963         * include/pupa/fs.h: Likewise.
16964         * include/pupa/kernel.h: Likewise.
16965         * include/pupa/loader.h: Likewise.
16966         * include/pupa/misc.h: Likewise.
16967         * include/pupa/mm.h: Likewise.
16968         * include/pupa/net.h: Likewise.
16969         * include/pupa/normal.h: Likewise.
16970         * include/pupa/rescue.h: Likewise.
16971         * include/pupa/setjmp.h: Likewise.
16972         * include/pupa/symbol.h: Likewise.
16973         * include/pupa/term.h: Likewise.
16974         * include/pupa/types.h: Likewise.
16975         * include/pupa/i386/setjmp.h: Likewise.
16976         * include/pupa/i386/types.h: Likewise.
16977         * include/pupa/i386/pc/biosdisk.h: Likewise.
16978         * include/pupa/i386/pc/boot.h: Likewise.
16979         * include/pupa/i386/pc/console.h: Likewise.
16980         * include/pupa/i386/pc/init.h: Likewise.
16981         * include/pupa/i386/pc/kernel.h: Likewise.
16982         * include/pupa/i386/pc/linux.h: Likewise.
16983         * include/pupa/i386/pc/loader.h: Likewise.
16984         * include/pupa/i386/pc/memory.h: Likewise.
16985         * include/pupa/i386/pc/multiboot.h: Likewise.
16986         * include/pupa/i386/pc/partition.h: Likewise.
16987         * include/pupa/i386/pc/time.h: Likewise.
16988         * include/pupa/i386/pc/vga.h: Likewise.
16989         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
16990         * include/pupa/util/getroot.h: Likewise.
16991         * include/pupa/util/misc.h: Likewise.
16992         * include/pupa/util/resolve.h: Likewise.
16993         * kern/device.c: Likewise.
16994         * kern/disk.c: Likewise.
16995         * kern/dl.c: Likewise.
16996         * kern/err.c: Likewise.
16997         * kern/file.c: Likewise.
16998         * kern/fs.c: Likewise.
16999         * kern/loader.c: Likewise.
17000         * kern/main.c: Likewise.
17001         * kern/misc.c: Likewise.
17002         * kern/mm.c: Likewise.
17003         * kern/rescue.c: Likewise.
17004         * kern/term.c: Likewise.
17005         * kern/i386/dl.c: Likewise.
17006         * kern/i386/pc/init.c: Likewise.
17007         * kern/i386/pc/lzo1x.S: Likewise.
17008         * kern/i386/pc/startup.S: Likewise.
17009         * loader/i386/pc/chainloader.c: Likewise.
17010         * loader/i386/pc/linux.c: Likewise.
17011         * loader/i386/pc/multiboot.c: Likewise.
17012         * normal/cmdline.c: Likewise.
17013         * normal/command.c: Likewise.
17014         * normal/main.c: Likewise.
17015         * normal/menu.c: Likewise.
17016         * normal/i386/setjmp.S: Likewise.
17017         * term/i386/pc/console.c: Likewise.
17018         * term/i386/pc/vga.c: Likewise.
17019         * util/console.c: Likewise.
17020         * util/genmoddep.c: Likewise.
17021         * util/misc.c: Likewise.
17022         * util/pupa-emu.c: Likewise.
17023         * util/resolve.c: Likewise.
17024         * util/unifont2pff.rb: Likewise.
17025         * util/i386/pc/biosdisk.c: Likewise.
17026         * util/i386/pc/getroot.c: Likewise.
17027         * util/i386/pc/pupa-mkimage.c: Likewise.
17028         * util/i386/pc/pupa-setup.c: Likewise.
17030 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17032         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17033         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17034         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17035         reading and reset it after reading.
17036         (pupa_ext2_close): Return PUPA_ERR_NONE.
17038         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17039         Correct value.
17040         (struct linux_kernel_header): Add kernel_version and
17041         initrd_addr_max.
17042         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17043         pupa_file_read succeeds.
17044         (pupa_rescue_cmd_initrd): Implement.
17046 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17048         * fs/ext2.c (pupa_ext2_label): New function.
17049         (pupa_ext2_fs): Added label.
17050         * fs/fat.c (pupa_fat_label): New function.
17051         (pupa_fat_fs): Added label.
17052         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17054         * kern/misc.c (pupa_strndup): New function.
17055         * include/pupa/misc.h (pupa_strndup): New prototype.
17057         * include/pupa/normal.h: Include <pupa/err.h>.
17058         (pupa_set_history): New prototype.
17059         (pupa_iterate_commands): New prototype.
17060         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17061         <pupa/disk.h>, <pupa/file.h>.
17062         (hist_size): New variable.
17063         (hist_lines): Likewise.
17064         (hist_end): Likewise.
17065         (hist_used): Likewise.
17066         (pupa_set_history): New function.
17067         (pupa_history_get): Likewise.
17068         (pupa_history_add): Likewise.
17069         (pupa_history_replace): Likewise.
17070         (pupa_tab_complete): Likewise.
17071         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17072         completion shows partitionnames while completing partitions, this
17073         feature was suggested by Jeff Bailey.
17074         * normal/command.c (pupa_iterate_commands): New function.
17075         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17076         (pupa_normal_init): Initialize history buffer.
17077         (PUPA_MOD_INIT): Likewise.
17078         (pupa_normal_fini): Free the history buffer.
17079         (PUPA_MOD_FINI): Likewise.
17081         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17082         key.
17084         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17085         * configure.ac [i386]: Check for regparam bug.
17086         (NESTED_FUNC_ATTR) [! i386]: Defined.
17088 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17090         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17091         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17092         (pupa_emu_SOURCES): New variable.
17093         (pupa_emu_LDFLAGS): Likewise.
17094         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17095         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17096         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17097         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17098         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17099         (pupa_jmp_buf): New typedef.
17100         (pupa_setjmp) [PUPA_UTIL]: New macro.
17101         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17102         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17103         (pupa_refresh): New prototype.
17104         * include/pupa/util/getroot.h: New file.
17105         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17106         it.
17107         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17108         (pupa_rescue_cmd_cat): Likewise.
17109         (pupa_rescue_cmd_ls): Likewise.
17110         (pupa_rescue_cmd_testload): Likewise.
17111         (pupa_rescue_cmd_lsmod): Likewise.
17112         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17113         * normal/menu.c (run_menu): Likewise.
17114         * kern/term.c (pupa_cls): Likewise.
17115         (pupa_refresh): New function.
17116         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17117         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17118         * util/console.c: New file.
17120         * util/i386/pc/getroot.c: New file.
17121         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17122         (pupa_putchar): New function.
17123         (pupa_refresh): Likewise.
17124         (xgetcwd): Function moved to ...
17125         (strip_extra_slashes): Likewise.
17126         (get_prefix): Likewise.
17127         * util/i386/pc/getroot.c: ... here.
17128         (find_root_device): Function moved and renamed to...
17129         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17130         Changed all callers.
17131         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17132         and renamed to...
17133         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17134         Changed all callers.
17135         * util/misc.c (pupa_memalign): New function.
17136         (pupa_mm_init_region): Likewise.
17137         (pupa_register_exported_symbols): Likewise.
17138         (pupa_putchar): Function removed.
17139         * util/pupa-emu.c: New file.
17141 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17143         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17144         (_multiboot_mod_SOURCES): New variable.
17145         (_multiboot_mod_CFLAGS): Likewise.
17146         * loader/i386/pc/multiboot.c: New file.
17147         * include/pupa/i386/pc/multiboot.h: Likewise.
17148         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17149         (pupa_multiboot_real_boot): New function.
17150         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17151         (pupa_multiboot_real_boot): New prototype.
17152         (pupa_rescue_cmd_multiboot): Likewise
17153         (pupa_rescue_cmd_module): Likewise.
17155         * kern/loader.c (pupa_loader_set): Continue when
17156         pupa_loader_unload_func() fails.
17157         (pupa_loader_unset): New function.
17158         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17160         * kern/misc.c (pupa_stpcpy): New function.
17161         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17163 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17165         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17166         for available extensions.
17168         * include/pupa/i386/pc/time.h: New file.
17169         * kern/disk.c: Include <pupa/machine/time.h>.
17170         (PUPA_CACHE_TIMEOUT): New macro.
17171         (pupa_last_time): New variable.
17172         (pupa_disk_open): Flush the cache when there was a timeout.
17173         (pupa_disk_close): Reset the timer.
17174         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17175         pupa_currticks.
17176         * util/misc.c: Include <sys/times.h>
17177         (pupa_get_rtc): New function.
17179 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17181         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17182         as blocks.
17183         (pupa_ext2_get_file_block): Use blocks member.
17185         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17186         first block. Return -1 instead of pupa_errno on error.
17188 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17190         * README: In the pupa-mkimage example use _chain instead of chain
17191         and ext2 instead of fat.
17192         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17193         adding journal playback for ext2fs.
17194         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17195         (pkgdata_MODULES): Added ext2.mod.
17196         (ext2_mod_SOURCES): New variable.
17197         (ext2_mod_CFLAGS): Likewise.
17198         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17199         * include/pupa/misc.h (pupa_strncpy): New prototype.
17200         (pupa_strcat): Likewise.
17201         (pupa_strncmp): Likewise.
17202         * kern/misc.c (pupa_strcat): Enable function.
17203         (pupa_strncpy): New function.
17204         (pupa_strncmp): Likewise.
17205         * fs/ext2.c: New file.
17207         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17208         when the read failed before retrying.
17209         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17210         (_FILE_OFFSET_BITS): Likewise.
17211         * configure.ac: Added AC_SYS_LARGEFILE.
17213 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17215         * genmk.rb (PModule#rule): Make sure to get only symbol names
17216         from the output of nm.
17217         Reported by Robert Millan <zeratul2@wanadoo.es>.
17219 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17221         I forgot to check in these changes for a long time. This adds
17222         incomplete support for VGA console, and this is still very
17223         buggy. Also, a lot of consideration is required for I18N,
17224         UNICODE, and VGA font issues. Therefore, assume that this is
17225         such that "better than nothing".
17227         * font/manager.c: New file.
17228         * include/pupa/font.h: Likewise.
17229         * include/pupa/i386/pc/vga.h: Likewise.
17230         * term/i386/pc/vga.c: Likewise.
17231         * util/unifont2pff.rb: Likewise.
17233         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17234         (pkgdata_MODULES): Added vga.mod and font.mod.
17235         (vga_mod_SOURCES): New variables.
17236         (vga_mod_CFLAGS): Likewise.
17237         (font_mod_SOURCES): Likewise.
17238         (font_mod_CFLAGS): Likewise.
17240         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17242         * include/pupa/term.h: Include pupa/err.h.
17243         (struct pupa_term): Added init and fini.
17244         Changed the argument of putchar to pupa_uint32_t.
17246         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17247         (pupa_console_real_putchar): New prototype.
17248         (pupa_console_putchar): Removed.
17249         (pupa_console_checkkey): Exported.
17250         (pupa_console_getkey): Likewise.
17252         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17253         characters.
17255         * kern/term.c (pupa_term_set_current): Rewritten.
17256         (pupa_putchar): Likewise.
17257         (pupa_putcode): New function.
17259         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17260         (pupa_console_real_putchar): ... this.
17261         (pupa_vga_set_mode): New function.
17262         (pupa_vga_get_font): Likewise.
17264         * normal/command.c: Include pupa/term.h.
17265         (terminal_command): New function.
17266         (pupa_command_init): Register the command "terminal".
17268         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17269         (DISP_UP): Likewise.
17270         (DISP_RIGHT): Likewise.
17271         (DISP_DOWN): Likewise.
17272         (DISP_HLINE): Likewise.
17273         (DISP_VLINE): Likewise.
17274         (DISP_UL): Likewise.
17275         (DISP_UR): Likewise.
17276         (DISP_LL): Likewise.
17277         (DISP_LR): Likewise.
17279         * term/i386/pc/console.c (pupa_console_putchar): New function.
17281 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17283         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17284         FIX. Reverse the path_list.
17286         * include/pupa/normal.h: Export pupa_register_command and
17287         pupa_unregister_command.
17289         * hello/hello.c (pupa_cmd_hello): New module.
17290         * conf/i386-pc.rmk: Added hello.mod.
17292 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17294         * kern/i386/pc/lzo1x.S: New file.
17296         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17297         (compress_kernel): New variable.
17298         (generate_image): Heavily modified to support compressing a
17299         large part of the core image.
17301         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17302         leak.
17303         (pupa_util_load_image): New function.
17305         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17306         (pupa_compressed_size): New variable.
17307         (codestart): Enable Gate A20 here.
17308         Decompress the compressed part of the core image.
17309         Rearrange the code to put functions and variables which are
17310         required for initialization in the non-compressed part.
17311         Include lzo1x.S.
17313         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17314         here.
17316         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17318         * include/pupa/i386/pc/kernel.h
17319         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17320         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17321         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17322         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17323         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17325         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17327         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17328         (Utility#rule): Likewise.
17330         * configure.ac: Check if LZO is available.
17332 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17334         * include/pupa/normal.h: New file.
17335         * include/pupa/setjmp.h: Likewise.
17336         * include/pupa/i386/setjmp.h: Likewise.
17337         * normal/cmdline.c: Likewise.
17338         * normal/command.c: Likewise.
17339         * normal/main.c: Likewise.
17340         * normal/menu.c: Likewise.
17341         * normal/i386/setjmp.S: Likewise.
17343         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17344         (pupa_rescue_cmd_initrd): Likewise.
17346         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17347         Likewise.
17349         * kern/i386/pc/startup.S (translation_table): New variable.
17350         (translate_keycode): New function.
17351         (pupa_console_getkey): Call translate_keycode.
17353         * kern/rescue.c (attempt_normal_mode): New function.
17354         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17355         it failed, print a message.
17357         * kern/mm.c (pupa_real_malloc): Print more information when a
17358         free magic is broken.
17359         (pupa_free): If the first free header is not free actually, set
17360         it to P.
17362         * kern/main.c (pupa_load_normal_mode): Just load the module
17363         "normal".
17364         (pupa_main): Don't print the message
17365         "Entering into rescue mode..." here.
17367         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17368         Declared.
17369         (pupa_rescue_cmd_initrd): Likewise.
17370         (pupa_rescue_cmd_initrd): Likewise.
17372         * include/pupa/symbol.h (FUNCTION): Specify the type.
17373         (VARIABLE): Likewise.
17375         * include/pupa/err.h (pupa_err_t): Added
17376         PUPA_ERR_UNKNOWN_COMMAND.
17378         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17379         (pupa_dl_get_prefix): Likewise.
17381         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17382         Added _chain.mod and _linux.mod instead of chain.mod and
17383         linux.mod.
17384         (chain_mod_SOURCES): Renamed to ...
17385         (_chain_mod_SOURCES): ... this.
17386         (chain_mod_CFLAGS): Renamed to ...
17387         (_chain_mod_CFLAGS): ... this.
17388         (linux_mod_SOURCES): Renamed to ...
17389         (_linux_mod_SOURCES): ... this.
17390         (linux_mod_CFLAGS): Renamed to ...
17391         (_linux_mod_CFLAGS): ... this.
17392         (normal_mod_SOURCES): New variable.
17393         (normal_mod_CFLAGS): Likewise.
17394         (normal_mod_ASFLAGS): Likewise.
17396 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17398         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17399         possible.
17401         * kern/dl.c (pupa_dl_ref): Refer depending modules
17402         recursively.
17403         (pupa_dl_unref): Unrefer depending modules recursively.
17404         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17405         a module is unloaded before one depending on that module is
17406         unloaded.
17407         (pupa_dl_unload): Unload depending modules explicitly,
17408         if possible.
17410 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17412         * include/pupa/i386/pc/linux.h: New file.
17413         * loader/i386/pc/linux.c: Likewise.
17415         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17416         Removed.
17417         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17418         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17419         of PUPA_CHAINLOADER_BOOT_SECTOR.
17421         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17422         (pupa_linux_prot_size): New variable.
17423         (pupa_linux_tmp_addr): Likewise.
17424         (pupa_linux_real_addr): Likewise.
17425         (pupa_linux_boot_zimage): New function.
17426         (pupa_linux_boot_bzimage): Likewise.
17428         * kern/i386/pc/init.c (struct mem_region): New structure.
17429         (MAX_REGIONS): New macro.
17430         (mem_regions): New variable.
17431         (num_regions): Likewise.
17432         (pupa_os_area_addr): Likewise.
17433         (pupa_os_area_size): Likewise.
17434         (pupa_lower_mem): Likewise.
17435         (pupa_upper_mem): Likewise.
17436         (add_mem_region): New function.
17437         (compact_mem_regions): Likewise.
17438         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17439         the size of the conventional memory and that of so-called upper
17440         memory (before the first memory hole).
17441         Instead of adding each found region to free memory, use
17442         add_mem_region and add them after removing overlaps.
17443         Also, add only 1/4 of the upper memory to free memory. The rest
17444         is used for loading OS images. Maybe this is ad hoc, but this
17445         makes it much easier to relocate OS images when booting.
17447         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17448         (pupa_enter_rescue_mode): Don't register initrd and module.
17450         * kern/mm.c: Include pupa/dl.h.
17452         * kern/main.c: Include pupa/file.h and pupa/device.h.
17454         * kern/loader.c (pupa_loader_load_module_func): Removed.
17455         (pupa_loader_load_module): Likewise.
17457         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17458         ``.o''.
17460         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17461         (pupa_linux_tmp_addr): Likewise.
17462         (pupa_linux_real_addr): Likewise.
17463         (pupa_linux_boot_zimage): Likewise.
17464         (pupa_linux_boot_bzimage): Likewise.
17466         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
17467         (pupa_upper_mem): Likewise.
17468         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
17469         module is too dangerous.
17471         * include/pupa/loader.h (pupa_os_area_addr): Declared.
17472         (pupa_os_area_size): Likewise.
17473         (pupa_loader_set): Remove the first argument. Loader doesn't
17474         manage modules or initrd any longer.
17475         (pupa_loader_load_module): Removed.
17477         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
17478         (linux_mod_SOURCES): New variable.
17479         (linux_mod_CFLAGS): Likewise.
17481 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
17483         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
17484         the length of a blocklist correctly.
17486         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
17487         Use ioctl only if the OS file is a block device.
17488         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
17489         not very useful for normal files.
17491         * kern/main.c (pupa_set_root_dev): New function.
17492         (pupa_load_normal_mode): Likewise.
17493         (pupa_main): Call those above.
17495         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
17496         pupa_uint16_t.
17498         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
17500 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
17502         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
17503         (setup): Configure the installed partition information and the
17504         dl prefix.
17506         * loader/i386/pc/chainloader.c (my_mod): New variable.
17507         (pupa_chainloader_unload): New function.
17508         (pupa_rescue_cmd_chainloader): Refer itself.
17509         (PUPA_MOD_INIT): Save its own module in MY_MOD.
17511         * kern/i386/pc/startup.S (install_partition): Removed.
17512         (version_string): Likewise.
17513         (config_file): Likewise.
17514         (pupa_install_dos_part): New variable.
17515         (pupa_install_bsd_part): Likewise.
17516         (pupa_prefix): Likewise.
17517         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
17519         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
17520         and pupa/misc.h.
17521         (make_install_device): New function.
17522         (pupa_machine_init): Set the dl prefix.
17524         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
17525         (buf): Renamed to ...
17526         (linebuf): ... this.
17527         (pupa_rescue_cmd_prefix): New function.
17528         (pupa_rescue_cmd_insmod): Likewise.
17529         (pupa_rescue_cmd_rmmod): Likewise.
17530         (pupa_rescue_cmd_lsmod): Likewise.
17531         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
17532         rmmod and lsmod.
17534         * kern/mm.c (pupa_memalign): If failed even after invalidating
17535         disk caches, unload unneeded modules and retry.
17537         * kern/misc.c (pupa_memmove): New function.
17538         (pupa_memcpy): Removed.
17539         (pupa_strcpy): New function.
17540         (pupa_itoa): Made static.
17542         * kern/dl.c (pupa_dl_iterate): New function.
17543         (pupa_dl_ref): Likewise.
17544         (pupa_dl_unref): Likewise.
17545         (pupa_dl_unload): Return if succeeded or not.
17546         (pupa_dl_unload_unneeded): New function.
17547         (pupa_dl_unload_all): Likewise.
17548         (pupa_dl_init): Renamed to ...
17549         (pupa_dl_set_prefix): ... this.
17550         (pupa_dl_get_prefix): New function.
17552         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
17553         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
17554         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17555         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17556         (pupa_install_dos_part): Declared.
17557         (pupa_install_bsd_part): Likewise.
17558         (pupa_prefix): Likewise.
17559         (pupa_boot_drive): Likewise.
17561         * include/pupa/types.h: Fix a typo.
17563         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
17564         pupa_memmove.
17565         (pupa_memmove): Declared.
17566         (pupa_strcpy): Likewise.
17568         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
17569         pupa_mod_init takes one argument, its own module.
17570         (pupa_dl_unload_unneeded): Declared.
17571         (pupa_dl_unload_all): Likewise.
17572         (pupa_dl_ref): Likewise.
17573         (pupa_dl_unref): Likewise.
17574         (pupa_dl_iterate): Likewise.
17575         (pupa_dl_init): Renamed to ...
17576         (pupa_dl_set_prefix): ... this.
17577         (pupa_dl_get_prefix): Declared.
17579         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
17580         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
17581         unloaded.
17582         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
17583         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
17585         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
17586         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
17588 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17590         * util/i386/pc/pupa-setup.c (setup): Define the internal
17591         function find_first_partition_start at the top level, because GCC
17592         3.0.x cannot compile internal functions in deeper scopes
17593         correctly.
17594         (find_root_device): Use lstat instead of stat.
17595         Don't follow symbolic links.
17596         Fix the path-constructing code.
17598         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
17599         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
17600         by a BLKGETSIZE ioctl first, because block devices don't fill
17601         the member st_mode of the structure stat on Linux.
17602         [__linux__] (linux_find_partition): Use a temporary buffer
17603         REAL_DEV for the working space. Copy it to DEV before returning.
17604         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
17605         buffer cache consistent.
17606         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
17607         strncmp. The previous value was merely wrong.
17608         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
17610         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
17611         FAT size is 12. The previous value was merely wrong.
17613         * kern/main.c (pupa_main): Don't split the starting message from
17614         newlines.
17616         * kern/term.c (pupa_putchar): Put CR after LF instead of before
17617         LF, because BIOS goes crazy about character attributes in this
17618         case.
17620 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
17622         * include/i386/pc/util/biosdisk.h: New file.
17623         * util/i386/pc/biosdisk.c: Likewise.
17624         * util/i386/pc/pupa-setup.c: Likewise.
17626         * Makefile.in (INCLUDE_DISTFILES): Added
17627         include/pupa/i386/pc/util/biosdisk.h.
17628         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
17629         directory util/i386/pc.
17630         (install-local): Added a rule for sbin_UTILITIES.
17631         (uninstall): Likewise.
17633         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
17635         * util/misc.c (xrealloc): New function.
17636         (pupa_malloc): Likewise.
17637         (pupa_free): Likewise.
17638         (pupa_realloc): Likewise.
17639         (pupa_stop): Likewise.
17640         (pupa_putchar): Likewise.
17642         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
17644         * include/pupa/util/misc.h (xrealloc): Declared.
17646         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
17647         macro.
17648         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
17649         (PUPA_BOOT_MACHINE_BPB_END): ... this.
17651         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
17652         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17654         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
17655         way should be implemented.
17656         [PUPA_UTIL] (pupa_fat_fini): Likewise.
17658         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
17659         the size of NAME for safety.
17660         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
17661         0x88.
17663         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
17664         (pupa_setup_SOURCES): Likewise.
17666         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
17668 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17670         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
17671         bunch of pushl's from pusha, because this destroys the return
17672         value.
17674 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
17676         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
17677         This means that any missing prototypes could be fatal. Also, you
17678         must take care when writing assembly code. See the comments at
17679         the beginning of startup.S, for more details.
17681         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
17682         compilation mechanism.
17683         (pupa_chainloader_real_boot): Likewise.
17684         (pupa_biosdisk_rw_int13_extensions): Likewise.
17685         (pupa_biosdisk_rw_standard): Likewise.
17686         (pupa_biosdisk_check_int13_extensions): Likewise.
17687         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
17688         (pupa_biosdisk_get_diskinfo_standard): Likewise.
17689         (pupa_get_memsize): Likewise.
17690         (pupa_get_mmap_entry): Likewise.
17691         (pupa_console_putchar): Likewise.
17692         (pupa_console_setcursor): Likewise.
17693         (pupa_getrtsecs): Use pushl instead of push.
17695         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
17696         memory instead of the stack for a mmap entry, because some
17697         BIOSes may ignore the maximum size and overflow.
17699         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
17701         * genmk.rb (PModule#rule): Compile automatically generated
17702         sources with module-specific CFLAGS as well as other sources.
17704 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17706         * configure.ac: Check ld.
17707         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
17708         respectively, before checking endianness and sizes.
17710         * Makefile.in (LD): New variable.
17712 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17714         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
17716 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
17718         * Changelog: New file.