Merge branch 'dmigen' into phcoder
[grub2/phcoder.git] / ChangeLog
blob6994cf5c3029dfaae7a333d8278bcdc4fb0227c5
1 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
3         Enable all targets that can be built by default
5         * configure.ac: enable efiemu runtime, grub-emu, grub-emu-usb,
6         grub-mkfont and grub-fstest if they can be built
8 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
10         Fix hang and segmentation fault in grub-emu-usb
12         * disk/scsi.c (grub_scsi_open): return err and not grub_errno
13         * util/usb.c (grub_libusb_devices): likewise
14         (grub_libusb_init): rename to ...
15         (GRUB_MOD_INIT (libusb)):...this
16         (grub_libusb_fini): rename to ..
17         (GRUB_MOD_FINI (libusb)):...this
18         * disk/usbms.c (grub_usbms_transfer): fix retry logic
19         * include/grub/disk.h (grub_raid_init): removed, it's useless
20         (grub_raid_fini): likewise
21         (grub_lvm_init): likewise
22         (grub_lvm_fini): likewise
23         * util/grub-emu.c (main): don't call grub_libusb_init, it's done
24         by grub_init_all
26 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
28         Fix libusb
30         * Makefile.in (LIBUSB): new macro
31         * genmk.rb (Utility/print_tail): new method
32         (Utility/rule): use intermediary variable #{prefix}_OBJECTS
33         (top level): call util.print_tail at the end.
35 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
37         Make FreeBSD accept zpool.cache
39         * loader/i386/bsd.c (grub_freebsd_add_meta_module): spoof filename if
40         type is /boot/zfs/zpool.cache
42 2009-07-16  Vladimir Serbinenko  <phcoder@gmail.com>
44         Fix 64-bit efiemu
46         * include/grub/efiemu/efiemu.h (grub_efiemu_configuration_table64_t):
47         correct wrong typedef
48         * efiemu/prepare.c (SUFFIX (grub_efiemu_prepare)): minor style fixes
50 2009-07-15  Pavel Roskin  <proski@gnu.org>
52         * include/grub/disk.h (struct grub_disk_dev): Use enum for id.
53         * kern/disk.c (struct grub_disk_cache): Likewise.
55         * commands/probe.c (options): Typo fix.
57         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_BPB_END):
58         Increase to 0x5a to accommodate FAT32.  Adjust other offsets
59         accordingly.
60         Original patch by Yves Blusseau <yves.grub-devel@zetam.org>
62         * boot/i386/pc/boot.S (general_error_string): Add DOS newline at
63         the end of "Error" to make the message more readable.
65         * boot/i386/pc/boot.S (kernel_segment): Remove.
66         (copy_buffer): Use GRUB_BOOT_MACHINE_KERNEL_ADDR in segment 0
67         for destination.
69         * boot/i386/pc/boot.S (boot_version): Remove.
70         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_VER_MAJ):
71         Remove.
73         * include/grub/i386/pc/boot.h: Sort all offsets.
74         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Remove, it's unused.
75         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Likewise.
76         * boot/i386/pc/boot.S: Assert location of every offset listed in
77         include/grub/i386/pc/boot.h.
79 2009-07-13  Pavel Roskin  <proski@gnu.org>
81         * include/grub/i386/coreboot/machine.h: Rename
82         GRUB_MACHINE_LINUXBIOS to GRUB_MACHINE_COREBOOT.
83         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Allow
84         multiboot 1 for GRUB_MACHINE_COREBOOT and GRUB_MACHINE_QEMU.
86         * kern/dl.c: Force native word size to suppress warnings when
87         compiling grub-emu.
89         * kern/device.c (grub_device_iterate): Change struct part_ent to
90         hold the name, not a pointer to it.  Use one grub_malloc() per
91         partition, not two.  Free partition_name if grub_malloc() fails.
92         Set ents to NULL only before grub_partition_iterate() is called.
94 2009-07-11  Bean  <bean123ch@gmail.com>
96         * kern/ieee1275/openfw.c (grub_children_iterate): Fix size of
97         childname.
99 2009-07-10  Bean  <bean123ch@gmail.com>
100 2009-07-10  Robert Millan  <rmh.grub@aybabtu.com>
102         * kern/ieee1275/openfw.c (grub_children_iterate)
103         (grub_devalias_iterate): Fix size evaluation for property or path
104         strings, which was broken since r2132.
106 2009-07-07  Pavel Roskin  <proski@gnu.org>
108         * commands/search.c (search_file): Merge into ...
109         (search_fs): ... this.  Accept search type as argument.
110         (grub_cmd_search): Pass search type to search_fs().
112         * include/grub/util/console.h: New file.
113         * util/console.c: Use it instead of grub/machine/console.h.
114         * util/grub-emu.c: Likewise.
116         * lib/arg.c (find_long_option): Remove.
117         (find_long): Add `len' argument, make `s' const char *.
118         (grub_arg_parse): Parse long options in place, not in a
119         temporary buffer.
121 2009-07-06  Pavel Roskin  <proski@gnu.org>
123         * commands/search.c (search_fs): Fix potential NULL pointer
124         dereference.
126         * commands/search.c (search_fs): Replace QUID macro with quid_fn
127         function pointer.
129 2009-07-06  Daniel Mierswa  <impulze@impulze.org>
131         * commands/search.c (search_fs): Use grub_strcasecmp() for UUID
132         comparison.
134 2009-07-05  Pavel Roskin  <proski@gnu.org>
136         * include/grub/i386/linux.h (struct linux_kernel_params):
137         Restore padding3, it's still needed.
139         * util/grub.d/10_freebsd.in: Fix spelling of `device.hints' on
140         FreeBSD.
141         * util/osdetect.lua: Likewise.
143 2009-07-05  Bean  <bean123ch@gmail.com>
145         * conf/common.rmk (lua_mode_SOURCES): Add script/lua/lstrlib.c.
147         * script/lua/grub_lib.c (grub_lua_run): Check input parameter.
148         (grub_lua_getenv): Likewise.
149         (grub_lua_setenv): Likewise.
150         (save_errno): New function.
151         (push_result): Likewise.
152         (grub_lua_enum_device): Likewise.
153         (grub_lua_enum_file): Likewise.
154         (grub_lua_file_open): Likewise.
155         (grub_lua_file_close): Likewise.
156         (grub_lua_file_seek): Likewise.
157         (grub_lua_file_read): Likewise.
158         (grub_lua_file_getline): Likewise.
159         (grub_lua_file_getsize): Likewise.
160         (grub_lua_file_getpos): Likewise.
161         (grub_lua_file_eof): Likewise.
162         (grub_lua_file_exist): Likewise.
163         (grub_lua_add_menu): Likewise.
165         * script/lua/grub_lua.h (isupper): New inline function.
166         (islower): Likewise.
167         (ispunct): Likewise.
168         (isxdigit): Likewise.
169         (strcspn): Change to normal function.
170         (strpbkr): New function declaration.
171         (memchr): Likewise.
173         * script/lua/grub_main.c (scan_str): New function.
174         (strcspn): Likewise.
175         (strpbrk): Likewise.
176         (memchr): Likewise.
178         * script/lua/linit.c (lualibs): Enable the string library.
180         * util/osdetect.lua: New file.
182 2009-07-04  Robert Millan  <rmh.grub@aybabtu.com>
184         * include/grub/i386/linux.h (struct linux_kernel_params): Add
185         `capabilities' member.
187 2009-07-02  Pavel Roskin  <proski@gnu.org>
189         * genparttoollist.sh: Add missing newline at the end.
191 2009-07-01  Pavel Roskin  <proski@gnu.org>
193         * kern/x86_64/efi/callwrap.S: Add missing newline at the end.
195         * util/hostdisk.c (open_device): Remove `const' from
196         `sysctl_size', as sysctlbyname() can change it (in this case it
197         doesn't actually happen).
199         * include/grub/types.h: Define GRUB_LONG_MAX and GRUB_LONG_MIN
200         using signed long int constants.
202         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): Make `p'
203         constant to avoid a warning on FreeBSD.
205         * util/hostdisk.c (device_is_wholedisk): Compile only on systems
206         where it's needed.
208         * Makefile.in: Install include/grub/machine symlink.
210         * Makefile.in: When installing symlinks, use "cp -fR", which
211         works on FreeBSD and MacOSX.
212         From Yves Blusseau <cl7m42e02@sneakemail.com>
214         * kern/dl.c (grub_dl_resolve_symbol): Make static.
215         * include/grub/dl.h: Remove grub_dl_resolve_symbol().
217         * util/misc.c: Move grub_reboot() and grub_halt() ...
218         * util/grub-emu.c: ... here.  Make main_env static.
219         * include/grub/util/misc.h: Remove main_env.
221         * kern/mm.c: Use correct format to print size_t.
223         * include/grub/elf.h: Define Elf_Sword and Elf_Xword.
224         * kern/i386/dl.c: Use ELF symbols without "32" or "64".
225         * kern/powerpc/dl.c: Likewise.
226         * kern/sparc64/dl.c: Likewise.
227         * kern/x86_64/dl.c: Likewise.
229 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
231         Fix grub-emu build on sparc64-ieee1275.
233         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Syncronize with ...
234         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): ... this.
236 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
238         * util/misc.c: Include `<setjmp.h>' and `<grub/machine/machine.h>'.
239         (grub_reboot, grub_halt): New functions.
241         * util/i386/pc/misc.c: Delete.  Update all users.
242         * util/sparc64/ieee1275/misc.c: Likewise.
243         * util/powerpc/ieee1275/misc.c: Likewise.
245 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
247         * conf/i386.rmk (setjmp_mod_SOURCES)
248         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Move to ...
249         * conf/common.rmk (setjmp_mod_SOURCES)
250         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): ... here, and modify
251         to use $(target_cpu).
252         * conf/x86_64-efi.rmk (setjmp_mod_SOURCES)
253         (setjmp_mod_ASFLAGS, setjmp_mod_LDFLAGS): Remove.
254         * conf/powerpc-ieee1275.rmk: Likewise.
255         * conf/sparc64-ieee1275.rmk: Likewise.
257         * conf/i386-pc.rmk (kernel_img_SOURCES): Use
258         $(target_cpu) for kern/$(target_cpu)/dl.c.
259         * conf/i386-efi.rmk: Likewise.
260         * conf/i386-ieee1275.rmk: Likewise.
261         * conf/x86_64-efi.rmk: Likewise.
262         * conf/i386-coreboot.rmk: Likewise.
263         * conf/powerpc-ieee1275.rmk (kernel_img_SOURCES): Use
264         $(target_cpu) for kern/$(target_cpu)/dl.c and for
265         kern/$(target_cpu)/cache.S.
266         * conf/sparc64-ieee1275.rmk: Likewise.
268 2009-07-01  Robert Millan  <rmh.grub@aybabtu.com>
270         * include/grub/i386/linux.h (linux_kernel_params): Change `mmap_size'
271         type to `grub_uint8_t', and adjust `padding9' accordingly.
273 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
275         * include/grub/i386/linux.h (GRUB_VIDEO_TYPE_TEXT): New macro.
277         * loader/i386/linux.c [__i386__] (grub_linux_boot): Simplify inline
278         assembly in final jump, using register constraints.
280         (grub_linux_boot): For text mode, initialize `have_vga' using
281         GRUB_VIDEO_TYPE_TEXT rather than 0 (this changes its value to 1).
283         Initialize `video_cursor_x' and `video_cursor_y' as late as possible,
284         right before the final jump.
286         Set `video_mode' to 0x3.
288         Document initialization of `video_page', `video_mode' and
289         `video_ega_bx'.
291 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
293         * include/grub/i386/linux.h (GRUB_LINUX_FLAG_QUIET): New macro.
294         * loader/i386/linux.c (grub_cmd_linux): Recognize "quiet" option,
295         and set GRUB_LINUX_FLAG_QUIET appropiately.
297 2009-06-29  Robert Millan  <rmh.grub@aybabtu.com>
299         Fix build on Debian / sparc.
301         * configure.ac: Recognize `sparc' target_cpu (as sparc64).
303 2009-06-28  Pavel Roskin  <proski@gnu.org>
305         * kern/i386/qemu/mmap.c (grub_machine_mmap_iterate): Use cast to
306         fix a warning.
308         * util/grub.d/10_linux.in: Match SUSE style initrd names.
310 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
312         * loader/i386/linux.c (grub_linux_boot): Fix uninitialized use of
313         `err'.
315 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
317         Revert r2338.
319         * loader/i386/linux.c (grub_cmd_linux): Don't call grub_error when
320         file can't be opened.  grub_file_open() is already supposed to set
321         grub_errno / grub_errmsg appropiately.
322         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
324 2009-06-27  Pavel Roskin  <proski@gnu.org>
325 2009-06-27  Robert Millan  <rmh.grub@aybabtu.com>
327         * include/grub/dl.h: Include grub/elf.h.
328         (struct grub_dl): Add symtab field.
329         * kern/dl.c [GRUB_MACHINE_QEMU]: Define
330         GRUB_MODULES_MACHINE_READONLY.
331         (grub_dl_resolve_symbols): Populate mod->symtab, making a copy
332         of the header for read-only modules.
333         (grub_dl_unload): Free mod->symtab for read-only modules.
334         * kern/i386/dl.c: Use mod->symtab.
335         * kern/powerpc/dl.c: Likewise.
336         * kern/sparc64/dl.c: Likewise.
337         * kern/x86_64/dl.c: Likewise.
339         * conf/i386-qemu.rmk: New file.
340         * kern/i386/qemu/startup.S: Likewise.
341         * kern/i386/qemu/mmap.c: Likewise.
342         * boot/i386/qemu/boot.S: Likewise.
343         * include/grub/i386/qemu/time.h: Likewise.
344         * include/grub/i386/qemu/serial.h: Likewise.
345         * include/grub/i386/qemu/kernel.h: Likewise.
346         * include/grub/i386/qemu/console.h: Likewise.
347         * include/grub/i386/qemu/boot.h: Likewise.
348         * include/grub/i386/qemu/init.h: Likewise.
349         * include/grub/i386/qemu/machine.h: Likewise.
350         * include/grub/i386/qemu/loader.h: Likewise.
351         * include/grub/i386/qemu/memory.h: Likewise.
353         * conf/i386-coreboot.rmk (GRUB_BOOT_MACHINE_LINK_ADDR)
354         (GRUB_KERNEL_MACHINE_LINK_ADDR): New variables.
355         [qemu] (pkglib_IMAGES): Add `boot.img'.
356         [qemu] (boot_img_SOURCES, boot_img_ASFLAGS, boot_img_LDFLAGS)
357         [qemu] (boot_img_FORMAT): New variables.
358         [qemu] (bin_UTILITIES): Add `grub-mkimage'.
359         [qemu] (grub_mkimage_SOURCES, grub_mkimage_CFLAGS): New variables.
360         [qemu] (kernel_img_SOURCES, kernel_img_HEADERS, kernel_img_CFLAGS)
361         [qemu] (kernel_img_ASFLAGS, kernel_img_LDFLAGS)
362         [qemu] (kernel_img_FORMAT): New variables.
364         * configure.ac: Recognise `i386-qemu'.
366         * util/i386/pc/grub-mkimage.c (compress_kernel): Add dummy variant
367         (for no compression).
368         [GRUB_MACHINE_QEMU] (generate_image): Misc adjustments to produce
369         a valid i386 ROM image.  Make `GRUB_KERNEL_MACHINE_COMPRESSED_SIZE',
370         `GRUB_KERNEL_MACHINE_INSTALL_DOS_PART' and
371         `GRUB_KERNEL_MACHINE_INSTALL_BSD_PART' optional features (with
372         ifdefs).
374 2009-06-27  Pavel Roskin  <proski@gnu.org>
376         * efiemu/prepare.c: Eliminate TYPE macro, it makes code hard to
377         read.
378         * efiemu/prepare32.c: Likewise.
379         * efiemu/prepare64.c: Likewise.
381 2009-06-26  Pavel Roskin  <proski@gnu.org>
383         * include/grub/types.h: Define GRUB_TARGET_WORDSIZE.
384         * include/grub/elf.h: Define symbols without "32" or "64" based
385         on GRUB_TARGET_WORDSIZE.
386         * include/grub/multiboot2.h: Use GRUB_TARGET_WORDSIZE.
387         * efiemu/loadcore32.c: Redefine GRUB_TARGET_WORDSIZE, remove own
388         ELF definitions.
389         * efiemu/loadcore64.c: Likewise.
390         * loader/i386/bsd32.c: Likewise.
391         * loader/i386/bsd64.c: Likewise.
392         * kern/dl.c: Remove own ELF definitions.
393         * util/i386/efi/grub-mkimage.c: Likewise.
395 2009-06-23  Robert Millan  <rmh.grub@aybabtu.com>
397         * kern/i386/pc/startup.S (real_to_prot): Access `gdtdesc' using
398         segment 0x0 unconditionally, because the reference generated by
399         GAS is an absolute address.
401 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
403         * include/grub/i386/kernel.h: Include `<grub/machine/machine.h>'.
404         [! GRUB_MACHINE_IEEE1275]: Set `GRUB_MOD_ALIGN' to 0x1.
406 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
408         * commands/search.c (grub_cmd_search): Macroify hardcoded args[]
409         indexes.  Check for -f explicitly.
410         (search_file): Improve error message.
411         (GRUB_MOD_INIT(search)): Add missing `-n' to help output.
413 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
415         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): Rename to ...
416         (GRUB_KERNEL_MACHINE_LINK_ADDR): ... this.  Update all users.
418 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
420         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/misc.S'.
421         * conf/i386-ieee1275.rmk: Likewise.
422         * conf/i386-coreboot.rmk: Likewise.
424         * kern/i386/pc/startup.S (grub_stop): Remove function.
425         * kern/i386/ieee1275/startup.S: Likewise.
426         * kern/i386/coreboot/startup.S: Likewise.
427         * kern/i386/misc.S (grub_stop): New function.
429 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
431         * kern/i386/pc/startup.S (real_to_prot): Move from here ...
432         * kern/i386/realmode.S (real_to_prot): ... to here.
434 2009-06-22  Robert Millan  <rmh.grub@aybabtu.com>
436         * conf/i386-ieee1275.rmk (pkglib_PROGRAMS): Replace `kernel.elf'
437         with `kernel.img'.
438         (kernel_elf_SOURCES): Rename to ...
439         (kernel_img_SOURCES): ... this.
440         (kernel_elf_HEADERS): Rename to ...
441         (kernel_img_HEADERS): ... this.  Update all users.
442         (kernel_elf_ASFLAGS): Rename to ...
443         (kernel_img_ASFLAGS): ... this.
444         (kernel_elf_CFLAGS): Rename to ...
445         (kernel_img_CFLAGS): ... this.
446         (kernel_elf_LDFLAGS): Rename to ...
447         (kernel_img_LDFLAGS): ... this.
448         * conf/i386-coreboot.rmk: Likewise.
449         * conf/powerpc-ieee1275.rmk: Likewise.
451         * util/elf/grub-mkimage.c (add_segments): Replace "kernel.elf"
452         with "kernel.img".
454 2009-06-21  Pavel Roskin  <proski@gnu.org>
456         * loader/powerpc/ieee1275/linux.c (offset_phdr): Fix prototypes
457         to match nested functions.
458         * loader/sparc64/ieee1275/linux.c: Likewise.
460         * conf/i386-ieee1275.rmk: Define kernel_elf_ASFLAGS.
462 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
464         * configure.ac: Enable `END_SYMBOL' / `BSS_START_SYMBOL' test on
465         all i386 platforms.
467 2009-06-21  Robert Millan  <rmh.grub@aybabtu.com>
469         Fix asm file handling on ELF, and remove workarounds.
471         * genmk.rb (class Programs): Detect assembly files, and set ASFLAGS
472         and -DASM_FILE=1 appropiately (copied from `class Images' stanza).
473         * kern/i386/ieee1275/startup.S (ASM_FILE): Remove macro.
474         * kern/i386/coreboot/startup.S (ASM_FILE): Likewise.
476 2009-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
478         Load BSD ELF modules
480         * conf/i386-pc.rmk (bsd_mod_SOURCES): Add loader/i386/bsd32.c
481         and loader/i386/bsd64.c
482         * include/grub/i386/bsd.h (FREEBSD_MODTYPE_MODULE): Remove
483         (FREEBSD_MODTYPE_ELF_MODULE): New definition
484         (FREEBSD_MODTYPE_ELF_MODULE_OBJ): Likewise
485         (grub_freebsd_load_elfmodule32): New declaration
486         (grub_freebsd_load_elfmoduleobj64): Likewise
487         (grub_freebsd_load_elf_meta32): Likewise
488         (grub_freebsd_load_elf_meta64): Likewise
489         (grub_freebsd_add_meta): Likewise
490         (grub_freebsd_add_meta_module): Likewise
491         * loader/i386/bsd.c (grub_freebsd_add_meta): Make global
492         (grub_freebsd_add_meta_module): Likewise and move module-specific
493         parts to grub_cmd_freebsd and grub_cmd_freebsd_module
494         (grub_cmd_freebsd): Add elf-kernel specific parts
495         based on grub_freebsd_add_meta_module
496         (grub_cmd_freebsd_module): Add type parsing moved from
497         grub_freebsd_add_meta_module
498         (grub_cmd_freebsd_module_elf): New function
499         (cmd_freebsd_module_elf): New variable
500         (GRUB_MOD_INIT): Register freebsd_module_elf
501         * loader/i386/bsd32.c: New file
502         * loader/i386/bsd64.c: Likewise
503         * loader/i386/bsdXX.c: Likewise
504         * kern/elf.c (grub_elf32_load): Let hook decide which pheaders to load
505         (grub_elf64_load): Likewise
506         * include/grub/elfload.h (grub_elf32_load_hook_t): New parameter do_load
507         All users updated
508         (grub_elf64_load_hook_t): Likewise
510 2009-06-21  Colin Watson  <cjwatson@ubuntu.com>
512         * util/grub-mkconfig.in (GRUB_DISABLE_LINUX_RECOVERY): Export
513         variable.
514         * util/grub.d/10_linux.in: If GRUB_DISABLE_LINUX_RECOVERY is true,
515         don't write a menu entry for recovery mode.
517 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
519         * util/i386/pc/grub-mkimage.c (main): Oops, free `output' only
520         after it's no longer needed.
522 2009-06-20  Robert Millan  <rmh.grub@aybabtu.com>
524         * include/grub/i386/loader.h (grub_linux_prot_size)
525         (grub_linux_tmp_addr, grub_linux_real_addr)
526         (grub_linux_is_bzimage, grub_linux16_boot): Declare only on
527         GRUB_MACHINE_PCBIOS.
528         * util/i386/pc/grub-mkimage.c (compress_kernel): Move
529         common grub_util_info() call to ...
530         (generate_image): ... here.
531         Fix use of uninitialized memory, comparison of signed with
532         unsigned integers and memory leak.
533         Remove bogus module address message.
535 2009-06-20  Vladimir Serbinenko  <phcoder@gmail.com>
537         * disk/mdraid_linux.c (GRUB_MOD_FINI): use grub_raid_unregister and not
538         grub_raid_register
539         * disk/dmraid_nvidia.c (GRUB_MOD_FINI): likewise
541 2009-06-19  Pavel Roskin  <proski@gnu.org>
543         * configure.ac: Remove stray AC_MSG_CHECKING.
545 2009-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
547         * disk/scsi.c (grub_scsi_open): use continue instead of big if
549 >>>>>>> collin:ChangeLog
550 2009-06-18  Pavel Roskin  <proski@gnu.org>
552         * conf/common.rmk: Add fs_file.mod.
553         * disk/fs_file.c: New file.
554         * include/grub/disk.h (enum grub_disk_dev_id): Add
555         GRUB_DISK_DEVICE_FILE_ID.
557 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
559         Fix build with Apple's toolchain. Part 2
561         * aclocal.m4 (grub_PROG_TARGET_CC): add missing prototype for main and
562         a fake start
564 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
566         Fix build with Apple's toolchain. Part 1
568         * commands/i386/pc/drivemap_int13h.S: use assembly-time constants
569         for long calls
570         * configure.ac: remove a leftover AC_MSG_RESULT
571         (CFLAGS): don't add -Wl,--defsym,___main=0x8100 when building with
572         Apple's toolchain
574 2009-06-18  Vladimir Serbinenko  <phcoder@gmail.com>
576         Fix warnings
578         * fs/ntfscomp.c (decomp_get16): initialize c1 and c2
579         (decomp_block): initialize ch
580         use grub_memcpy instead of memcpy
582 2009-06-17  Pavel Roskin  <proski@gnu.org>
584         * include/grub/i386/coreboot/console.h: Don't use the i386-pc
585         version, use declarations needed to use vga_text as the startup
586         console.
588         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Remove
589         term/i386/pc/at_keyboard.c, it doesn't need to be compiled into
590         the kernel.
591         * kern/i386/coreboot/init.c: Don't call grub_at_keyboard_init()
592         and grub_at_keyboard_fini(), it's done on module load and
593         unload.
595 2009-06-17  Felix Zielcke  <fzielcke@z-51.de>
597         * loader/i386/linux.c (grub_cmd_linux): Set grub_error if the
598         file can't be found.
599         * loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
601 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
603         Fix newline handling
605         * include/grub/script_sh.h (grub_lexer_param): new field was_newline
606         * script/sh/lexer.c (grub_script_lexer_init): initialize was_newline
607         (grub_script_yylex): don't segfault on unterminated script
608         newline terminates command and variable
610 2009-06-17  Vladimir Serbinenko  <phcoder@gmail.com>
612         avoid double grub_adjust_range call. Bug reported by David Simner
614         * kern/disk.c (grub_disk_write): change to raw disk access before
615         calling disk_read
617 2009-06-17  Colin Watson  <cjwatson@ubuntu.com>
619         * util/elf/grub-mkimage.c (usage): Prefix each option line with two
620         spaces, for the benefit of help2man.
621         * util/i386/efi/grub-mkimage.c (usage): Likewise.
623 2009-06-16  Pavel Roskin  <proski@gnu.org>
625         * kern/i386/halt.c: Include grub/machine/init.h.
626         * kern/i386/reboot.c: Include grub/cpu/reboot.h.
628 2009-06-16  Felix Zielcke  <fzielcke@z-51.de>
630         * util/grub.d/30_os-prober.in: Use ${root} in the generated
631         drivemap menuentry.
633 2009-06-16  James Jarvis  <James.Jarvis@ed.ac.uk>
635         * commands/help.c GRUB_MOD_INIT(echo): Fix the help output of
636         `echo' command.
638 2009-06-16  Pavel Roskin  <proski@gnu.org>
640         * boot/i386/pc/boot.S: Remove root_drive.  Assert offset of
641         boot_drive_check by using GRUB_BOOT_MACHINE_DRIVE_CHECK.  Don't
642         save %dx, we only need %dl and we never change it.
643         * boot/i386/pc/cdboot.S: Don't set the root drive.
644         * boot/i386/pc/pxeboot.S: Likewise.
645         * include/grub/i386/pc/boot.h: Remove
646         GRUB_BOOT_MACHINE_ROOT_DRIVE, adjust
647         GRUB_BOOT_MACHINE_DRIVE_CHECK.
648         * include/grub/i386/pc/kernel.h: Remove grub_root_drive.
649         * kern/i386/pc/init.c (make_install_device): Remove references
650         to grub_root_drive.
651         * kern/i386/pc/startup.S: Likewise.
652         * util/i386/pc/grub-setup.c (setup): Don't set root_drive.
654 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
656         xnu_uuid command
658         * commands/xnu_uuid.c: new file
659         * conf/common.rmk (pkglib_MODULES): add xnu_uuid.mod
660         (xnu_uuid_mod_SOURCES): new variable
661         (xnu_uuid_mod_CFLAGS): likewise
662         (xnu_uuid_mod_LDFLAGS): likewise
663         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
664         * conf/i386-ieee1275.rmk: likewise
665         * conf/i386-pc.rmk: likewise
666         * conf/powerpc-ieee1275.rmk: likewise
667         * conf/sparc64-ieee1275.rmk: likewise
668         * util/grub.d/30_os-prober.in: use UUID for Mac OS X/Darwin
670 2009-06-16  Pavel Roskin  <proski@gnu.org>
672         * configure.ac: Avoid '==' in test command, it's not portable.
674 2009-06-16  Vladimir Serbinenko  <phcoder@gmail.com>
676         Probe command
678         * commands/probe.c: new file
679         * conf/common.rmk (pkglib_MODULES): add probe.mod
680         (probe_mod_SOURCES): new variable
681         (probe_mod_CFLAGS): likewise
682         (probe_mod_LDFLAGS): likewise
683         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/probe.c
684         * conf/i386-ieee1275.rmk: likewise
685         * conf/i386-pc.rmk: likewise
686         * conf/powerpc-ieee1275.rmk: likewise
687         * conf/sparc64-ieee1275.rmk: likewise
689 2009-06-15  Vladimir Serbinenko  <phcoder@gmail.com>
691         Fix handling of string like \"hello\" and "a
692         b"
694         * script/sh/lexer.c (check_textstate): accept GRUB_PARSER_STATE_ESC
695         (grub_script_yylex): fix parsing of quoting, escaping and newline
697 2009-06-13  Vladimir Serbinenko  <phcoder@gmail.com>
699         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): fix partition
700         handling
702 2009-06-13  Jun Inoue  <jun.lambda@gmail.com>
704         * util/grub-mkconfig.in: Fix parsing of --output option.
706 2009-06-12  Pavel Roskin  <proski@gnu.org>
708         * Makefile.in (pkgdata_SRCDIR): Remove.  genmodsrc.sh and
709         genmk.rb don't need to be generated or installed.
711 2009-06-12  Vladimir Serbinenko  <phcoder@gmail.com>
713         * commands/i386/pc/drivemap_int13h.S: add more comments
715 2009-06-11  Pavel Roskin  <proski@gnu.org>
717         * Makefile.in (uninstall): Uninstall manuals.
719         * Makefile.in: Rename lib_DATA to lib_SCRIPTS, move it from
720         PKGLIB to SCRIPTS.  This fixes installation of grub-mkconfig_lib
721         and update-grub_lib in two places.
722         * conf/common.rmk: Rename lib_DATA to lib_SCRIPTS.
724         * disk/usbms.c (grub_usbms_transfer): Initialize `err' to fix
725         a compiler warning.
727         * loader/i386/bsd.c (grub_freebsd_boot): Rename `entry' to
728         `entry_lo' to fix variable shadowing.
730 2009-06-11  Christian Franke  <franke@computer.org>
732         * kern/misc.c (__enable_execute_stack): Add missing return type
733         to prevent gcc warning.
735 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
737         * conf/i386-ieee1275.rmk (COMMON_LDFLAGS): Remove `-static -lgcc'.
739 2009-06-11  Pavel Roskin  <proski@gnu.org>
741         * Makefile.in: Don't rely on any scripts being executable.
742         Always use $(SHELL) to run shell scripts.
744         * configure.ac: Always define ___main if using -nostdlib.  This
745         fixes tests on Cygwin.
747 2009-06-11  Giuseppe Caizzone  <acaizzo@gmail.com>
749         UDF fix
751         * fs/udf.c (grub_udf_read_block): handle the fact that ad->length
752         is in bytes and not in blocks
754 2009-06-11  Pavel Roskin  <proski@gnu.org>
756         * kern/i386/halt.c (grub_halt): Make `i' unsigned to fix a
757         warning.
759 2009-06-11  Felix Zielcke  <fzielcke@z-51.de>
761         * util/grub.d/30_os-prober.in: Fix a comment. Source
762         ${libdir}/grub/grub-mkconfig_lib.  Use prepare_grub_to_access_device
763         to set the root device.  Place drivemap command in the generated
764         chain entry.
766 2009-06-11  Pavel Roskin  <proski@gnu.org>
768         * configure.ac: Remove host_m32.  Issues with 64-bit utilities
769         have long been resolved.
771 2009-06-11  Colin Watson  <cjwatson@ubuntu.com>
773         * util/grub.d/10_linux.in: Capitalise "Linux".
775         * util/grub-pe2elf.c (usage): Fix references to grub-editenv.
777 2009-06-11  Pavel Roskin  <proski@gnu.org>
779         * kern/efi/efi.c (grub_exit): Add infinite loop at the end to
780         fix a gcc warning and ensure that the function won't ever exit.
782         * kern/i386/ieee1275/init.c: Add missing prototype for
783         grub_stop_floppy().
785         * loader/ieee1275/multiboot2.c [__i386__]: Include
786         grub/cpu/multiboot.h.
788         * term/i386/pc/serial.c (serial_translate_key_sequence): Avoid
789         casts to short - they are not portable and cause warnings.  Fix
790         use of uninitialized values in input_buf.  Use ARRAY_SIZE.
792 2009-06-11  Vladimir Serbinenko  <phcoder@gmail.com>
794         Drivemap fixes
796         * commands/i386/pc/drivemap.c (grub_get_root_biosnumber_drivemap):
797         new function
798         (grub_get_root_biosnumber_saved): new variable
799         (GRUB_MOD_INIT): register grub_get_root_biosnumber_drivemap
800         (GRUB_MOD_FINI): unregister grub_get_root_biosnumber_drivemap
801         * commands/i386/pc/drivemap_int13h.S (grub_drivemap_handler): restore
802         %dx after the call if necessary
803         * conf/common.rmk (pkglib_MODULES): remove boot.mod
804         (boot_mod_SOURCES): remove
805         (boot_mod_CFLAGS): remove
806         (boot_mod_LDFLAGS): remove
807         * conf/i386-coreboot.rmk (pkglib_MODULES): add boot.mod
808         (boot_mod_SOURCES): new variable
809         (boot_mod_CFLAGS): likewise
810         (boot_mod_LDFLAGS): likewise
811         * conf/i386-efi.rmk: likewise
812         * conf/i386-ieee1275.rmk: likewise
813         * conf/i386-pc.rmk: likewise
814         * conf/powerpc-ieee1275.rmk: likewise
815         * conf/sparc64-ieee1275.rmk: likewise
816         * conf/x86_64-efi.rmk: likewise
817         * include/grub/i386/pc/biosnum.h: new file
818         * lib/i386/pc/biosnum.c: likewise
819         * loader/i386/bsd.c (grub_bsd_get_device): use grub_get_root_biosnumber
820         * loader/i386/multiboot.c (grub_multiboot_get_bootdev): likewise
821         * loader/i386/pc/chainloader.c (grub_chainloader_cmd): likewise
823 2009-06-10  Pavel Roskin  <proski@gnu.org>
825         * io/gzio.c (test_header): Don't reuse one buffer for all data.
826         Use separate variables.  Read only the file size at the end, but
827         not the checksum that we don't use.
829         * kern/file.c (grub_file_read): Use void pointer for the buffer.
830         Adjust all callers.
832         * kern/ieee1275/openfw.c: Remove libc includes.
833         * kern/ieee1275/cmain.c: Likewise.
834         * include/grub/ieee1275/ieee1275.h: Likewise.
836         * kern/i386/coreboot/init.c: Include grub/cpu/tsc.h to fix
837         compiler warnings.
839 2009-06-10  Felix Zielcke  <fzielcke@z-51.de>
841         * gendistlist.sh (EXTRA_DISTFILES): Add `genhandlerlist.sh' and
842         `genparttoollist.sh'.
843         (DISTDIRS): Add `efiemu', `mmap', `parttool' and `script'.
844         Add `*.sh' to the list find searches for and change `mdate.sh'
845         to `mdate-sh'.
847 2009-06-10  Pavel Roskin  <proski@gnu.org>
849         * include/grub/multiboot2.h: Provide compatibility defines for
850         multiboot2.h.
851         * include/multiboot2.h: Include stdint.h only if needed, using
852         angle brackets.
853         * loader/i386/pc/multiboot2.c: Include multiboot2.h after
854         grub/multiboot2.h.
855         * loader/ieee1275/multiboot2.c: Likewise.
856         * loader/multiboot2.c: Likewise.
857         * loader/multiboot_loader.c: Likewise.
859         * configure.ac: Use -nostdlib when probing for the target.  It
860         should not be required to have libc for the target.
862         * configure.ac: Remove checks for __bswapsi2 and __bswapdi2,
863         they fail without libc headers for the target.
864         * include/grub/powerpc/libgcc.h: Use weak attribute for all
865         exports.
866         * include/grub/sparc64/libgcc.h: Likewise.  Don't use
867         preprocessor conditionals.
869         * conf/common.rmk: Compile tar.mod from tar.c, not cpio.c.  The
870         build system doesn't need to be aware of the tar.c internals.
872 2009-06-09  Michel Hermier  <michel.hermier@gmail.com>
874         * fs/i386/pc/pxe.c (grub_pxefs_read): Fix returned values.
876 2009-06-09  Robert Millan  <rmh.grub@aybabtu.com>
878         * util/deviceiter.c (grub_util_iterate_devices): Increase number of
879         disk limit to 26 for IDE, Virtio, Xen and SCSI.
881 2009-06-09  Felix Zielcke  <fzielcke@z-51.de>
883         * util/i386/pc/grub-install.in: Change the error message if UUIDs
884         aren't available if ata.mod gets used.
886 2009-06-09  Oliver Henshaw  <oliver.henshaw@gmail.com>
888         * bus/usb/ohci.c (grub_ohci_pci_iter): Link struct only after
889         initialising controller.
890         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
892 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
894         * util/i386/pc/grub-install.in: Add a parameter --disk-module
895         to choose between ata and biosdisk module on i386-pc.
897 2009-06-08  Oliver Henshaw  <oliver.henshaw@gmail.com>
899         * bus/usb/ohci.c (grub_ohci_pci_iter): Define the Class,
900         Subclass and Programming Interface fields in terms of the 3 byte
901         Class Code register.
902         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
904         * bus/usb/ohci.c (grub_ohci_pci_iter): Check that programming
905         interface is OHCI.  Add grub_dprintf for symmetry with
906         bus/usb/uhci.c.
907         * bus/usb/uhci.c (grub_uhci_pci_iter): Check that programming
908         interface is UHCI.  Add interf variable for programming
909         interface.  Print interface with class/subclass.
911         * bus/usb/ohci.c: Set interf with correct field.
913         * bus/usb/uhci.c: Remove unneeded doubled lines.
914         * bus/usb/ohci.c: Likewise. Change interf to grub_uint32_t.
915         Remove whitespace inside comment.
917 2009-06-08  Robert Millan  <rmh.grub@aybabtu.com>
919         * loader/i386/linux.c (grub_cmd_linux): When processing `vga=', use
920         as fallback an equivalent option without depth.
922 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
924         Not fail if unable to retrieve C/H/S on LBA disks
926         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): behave gracefully
927         if unable to retrieve C/H/S on LBA disks
929 2009-06-08  Pavel Roskin  <proski@gnu.org>
931         * fs/hfs.c (grub_hfs_find_dir): Use union to avoid a warning
932         about aliasing.
934 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
936         * Makefile.in (uninstall): Remove all $lib_DATA files.
938 2009-06-08  Vladimir Serbinenko  <phcoder@gmail.com>
940         Bugfix: install on partitionless device
942         * util/hostdisk.c (grub_util_biosdisk_get_grub_dev): check if os_dev
943         is a whole disk
945 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
947         * Makefile.in (uninstall): Remove all $include_DATA files.
949 2009-06-08  Felix Zielcke  <fzielcke@z-51.de>
951         * commands/true.c: New file.  Implement the true and false commands.
952         * conf/common.rmk.c (pkglib_MODULES): Add `true.mod'.
953         (true_mod_SOURCES): New variable.
954         (true_mod_CFLAGS): Likewise.
955         (true_mod_LDFLAGS): Likewise.
957 2009-06-05  Colin D Bennett  <colin@gibibit.com>
959         Optimized font character lookup using binary search instead of linear
960         search.  Fonts now are required to have the character index ordered by
961         code point.
963         * font/font.c (load_font_index): Verify that fonts have ordered
964         character indices.
965         (find_glyph): Use binary search instead of linear search to find a
966         character in a font.
968 2009-06-05  Michael Scherer  <misc@mandriva.org>
970         * fs/hfsplus.c (grub_hfsplus_mount): Determine if the filesystem
971         uses case sensitive btree.
972         (grub_hfsplus_iterate_dir): Use GRUB_FSHELP_CASE_INSENSITIVE
973         only for case insensitive filesystems.
975 2009-06-05  Vladimir Serbinenko  <phcoder@gmail.com>
977         * conf/i386-pc.rmk (efiemu_mod_CFLAGS): remove -Werror -Wall
978         * conf/common.rmk (search_mod_CFLAGS): likewise
980 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
982         * kern/i386/pc/startup.S [APPLE_CC]: block of nops to
983         compensate a compiler bug
985 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
987         * include/grub/term.h (GRUB_TERM_BACKSPACE): explicitly define as 8
988         instead of '\b'
990 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
992         Definitions for creating asm symbols with Apple's CC
994         * include/grub/symbol.h [APPLE_CC] (FUNCTION): new macro
995         [APPLE_CC] (VARIABLE): likewise
997 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
999         Disable lnxboot.img when compiled
1000         with Apple's CC
1002         * conf/i386-pc.rmk (pkglib_IMAGES): remove lnxboot.img
1003         pkglib_IMAGES [! TARGET_APPLE_CC] (pkglib_IMAGES): add lnxboot.img
1004         * boot/i386/pc/lnxboot.S [APPLE_CC]: define an #error
1005         [! APPLE_CC] (CODE_LENG): skip
1006         [! APPLE_CC] (setup_sects): likewise
1007         [! APPLE_CC]: skip filling
1009 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1011         Address in trampolines based on 32-bit registers when compiled
1012         with Apple's CC
1014         * loader/i386/xnu_helper.S [APPLE_CC]: use 32-bit registers
1015         for addresses
1016         * loader/i386/linux_trampoline.S [APPLE_CC]: likewise
1018 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1020         Avoid aliases when compiling with Apple's CC for PCBIOS machine
1022         * kern/misc.c [APPLE_CC] (memcpy): new function
1023         [APPLE_CC] (memmove): likewise
1024         [APPLE_CC && !GRUB_UTIL] (grub_err_printf): likewise
1025         (memcpy): define alias conditionally on !APPLE_CC
1026         (memset): likewise
1027         (abort): likewise
1028         * include/grub/misc.h (memove): don't define when both GRUB_UTIL and
1029         APPLE_CC are defined
1030         * include/grub/list.h [APPLE_CC] (grub_assert_fail): new function
1031         (grub_assert_fail): make prototype conditional
1033 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1035         Use grub-macho2img when compiling with Apple's CC for PCBIOS machine
1037         * conf/common.rmk (bin_UTILITIES): add (on false on condition)
1038         grub-macho2img
1039         (CLEANFILES): add grub-macho2img
1040         (grub_macho2img_SOURCES): new variable
1041         * kern/i386/pc/startup.S (bss_start): new variable
1042         (bss_end): likewise
1043         * genmk.rb: use grub-macho2img for *.img when compiled with Apple's CC
1044         * util/grub-macho2img.c: new file
1046 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1048         Use objconv when compiling with Apple's CC
1050         * conf/i386-pc.rmk (efiemu32.o): use OBJCONV if defined
1051         (efiemu64.o): likewise
1052         (efiemu64_c.o): omit -mcmodel=large and add -DAPPLE_CC=1
1053         when compiling with Apple's CC
1054         (efiemu64_s.o): likewise
1055         * configure.ac: check for objconv when compiling with Apple's CC
1056         * genmk.rb: use objconv for modules when compiled with Apple's CC
1058 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1060         Define segment as well as section when compiling with
1061         Apple's CC
1063         * efiemu/runtime/efiemu.c (PHYSICAL_ATTRIBUTE): new definition
1064         (efiemu_set_virtual_address_map): declare with PHYSICAL_ATTRIBUTE
1065         (efiemu_convert_pointer): likewise
1066         (efiemu_set_virtual_address_map): likewise
1067         (efiemu_convert_pointer): likewise
1068         (efiemu_getcrc32): likewise
1069         (init_crc32_table): likewise
1070         (reflect): likewise
1071         * include/grub/dl.h (GRUB_MOD_NAME): define segment with Apple's CC
1072         (GRUB_MOD_DEP): likewise
1074 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1076         Allow a compilation without -mcmodel=large
1078         * kern/efi/mm.c (grub_efi_allocate_pages): don't allocate >4GiB
1079         when compiled without -mcmodel=large
1080         (filter_memory_map): remove memory post 4 GiB when compiled
1081         without -mcmodel=large
1082         * configure.ac: fail gracefully and add -DMCMODEL_SMALL=1 to
1083         TARGET_CFLAGS when -mcmodel=large isn't supported
1085 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1087         Remove nested functions in efiemu core
1089         * efiemu/runtime/efiemu.c (reflect): make static instead of nested
1091 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1093         Avoid clobbering %ebx/%rbx in inline assembly with Apple's CC
1095         * efiemu/runtime/efiemu.c (write_cmos): use %cl instead of %bl as
1096         temporary storage
1097         * include/grub/i386/tsc.h (grub_get_tsc): restore %rbx/%ebx when
1098         using Apple's CC
1099         (grub_cpu_is_tsc_supported): likewise
1100         * loader/i386/xnu.c (guessfsb): restore %rbx/%ebx in inline assembly
1102 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1104         Absolute addressing through constant with Apple's cc
1106         * kern/i386/pc/startup.S: Define necessary constants
1107         and address through it when using ABS with Apple's CC
1108         * boot/i386/pc/diskboot.S: likewise
1109         * boot/i386/pc/boot.S: likewise
1110         * boot/i386/pc/lnxboot.S: likewise
1111         * boot/i386/pc/cdboot.S: likewise
1112         * mmap/i386/pc/mmap_helper.S: likewise
1113         * commands/i386/pc/drivemap_int13h.S: likewise
1115 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1117         Check if compiler is apple cc
1119         * Makefile.in (ASFLAGS): new variable
1120         (TARGET_ASFLAGS): likewise
1121         (TARGET_MODULE_FORMAT): likewise
1122         (TARGET_APPLE_CC): likewise
1123         (OBJCONV): likewise
1124         (TARGET_IMG_CFLAGS): likewise
1125         (TARGET_CPPFLAGS): add includedir
1126         * configure.ac: call grub_apple_cc and grub_apple_target_cc
1127         (TARGET_IMG_LDFLAGS): Add -Wl,-Ttext,. All users updated
1128         Check for linker script only if compiler isn't Apple's CC
1129         (TARGET_MODULE_FORMAT): set
1130         (TARGET_APPLE_CC): likewise
1131         (TARGET_ASFLAGS): likewise
1132         (ASFLAGS): likewise
1133         Check for objcopy only if compiler isn't Apple's CC
1134         Check for BSS symbol only if compiler isn't Apple's CC
1135         * genmk.rb: adapt nm options if we use Apple's utils
1136         * aclocal.m4 (grub_apple_cc): new test
1137         (grub_apple_target_cc): likewise
1139 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1141         Simplify sed expressions and improve awk
1143         * Makefile.in (install-local): simplify sed expression
1144         * gencmdlist.sh: likewise
1145         * genmoddep.awk: avoid adding module as a dependency of itself
1147 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1149         Add missing start symbols
1151         * boot/i386/pc/boot.S: add start
1152         * boot/i386/pc/pxeboot.S: likewise
1154 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1156         Fix wrong assumptions with grub-mkimage on EFI
1158         * i386/efi/grub-mkimage.c (read_kernel_module): don't write prefix here
1159         (relocate_addresses): consider both r_addend and value at offset
1160         (make_mods_section): zerofill modinfo and header
1161         (convert_elf): write prefix here
1163 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1165         Use .asciz instead of .string
1167         * i386/pc/diskboot.S: use .asciz instead of .string
1168         * i386/pc/boot.S: likewise
1169         * include/grub/dl.h (GRUB_MOD_DEP): likewise
1170         (GRUB_MOD_NAME): likewise
1172 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1174         gfxpayload support
1176         * commands/videotest.c (grub_cmd_videotest): use grub_video_set_mode
1177         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_PURE_TEXT): new definition
1178         (grub_video_setup): remove
1179         (grub_video_set_mode): new prototype
1180         * loader/i386/linux.c (DEFAULT_VIDEO_MODE): new definition
1181         (vid_mode): remove
1182         (linux_vesafb_res): compile only on PCBIOS
1183         (grub_linux_boot): support gfxpayload
1184         * loader/i386/pc/xnu.c (video_hook): new function
1185         (grub_xnu_set_video): support gfxpayload
1186         * term/gfxterm.c (DEFAULT_VIDEO_WIDTH): removed
1187         (DEFAULT_VIDEO_HEIGHT): likewise
1188         (DEFAULT_VIDEO_FLAGS): likewise
1189         (DEFAULT_VIDEO_MODE): new definition
1190         (video_hook): new function
1191         (grub_gfxterm_init): use grub_video_set_mode
1192         * util/grub.d/30_os-prober.in: remove explicit modesetting before
1193         loading xnu
1194         * video/video.c (grub_video_setup): removed
1195         (grub_video_set_mode): new function based on grub_gfxterm_init and
1196         grub_video_setup
1198 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1200         Avoid calling biosdisk in drivemap
1202         * commands/i386/pc/drivemap.c (parse_biosdisk): remove
1203         (revparse_biosdisk): likewise
1204         (list_mappings): derive name from id directly
1205         (grub_cmd_drivemap): use tryparse_diskstring
1207 2009-06-04  Vladimir Serbinenko  <phcoder@gmail.com>
1209         Script fixes
1211         * include/grub/script_sh.h (grub_script_cmdline): remove cmdline
1212         (grub_lexer_param): add tokenonhold
1213         (grub_script_create_cmdline): remove cmdline. All callers updated
1214         (grub_script_function_create): make functionname
1215         grub_script_arg. All callers updated
1216         (grub_script_execute_argument_to_string): new prototype
1217         * kern/parser.c (state_transitions): reorder
1218         (grub_parser_cmdline_state): fix a bug and make more compact
1219         * script/sh/execute.c (grub_script_execute_argument_to_string):
1220         make global
1221         (grub_script_execute_cmdline): use new format
1222         * script/sh/function.c (grub_script_function_create): make functionname
1223         grub_script_arg. All callers updated
1224         * script/sh/lexer.c (grub_script_lexer_init): initialize tokenonhold
1225         (grub_script_yylex): remove
1226         (grub_script_yylex2): renamed to ...
1227         (grub_script_yylex): ...renamed
1228         parse the expressions like a${b}c
1229         * script/sh/parser.y (GRUB_PARSER_TOKEN_ARG): new typed terminal
1230         (GRUB_PARSER_TOKEN_VAR): remove
1231         (GRUB_PARSER_TOKEN_NAME): likewise
1232         ("if"): declare as typeless
1233         ("while"): likewise
1234         ("function"): likewise
1235         ("else"): likewise
1236         ("then"): likewise
1237         ("fi"): likewise
1238         (text): remove
1239         (argument): likewise
1240         (script): accept empty scripts and make exit on error
1241         (arguments): use GRUB_PARSER_TOKEN_ARG
1242         (function): likewise
1243         (command): move error handling to script
1244         (menuentry): move grub_script_lexer_ref before
1245         * script/sh/script.c (grub_script_create_cmdline): remove cmdline
1246         argument. All callers updated
1248 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1250         Prevent GRUB from probing floppies during boot.
1252         * conf/common.rmk (search_mod_CFLAGS): Use `-Werror -Wall'.
1253         * commands/search.c (options): Add --no-floppy.
1254         (search_fs, search_file, grub_cmd_search): Support --no-floppy.
1255         * util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Use
1256         --no-floppy when searching for UUIDs.
1258 2009-06-04  Robert Millan  <rmh.grub@aybabtu.com>
1260         Simplify the code duplication in commands/search.c.
1262         * commands/search.c (search_label, search_fs_uuid): Merge into ...
1263         (search_fs): ... this.  Update all users.
1265 2009-06-03  Felix Zielcke  <fzielcke@z-51.de>
1267         * util/grub-mkconfig.in (update_grub_dir): Rename to grub_mkconfig_dir.
1269 2009-05-28  Pavel Roskin  <proski@gnu.org>
1271         * Makefile.in: Don't use "cp -d", it doesn't work on FreeBSD.
1272         Remove the original symlink explicitly.
1274         * fs/hfs.c (grub_hfs_find_dir): Skip sequences of slashes, not
1275         just one slash.  That's how grub_fshelp_find_file() does it.
1277 2009-05-26  Pavel Roskin  <proski@gnu.org>
1279         * genmk.rb: Avoid shadowing variable `s', rename the outer `s'
1280         to `str'.
1282         * util/getroot.c (grub_util_get_dev_abstraction): Mark os_dev as
1283         possibly unused.
1285 2009-05-25  Christian Franke  <franke@computer.org>
1287         * disk/ata.c (grub_ata_wait_not_busy): Add debug output of status
1288         register.
1289         (grub_atapi_identify): Add wait after drive select.
1290         (grub_ata_identify): Do more strict status register check before
1291         calling grub_atapi_identify ().  Suppress error message if status
1292         register is 0x00 after command failure.  Add status register
1293         check after PIO read to avoid bogus identify due to stuck DRQ.
1294         Thanks to Pavel Roskin for testing.
1295         (grub_device_initialize): Remove unsafe status register check.
1296         Thanks to 'phcoder' for problem report and patch.
1297         Prevent sign extension in debug message.
1299 2009-05-23  Colin D Bennett  <colin@gibibit.com>
1301         Cleaned up `include/grub/normal.h'.  Grouped prototypes by
1302         definition file, and functions defined in `normal/menu.c' have had
1303         their prototypes moved to `include/grub/menu.h' for consistency.
1305         * include/grub/menu.h (grub_menu_execute_callback): Added; moved
1306         from normal.h.
1307         (grub_menu_get_entry): Likewise.
1308         (grub_menu_get_timeout): Likewise.
1309         (grub_menu_set_timeout): Likewise.
1310         (grub_menu_execute_entry): Likewise.
1311         (grub_menu_execute_with_fallback): Likewise.
1312         (grub_menu_entry_run): Likewise.
1314         * include/grub/normal.h: Re-ordered and grouped function
1315         prototypes by file that the function is defined in.
1316         (grub_menu_execute_callback): Removed; moved to menu.h.
1317         (grub_menu_get_entry): Likewise.
1318         (grub_menu_get_timeout): Likewise.
1319         (grub_menu_set_timeout): Likewise.
1320         (grub_menu_execute_entry): Likewise.
1321         (grub_menu_execute_with_fallback): Likewise.
1322         (grub_menu_entry_run): Likewise.
1323         (grub_menu_addentry): Renamed from this ...
1324         (grub_normal_add_menu_entry): ... to this.
1326         * normal/main.c (grub_menu_addentry): Renamed from this ...
1327         (grub_normal_add_menu_entry): ... to this.
1329         * script/sh/execute.c (grub_script_execute_menuentry): Update
1330         reference to renamed grub_menu_addentry function.
1332 2009-05-23  Felix Zielcke  <fzielcke@z-51.de>
1334         * commands/i386/pc/drivemap.c (MODNAME): Remove. Update all users.
1336 2009-05-22  Pavel Roskin  <proski@gnu.org>
1338         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Remove.
1339         * configure.ac: Don't call grub_I386_CHECK_REGPARM_BUG.  Define
1340         NESTED_FUNC_ATTR using AH_BOTTOM.  Use regparm(1) only when
1341         compiling for the i386 targets, but not for the utilities.
1343         * include/grub/i386/pc/kernel.h (grub_boot_drive): Change type
1344         to grub_uint8_t.
1345         (grub_root_drive): Likewise.
1346         * kern/i386/pc/startup.S (grub_boot_drive): Change size to byte,
1347         remove alignment.
1348         (grub_root_drive): Change size to byte.
1349         (grub_start_addr): Remove.
1350         (grub_end_addr): Likewise.
1351         (grub_apm_bios_info): Likewise.
1353 2009-05-21  Felix Zielcke  <fzielcke@z-51.de>
1355         * normal/i386: Remove.
1356         * normal/powerpc: Likewise.
1357         * normal/sparc64: Likewise.
1358         * normal/x86_64: Likewise.
1360 2009-05-19  Vladimir Serbinenko  <phcoder@gmail.com>
1362         * conf/x86_64-efi.rmk (linux_mod_ASFLAGS): Add missing variable
1363         * loader/i386/linux_trampoline.S: Fix indentation
1364         * loader/i386/xnu_helper.S: Likewise
1366 2009-05-18  Colin D Bennett  <colin@gibibit.com>
1368         Display error messages when parsing a Lua statement fails.
1369         Previously, executing a syntactically invalid statement like
1370         ")foo" or "bar;" would silently fail.
1372         * script/lua/grub_main.c (handle_lua_error): New function.
1373         (grub_lua_parse_line): Improved reporting of Lua parser and
1374         execution errors.
1376 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1378         Remove -Werror which causes build to fail on some systems
1380         * conf/i386-pc.rmk (xnu_mod_CFLAGS): Remove -Werror -Wall
1381         * conf/i386-efi.rmk (xnu_mod_CFLAGS): Likewise
1382         * conf/x86_64-efi.rmk (xnu_mod_CFLAGS): Likewise
1384 2009-05-17  Vladimir Serbinenko  <phcoder@gmail.com>
1386         trampoline for linux on 64-bit platform
1388         * conf/x86_64-efi.rmk (linux_mod_SOURCES): added
1389         loader/i386/efi/linux_trampoline.S
1390         * include/grub/x86_64/efi/loader.h (grub_linux_real_boot): removed
1391         declaration
1392         * kern/x86_64/efi/startup.S (grub_linux_real_boot): moved from
1393         here
1394         * loader/i386/linux_trampoline.S: moved here
1395         * loader/i386/efi/linux.c (allocate_pages): reserve space for
1396         trampoline
1397         (jumpvector): removed
1398         (grub_linux_trampoline_start): new declaration
1399         (grub_linux_trampoline_end): likewise
1400         (grub_linux_boot): use trampoline when on 64-bit platform
1401         * loader/i386/linux.c: likewise
1403 2009-05-16  Pavel Roskin  <proski@gnu.org>
1405         * script/lua/grub_lib.c (grub_lua_getenv): Make name and value
1406         const to avoid a warning.
1407         (grub_lua_setenv): Likewise.
1408         * script/lua/grub_main.c (grub_lua_parse_line): Use size_t for
1409         lmsg to fix a warning.
1411 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1413         * conf/i386.rmk (setjmp_mod_CFLAGS): Rename to ...
1414         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1415         * conf/x86_64-efi.rmk (setjmp_mod_CFLAGS): Rename to ...
1416         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1417         * conf/powerpc-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1418         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1419         * conf/sparc64-ieee1275.rmk (setjmp_mod_CFLAGS): Rename to ...
1420         (setjmp_mod_ASFLAGS): ... this. Set to $(COMMON_ASFLAGS).
1422 2009-05-16  Felix Zielcke  <fzielcke@z-51.de>
1424         * util/grub-mkconfig.in: Export GRUB_TERMINAL_INPUT.
1426 2009-05-16  Bean  <bean123ch@gmail.com>
1428         * conf/common.rmk (pkglib_MODULES): Add lua.mod.
1429         (lua_mod_SOURCES): New variable.
1430         (lua_mod_CFLAGS): Likewise.
1431         (lua_mod_LDFLAGS): Likewise.
1433         * conf/i386.rmk (pkglib_MODULES): Add setjmp.mod.
1434         (setjmp_mod_SOURCES): New variable.
1435         (setjmp_mod_CFLAGS): Likewise.
1436         (setjmp_LDFLAGS): Likewise.
1438         * conf/x86_64-efi.rmk (pkglib_MODULES): Add setjmp.mod.
1439         (setjmp_mod_SOURCES): New variable.
1440         (setjmp_mod_CFLAGS): Likewise.
1441         (setjmp_LDFLAGS): Likewise.
1443         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1444         (setjmp_mod_SOURCES): New variable.
1445         (setjmp_mod_CFLAGS): Likewise.
1446         (setjmp_LDFLAGS): Likewise.
1448         * conf/sparc64-ieee1275.rmk (pkglib_MODULES): Add setjmp.mod.
1449         (setjmp_mod_SOURCES): New variable.
1450         (setjmp_mod_CFLAGS): Likewise.
1451         (setjmp_LDFLAGS): Likewise.
1453         * normal/i386/setjmp.S: Moved from here ...
1454         * lib/i386/setjmp.S: ... Moved here
1455         * normal/x86_64/setjmp.S: Moved from here ...
1456         * lib/x86_64/setjmp.S: ... Moved here
1457         * normal/powerpc/setjmp.S: Moved from here ...
1458         * lib/powerpc/setjmp.S: ... Moved here
1459         * normal/sparc64/setjmp.S: Moved from here ...
1460         * lib/sparc64/setjmp.S: ... Moved here
1462         * include/grub/i386/setjmp.h (grub_setjmp): Don't use attribute
1463         returns_twice in mingw.
1465         * script/lua/grub_lib.c: New file.
1466         * script/lua/grub_lib.h: Likewise.
1467         * script/lua/grub_lua.h: Likewise.
1468         * script/lua/grub_main.c: Likewise.
1469         * script/lua/lapi.c: Likewise.
1470         * script/lua/lapi.h: Likewise.
1471         * script/lua/lauxlib.c: Likewise.
1472         * script/lua/lauxlib.h: Likewise.
1473         * script/lua/lbaselib.c: Likewise.
1474         * script/lua/lcode.c: Likewise.
1475         * script/lua/lcode.h: Likewise.
1476         * script/lua/ldblib.c: Likewise.
1477         * script/lua/ldebug.c: Likewise.
1478         * script/lua/ldebug.h: Likewise.
1479         * script/lua/ldo.c: Likewise.
1480         * script/lua/ldo.h: Likewise.
1481         * script/lua/ldump.c: Likewise.
1482         * script/lua/lfunc.c: Likewise.
1483         * script/lua/lfunc.h: Likewise.
1484         * script/lua/lgc.c: Likewise.
1485         * script/lua/lgc.h: Likewise.
1486         * script/lua/linit.c: Likewise.
1487         * script/lua/liolib.c: Likewise.
1488         * script/lua/llex.c: Likewise.
1489         * script/lua/llex.h: Likewise.
1490         * script/lua/llimits.h: Likewise.
1491         * script/lua/lmathlib.c: Likewise.
1492         * script/lua/lmem.c: Likewise.
1493         * script/lua/lmem.h: Likewise.
1494         * script/lua/loadlib.c: Likewise.
1495         * script/lua/lobject.c: Likewise.
1496         * script/lua/lobject.h: Likewise.
1497         * script/lua/lopcodes.c: Likewise.
1498         * script/lua/lopcodes.h: Likewise.
1499         * script/lua/loslib.c: Likewise.
1500         * script/lua/lparser.c: Likewise.
1501         * script/lua/lparser.h: Likewise.
1502         * script/lua/lstate.c: Likewise.
1503         * script/lua/lstate.h: Likewise.
1504         * script/lua/lstring.c: Likewise.
1505         * script/lua/lstring.h: Likewise.
1506         * script/lua/lstrlib.c: Likewise.
1507         * script/lua/ltable.c: Likewise.
1508         * script/lua/ltable.h: Likewise.
1509         * script/lua/ltablib.c: Likewise.
1510         * script/lua/ltm.c: Likewise.
1511         * script/lua/ltm.h: Likewise.
1512         * script/lua/lua.h: Likewise.
1513         * script/lua/luaconf.h: Likewise.
1514         * script/lua/lualib.h: Likewise.
1515         * script/lua/lundump.c: Likewise.
1516         * script/lua/lundump.h: Likewise.
1517         * script/lua/lvm.c: Likewise.
1518         * script/lua/lvm.h: Likewise.
1519         * script/lua/lzio.c: Likewise.
1520         * script/lua/lzio.h: Likewise.
1522 2009-05-16  Bean  <bean123ch@gmail.com>
1524         * include/grub/kernel.h (grub_module_header_types): Add type
1525         OBJ_TYPE_CONFIG.
1527         * kern/main.c (grub_load_config): New function.
1528         (grub_main): Call grub_load_config to read boot config.
1530         * grub-mkimage (generate_image): New parameter config_path.
1531         (options): New option --config.
1532         (main): Parse --config option, and pass it to generate_image.
1534 2009-05-14  Christian Franke  <franke@computer.org>
1536         * commands/i386/pc/drivemap_int13h.S: Add missing EXT_C for symbols.
1537         This fixes build on Cygwin.
1539 2009-05-14  Pavel Roskin  <proski@gnu.org>
1541         * commands/i386/pc/drivemap_int13h.S: Eliminate unconditional
1542         jump.  This saves two bytes, so the typical case of 2 swapped
1543         drives would fit 32 bytes.
1545 2009-05-13  Pavel Roskin  <proski@gnu.org>
1547         * loader/i386/multiboot.c (grub_multiboot): Cast mmap_addr to
1548         grub_uint32_t to avoid a warning.
1550         * loader/i386/linux.c (allocate_pages): When assigning
1551         real_mode_mem, cast through grub_size_t to fix a warning.  The
1552         code already makes sure that the value would fit a pointer.
1553         (grub_linux_setup_video): Cast render_target->data to
1554         grub_size_t to fix a warning.
1556 2009-05-13  Javier Martín  <lordhabbit@gmail.com>
1558         * commands/i386/pc/drivemap.c: New file - implement drivemap
1559         command.
1560         * commands/i386/pc/drivemap_int13h.S: New file - int13 handler.
1561         * conf/i386-pc.rmk: Add drivemap.c and drivemap_int13h.S.
1563 2009-05-13  Pavel Roskin  <proski@gnu.org>
1565         * util/i386/pc/grub-setup.c (setup): Remove unused variable
1566         embedding_area_exists.
1568 2009-05-13  Robert Millan  <rmh.grub@aybabtu.com>
1570         * util/i386/pc/grub-setup.c (setup): Restructure code flow to make
1571         it easier to understand / work with.
1572         Improve warning messages for cases where there's no embedding area,
1573         or when it is too small (or core.img too large).
1575 2009-05-13  Pavel Roskin  <proski@gnu.org>
1577         * loader/i386/pc/multiboot2.c: Add necessary includes for
1578         grub_multiboot2_real_boot().
1580         * fs/iso9660.c (grub_iso9660_iterate_dir): The file mode in the
1581         PX record is always little-endian.  We only need the lower 2
1582         bytes of the mode.
1584         * fs/cpio.c: Use the same name "struct head" for tar and cpio to
1585         facilitate code reuse.
1586         (grub_cpio_mount): Use "struct head", not a char buffer.  This
1587         fixes a warning reported by gcc 4.4.
1589         * kernel/disk.c (grub_disk_read): Use void pointer for the
1590         buffer.
1591         (grub_disk_write): Use const void pointer for the buffer.
1592         Adjust all callers.  Remove unnecessary casts.
1594 2009-05-10  Robert Millan  <rmh.grub@aybabtu.com>
1596         * util/i386/pc/grub-install.in: Update copyright year.
1598 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1600         gptsync
1602         * commands/gptsync.c: new file
1603         * conf/common.rmk (pkglib_MODULES): add gptsync.mod
1604         (gptsync_mod_SOURCES): new variable
1605         (gptsync_mod_CFLAGS): likewise
1606         (gptsync_mod_LDFLAGS): likewise
1607         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_NTFS):
1608         new definition
1609         (GRUB_PC_PARTITION_TYPE_HFS): likewise
1610         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add commands/gptsync.c
1611         * conf/i386-ieee1275.rmk: likewise
1612         * conf/i386-pc.rmk: likewise
1613         * conf/powerpc-ieee1275.rmk: likewise
1615 2009-05-09  Vladimir Serbinenko  <phcoder@gmail.com>
1617         Fixed grub-emu
1619         * kern/dl.c (grub_dl_ref): omit when compiling grub-emu
1620         (grub_dl_ref): likewise
1622 2009-05-08  Robert Millan  <rmh.grub@aybabtu.com>
1624         * util/i386/pc/grub-setup.c (setup): Factorize find_usable_region(),
1625         split in two functions (one for msdos and one for gpt).
1627 2009-05-08  Pavel Roskin  <proski@gnu.org>
1629         * disk/raid.c (grub_raid_block_xor): Make buf2 constant, it's
1630         not modified.
1632         * disk/raid6_recover.c (grub_raid6_recover): Fix warnings about
1633         uninitialized err[0] and err[1].  Rename them to bad1 and bad2.
1634         Initialize them with -1.  Add sanity check for bad1.  Eliminate
1635         nerr variable.
1637 2009-05-08  David S. Miller  <davem@davemloft.net>
1639         * util/sparc64/ieee1275/grub-ofpathname.c (main): Set progname.
1641 2009-05-06  Robert Millan  <rmh.grub@aybabtu.com>
1643         * util/i386/pc/grub-setup.c (setup): Fix check for embed region
1644         existence.
1646 2009-05-05  Felix Zielcke  <fzielcke@z-51.de>
1648         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
1649         `kern/rescue_reader.c', `kern/rescue_parser.c' and `normal/autofs.c'.
1651 2009-05-05  David S. Miller  <davem@davemloft.net>
1653         * util/sparc64/ieee1275/grub-install.in: Fix sed arg quoting.
1655 2009-05-05  Pavel Roskin  <proski@gnu.org>
1657         * include/grub/dl.h [GRUB_UTIL]: Provide inline implementations
1658         of grub_dl_ref() and grub_dl_unref().
1659         * commands/parttool.c: Remove preprocessor conditionals around
1660         grub_dl_ref() and grub_dl_unref().
1661         * fs/affs.c: Likewise.
1662         * fs/afs.c: Likewise.
1663         * fs/cpio.c: Likewise.
1664         * fs/ext2.c: Likewise.
1665         * fs/fat.c: Likewise.
1666         * fs/hfs.c: Likewise.
1667         * fs/hfsplus.c: Likewise.
1668         * fs/iso9660.c: Likewise.
1669         * fs/jfs.c: Likewise.
1670         * fs/minix.c: Likewise.
1671         * fs/ntfs.c: Likewise.
1672         * fs/reiserfs.c: Likewise.
1673         * fs/sfs.c: Likewise.
1674         * fs/udf.c: Likewise.
1675         * fs/ufs.c: Likewise.
1676         * fs/xfs.c: Likewise.
1677         * include/grub/dl.h: Likewise.
1678         * loader/xnu.c: Likewise.
1680 2009-05-04  Pavel Roskin  <proski@gnu.org>
1682         * commands/acpi.c: Remove unused variable my_mod.
1683         * partmap/amiga.c: Likewise.
1684         * partmap/apple.c: Likewise.
1685         * partmap/gpt.c: Likewise.
1686         * partmap/pc.c: Likewise.
1687         * partmap/sun.c: Likewise.
1688         * term/gfxterm.c: Likewise.
1689         * term/i386/pc/vesafb.c: Likewise.
1690         * term/i386/pc/vga.c: Likewise.
1692 2009-05-04  David S. Miller  <davem@davemloft.net>
1694         * kern/ieee1275/openfw.c (grub_children_iterate): Fix string
1695         pointer args to grub_ieee1275_get_property().
1697         * conf/sparc64-ieee1275.rmk: Fix build due to missing '\'.
1699         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Bypass cdrom
1700         devices, and do not traverse down under controller nodes.
1702         * disk/ieee1275/ofdisk.c (compute_dev_path): New.
1703         (grub_ofdisk_open): Use it to un-escape "," characters.
1704         * kern/disk.c (find_part_sep): New.
1705         (grub_disk_open): Use it to find the first non-escaped ','
1706         character in the disk name.
1707         * util/ieee1275/devicemap.c (escape_of_path): New.
1708         (grub_util_emit_devicemap_entry): Use it.
1709         * util/sparc64/ieee1275/grub-install.in: Update script to
1710         strip partition specifiers properly by not triggering on
1711         '\' escaped ',' characters.
1713 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1715         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START): Set
1716         to 0x300.
1717         * loader/i386/linux.c (vga_modes, linux_vesafb_res): Add a few
1718         resolutions.
1719         (linux_vesafb_modes): Add a lot of additional modes to the list (based
1720         on documentation from Wikipedia).
1722 2009-05-04  Pavel Roskin  <proski@gnu.org>
1724         * disk/ata.c: Spelling fixes.
1725         * disk/raid.c: Likewise.
1726         * disk/usbms.c: Likewise.
1727         * disk/dmraid_nvidia.c: Likewise.
1728         * kern/ieee1275/openfw.c: Likewise.
1729         * kern/ieee1275/init.c: Likewise.
1730         * kern/ieee1275/cmain.c: Likewise.
1731         * boot/i386/pc/cdboot.S: Likewise.
1732         * video/readers/png.c: Likewise.
1733         * video/i386/pc/vbe.c: Likewise.
1734         * fs/udf.c: Likewise.
1735         * fs/hfs.c: Likewise.
1736         * fs/reiserfs.c: Likewise.
1737         * efiemu/runtime/efiemu.c: Likewise.
1738         * efiemu/main.c: Likewise.
1739         * efiemu/mm.c: Likewise.
1740         * include/grub/elf.h: Likewise.
1741         * include/grub/xnu.h: Likewise.
1742         * include/grub/usbdesc.h: Likewise.
1743         * include/grub/usb.h: Likewise.
1744         * include/grub/script_sh.h: Likewise.
1745         * include/grub/lib/LzmaEnc.h: Likewise.
1746         * include/grub/efiemu/efiemu.h: Likewise.
1747         * include/grub/command.h: Likewise.
1748         * normal/menu.c: Likewise.
1749         * normal/main.c: Likewise.
1750         * normal/datetime.c: Likewise.
1751         * bus/usb/uhci.c: Likewise.
1752         * mmap/i386/uppermem.c: Likewise.
1753         * mmap/mmap.c: Likewise.
1754         * commands/acpi.c: Likewise.
1755         * commands/test.c: Likewise.
1756         * partmap/apple.c: Likewise.
1757         * font/font.c: Likewise.
1758         * loader/sparc64/ieee1275/linux.c: Likewise.
1759         * loader/macho.c: Likewise.
1760         * loader/i386/bsd_trampoline.S: Likewise.
1761         * loader/i386/bsd.c: Likewise.
1762         * loader/xnu.c: Likewise.
1763         * term/i386/pc/vesafb.c: Likewise.
1764         * term/usb_keyboard.c: Likewise.
1765         * util/resolve.c: Likewise.
1766         * util/getroot.c: Likewise.
1768 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1770         * conf/i386-pc.rmk (libpkg_DATA): Rename to pkglib_DATA.
1772 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1774         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (grub_cmd_linux): Fix
1775         build error.
1777 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1779         * loader/i386/linux.c (grub_cmd_linux): Make "vga=" compatibility
1780         parameter only available on BIOS.
1782 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1784         Removed wrong semicolon in declaration
1786         * grub/misc.h (grub_dprintf): remove semicolon
1788 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1790         * loader/i386/linux.c (GRUB_ASSUME_LINUX_HAS_FB_SUPPORT): New macro.
1791         (grub_linux_boot): Don't check for `linux_vesafb_modes' bounds (this
1792         is done by grub_cmd_linux() now).
1793         [! GRUB_ASSUME_LINUX_HAS_FB_SUPPORT]: If "vga=" parameter wasn't set,
1794         restore video to text mode.
1795         (grub_cmd_linux): Default `vid_mode' initialization to 0, which
1796         indicates lack of "vga=" parameter.  "vga=0" is mapped to
1797         `GRUB_LINUX_VID_MODE_NORMAL'.
1799 2009-05-04  Felix Zielcke  <fzielcke@z-51.de>
1801         * conf/i386-efi.rmk (grub_emu_SOURCES): Remove `normal/execute.c',
1802         `normal/lexer.c', `kern/rescue.c', `normal/function.c', `normal/misc.c'
1803         and `normal/script.c'.  Add `kern/rescue_reader.c',
1804         `kern/rescue_parser.c', `script/sh/main.c', `script/sh/execute.c',
1805         `script/sh/function.c', `script/sh/lexer.c', `script/sh/script.c' and
1806         `grub_script.tab.c'.
1808         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1809         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
1810         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1811         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
1812         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
1814         * Makefile.in: Remove duplicated 2008 in Copyright line.
1816 2009-05-04  Robert Millan  <rmh.grub@aybabtu.com>
1818         * util/misc.c (grub_util_warn): New function.  Emits a warning
1819         unconditionally.
1820         * include/grub/util/misc.h (grub_util_warn): New declaration.
1822         * util/i386/pc/grub-install.in: Understand --force and pass it down
1823         to grub-setup.
1825         * util/i386/pc/grub-setup.c (main): Understand --force and pass it
1826         down to setup().
1827         (setup): Improve error messages and add warnings when requested to
1828         install in odd layouts.  Refuse to install using blocklists unless
1829         --force was set.
1831 2009-05-04  martin f. krafft  <madduck@madduck.net>
1833         * disk/raid.c (grub_raid_scan_device): Improve debug message.
1835 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1837         Updated copyright year
1839         * fs/hfsplus.c: updated copyright year
1841 2009-05-04  Vladimir Serbinenko  <phcoder@gmail.com>
1843         HFS+ UUID
1845         * fs/hfsplus.c (grub_hfsplus_volheader): added num_serial field
1846         in the space previously used by unused3
1847         (grub_hfsplus_uuid): new function
1848         (grub_hfsplus_fs): added uuid field
1850 2009-05-03  Pavel Roskin  <proski@gnu.org>
1852         * disk/ata.c: Don't cast mod to void in GRUB_MOD_INIT to
1853         suppress warnings.  It's no longer needed.
1854         * disk/host.c: Likewise.
1855         * disk/ata_pthru.c: Likewise.
1856         * disk/loopback.c: Likewise.
1857         * hook/datehook.c: Likewise.
1858         * parttool/pcpart.c: Likewise.
1859         * fs/i386/pc/pxe.c: Likewise.
1860         * fs/ntfscomp.c: Likewise.
1861         * efiemu/main.c: Likewise.
1862         * mmap/mmap.c: Likewise.
1863         * commands/crc.c: Likewise.
1864         * commands/hexdump.c: Likewise.
1865         * commands/hdparm.c: Likewise.
1866         * commands/acpi.c: Likewise.
1867         * commands/echo.c: Likewise.
1868         * commands/minicmd.c: Likewise.
1869         * commands/blocklist.c: Likewise.
1870         * commands/memrw.c: Likewise.
1871         * commands/loadenv.c: Likewise.
1872         * commands/usbtest.c: Likewise.
1873         * commands/lsmmap.c: Likewise.
1874         * commands/boot.c: Likewise.
1875         * commands/parttool.c: Likewise.
1876         * commands/configfile.c: Likewise.
1877         * commands/search.c: Likewise.
1878         * commands/ieee1275/suspend.c: Likewise.
1879         * commands/cat.c: Likewise.
1880         * commands/i386/pc/pxecmd.c: Likewise.
1881         * commands/i386/pc/play.c: Likewise.
1882         * commands/i386/pc/halt.c: Likewise.
1883         * commands/i386/pc/vbeinfo.c: Likewise.
1884         * commands/i386/pc/vbetest.c: Likewise.
1885         * commands/lspci.c: Likewise.
1886         * commands/date.c: Likewise.
1887         * commands/handler.c: Likewise.
1888         * commands/ls.c: Likewise.
1889         * commands/test.c: Likewise.
1890         * commands/cmp.c: Likewise.
1891         * commands/efi/loadbios.c: Likewise.
1892         * commands/efi/fixvideo.c: Likewise.
1893         * commands/halt.c: Likewise.
1894         * commands/help.c: Likewise.
1895         * commands/reboot.c: Likewise.
1896         * hello/hello.c: Likewise.
1897         * script/sh/main.c: Likewise.
1898         * loader/xnu.c: Likewise.
1899         * term/terminfo.c: Likewise.
1900         * term/i386/pc/serial.c: Likewise.
1901         * term/usb_keyboard.c: Likewise.
1903 2009-05-03  David S. Miller  <davem@davemloft.net>
1905         * normal/menu.c: Include grub/parser.h
1907 2009-05-03  Pavel Roskin  <proski@gnu.org>
1909         * mmap/efi/mmap.c (grub_mmap_malign_and_register): Return void*,
1910         not char*.
1911         * mmap/i386/mmap.c (grub_mmap_malign_and_register): Likewise.
1912         Suggested by Javier Martín <lordhabbit@gmail.com>
1914         * util/i386/pc/grub-mkrescue.in: Allow for the case when
1915         efiemu??.o doesn't exist.
1916         * util/i386/pc/grub-install.in: Likewise.  Use "cp -f" for
1917         copying.
1919 2009-05-03  Bean  <bean123ch@gmail.com> Vladimir Serbinenko  <phcoder@gmail.com>
1921         FreeBSD 64-bit support
1923         * conf/i386-pc.rmk (bsd_mod_SOURCES): add loader/i386/bsd_helper.S
1924         and loader/i386/bsd_trampoline.S
1925         (bsd_mod_ASFLAGS): new variable
1926         * include/grub/i386/bsd.h (FREEBSD_MODINFOMD_SMAP): new definition
1927         (FREEBSD_MODTYPE_KERNEL64): likewise
1928         (grub_bsd64_trampoline_start): likewise
1929         (grub_bsd64_trampoline_end): likewise
1930         (grub_bsd64_trampoline_selfjump): likewise
1931         (grub_bsd64_trampoline_gdt): likewise
1932         * include/grub/i386/loader.h (grub_unix_real_boot): moved from here ...
1933         * include/grub/i386/bsd.h (grub_unix_real_boot): ... moved here
1934         * kern/i386/loader.S (grub_unix_real_boot): moved from here ...
1935         * loader/i386/bsd_helper.S (grub_unix_real_boot): moved here
1936         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
1937         of "attrib" member
1938         * loader/i386/bsd_pagetable.c: new file
1939         * loader/i386/bsd_trampoline.S: likewise
1940         * loader/i386/bsd.c (ALIGN_QWORD): new macro
1941         (ALIGN_VAR): likewise
1942         (entry_hi): new variable
1943         (kern_end_mdofs): likewise
1944         (is_64bit): likewise
1945         (grub_freebsd_add_meta): use ALIGN_VAR
1946         (grub_e820_mmap): new declaration
1947         (grub_freebsd_add_mmap): new function
1948         (grub_freebsd_add_meta_module): support 64 bit kernels
1949         (grub_freebsd_list_modules): use ALIGN_VAR
1950         (gdt_descriptor): new declaration
1951         (grub_freebsd_boot): support 64 bit kernels
1952         (grub_bsd_elf64_hook): new function
1953         (grub_bsd_load_elf): support elf64
1955 2009-05-03  Bean  <bean123ch@gmail.com>
1957         * script/sh/execute.c (grub_script_execute_cmdif): Reset grub_errno
1958         after we get the result of if statement.
1960 2009-05-03  Bean  <bean123ch@gmail.com>
1962         * Makefile.in (enable_efiemu): New variable.
1964         * conf/i386-pc.rmk: Only compile efiemu runtimes when enable_efiemu is
1965         set.
1966         (efiemu32.o): Use macro $< for source file, add $(srcdir) to include
1967         path.
1968         (efi64_c.o): Use macro $< for source file, add $(srcdir) to include
1969         path, add -mno-red-zone option.
1970         (efiemu64_s.o): Likewise.
1971         (efiemu64.o): Use macro $^ for source file.
1973         * configure.ac (--enable-efiemu): New option.
1975 2009-05-03  Vladimir Serbinenko  <phcoder@gmail.com>
1977         xnu support
1979         * conf/i386-efi.rmk (kernel_mod_HEADERS): added i386/pit.h
1980         (pkglib_MODULES): add xnu.mod
1981         (xnu_mod_SOURCES): new variable
1982         (xnu_mod_CFLAGS): likewise
1983         (xnu_mod_LDFLAGS): likewise
1984         (xnu_mod_ASFLAGS): likewise
1985         * conf/i386-pc.rmk: likewise
1986         * conf/x86_64-efi.rmk: likewise
1987         * include/grub/efi/efi.h (grub_efi_finish_boot_services):
1988         new declaration
1989         * include/grub/i386/macho.h: new file
1990         * include/grub/i386/xnu.h: likewise
1991         * include/grub/macho.h: likewise
1992         * include/grub/machoload.h: likewise
1993         * include/grub/x86_64/macho.h: likewise
1994         * include/grub/x86_64/xnu.h: likewise
1995         * include/grub/xnu.h: likewise
1996         * kern/efi/efi.c (grub_efi_finish_boot_services): new function
1997         * kern/efi/mm.c (MAX_HEAP_SIZE): increase
1998         * loader/i386/efi/xnu.c: new file
1999         * loader/i386/pc/xnu.c: likewise
2000         * loader/i386/xnu.c: likewise
2001         * loader/i386/xnu_helper.S: likewise
2002         * loader/macho.c: likewise
2003         * loader/xnu.c: likewise
2004         * loader/xnu_resume.c: likewise
2005         * util/grub-dumpdevtree: likewise
2006         * include/grub/i386/pit.h: include grub/err.h
2007         (grub_pit_wait): export
2008         * util/grub.d/30_os-prober.in: support Darwin/Mac OS X
2010 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2012         Efiemu
2014         * conf/i386-pc.rmk: new modules efiemu, efiemu_acpi, efiemu_pnvram,
2015         _linux_efi, linux_efi.
2016         new files in grub-emu
2017         new targets efiemu32.o and efiemu64.o
2018         * loader/linux_normal_efiemu.c: likewise
2019         * loader/i386/efi/linux.c: added preliminary efiemu support
2020         * util/i386/pc/grub-install.in: add efiemu??.o to the list of
2021         files to copy
2022         * include/grub/autoefi.h: new file
2023         * include/grub/i386/efiemu.h: likewise
2024         * include/grub/i386/pc/efiemu.h: likewise
2025         * include/grub/efi/api.h: add LL suffix when necessary
2026         new definitions relating to tables
2027         * include/grub/efiemu/efiemu.h: new file
2028         * include/grub/efiemu/runtime.h: likewise
2029         * efiemu/prepare.c: likewise
2030         * efiemu/loadcore_common.c: likewise
2031         * efiemu/loadcore64.c: likewise
2032         * efiemu/runtime/efiemu.sh: likewise
2033         * efiemu/runtime/efiemu.S: likewise
2034         * efiemu/runtime/efiemu.c: likewise
2035         * efiemu/runtime/config.h: likewise
2036         * efiemu/prepare32.c: likewise
2037         * efiemu/main.c: likewise
2038         * efiemu/modules/pnvram.c: likewise
2039         * efiemu/modules/i386: likewise
2040         * efiemu/modules/i386/pc: likewise
2041         * efiemu/modules/acpi.c: likewise
2042         * efiemu/i386/pc/cfgtables.c: likewise
2043         * efiemu/i386/loadcore64.c: likewise
2044         * efiemu/i386/loadcore32.c: likewise
2045         * efiemu/prepare64.c: likewise
2046         * efiemu/loadcore.c: likewise
2047         * efiemu/symbols.c: likewise
2048         * efiemu/mm.c: likewise
2049         * efiemu/loadcore32.c: likewise
2051 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2053         ACPI spoofing
2055         * commands/acpi.c: new file
2056         * commands/i386/pc/acpi.c: likewise
2057         * commands/efi/acpi.c: likewise
2058         * include/grub/acpi.h: likewise
2059         * conf/i386-pc.rmk (pkglib_MODULES): added acpi.mod
2060         (acpi_mod_SOURCES): new variable
2061         (acpi_mod_CFLAGS): likewise
2062         (acpi_mod_LDFLAGS): likewise
2063         * conf/i386-efi.rmk: likewise
2064         * conf/x86_64-efi.rmk: likewise
2066 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2068         Missing part from mmap patch
2070         * mmap/efi/mmap.c (grub_machine_mmap_unregister): renamed to
2071         (grub_mmap_unregister)
2072         (grub_mmap_free_and_unregister): use grub_mmap_register
2074 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2076         Mmap services
2078         * loader/i386/efi/linux.c (grub_linux_boot): use grub_mmap_iterate
2079         * loader/i386/linux.c (find_mmap_size): likewise
2080         (allocate_pages): likewise
2081         * loader/i386/multiboot.c (grub_get_multiboot_mmap_len): likewise
2082         (grub_fill_multiboot_mmap): likewise
2083         (grub_multiboot): use grub_mmap_get_lower and grub_mmap_get_upper
2084         * loader/i386/pc/linux.c (grub_cmd_linux): use grub_mmap_get_lower
2085         * include/grub/i386/bsd.h (OPENBSD_MMAP_AVAILABLE): new definition
2086         (OPENBSD_MMAP_RESERVED): likewise
2087         * include/grub/i386/pc/memory.h: include grub/memory.h
2088         (grub_lower_mem): removed
2089         (grub_upper_mem): likewise
2090         (GRUB_MACHINE_MEMORY_ACPI): new definition
2091         (GRUB_MACHINE_MEMORY_NVS): likewise
2092         (GRUB_MACHINE_MEMORY_MAX_TYPE): likewise
2093         (GRUB_MACHINE_MEMORY_HOLE): likewise
2094         (grub_machine_mmap_register): likewise
2095         (grub_machine_mmap_unregister): likewise
2096         (grub_machine_get_upper): likewise
2097         (grub_machine_get_lower): likewise
2098         (grub_machine_get_post64): likewise
2099         * include/grub/i386/efi/memory.h: new file
2100         * include/grub/x86_64/efi/memory.h: likewise
2101         * include/grub/efi/memory.h: likewise
2102         * conf/i386-pc.rmk (pkglib_MODULES): added mmap.mod
2103         (mmap_mod_SOURCES): new variable
2104         (mmap_mod_LDFLAGS): likewise
2105         (mmap_mod_ASFLAGS): likewise
2106         * conf/i386-coreboot.rmk: likewise
2107         * conf/i386-ieee1275.rmk: likewise
2108         * conf/i386-efi.rmk: likewise
2109         * conf/x86_64-efi.rmk: likewise
2110         * include/grub/types.h (UINT_TO_PTR): new macro
2111         (PTR_TO_UINT32): likewise
2112         (PTR_TO_UINT64): likewise
2113         * include/grub/memory.h: new file
2114         * mmap/i386/pc/mmap.c: likewise
2115         * mmap/i386/pc/mmap_helper.S: likewise
2116         * mmap/i386/uppermem.c: likewise
2117         * mmap/mmap.c: likewise
2118         * mmap/efi/mmap.c: likewise
2119         * kern/i386/coreboot/init.c (grub_machine_init): don't use
2120         grub_upper_mem
2121         * kern/i386/pc/init.c (grub_lower_mem): removed variable
2122         (grub_upper_mem): likewise
2123         (grub_machine_init): don't use grub_upper_mem,
2124         make grub_lower_mem local
2125         * loader/i386/bsd.c (grub_openbsd_boot): use grub_mmap_get_lower,
2126         grub_mmap_iterate and grub_mmap_get_upper
2127         (grub_netbsd_boot): use grub_mmap_get_lower and grub_mmap_get_upper
2129 2009-05-02  Bean  <bean123ch@gmail.com>
2131         * conf/common.rmk (grub_script.tab.c): Change normal/parser.y to
2132         script/sh/parser.y.
2133         (pkglib_MODULES): Add normal.mod and sh.mod.
2134         (normal_SOURCES): New variable.
2135         (normal_mod_CFLAGS): Likewise.
2136         (normal_mod_LDFLAGS): Likewise.
2137         (sh_mod_SOURCES): Likewise.
2138         (sh_mod_CFLAGS): Likewise.
2139         (sh_mod_LDFLAGS): Likewise.
2141         * conf/i386-pc.rmk (normal/lexer.c_DEPENDENCIES): Changed to
2142         script/sh/lexer.c_DEPENDENCIES.
2143         (kernel_img_SOURCES): Remove kern/rescue.c, and kern/reader.c,
2144         kern/rescue_reader.c and kern/rescue_parser.c.
2145         (kernel_img_HEADERS): Remove rescue.h, add reader.h.
2146         (grub_emu_SOURCES): Change source files.
2147         (pkglib_MODULES): Remove normal.mod.
2148         (normal_SOURCES): Removed.
2149         (normal_mod_CFLAGS): Likewise.
2150         (normal_mod_LDFLAGS): Likewise.
2151         * conf/i386-coreboot.rmk: Likewise.
2152         * conf/i386-efi.rmk: Likewise.
2153         * conf/i386-ieee1276.rmk: Likewise.
2154         * conf/powerpc-ieee1275.rmk: Likewise.
2155         * conf/sparc64-ieee1275.rmk: Likewise.
2156         * conf/x86_64-efi.rmk: Likewise.
2158         * include/grub/command.h (grub_command_execute): New inline function.
2160         * include/grub/menu.h (grub_menu_entry): Removed commands field.
2162         * include/grub/normal.h: Remove <grub/setjmp.h>.
2163         (grub_fs_module_list): Moved to normal/autofs.c.
2164         (grub_exit_env): Removed.
2165         (grub_command_execute): Likewise.
2166         (grub_normal_menu_addentry): Renamed to grub_menu_addentry, removed
2167         parameter script.
2168         (read_command_list): New function declaration.
2169         (read_fs_list): Likewise.
2171         * include/parser.h: Include <grub/reader.h>.
2172         (grub_parser_split_cmdline): Change type of getline parameter.
2173         (grub_parser): New structure.
2174         (grub_parser_class): New variable.
2175         (grub_parser_execute): New function declaration.
2176         (grub_register_rescue_parser): Likewise.
2177         (grub_parser_register): New inline function.
2178         (grub_parser_unregister): Likewise.
2179         (grub_parser_get_current): Likewise.
2180         (grub_parser_set_current): Likewise.
2182         * include/grub/reader.h: New file.
2183         * kern/reader.c: Likewise.
2184         * kern/rescue_parser.c: Likewise.
2185         * kern/rescue_reader.c: Likewise.
2186         * normal/autofs.c: Likewise.
2187         * normal/dyncmd.c: Likewise.
2189         * include/grub/rescue.h: Removed.
2190         * normal/command.h: Likewise.
2192         * include/grub/script.h: Moved to ...
2193         * include/grub/script_sh.h: ... Moved here.
2194         * normal/execute.c: Moved to ...
2195         * script/sh/execute.c: ... Moved here.
2196         * normal/function.c: Moved to ...
2197         * script/sh/function.c: ... Moved here.
2198         * normal/lexer.c: Moved to ...
2199         * script/sh/lexer.c: ... Moved here.
2200         * normal/parser.y: Moved to ...
2201         * script/sh/parser.y: ... Moved here.
2202         * normal/script.c: Moved to ...
2203         * script/sh/script.c: ... Moved here.
2205         * normal/main.c: Remove <grub/rescue.h> and <grub/script.h>, include
2206         <grub/reader.h>.
2207         (grub_exit_env): Removed.
2208         (fs_module_list): Moved to normal/autofs.c.
2209         (grub_file_getline): Don't handle comment here.
2210         (free_menu): Skip removed field entry->commands.
2211         (grub_normal_menu_addentry): Removed as grub_menu_entry, removed
2212         script parameter.
2213         (read_config_file): Removed nested parameter, change getline function.
2214         (grub_enter_normal_mode): Removed.
2215         (grub_dyncmd_dispatcher): Moved to normal/dyncmd.c.
2216         (read_command_list): Likewise.
2217         (autoload_fs_module): Moved to normal/autofs.c.
2218         (read_fs_list): Likewise.
2219         (reader_nested): New variable.
2220         (grub_normal_execute): Run parser.sh to switch to sh parser.
2221         (grub_cmd_rescue): Removed.
2222         (cmd_normal): Removed.
2223         (grub_cmd_normal): Unregister itself at the beginning. Don't register
2224         rescue command.
2225         (grub_cmdline_run): New function.
2226         (grub_normal_reader_init): Likewise.
2227         (grub_normal_read_line): Likewise.
2228         (grub_env_write_pager): Likewise.
2229         (cmdline): New variable.
2230         (grub_normal_reader): Likewise.
2231         (GRUB_MOD_INIT): Register normal reader and set as current, register
2232         pager hook, register normal command with grub_register_command_prio,
2233         so that it won't show up in command.lst.
2234         (GRUB_MOD_FINI): Unregister normal reader, unhook pager, clear
2235         grub_fs_autoload_hook.
2237         * normal/menu.c: Remove <grub/script.h>, add <grub/command.h>.
2238         (grub_menu_execute_entry): Replace grub_script_execute with
2239         grub_parser_execute, change parameter to grub_command_execute.
2241         * normal/menu_text.c: Remove <grub/script.h>.
2243         * normal/menu_entry.c: Remove <grub/script.h>, add <grub/command.h>
2244         and <grub/parser.h>.
2245         (run): Change editor_getline to use new parser interface. Change
2246         parameter to grub_command_execute.
2248         * kern/main.c: Remove <grub/rescue.h>, include <grub/command.h>,
2249         <grub/reader.h> and <grub/parser.h>.
2250         (grub_load_normal_mode): Execute normal command.
2251         (grub_main): Call grub_register_core_commands,
2252         grub_register_rescue_parser and grub_register_rescue_reader, use
2253         grub_reader_loop to enter input loop.
2255         * kern/parser.c (grub_parser_split_cmdline): Change type of
2256         getline parameter.
2257         (grub_parser_class): New variable.
2258         (grub_parser_execute): New function.
2260         * loader/i386/multiboot.c: Remove <grub/rescue.h>.
2261         * loader/multiboot2.c: Likewise.
2262         * loader/sparc64/ieee1275/linux.c: Likewise.
2264         * util/grub-emu.c (read_command_list): New dummy function.
2266 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2268         * util/deviceiter.c (grub_util_iterate_devices): Increase max drive
2269         count to 16 for CCISS and IDA.
2271 2009-05-02  Robert Millan  <rmh.grub@aybabtu.com>
2273         * normal/menu_text.c  (grub_wait_after_message): Print a newline
2274         after waiting for user input.
2276         * loader/i386/linux.c: Include `<grub/normal.h>'.
2277         (grub_cmd_linux): Improve the error message about `ask' mode, by
2278         waiting for user input so it's not missed (we can do this, since
2279         user requested interaction).
2281 2009-05-02  Vladimir Serbinenko  <phcoder@gmail.com>
2283         Added missing lst to grub-mkrescue
2285         * util/i386/pc/grub-mkrescue.in: added ${input_dir}/handler.lst
2286         and ${input_dir}/parttool.lst
2288 2009-04-30  David S. Miller  <davem@davemloft.net>
2290         * util/hostdisk.c (device_is_wholedisk): New function.
2291         (grub_util_biosdisk_get_grub_dev): Shortcut when hdg.start is
2292         zero only if device_is_wholedisk() returns true.
2294         * util/hostdisk.c (convert_system_partition_to_system_disk):
2295         Handle virtual disk devices named /dev/vdiskX as found on sparc
2296         and powerpc.
2298         * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
2299         lettered partition specifier is found, convert to numbered.
2301 2009-04-29  David S. Miller  <davem@davemloft.net>
2303         * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
2304         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2306         * normal/command.c: Add missing newline at end of file.
2308         * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
2309         warnings.
2310         * kern/ieee1275/openfw.c (grub_claimmap): Likewise.
2311         * disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
2312         grub_ofdisk_read): Likewise, and deal similarly with the fact that
2313         ihandles have a 32-bit type but need to be stored in a "void *".
2315 2009-04-28  Pavel Roskin  <proski@gnu.org>
2317         * disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
2318         not disk.  Adjust all dependencies.
2319         (grub_fs_uuid_close): Use grub_device_close(), not
2320         grub_disk_close().
2322         * disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
2323         parent's partition, don't copy it by reference, as it gets freed
2324         on close.
2326 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2328         Preboot hooks support
2330         * commands/boot.c (struct grub_preboot_t): new declaration
2331         (preboots_head): new variable
2332         (preboots_tail): likewise
2333         (grub_loader_register_preboot_hook): new function
2334         (grub_loader_unregister_preboot_hook): likewise
2335         (grub_loader_set): launch preboot hooks
2336         * include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
2337         (grub_loader_register_preboot_hook): new declaration
2338         (grub_loader_unregister_preboot_hook): likewise
2340 2009-04-27  Vladimir Serbinenko  <phcoder@gmail.com>
2342         Warning fix
2344         * disk/scsi.c (grub_scsi_open): added missing cast when
2345         calling grub_dprintf
2347 2009-04-26  Vladimir Serbinenko  <phcoder@gmail.com>
2349         Bug and warning fixes
2351         * include/grub/i386/pc/init.h (grub_stop_floppy): added missing
2352         declaration
2353         * commands/test.c (test_parse): fixed bug with file tests and corrected
2354         declaration of find_file
2356 2009-04-26  Pavel Roskin  <proski@gnu.org>
2358         * Makefile.in: Don't install empty manual pages if help2man is
2359         missing.  Use help2man option for output, not shell redirection.
2361 2009-04-26  David S. Miller  <davem@davemloft.net>
2363         * util/grub-mkdevicemap.c (make_device_map): Add missing
2364         NESTED_FUNC_ATTR to process_device().
2366 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2368         Test command
2370         * commands/test.c: rewritten to use bash-like test
2372 2009-04-25  Vladimir Serbinenko  <phcoder@gmail.com>
2374         Parttool autoloading and improvements
2376         * Makefile.in (pkglib_DATA): add parttool.lst
2377         (parttool.lst): new target
2378         * genmk.rb: generate parttool-*
2379         (CLEANFILES): add #{parttool}
2380         (PARTTOOLFILES): new variable
2381         * genparttoollist.sh: new file
2382         * parttool/pcpart.c (grub_pcpart_boot): more feedback
2383         (grub_pcpart_type): likewise
2384         * commands/parttool.c (helpmsg): new variable
2385         (grub_cmd_parttool): output help if not enough arguments are supplied
2386         autoload modules
2387         (GRUB_MOD_INIT(parttool)): use helpmsg
2389 2009-04-24  David S. Miller  <davem@davemloft.net>
2391         Avoiding opening same device multiple times in device iterator.
2393         * kern/device.c: (grub_device_iterate): Define struct part_ent,
2394         and use it to build a list of partitions in iterate_disk() and
2395         iterate_partition().
2397         * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
2398         on disk->data.
2400         * disk/ieee1275/nand.c (grub_nand_iterate): Return
2401         grub_devalias_iterate() result instead of unconditional 0.
2402         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
2403         Also, capture hook return value, either directly or via
2404         grub_children_iterate(), and propagate to caller.
2405         * include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
2406         grub_children_iterate): Return value is now 'int' instead of
2407         'grub_err_t'.
2408         * kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
2409         like a proper iterator, stopping when hooks return non-zero.
2410         (grub_devalias_iterate): Likewise.
2412 2009-04-23  David S. Miller  <davem@davemloft.net>
2414         * kern/sparc64/ieee1275/openfw.c: Unused, delete.
2416 2009-04-22  David S. Miller  <davem@davemloft.net>
2418         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
2419         is larger than address_cells, use that value for address_cells too.
2421         * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
2422         IEEE1275_MAX_PATH_LEN): Define.
2423         * kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
2424         allocate 'childtype', 'childpath', 'childname', and 'fullname'.
2425         (grub_devalias_iterate): Dynamically allocate 'aliasname' and
2426         'devtype'.  Explicitly NULL terminate devalias expansion.
2428         * util/sparc64/ieee1275/misc.c: New file.
2429         * util/sparc64/ieee1275/grub-setup.c: New file.
2430         * util/sparc64/ieee1275/grub-ofpathname.c: New file.
2431         * util/sparc64/ieee1275/grub-mkimage.c: New file.
2432         * util/sparc64/ieee1275/grub-install.in: New file.
2433         * util/ieee1275/ofpath.c: New file.
2434         * util/ieee1275/devicemap.c: New file.
2435         * util/devicemap.c: New file.
2436         * util/deviceiter.c: New file.
2437         * kern/sparc64/ieee1275/init.c: New file.
2438         * include/grub/util/ofpath.h: New file.
2439         * include/grub/util/deviceiter.h: New file.
2440         * util/grub-mkdevicemap.c: Include deviceiter.h.
2441         Implement using grub_util_emit_devicemap_entry and
2442         grub_util_iterate_devices.
2443         * conf/i386-corebook.rmk: Build util/deviceiter.c and
2444         util/devicemap.c into grub-mkdevicemap
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: Add rules to build boot block
2450         images and installation utilities.  Build kernel as image
2451         instead of as elf binary.  Use common rules as much as possible.
2453 2009-04-19  Vladimir Serbinenko  <phcoder@gmail.com>
2455         Correct GPT definition
2457         * include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type
2458         of "attrib" member
2460 2009-04-19  Felix Zielcke  <fzielcke@z-51.de>
2462         * INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2464 2009-04-19  David S. Miller  <davem@davemloft.net>
2466         * loader/sparc64/ieee1275/linux.c: Include grub/command.h
2467         (grub_rescue_cmd_linux): Rename to...
2468         (grub_cmd_linux): and fix prototype.
2469         (grub_rescue_cmd_initrd): Rename to...
2470         (grub_cmd_initrd): and fix prototype.
2471         (cmd_linux, cmd_initrd): New.
2472         (GRUB_MOD_INIT(linux)): Use grub_register_command().
2473         (GRUB_MOD_FINI(linux): Use grub_unregister_command().
2475 2009-04-17  Pavel Roskin  <proski@gnu.org>
2477         * bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
2478         format.
2479         (grub_ohci_transfer): Likewise.
2481         * bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2483         * loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
2484         return without a value.  Fix inconsistent indentation.
2486         * fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
2487         match struct grub_fs.
2489         * disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
2490         * bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
2491         * bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
2492         * commands/lspci.c (grub_lspci_iter): Likewise.
2494 2009-04-16  Bean  <bean123ch@gmail.com>
2496         * commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
2497         value.
2499 2009-04-15  Pavel Roskin  <proski@gnu.org>
2501         * include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
2502         LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
2503         users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
2504         definitions.
2506 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2508         * disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
2509         that no multiple data or metadata areas are supported and `Unknown
2510         metadata header'.
2512 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2514         Move loader out of the kernel
2516         * kern/loader.c: moved to ...
2517         * commands/boot.c: ... moved here
2518         * commands/minicmd.c (grub_mini_cmd_boot): moved to ...
2519         * commands/boot.c (grub_cmd_boot): moved here. All users updated
2520         * include/grub/kernel.h (grub_machine_fini): export
2521         * include/grub/loader.h (grub_loader_is_loaded): update declaration
2522         (grub_loader_set): likewise
2523         (grub_loader_unset): likewise
2524         (grub_loader_boot): likewise
2525         * conf/common.rmk: new module boot.mod
2526         (pkglib_MODULES): add boot.mod
2527         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
2528         (grub_emu_SOURCES): likewise
2529         * conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
2530         (grub_emu_SOURCES): likewise
2531         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
2532         (grub_emu_SOURCES): likewise
2533         * conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
2534         (grub_emu_SOURCES): likewise
2535         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
2536         (grub_emu_SOURCES): likewise
2537         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): likewise
2538         (grub_emu_SOURCES): likewise
2539         * conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
2540         (grub_emu_SOURCES): likewise
2542 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2544         use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
2546         * kern/misc.c (grub_itoa): Removed function
2547         (grub_ltoa): likewise
2548         (grub_vsprintf): use grub_lltoa
2550 2009-04-15  Vladimir Serbinenko  <phcoder@gmail.com>
2552         Restore grub-emu
2554         * conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
2555         * conf/i386-coreboot.rmk: likewise
2556         * conf/i386-ieee1275.rmk: likewise
2557         * conf/powerpc-ieee1275.rmk: likewise
2559 2009-04-15  Felix Zielcke  <fzielcke@z-51.de>
2561         * INSTALL: Add that `./autogen.sh' needs to be run before
2562         `./configure.'.
2564 2009-04-14  Bean  <bean123ch@gmail.com>
2566         * Makefile.in (pkglib_DATA): Add handler.lst.
2567         (handler.lst): New rule.
2569         * conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
2570         * conf/i386-coreboot.rmk: Likewise.
2571         * conf/i386-ieee1275.rmk: Likewise.
2572         * conf/i386-efi.rmk: Likewise.
2573         * conf/x86_64-efi.rmk: Likewise.
2574         * conf/powerpc-ieee1275.rmk: Likewise.
2575         * conf/sparc64-ieee1275.rmk: Likewise.
2577         * genhandlerlist.sh: New file.
2579         * genmk.rb: Add rules to generate handler.lst.
2581         * include/grub/normal.h (grub_file_getline): New function definition.
2582         (read_handler_list): Likewise.
2583         (free_handler_list): Likewise.
2585         * include/grub/term.h (grub_term_register_input): Add name parameter
2586         for auto generation of handler.lst.
2587         (grub_term_register_output): Likewise.
2589         * normal/handler.c: New file.
2591         * normal/main.c (get_line): Renamed to grub_file_getline.
2592         (read_config_file): Use the newly renamed grub_file_getline.
2593         (read_command_list): Likewise.
2594         (read_fs_list): Likewise.
2595         (grub_normal_execute): Call read_handler_list to parse handler.lst.
2596         (GRUB_MOD_FINI): Call free_handler_list to free handler list.
2598         * term/efi/console.c (grub_console_init): Add name parameter for auto
2599         generation of handler.lst.
2600         * term/gfxterm.c: Likewise.
2601         * term/i386/pc/at_keyboard.c: Likewise.
2602         * term/i386/pc/console.c: Likewise.
2603         * term/i386/pc/serial.c: Likewise.
2604         * term/i386/pc/vesafb.c: Likewise.
2605         * term/i386/pc/vga.c: Likewise.
2606         * term/i386/pc/vga_text.c: Likewise.
2607         * term/ieee1275/ofconsole.c: Likewise.
2608         * term/usb_keyboard.c: Likewise.
2610 2009-04-14  Bean  <bean123ch@gmail.com>
2612         * util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
2613         properly with null character.
2615 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2617         * configure: Remove.
2618         * config.h.in: Likewise.
2619         * stamp-h.in: Likewise.
2620         * DISTLIST: Likewise.
2621         * conf/common.mk: Likewise.
2622         * conf/i386-coreboot.mk: Likewise.
2623         * conf/i386-efi.mk: Likewise.
2624         * conf/i386-ieee1275.mk: Likewise.
2625         * conf/i386.mk: Likewise.
2626         * conf/i386-pc.mk: Likewise.
2627         * conf/powerpc-ieee1275.mk: Likewise.
2628         * conf/sparc64-ieee1275.mk: Likewise.
2629         * conf/x86_64-efi.mk: Likewise.
2631         * INSTALL: Remove the sentence that Ruby and autoconf are only required if you
2632         develop on GRUB.
2634 2009-04-14  John Stanley  <jpsinthemix@verizon.net>
2635             David S. Miller  <davem@davemloft.net>
2637         * util/hostdisk.c (make_device_name): Fix buffer length
2638         calculations.
2640 2009-04-14  Felix Zielcke  <fzielcke@z-51.de>
2642         * util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
2643         <sys/param.h> and <sys/sysctl.h>.
2644         (open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
2645         to add 0x10 to `kern.geom.debugflags' if it's not already set, before
2646         opening the device and reset them afterwards.
2648 2009-04-13  Pavel Roskin  <proski@gnu.org>
2650         * conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
2651         Reported by John Stanley <jpsinthemix@verizon.net>
2653 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2655         * util/grub.d/10_freebsd.in: Detect Debian GNU/kFreeBSD and use
2656         that name for menuentries when appropriate.
2658 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2660         * util/grub.d/10_freebsd.in: Add a missing `fi'.
2662 2009-04-13  Robert Millan  <rmh@aybabtu.com>
2664         * loader/i386/linux.c (grub_cmd_linux): Don't pass `vga=ask' parameter
2665         to Linux, simply abort telling the user it's no longer supported.
2667 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2669         * util/grub.d/10_freebsd.in: Don't exit if /boot/devices.hints
2670         doesn't exist.  Check also for /boot/kernel/kernel.gz.  Print
2671         `freebsd_loadenv' only when devices.hints exist.
2673 2009-04-13  Pavel Roskin  <proski@gnu.org>
2675         * term/usb_keyboard.c (grub_usb_keyboard_getkey): Warning fixes.
2677 2009-04-13  Felix Zielcke  <fzielcke@z-51.de>
2679         * util/i386/pc/grub-install.in (install_drive): Remove the BSD
2680         partition number.
2681         (grub_drive): Likewise.
2683 2009-04-13  David S. Miller  <davem@davemloft.net>
2685         * kern/sparc64/ieee1275/ieee1275.c: New file.
2686         * include/grub/sparc64/ieee1275/ieee1275.h (IEEE1275_MAP_WRITE,
2687         IEEE1275_MAP_READ, IEEE1275_MAP_EXEC, IEEE1275_MAP_LOCKED,
2688         IEEE1275_MAP_CACHED, IEEE1275_MAP_SE, IEEE1275_MAP_GLOBAL,
2689         IEEE1275_MAP_IE, IEEE1275_MAP_DEFAULT): Define.
2690         (grub_ieee1275_map_physical, grub_ieee1275_claim_vaddr,
2691         grub_ieee1275_alloc_physmem): Declare new exported functions.
2693         * include/grub/sparc64/ieee1275/loader.h: New file.
2694         * include/grub/sparc64/ieee1275/memory.h: Likewise.
2695         * include/grub/sparc64/kernel.h: Likewise.
2696         * loader/sparc64/ieee1275/linux.c: Likewise.
2698         * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
2699         (grub_fstest_SOURCES): Likewise.
2701         * util/hostdisk.c (make_device_name): Do not make any assumptions
2702         about the length of drive names.
2704         * kern/dl.c (grub_dl_load_file): Close file immediately when
2705         we are done using it.
2707 2009-04-12  David S. Miller  <davem@davemloft.net>
2709         * kern/misc.c (grub_ltoa): Fix cast when handling negative
2710         values.  Noticed by Pavel Roskin.
2712         * configure.ac: Check for __bswapsi2 and__bswapdi2 using
2713         target compiler.
2715         * genmk.rb: Add more flexible image type specification, also
2716         pass --strip-unneeded to objcopy.
2717         * conf/i386-pc.rmk: Use *_FORMAT.
2718         * conf/i386-pc.mk: Rebuilt.
2720         * disk/ieee1275/ofdisk.c (struct ofdisk_hash_ent): New struct.
2721         (OFDISK_HASH_SZ): Define.
2722         (ofdisk_hash): New hash table.
2723         (ofdisk_hash_fn, ofdisk_hash_find, ofdisk_hash_add): New functions.
2724         (grub_ofdisk_open): Use ofdisk_hash_ent address as disk->id
2725         instead of device phandle which is not unique.
2727         * kern/sparc64/ieee1275/init.c: Delete, replace with...
2728         * kern/sparc64/ieee1275/crt0.S: assembler implementation.
2729         * include/grub/sparc64/ieee1275/kernel.h: Declare grub_prefix[].
2730         (GRUB_MOD_ALIGN, GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_TOTAL_MODULE_SIZE,
2731         GRUB_KERNEL_MACHINE_KERNEL_IMAGE_SIZE,
2732         GRUB_KERNEL_MACHINE_COMPRESSED_SIZE, GRUB_KERNEL_MACHINE_PREFIX,
2733         GRUB_KERNEL_MACHINE_DATA_END): Define.
2734         (grub_kernel_image_size, grub_total_module_size): Declare.
2736 2009-04-12  Pavel Roskin  <proski@gnu.org>
2738          * configure.ac: Change the logic when we check for target tools.
2739          Do it when the target is specified and it's different from the
2740          specified value of the host.
2742 2009-04-11  Felix Zielcke  <fzielcke@z-51.de>
2744         * util/hostdisk.c [__FreeBSD_kernel__]: Include sys/disk.h.
2745         (grub_util_biosdisk_open) [__FreeBSD_kernel__]: Add support for
2746         GNU/kFreeBSD. Check if a device is a character device. Use
2747         DIOCGMEDIASIZE to get the size.
2748         (convert_system_partition_to_system_disk) [__FreeBSD_kernel__]: Add
2749         support for GNU/kFreeBSD.
2750         (grub_util_biosdisk_get_grub_dev) [__FreeBSD_kernel__]: Check if OS_DEV
2751         is a character device instead of a block device. Add support for
2752         FreeBSD device names.
2754         * util/getroot.c (find_root_device) [__FreeBSD_kernel__]: Check if ENT
2755         is a character device instead of a block device.
2757         * util/grub-probe.c (probe) [__FreeBSD_kernel__]: Check if DEVICE_NAME
2758         is a character device instead of a block device.
2760 2009-04-11  Andrey Shuvikov  <mr_hyro@yahoo.com>
2762         * util/hostdisk.c [__FreeBSD__]: Include sys/disk.h.
2763         (grub_util_biosdisk_open) [__FreeBSD__]: Add support for
2764         FreeBSD. Check if a device is a character device. Use
2765         DIOCGMEDIASIZE to get the size.
2766         (convert_system_partition_to_system_disk) [__FreeBSD__]: Add
2767         support for FreeBSD.
2768         (grub_util_biosdisk_get_grub_dev) [__FreeBSD__]: Check if OS_DEV
2769         is a character device instead of a block device. Add support for
2770         FreeBSD device names.
2772         * util/getroot.c (find_root_device) [__FreeBSD__]: Check if ENT is
2773         a character device instead of a block device.
2774         (grub_util_check_char_device): New function.
2776         * util/grub-probe.c (probe) [__FreeBSD__]: Check if DEVICE_NAME is
2777         a character device instead of a block device.
2779         * include/grub/util/getroot.h (grub_util_check_char_device): New
2780         prototype.
2782 2009-04-11  David S. Miller  <davem@davemloft.net>
2784         * conf/sparc64-ieee1275.rmk (kernel_img_LDFLAGS): Link with
2785         static libgcc.
2786         * configure.ac: Check for __bswapsi2 and __bswapdi2 presence.
2787         * include/grub/sparc64/libgcc.h (__bswapsi2): Export libgcc
2788         function, if present.
2789         (__bswapdi2): Likewise.
2791         * include/grub/sparc64/ieee1275/boot.h: New file.
2792         * boot/sparc64/ieee1275/boot.S: Likewise.
2793         * boot/sparc64/ieee1275/diskboot.S: Likewise.
2795         * kern/misc.c (grub_ltoa): New function.
2796         (grub_vsprintf): Use it to format 'long' integers.
2798 2009-04-10  David S. Miller  <davem@davemloft.net>
2800         * disk/ieee1275/nand.c (grub_nand_open): All ieee1275 call arg
2801         slots are of type grub_ieee1275_cell_t.
2802         (grub_nand_read): Likewise.
2803         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_INVALID,
2804         IEEE1275_IHANDLE_INVALID): Use grub_ieee1275_cell_t since these
2805         macros are used to compare values in arg/ret block of the call.
2806         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
2807         grub_ieee1275_next_property, grub_ieee1275_get_property_length,
2808         grub_ieee1275_instance_to_package, grub_ieee1275_package_to_path,
2809         grub_ieee1275_instance_to_path, grub_ieee1275_write,
2810         grub_ieee1275_read, grub_ieee1275_seek, grub_ieee1275_peer,
2811         grub_ieee1275_child, grub_ieee1275_parent, grub_ieee1275_open,
2812         grub_ieee1275_close, grub_ieee1275_set_property,
2813         grub_ieee1275_set_color): All ieee1275 call arg slots are of type
2814         grub_ieee1275_cell_t.
2815         * kern/ieee1275/openfw.c (grub_map): Likewise.
2816         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_ihandle_t,
2817         grub_ieee1275_phandle_t): Define as grub_unit32_t type.
2819         * kern/ieee1275/init.c (grub_machine_init): Make 'actual' grub_ssize_t.
2820         * kern/ieee1275/openfw.c (grub_children_iterate): Likewise.
2821         (grub_devalias_iterate): Likewise.
2823 2009-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
2825         UFS improvements
2827         * fs/ufs.c (INODE_NBLOCKS): new definition
2828         (struct grub_ufs_dirent): added fields for non-BSD dirents
2829         (grub_ufs_get_file_block): fixed double indirect handling
2830         (grub_ufs_lookup_symlink): use more robust way to determine whether
2831         symlink is inline
2832         (grub_ufs_find_file): support for non-BSD dirents
2833         (grub_ufs_dir): support for non-BSD dirents
2835 2009-04-10  Bean  <bean123ch@gnail.com>
2837         * include/grub/efi/api.h (grub_efi_configuration_table): Add packed
2838         attribute, otherwise the size would be wrong for i386 platform.
2840         * include/grub/pci.h (grub_pci_read_word): New inline function.
2841         (grub_pci_read_byte): Likewise.
2842         (grub_pci_write): Likewise.
2843         (grub_pci_write_word): Likewise.
2844         (grub_pci_write_byte): Likewise.
2846         * include/grub/pci.h (grub_pci_iteratefunc_t): Add NESTED_FUNC_ATTR.
2848         * loader/i386/efi/linux.c (fake_bios_data): Moved to loadbios module.
2849         (find_framebuf): Scan pci to locate the frame buffer address.
2851         * commands/efi/fixvideo.c: New file.
2853         * commands/efi/loadbios.c: Likewise.
2855         * commands/memrw.c: Likewise.
2857         * util/grub-dumpbios.in: Likewise.
2859         * conf/common.rmk (grub-dumpbios): New utility.
2860         (pkglib_MODULES): New module memrw.mod.
2861         (memrw_mod_SOURCE): New macro.
2862         (memrw_mod_CFLAGS): Likewise.
2863         (memrw_mod_LDFLAGS): Likewise.
2865         * conf/i386-efi.rmk (pkglib_MODULES): New module loadbios.mod and
2866         fixvideo.mod.
2867         (loadbios_mod_SOURCE): New macro.
2868         (loadbios_mod_CFLAGS): Likewise.
2869         (loadbios_mod_LDFLAGS): Likewise.
2870         (fixvideo_mod_SOURCE): Likewise.
2871         (fixvideo_mod_CFLAGS): Likewise.
2872         (fixvideo_mod_LDFLAGS): Likewise.
2874         * conf/x86_64.rmk (pkglib_MODULES): New module loadbios.mod and
2875         fixvideo.mod.
2876         (loadbios_mod_SOURCE): New macro.
2877         (loadbios_mod_CFLAGS): Likewise.
2878         (loadbios_mod_LDFLAGS): Likewise.
2879         (fixvideo_mod_SOURCE): Likewise.
2880         (fixvideo_mod_CFLAGS): Likewise.
2881         (fixvideo_mod_LDFLAGS): Likewise.
2883 2009-04-08  Felix Zielcke  <fzielcke@z-51.de>
2885         * disk/lvm.c (grub_lvm_scan_device): Add a missing NULL check.
2887 2009-04-07  David S. Miller  <davem@davemloft.net>
2889         * kern/sparc64/dl.c (grub_arch_dl_relocate_symbols): Add
2890         support for R_SPARC_OLO10 relocations.  Fix compile warning for
2891         R_SPARC_WDISP30 case.
2892         * kern/sparc64/cache.S: Fix grub_arch_sync_caches implementation.
2894 2009-04-06  Pavel Roskin  <proski@gnu.org>
2896         * include/grub/misc.h (ARRAY_SIZE): New macro.
2897         * include/grub/i386/linux.h (GRUB_LINUX_VID_MODE_VESA_START):
2898         New macro.
2899         * loader/i386/linux.c (allocate_pages): Use free_pages().
2900         (grub_linux_unload): Don't use free_pages().
2901         (grub_linux_boot): Prevent accessing linux_vesafb_modes with a
2902         wrong index.  Treat all other modes as text modes.
2903         (grub_cmd_linux): Initialize vid_mode unconditionally to
2904         GRUB_LINUX_VID_MODE_NORMAL.  Recognize and support "vga=ask".
2906         * commands/help.c (print_command_help): Use cmd->prio, not
2907         cmd->flags to check for GRUB_PRIO_LIST_FLAG_ACTIVE.
2909 2009-04-06  Vladimir Serbinenko  <phcoder@gmail.com>
2911         Parttool
2913         * parttool/pcpart.c: new file
2914         * commands/parttool.c: likewise
2915         * conf/common.rmk (pkglib_MODULES): Added parttool.mod and pcpart.mod
2916         (parttool_mod_SOURCES): new variable
2917         (parttool_mod_CFLAGS): likewise
2918         (parttool_mod_LDFLAGS): likewise
2919         (pcpart_mod_SOURCES): likewise
2920         (pcpart_mod_CFLAGS): likewise
2921         (pcpart_mod_LDFLAGS): likewise
2922         * conf/i386-coreboot.rmk (grub_emu_SOURCES): added commands/parttool.c
2923         and parttool/pcpart.c
2924         * conf/i386-efi.rmk: likewise
2925         * conf/i386-ieee1275.rmk: likewise
2926         * conf/i386-pc.rmk: likewise
2927         * conf/powerpc-ieee1275.rmk: likewise
2928         * conf/sparc64-ieee1275.rmk: likewise
2929         * conf/x86_64-ieee1275.rmk: likewise
2931 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2933         Support for mtime and further expandability of dir command
2935         * include/grub/lib/datetime.h: moved to ...
2936         * include/grub/datetime.h: ... moved here and added
2937         declaration of grub_unixtime2datetime. All users updated
2938         * include/grub/fs.h: new syntax for dir and mtime functions in
2939         struct grub_fs
2940         * include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
2941         and GRUB_FSHELP_FLAGS_MASK
2942         * commands/ls.c (grub_ls_list_files): Write mtime in long format
2943         * fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
2944         (grub_ext2_mtime): new function
2945         * fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
2946         (grub_hfsplus_mtime): new function
2947         * fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
2948         (GRUB_UFS_ATTR_FILE): likewise
2949         (GRUB_UFS_ATTR_LNK): likewise
2950         (struct grub_ufs_sblock): new fields mtime
2951         (grub_ufs_read_inode): new parameter to read inode to a separate buffer
2952         all users updated
2953         (grub_ufs_dir): mtime support
2954         (grub_ufs_mtime): new function
2955         * fs/affs.c (grub_affs_dir): use new dir syntax
2956         * fs/afs.c (grub_afs_dir): likewise
2957         * fs/cpio.c (grub_cpio_dir): likewise
2958         * fs/fat.c (grub_fat_find_dir): likewise
2959         * fs/hfs.c (grub_hfs_dir): likewise
2960         * fs/iso9660.c (grub_iso9660_dir): likewise
2961         * fs/jfs.c (grub_jfs_dir): likewise
2962         * fs/minix.c (grub_minix_dir): likewise
2963         * fs/ntfs.c (grub_ntfs_dir): likewise
2964         * fs/reiserfs.c (grub_reiserfs_dir): likewise
2965         * fs/sfs.c (grub_sfs_dir): likewise
2966         * fs/xfs.c (grub_xfs_dir): likewise
2967         * util/hostfs.c (grub_hostfs_dir): likewise
2968         * lib/datetime.c: moved to ...
2969         * normal/datetime.c: ... moved here
2970         (grub_unixtime2datetime): new function
2971         * kern/rescue.c (grub_rescue_print_files): use new dir syntax
2972         * normal/completion.c (iterate_dir): use new dir syntax
2973         * normal/misc.c (grub_normal_print_device_info): tell the
2974         last modification time of a volume
2975         * kern/fs.c (grub_fs_probe): updated dummy function to use new syntax
2976         * conf/common.rmk: added lib/datetime.c to ls.mod
2977         * conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c
2978         (normal_mod_SOURCES): likewise
2979         (datetime_mod_SOURCES): Removed lib/datetime.c
2980         * conf/i386-efi.rmk: likewise
2981         * conf/i386-ieee1275.rmk: likewise
2982         * conf/i386-pc.rmk: likewise
2983         * conf/powerpc-ieee1275.rmk: likewise
2984         * conf/sparc64-ieee1275.rmk: likewise
2985         * conf/x86_64-efi.rmk: likewise
2987 2009-04-05  Vladimir Serbinenko  <phcoder@gmail.com>
2989         Trim trailing spaces in FAT label and support mtools-like labels
2991         * fs/fat.c (grub_fat_iterate_dir): New function based
2992         on grub_fat_find_dir
2993         (grub_fat_find_dir): use grub_fat_iterate_dir
2994         (grub_fat_label): likewise
2996 2009-04-04  Vladimir Serbinenko  <phcoder@gmail.com>
2998         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): add list.h
2999         and command.h
3000         remove extraneous kernel_elf_HEADERS
3002 2009-04-04  Bean  <bean123ch@gnail.com>
3004         * include/grub/util/misc.h: Add dummy function fsync for mingw.
3006         * util/misc.c: Likewise.
3008 2009-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
3010         * loader/i386/efi/linux.c (fake_bios_data): Use grub_dprintf
3011         instead of grub_printf.
3013 2009-04-03  Robert Millan  <rmh@aybabtu.com>
3015         * loader/i386/linux.c (grub_linux_setup_video): Fill
3016         `params->{red,green,blue,reserved}_{mask_size,field_pos}' with
3017         values from `mode info' structure instead of hardcoded
3018         values.
3020 2009-04-01  Pavel Roskin  <proski@gnu.org>
3022         * Makefile.in: Remove all references to MODULE_LDFLAGS, it's
3023         unused now.
3024         * genmk.rb: Likewise.
3025         * configure.ac: Likewise.
3027 2009-04-01  Manoel Abranches  <mrabran@linux.vnet.ibm.com>
3029         * aclocal.m4: Move --build-id=none from MODULE_LDFLAGS to
3030         TARGET_LDFLAGS.  This corrects a problem with grub-mkelfimage.
3032 2009-04-01  David S. Miller  <davem@davemloft.net>
3034         * normal/sparc64/setjmp.S: Fix setjmp implementation.
3035         * include/grub/sparc64/setjmp.h (grub_jmp_buf): Update.
3036         (grub_setjmp): Mark with 'returns_twice' attribute.
3037         * include/grub/i386/setjmp.h (grub_setjmp): Likewise
3038         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise.
3039         * include/grub/x86_64/setjmp.h (grub_setjmp): Likewise.
3041 2009-04-01  Robert Millan  <rmh@aybabtu.com>
3043         Reapply fix from 2008-07-28 which was accidentally reverted; also
3044         perform the same fix to a similar check in same function.
3046         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
3047         with the same number are found, just use issue a warning with
3048         grub_dprintf(), as this error has been reported to be non-fatal.
3050 2009-03-31  Pavel Roskin  <proski@gnu.org>
3052         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Provide safe default
3053         for cross-compilation.
3055 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3057         Fix i386-ieee1275 build.
3059         * include/grub/i386/ieee1275/loader.h (grub_multiboot2_real_boot):
3060         Remove declaration.
3062 2009-03-30  Pavel Roskin  <proski@gnu.org>
3064         * fs/hfs.c (grub_hfs_strncasecmp): Integrate into ...
3065         (grub_hfs_cmp_catkeys): ... this.  Don't assume strings to be
3066         zero-terminated, rely only on the strlen value.  Fix comparison
3067         of strings differing in length.
3069 2009-03-30  Robert Millan  <rmh@aybabtu.com>
3071         * loader/i386/linux.c (grub_cmd_linux): Check for zImage before
3072         checking for abi version.  Improve error messages on BIOS to notify
3073         user about `linux16' command.
3075 2009-03-29  Vladimir Serbinenko  <phcoder@gmail.com>
3077         Leak fixes
3079         * kern/disk.c (grub_disk_cache_store): Invalidate previous cache
3080         in case of collision
3081         * disk/scsi.c (grub_scsi_open): free scsi in case of error
3083 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3085         * loader/i386/linux.c (grub_cmd_linux): Parse "vga=" parameter and
3086         set `vid_mode' accordingly.
3087         (grub_linux_boot): Process `vid_mode' and set video mode.
3089 2009-03-29  Robert Millan  <rmh@aybabtu.com>
3091         * util/grub.d/10_linux.in (linux_entry): New function.
3092         Factorize generation of Linux boot entries.
3094 2009-03-29  Yoshinori K. Okuji  <okuji@enbug.org>
3096         Make the format of Environment Block plain text. The boot loader
3097         part is not tested well yet.
3099         * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
3100         (buffer): Removed.
3101         (envblk): Likewise.
3102         (usage): Remove "info" and "clear". Add "unset". Update the
3103         description of "set", as this does not delete variables any
3104         longer.
3105         (create_envblk_file): Complete rewrite.
3106         (open_envblk_file): Likewise.
3107         (cmd_info): Removed.
3108         (cmd_list): Likewise.
3109         (cmd_set): Likewise.
3110         (cmd_clear): Likewise.
3111         (list_variables): New function.
3112         (write_envblk): Likewise.
3113         (set_variables): Likewise.
3114         (unset_variables): Likewise.
3115         (main): Complete rewrite.
3117         * commands/loadenv.c (buffer): Removed.
3118         (envblk): Likewise.
3119         (open_envblk_file): New function.
3120         (read_envblk_file): Complete rewrite.
3121         (grub_cmd_load_env): Likewise.
3122         (grub_cmd_list_env): Likewise.
3123         (struct blocklist): New struct.
3124         (free_blocklists): New function.
3125         (check_blocklists): Likewise.
3126         (write_blocklists): Likewise.
3127         (grub_cmd_save_env): Complete rewrite.
3129         * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
3130         a plain text signature.
3131         (GRUB_ENVBLK_MAXLEN): Removed.
3132         (struct grub_envblk): Complete rewrite.
3133         (grub_envblk_find): Removed.
3134         (grub_envblk_insert): Likewise.
3135         (grub_envblk_open): New prototype.
3136         (grub_envblk_set): Likewise.
3137         (grub_envblk_delete): Put const to VALUE.
3138         (grub_envblk_iterate): Put const to NAME and VALUE.
3139         (grub_envblk_close): New prototype.
3140         (grub_envblk_buffer): New inline function.
3141         (grub_envblk_size): Likewise.
3143         * lib/envblk.c: Include grub/mm.h.
3144         (grub_env_find): Removed.
3145         (grub_envblk_open): New function.
3146         (grub_envblk_close): Likewise.
3147         (escaped_value_len): Likewise.
3148         (find_next_line): Likewise.
3149         (grub_envblk_insert): Removed.
3150         (grub_envblk_set): New function.
3151         (grub_envblk_delete): Complete rewrite.
3152         (grub_envblk_iterate): Likewise.
3154 2009-03-28  Robert Millan  <rmh@aybabtu.com>
3156         * conf/i386-pc.rmk (pkglib_MODULES): Add `linux16.mod'.
3157         (linux16_mod_SOURCES, linux16_mod_CFLAGS, linux16_mod_LDFLAGS): New
3158         variables.  Use 16-bit loader.
3159         (linux_mod_SOURCES, linux_mod_CFLAGS, linux_mod_LDFLAGS): Use 32-bit
3160         loader.
3161         * kern/i386/loader.S (grub_linux_boot): Rename to ...
3162         (grub_linux16_boot): ... this.  Update all users.
3163         * loader/i386/linux.c (grub_linux32_boot): Rename to ...
3164         (grub_linux_boot): ... this.  Update all users.
3166         * loader/i386/pc/linux.c (GRUB_MOD_INIT(linux)): Rename to ...
3167         (GRUB_MOD_INIT(linux16)): ... this.  Rename `linux' and `initrd'
3168         commands to `linux16' and `initrd16'.
3169         (GRUB_MOD_FINI(linux)): Rename to ...
3170         (GRUB_MOD_FINI(linux16)): ... this.
3172 2009-03-24  Pavel Roskin  <proski@gnu.org>
3174         * genmk.rb: Define ASM_FILE for *.S files for *.lst generation,
3175         not just for compilation.
3177 2009-03-22  Vladimir Serbinenko  <phcoder@gmail.com>
3179         Move multiboot helper out of kernel
3181         * conf/i386-pc.rmk (multiboot_mod_SOURCES): Add
3182         `loader/i386/multiboot_helper.S'.
3183         * conf/i386-coreboot.rmk: Likewise
3184         * conf/i386-ieee1275.rmk: Likewise
3186         * kern/i386/loader.S: Move multiboot helpers from here...
3187         * loader/i386/multiboot_helper.S: ...moved here
3188         * include/grub/i386/loader.h: Move declarations of multiboot
3189         helpers from here...
3190         * include/grub/i386/multiboot.h: ...moved here
3191         * loader/i386/multiboot.c: Added include of grub/cpu/multiboot.h
3193 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3195         * kern/env.c (grub_env_context_open): Added an argument to specify
3196         whether a new context inherits exported variables from current
3197         one. This is useful when making a sandbox to interpret a config
3198         file.
3199         All callers updated.
3201         * include/grub/env.h (grub_env_context_open): Updated the prototype.
3203 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3205         * kern/env.c (grub_env_context_close): Fix memory leaks.
3207 2009-03-22  Yoshinori K. Okuji  <okuji@enbug.org>
3209         * normal/main.c (grub_normal_execute): Added an argument
3210         BATCH to specify if an interactive interface should be provided
3211         after reading a config file.
3212         All callers updated.
3213         (read_command_list): Prevent being executed twice.
3214         (read_fs_list): Likewise.
3216         * include/grub/normal.h (grub_normal_execute): Updated the
3217         prototype.
3219 2009-03-22  Pavel Roskin  <proski@gno.org>
3221         * kern/powerpc/ieee1275/startup.S: Replace EXT_C(start) with
3222         _start.
3223         * kern/i386/pc/startup.S: Likewise.
3224         * kern/i386/efi/startup.S: Likewise.
3225         * kern/i386/ieee1275/startup.S: Likewise.
3226         * kern/i386/coreboot/startup.S: Likewise.
3227         * kern/x86_64/efi/startup.S: Likewise.
3229         * aclocal.m4 (grub_CHECK_START_SYMBOL): Remove.
3230         * configure.ac: Don't call grub_CHECK_START_SYMBOL.
3231         * kern/i386/pc/startup.S: Use _start instead of START_SYMBOL.
3233 2009-03-21  Vladimir Serbinenko  <phcoder@gmail.com>
3235         Bugfixes in multiboot for bugs uncovered by solaris kernel.
3237         * loader/i386/multiboot_elfxx.c (grub_multiboot_load_elf): Corrected
3238         limit detection.
3239         Use vaddr of correct segment for entry_point.
3241 2009-03-21  Bean  <bean123ch@gmail.com>
3243         * commands/blocklist.c: Add include file <grub/command.h>, remove
3244         <grub/normal.h> and <grub/arg.h>.
3245         (grub_cmd_blocklist): Use the new command interface.
3246         (GRUB_MOD_INIT): Likewise.
3247         (GRUB_MOD_FINI): Likewise.
3248         * commands/boot.c: Likewise.
3249         * commands/cat.c: Likewise.
3250         * commands/cmp.c: Likewise.
3251         * commands/configfile.c: Likewise.
3252         * commands/crc.c: Likewise.
3253         * commands/echo.c: Likewise.
3254         * commands/halt.c: Likewise.
3255         * commands/handler.c: Likewise.
3256         * commands/hdparm.c: Likewise.
3257         * commands/help.c: Likewise.
3258         * commands/hexdump.c: Likewise.
3259         * commands/loadenv.c: Likewise.
3260         * commands/ls.c: Likewise.
3261         * commands/lsmmap.c: Likewise.
3262         * commands/lspci.c: Likewise.
3263         * commands/loadenv.c: Likewise.
3264         * commands/read.c: Likewise.
3265         * commands/reboot.c: Likewise.
3266         * commands/search.c: Likewise.
3267         * commands/sleep.c: Likewise.
3268         * commands/test.c: Likewise.
3269         * commands/usbtest.c: Likewise.
3270         * commands/videotest.c: Likewise.
3271         * commands/i386/cpuid.c: Likewise.
3272         * commands/i386/pc/halt.c: Likewise.
3273         * commands/i386/pc/play.c: Likewise.
3274         * commands/i386/pc/pxecmd.c: Likewise.
3275         * commands/i386/pc/vbeinfo.c: Likewise.
3276         * commands/i386/pc/vbetest.c: Likewise.
3277         * commands/ieee1275/suspend.c: Likewise.
3278         * disk/loopback.c: Likewise.
3279         * font/font_cmd.c: Likewise.
3280         * hello/hello.c: Likewise.
3281         * loader/efi/appleloader.c: Likewise.
3282         * loader/efi/chainloader.c: Likewise.
3283         * loader/i386/bsd.c: Likewise.
3284         * loader/i386/efi/linux.c: Likewise.
3285         * loader/i386/ieee1275/linux.c: Likewise.
3286         * loader/i386/linux.c: Likewise.
3287         * loader/i386/pc/chainloader.c: Likewise.
3288         * loader/i386/pc/linux.c: Likewise.
3289         * loader/powerpc/ieee1275/linux.c: Likewise.
3290         * loader/multiboot_loader.c: Likewise.
3291         * term/gfxterm.c: Likewise.
3292         * term/i386/pc/serial.c: Likewise.
3293         * term/terminfo.c: Likewise.
3295         * term/i386/pc/vesafb.c: Removed <grub/arg.h>.
3296         * term/i386/pc/vga.c: Likewise.
3297         * video/readers/jpeg.c: Likewise.
3298         * video/readers/png.c: Likewise.
3299         * video/readers/tga.c: Likewise.
3301         * util/grub-fstest (cmd_loopback): Removed.
3302         (cmd_blocklist): Likewise.
3303         (cmd_ls): Likewise.
3304         (grub_register_command): Likewise.
3305         (grub_unregister_command): Likewise.
3306         (execute_command): Use grub_command_find to locate command and execute
3307         it.
3309         * include/grub/efi/chainloader.h: Removed.
3310         * loader/efi/chainloader_normal.c: Likewise.
3311         * loader/i386/bsd_normal.c: Likewise.
3312         * loader/i386/pc/chainloader_normal.c: Likewise.
3313         * loader/i386/pc/multiboot_normal.c: Likewise.
3314         * loader/linux_normal.c: Likewise.
3315         * loader/multiboot_loader_normal.c: Likewise.
3316         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
3318         * gencmdlist.sh: Scan new registration command grub_register_extcmd
3319         and grub_register_command_p1.
3321         * conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
3322         kern/command.c, lib/arg.c and commands/extcmd.c.
3323         (pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
3324         (minicmd_mod_SOURCES): New variable.
3325         (minicmd_mod_CFLAGS): Likewise.
3326         (minicmd_mod_LDFLAGS): Likewise.
3327         (extcmd_mod_SOURCES): Likewise.
3328         (extcmd_mod_CFLAGS): Likewise.
3329         (extcmd_mod_LDFLAGS): Likewise.
3330         (boot_mod_SOURCES): Removed.
3331         (boot_mod_CFLAGS): Likewise.
3332         (boot_mod_LDFLAGS): Likewise.
3334         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
3335         kern/corecmd.c.
3336         (kernel_img_HEADERS): Add command.h.
3337         (grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
3338         commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
3339         and lib/arg.c.
3340         (pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
3341         _multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
3342         remove the corresponding normal mode command.
3343         (normal_mod_SOURCES): Remove normal/arg.c.
3344         * conf/i386-coreboot.rmk: Likewise.
3345         * conf/i386-efi.rmk: Likewise.
3346         * conf/i386-ieee1275.rmk: Likewise.
3347         * conf/powerpc-ieee1275.rmk: Likewise.
3348         * conf/x86_64-efi.rmk: Likewise.
3350         * include/grub/arg.h: Move from here ...
3351         * include/grub/lib/arg.h: ... to here.
3353         * normal/arg.c: Move from here ...
3354         * lib/arg.c: ... to here.
3356         * commands/extcmd.c: New file.
3357         * commands/minicmd.c: Likewise.
3358         * include/grub/command.h: Likewise.
3359         * include/grub/extcmd.h: Likewise.
3360         * kern/command.c: Likewise.
3361         * kern/corecmd.c: Likewise.
3363         * kern/list.c (grub_list_iterate): Return int instead of void.
3364         (grub_list_insert): New function.
3365         (grub_prio_list_insert): Likewise.
3367         * kern/rescue.c (grub_rescue_command): Removed.
3368         (grub_rescue_command_list): Likewise.
3369         (grub_rescue_register_command): Likewise.
3370         (grub_rescue_unregister_command): Likewise.
3371         (grub_rescue_cmd_boot): Move to minicmd.c
3372         (grub_rescue_cmd_help): Likewise.
3373         (grub_rescue_cmd_info): Likewise.
3374         (grub_rescue_cmd_boot): Likewise.
3375         (grub_rescue_cmd_testload): Likewise.
3376         (grub_rescue_cmd_dump): Likewise.
3377         (grub_rescue_cmd_rmmod): Likewise.
3378         (grub_rescue_cmd_lsmod): Likewise.
3379         (grub_rescue_cmd_exit): Likewise.
3380         (grub_rescue_print_devices): Moved to corecmd.c.
3381         (grub_rescue_print_files): Likewise.
3382         (grub_rescue_cmd_ls): Likewise.
3383         (grub_rescue_cmd_insmod): Likewise.
3384         (grub_rescue_cmd_set): Likewise.
3385         (grub_rescue_cmd_unset): Likewise.
3386         (attempt_normal_mode): Use grub_command_find to get normal module.
3387         (grub_enter_rescue_mode): Use grub_register_core_commands to register
3388         commands, remove grub_rescue_register_command calls.
3390         * normal/command.c (grub_register_command): Removed.
3391         (grub_unregister_command): Likewise.
3392         (grub_command_find): Likewise.
3393         (grub_iterate_commands): Likewise.
3394         (rescue_command): Likewise.
3395         (export_command): Moved to corecmd.c.
3396         (set_command): Removed.
3397         (unset_command): Likewise.
3398         (insmod_command): Likewise.
3399         (rmmod_command): Likewise.
3400         (lsmod_command): Likewise.
3401         (grub_command_init): Likewise.
3403         * normal/completion.c (iterate_command): Use cmd->prio to check for
3404         active command.
3405         (complete_arguments): Use grub_extcmd_t structure to find options.
3406         (grub_normal_do_completion): Change function grub_iterate_commands to
3407         grub_command_iterate.
3409         * normal/execute.c (grub_script_execute_cmd): No need to parse
3410         argument here.
3412         * normal/main.c (grub_dyncmd_dispatcher): New function.
3413         (read_command_list): Register unload commands as dyncmd.
3414         (grub_cmd_normal): Use new command interface, register rescue,
3415         unregister normal at entry, register normal, unregister rescue at exit.
3417         * include/grub/list.h (grub_list_test_t): New type.
3418         (grub_list_iterate): Return int instead of void.
3419         (grub_list_insert): New function.
3420         (GRUB_AS_NAMED_LIST_P): New macro.
3421         (GRUB_AS_PRIO_LIST): Likewise.
3422         (GRUB_AS_PRIO_LIST_P): Likewise.
3423         (GRUB_PRIO_LIST_PRIO_MASK): New constant.
3424         (GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
3425         (grub_prio_list): New structure.
3426         (grub_prio_list_insert): New function.
3427         (grub_prio_list_remove): New inline function.
3429         * include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
3430         (GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
3431         (GRUB_COMMAND_FLAG_MENU): Likewise.
3432         (GRUB_COMMAND_FLAG_BOTH): Likewise.
3433         (GRUB_COMMAND_FLAG_TITLE): Likewise.
3434         (GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
3435         (GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
3436         (GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
3437         (grub_command): Likewise.
3438         (grub_register_command): Likewise.
3439         (grub_command_find): Likewise.
3440         (grub_iterate_commands): Likewise.
3441         (grub_command_init): Likewise.
3442         (grub_arg_parse): Likewise.
3443         (grub_arg_show_help): Likewise.
3445         * include/grub/rescue.h (grub_rescue_register_command): Removed.
3446         (grub_rescue_unregister_command): Likewise.
3448         * include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
3449         grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
3450         grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.
3452         * include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
3453         grub_rescue_cmd_initrd.
3454         * include/grub/i386/loader.h: Likewise.
3455         * include/grub/x86_64/loader.h: Likewise.
3457         * include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
3459 2009-03-21  Bean  <bean123ch@gmail.com>
3461         * util/hostdisk.c (read_device_map): Use grub_util_get_disk_size
3462         instead of stat in mingw environment.
3464         * util/misc.c (grub_millisleep): Use Sleep in mingw environment.
3466         * aclocal.m4 (grub_CHECK_LINK_DIR): New function.
3468         * configure.ac: Use grub_CHECK_LINK_DIR to determine whether to use
3469         AC_CONFIG_LINKS.
3471 2009-03-21  Bean  <bean123ch@gmail.com>
3473         * fs/ext2.c (grub_ext2_mount): Change errno to GRUB_ERR_BAD_FS for
3474         out of range error.
3476 2009-03-18  Michel Dänzer  <michel@daenzer.net>
3478         * fs/ext2.c (grub_ext2_read_block): Take endianness into account when
3479         checking inode flags for EXT4_EXTENTS_FLAG.
3481 2009-03-18  Robert Millan  <rmh@aybabtu.com>
3483         * loader/i386/linux.c: Include `<grub/video.h>' and
3484         `<grub/i386/pc/vbe.h>'..
3485         (grub_linux_setup_video): New function.  Loosely based on the EFI one.
3486         (grub_linux32_boot): Attempt to configure video settings with
3487         grub_linux_setup_video().
3488         (grub_rescue_cmd_linux): Set noreturn=0 in grub_loader_set, in order
3489         to avoid grub_console_fini() which would step out of graphical mode
3490         unconditionally.
3492 2009-03-14  Robert Millan  <rmh@aybabtu.com>
3494         Fix build on powerpc.
3495         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Add `handler.h'.
3497 2009-03-12  Vladimir Serbinenko  <phcoder@gmail.com>
3499         * term/gfxterm.c (GRUB_MOD_FINI(term_gfxterm)): Correct name of
3500         background image command.
3502 2009-03-12  Colin D Bennett  <colin@gibibit.com>
3504         * term/gfxterm.c (draw_cursor): Ensure character is redrawn.
3505         (grub_gfxterm_putchar): Extract pairs of identical calls to
3506         draw_cursor out of conditional blocks.
3508 2009-03-11  Pavel Roskin  <proski@gnu.org>
3510         * fs/hfs.c (grub_hfs_strncasecmp): New function.
3511         (grub_hfs_cmp_catkeys): Use HFS specific string comparison.
3513 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3515         * loader/i386/multiboot_elfxx.c
3516         (CONCAT(grub_multiboot_load_elf, XX)): Do not reject ET_DYN files.
3518 2009-03-11  Felix Zielcke  <fzielcke@z-51.de>
3520         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add `kern/list.c' and
3521         `kern/handler.c'.
3523 2009-03-11  Robert Millan  <rmh@aybabtu.com>
3525         * loader/i386/multiboot.c (code_size): New variable.
3526         (grub_multiboot): Define offsets by adding to `code_size' rather
3527         than subtracting from `grub_multiboot_payload_size'.  Provide
3528         4-byte alignment to MBI and others by increasing
3529         `boot_loader_name_length' appropriately.
3531         * loader/i386/multiboot_elfxx.c
3532         (CONCAT(grub_multiboot_load_elf, XX)): Initialize `code_size'.
3534 2009-03-09  Felix Zielcke  <fzielcke@z-51.de>
3536         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove duplicated
3537         `fs/ext2.c'.
3539 2009-03-08  Robert Millan  <rmh@aybabtu.com>
3541         Make loader/i386/linux.c usable on i386-pc again.
3543         * kern/i386/pc/init.c (grub_machine_init): Disable addition of low
3544         memory to heap.
3545         * loader/i386/linux.c [GRUB_MACHINE_PCBIOS] (allocate_pages): Remove
3546         `#error' stanza.
3548 2009-03-07  Bean  <bean123ch@gmail.com>
3550         * loader/i386/efi/linux.c (grub_rescue_cmd_initrd): Fix a bug in initrd
3551         allocation.
3553 2009-03-06  Robert Millan  <rmh@aybabtu.com>
3555         Fix display issue on terminals with screen size other than 80x25
3556         (e.g. gfxterm with resolution higher than 640x480).
3558         * normal/main.c (grub_normal_init_page): Display title text in a
3559         position relative to the center of the terminal instead of relying
3560         on a hardcoded offset.
3562 2009-03-04  Robert Millan  <rmh@aybabtu.com>
3564         Filter /etc/grub.d/10_* so that only add-ons for native kernels are
3565         installed.
3567         * Makefile.in (host_kernel): New variable.
3568         * conf/common.rmk (grub-mkconfig_SCRIPTS): Conditionalize all 10_*.in
3569         scripts instead of just the windows one.
3570         * configure.ac: Initialize and AC_SUBST `host_kernel'.
3572 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3574         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `kern/list.c' and
3575         `kern/handler.c'.
3576         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3577         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3578         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3579         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3580         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3581         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3583 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3585         * partmap/pc.c (pc_partition_map_iterate): Skip over invalid BSD partitions
3586         or if there's no space for the disk label and print the partition number on a
3587         invalid magic.
3589 2009-03-04  Felix Zielcke  <fzielcke@z-51.de>
3591         * util/misc.c: Include <time.h>.
3592         (grub_millisleep): New function.
3594 2009-03-04  Bean  <bean123ch@gmail.com>
3596         * configure.ac: Only test -mcmodel=large option in x86_64-efi, also add
3597         another option -mno-red-zone.
3599         * commands/handler.c: Change module description.
3601         * kern/handler.c: Add missing space at the end of description line.
3603         * kern/list.c: Likewise.
3605 2009-03-03  Robert Millan  <rmh@aybabtu.com>
3607         Move more components to the relocation area, and fix mbi pointer
3608         handling to use the destination rather than the origin (thanks to
3609         Vladimir Serbinenko for spotting).
3611         * loader/i386/multiboot.c (mbi_dest): New variable.
3612         (grub_multiboot_boot): Use `mbi_dest' instead of `mbi'.
3613         (grub_multiboot): Put cmdline, boot_loader_name and mbi in the
3614         relocation area.
3616 2009-03-01  Bean  <bean123ch@gmail.com>
3618         * include/grub/efi/api.h (GRUB_EFI_MPS_TABLE_GUID): New constant.
3619         (GRUB_EFI_ACPI_TABLE_GUID): Likewise.
3620         (GRUB_EFI_ACPI_20_TABLE_GUID): Likewise.
3621         (GRUB_EFI_SMBIOS_TABLE_GUID): Likewise.
3623         * loader/i386/efi/linux.c (acpi_guid): New variable.
3624         (acpi_guid): Likewise.
3625         (EBDA_SEG_ADDR): New constant.
3626         (LOW_MEM_ADDR): Likewise.
3627         (FAKE_EBDA_SEG): Likewise.
3628         (fake_bios_data): New function.
3629         (grub_linux_boot): Call fake_bios_data.
3631 2009-03-01  Bean  <bean123ch@gmail.com>
3633         * commands/terminal.c: Removed.
3635         * commands/handler.c: New file.
3637         * include/grub/list.h: Likewise.
3639         * include/grub/handler.h: Likewise.
3641         * kern/list.c: Likewise.
3643         * kern/handler.c: Likewise.
3645         * kern/term.h: Include header file <grub/handler.h>.
3646         (grub_term_input): Move next field to the beginning.
3647         (grub_term_output): Likewise.
3648         (grub_term_input_class): New variable.
3649         (grub_term_output_class): Likewise.
3650         (grub_term_register_input): Changed to inline function.
3651         (grub_term_register_output): Likewise.
3652         (grub_term_unregister_input): Likewise.
3653         (grub_term_unregister_output): Likewise.
3654         (grub_term_set_current_input): Likewise.
3655         (grub_term_set_current_output): Likewise.
3656         (grub_term_get_current_input): Likewise.
3657         (grub_term_get_current_output): Likewise.
3658         (grub_term_iterate_input): Removed.
3659         (grub_term_iterate_output): Likewise.
3661         * kern/term.c (grub_term_list_input): Removed.
3662         (grub_term_list_output): Likewise.
3663         (grub_term_input_class): New variable.
3664         (grub_term_output_class): Likewise.
3665         (grub_cur_term_input): Change variable as macro.
3666         (grub_cur_term_output): Likewise.
3667         (grub_term_register_input): Removed.
3668         (grub_term_register_output): Likewise.
3669         (grub_term_unregister_input): Likewise.
3670         (grub_term_unregister_output): Likewise.
3671         (grub_term_set_current_input): Likewise.
3672         (grub_term_set_current_output): Likewise.
3673         (grub_term_iterate_input): Likewise.
3674         (grub_term_iterate_output): Likewise.
3675         (grub_term_get_current_input): Likewise.
3676         (grub_term_get_current_output): Likewise.
3678         * util/grub-editenv.c: Include header file <grub/handler.h>.
3679         (grub_term_get_current_input): Removed.
3680         (grub_term_get_current_output): Likewise.
3681         (grub_term_input_class): New variable.
3682         (grub_term_output_class): Likewise.
3684         * util/grub-fstest.c (grub_term_get_current_input): Removed.
3685         (grub_term_get_current_output): Likewise.
3686         (grub_term_input_class): New variable.
3687         (grub_term_output_class): Likewise.
3689         * util/grub-probe.c (grub_term_get_current_input): Removed.
3690         (grub_term_get_current_output): Likewise.
3691         (grub_term_input_class): New variable.
3692         (grub_term_output_class): Likewise.
3694         * util/i386/pc/grub-setup.c (grub_term_get_current_input): Removed.
3695         (grub_term_get_current_output): Likewise.
3696         (grub_term_input_class): New variable.
3697         (grub_term_output_class): Likewise.
3699         * conf/common.rmk (pkglib_MODULES): Replace terminal with handler.
3700         (terminal_mod_SOURCES): Likewise.
3701         (terminal_mod_CFLAGS): Likewise.
3702         (terminal_mod_LDFLAGS): Likewise.
3704         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace terminal.c with
3705         handler.c.
3706         (kernel_img_SOURCES): Add list.c and handler.c.
3707         (kernel_img_HEADERS): Add list.h and handler.h.
3709         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3710         handler.c.
3711         (kernel_mod_SOURCES): Add list.c and handler.c.
3712         (kernel_mod_HEADERS): Add list.h and handler.h.
3714         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Replace terminal.c with
3715         handler.c.
3716         (kernel_elf_SOURCES): Add list.c and handler.c.
3717         (kernel_elf_HEADERS): Add list.h and handler.h.
3719         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3720         handler.c.
3721         (kernel_elf_SOURCES): Add list.c and handler.c.
3722         (kernel_elf_HEADERS): Add list.h and handler.h.
3724         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Replace terminal.c with
3725         handler.c.
3726         (kernel_mod_SOURCES): Add list.c and handler.c.
3727         (kernel_mod_HEADERS): Add list.h and handler.h.
3729         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace terminal.c with
3730         handler.c.
3731         (kernel_elf_SOURCES): Add list.c and handler.c.
3732         (kernel_elf_HEADERS): Add list.h and handler.h.
3734 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3736         Factorize elf32 / elf64 code in Multiboot loader.  This will
3737         prevent it from getting out of sync again.
3739         * loader/i386/multiboot.c (grub_multiboot_is_elf32,
3740         grub_multiboot_load_elf32, grub_multiboot_is_elf64,
3741         grub_multiboot_load_elf64): Move from here ...
3742         * loader/i386/multiboot_elfxx.c (grub_multiboot_is_elf,
3743         grub_multiboot_load_elf): ... to here (new file).
3745 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3747         * util/grub.d/10_linux.in: Rename "single-user mode" to
3748         "recovery mode".
3750 2009-02-27  Vladimir Serbinenko  <phcoder@gmail.com>
3752         Don't leak in SCSI code.
3753         * disk/scsi.c (grub_scsi_close): free `scsi'.
3755 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3757         * loader/i386/pc/multiboot.c: Move from here ...
3758         * loader/i386/multiboot.c: ... to here.  Update all users.
3760 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3762         Patch from Alexandre Bique <bique.alexandre@gmail.com>
3763         * util/i386/pc/grub-setup.c (setup): Fix directory path.
3765 2009-02-27  Krzysztof Smiechowicz  <deadwood@wp.pl>
3767         * fs/sfs.c (grub_sfs_read_extent): Correction to traversing extent
3768         b-tree.
3770 2009-02-27  Robert Millan  <rmh@aybabtu.com>
3772         * kern/misc.c (grub_strtoull): Fix bug (it mistakenly parsed the
3773         `0x' qualifier as 0 when base is specified as parameter).
3775 2009-02-24  Bean  <bean123ch@gmail.com>
3777         * configure.ac: Check for -mcmodel=large in x86_64 target.
3779         * include/grub/efi/api.h (efi_call_10): New macro.
3780         (efi_wrap_10): New function.
3782         * include/grub/efi/pe32.h (GRUB_PE32_REL_BASE_HIGH): New macro.
3783         (GRUB_PE32_REL_BASED_HIGH): Likewise.
3784         (GRUB_PE32_REL_BASED_LOW): Likewise.
3785         (GRUB_PE32_REL_BASED_HIGHLOW): Likewise.
3786         (GRUB_PE32_REL_BASED_HIGHADJ): Likewise.
3787         (GRUB_PE32_REL_BASED_MIPS_JMPADDR): Likewise.
3788         (GRUB_PE32_REL_BASED_SECTION): Likewise.
3789         (GRUB_PE32_REL_BASED_REL): Likewise.
3790         (GRUB_PE32_REL_BASED_IA64_IMM64): Likewise.
3791         (GRUB_PE32_REL_BASED_DIR64): Likewise.
3792         (GRUB_PE32_REL_BASED_HIGH3ADJ): Likewise.
3794         * kern/x86_64/dl.c (grub_arch_dl_relocate_symbols): Fixed relocation
3795         issue.
3797         * kern/x86_64/efi/callwrap.S (efi_wrap_6): Bug fix.
3798         (efi_wrap_10): New function.
3800         * kern/x86_64/efi/startup.S (codestart): Use relative addressing.
3802         * loader/efi/appleloader.c (devpath_5): Add support for late 2008
3803         MB/MBP model (NV chipset).
3804         (devdata_devs): Add devpath_5 to the list.
3806         * load/i386/efi/linux.c (video_base): Remove variable.
3807         (RGB_MASK): New macro.
3808         (RGB_MAGIC): Likewise.
3809         (LINE_MIN): Likewise.
3810         (LINE_MAX): Likewise.
3811         (FBTEST_STEP): Likewise.
3812         (FBTEST_COUNT): Likewise.
3813         (fb_list): New variable.
3814         (grub_find_video_card): Remove function.
3815         (find_framebuf): New function.
3816         (grub_linux_setup_video): Use find_framebuf to get frame buffer and
3817         line length.
3819         * util/i386/efi/grub-mkimage.c (grub_reloc_section): Fix relocation
3820         problem for x86_64.
3822 2009-02-22  Vesa Jääskeläinen  <chaac@nic.fi>
3824         Patch #25624 by Kevin Lacquement <kevin@lacqui>.
3826         * util/grub-mkconfig.in: Use ${grub_mkdevicemap} instead of hard
3827         coding tool name.
3829 2009-02-22  Robert Millan  <rmh@aybabtu.com>
3831         * include/multiboot.h (MULTIBOOT_INFO_ALIGN): New macro.
3832         * loader/i386/pc/multiboot.c (grub_multiboot): Include the MBI
3833         in our relocation, instead of using it directly from heap.  Also
3834         use `MULTIBOOT_INFO_ALIGN' to ensure it is aligned.
3836 2009-02-21  Robert Millan  <rmh@aybabtu.com>
3838         Implement USB keyboard support (based on patch by Marco Gerards)
3840         * conf/i386-pc.rmk (pkglib_MODULES): Add `usb_keyboard.mod'.
3841         (usb_keyboard_mod_SOURCES, usb_keyboard_mod_CFLAGS)
3842         (usb_keyboard_mod_LDFLAGS): New variables.
3844         * term/usb_keyboard.c: New file.
3846 2009-02-14  Vladimir Serbinenko  <phcoder@gmail.com>
3848         Corrected wrong declaration
3850         * kern/disk.c: corrected declaration of grub_disk_ata_pass_through.
3852 2009-02-14  Christian Franke  <franke@computer.org>
3854         * commands/lspci.c (grub_pci_classes): Add `SATA Controller'.
3855         (grub_lspci_iter): Print class code and programming interface byte.
3857 2009-02-14  Christian Franke  <franke@computer.org>
3859         * gendistlist.sh: Ignore `.svn' directories.
3861 2009-02-14  Felix Zielcke  <fzielcke@z-51.de>
3863         * fs/fat.c: Add 2009 to Copyright line.
3865 2009-02-14  Christian Franke  <franke@computer.org>
3867         * commands/hdparm.c: New file.  Provides `hdparm' command
3868         which sends ATA commands via grub_disk_ata_pass_through ().
3870         * conf/i386-pc.rmk: Add ata_pthru.mod and hdparm.mod.
3872         * disk/ata.c: Include <grub/ata.h>.  Move <grub/misc.h>
3873         and <grub/cpu/io.h> to include/grub/ata.h.
3874         (enum grub_ata_addressing_t): Move to include/grub/ata.h.
3875         (GRUB_CDROM_SECTOR_SIZE): Remove.
3876         (GRUB_ATA_*): Move to include/grub/ata.h.
3877         (GRUB_ATAPI_*): Likewise.
3878         (enum grub_ata_commands): Likewise.
3879         (enum grub_ata_timeout_milliseconds): Likewise.
3880         (struct grub_ata_device): Likewise.
3881         (grub_ata_regset): Likewise.
3882         (grub_ata_regget): Likewise.
3883         (grub_ata_regset2): Likewise.
3884         (grub_ata_regget2): Likewise.
3885         (grub_ata_check_ready): Likewise.
3886         (grub_ata_wait_not_busy): Remove static, exported in
3887         include/grub/ata.h.
3888         (grub_ata_wait_drq): Likewise.
3889         (grub_ata_pio_read): Likewise.
3891         * disk/ata_pthru.c: New file.  Provides grub_ata_pass_through ()
3892         function for hdparm.mod.
3894         * include/grub/ata.h: New file, contains declarations from
3895         disk/ata.c.
3896         (enum grub_ata_commands): Add new commands for commands/hdparm.c.
3898         * include/grub/disk.h (grub_disk_ata_pass_through_parms): New struct.
3899         (grub_disk_ata_pass_through): New exported variable.
3901         * kern/disk.c (grub_disk_ata_pass_through): New variable.
3903 2009-02-13  Colin D Bennett  <colin@gibibit.com>
3905         Support multiple fallback entries, and provide an API to support
3906         executing default+fallback menu entries.  Renamed the `terminal' menu
3907         viewer to `text'.
3909         * include/grub/normal.h (grub_normal_text_menu_viewer): New global
3910         variable declaration.
3911         (grub_menu_execute_callback): New structure declaration.
3912         (grub_menu_execute_callback_t): New typedef.
3913         (grub_menu_execute_with_fallback): New function declaration.
3914         (grub_menu_get_entry): Likewise.
3915         (grub_menu_get_timeout): Likewise.
3916         (grub_menu_set_timeout): Likewise.
3918         * normal/main.c (GRUB_MOD_INIT(normal)): Refer to new variable name.
3920         * normal/menu.c (grub_wait_after_message): Moved to
3921         `normal/menu_text.c'.
3922         (draw_border): Likewise.
3923         (print_message): Likewise.
3924         (print_entry): Likewise.
3925         (print_entries): Likewise.
3926         (grub_menu_init_page): Likewise.
3927         (get_entry_number): Likewise.
3928         (print_timeout): Likewise.
3929         (run_menu): Likewise.
3930         (grub_menu_execute_entry): Likewise.
3931         (show_text_menu): Likewise.
3932         (get_and_remove_first_entry_number): New function.
3933         (grub_menu_execute_with_fallback): Likewise.
3934         (get_entry): Renamed to ...
3935         (grub_menu_get_entry): .. this and made it global.
3936         (get_timeout): Renamed to ...
3937         (grub_menu_get_timeout): ... this and made it global.
3938         (set_timeout): Renamed to ...
3939         (grub_menu_set_timeout): ... this and made it global.
3940         (grub_normal_terminal_menu_viewer): Renamed to ...
3941         (grub_normal_text_menu_viewer): ... this.
3943         * normal/menu_text.c: New file.  Extracted text-menu-specific code
3944         from normal/menu.c.
3946         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add `normal/menu_text.c'.
3947         (normal_mod_SOURCES): Likewise.
3949         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
3950         (normal_mod_SOURCES): Likewise.
3952         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3953         (normal_mod_SOURCES): Likewise.
3955         * conf/i386-pc.rmk, (grub_emu_SOURCES): Likewise.
3956         (normal_mod_SOURCES): Likewise.
3958         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3959         (normal_mod_SOURCES): Likewise.
3961         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3962         (normal_mod_SOURCES): Likewise.
3964         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3965         (normal_mod_SOURCES): Likewise.
3967 2009-02-11  Robert Millan  <rmh@aybabtu.com>
3969         * util/grub.d/00_header.in: Update old reference to `font' command.
3971 2009-02-10  Felix Zielcke  <fzielcke@z-51.de>
3973         * fs/fat.c (grub_fat_mount): Fix wrong comparison.
3975         Based on patch from Javier Martín.
3977 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3979         * conf/common.rmk (grub_probe_SOURCES): Move fs/ext2.c before fs/fat.c
3980         to avoid false positives with FAT.
3981         (grub_fstest_SOURCES): Likewise.
3982         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
3983         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
3984         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3985         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
3986         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3987         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
3989 2009-02-09  Felix Zielcke  <fzielcke@z-51.de>
3991         * fs/fat.c (grub_fat_mount): Try to avoid false positives by checking
3992         bpb.version_specific.fat12_or_fat16.fstype and
3993         bpb.version_specific.fat32.fstype.
3995 2009-02-08  Robert Millan  <rmh@aybabtu.com>
3997         * fs/tar.c: Replace "fs/cpio.c" with "cpio.c".
3999 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4001         * Makefile.in (host_os, host_cpu): New variables.
4002         (target_os): Remove.  Update all users.
4004 2009-02-08  Marco Gerards  <marco@gnu.org>
4006         * Makefile.in (enable_grub_emu_usb): New variable.
4007         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/scsi.c'.
4008         (grub_emu_SOURCES) [grub_emu_SOURCES]: Add `disk/usbms.c',
4009         `util/usb.c', `bus/usb/usb.c' and `commands/usbtest.c'.
4010         (grub_emu_LDFLAGS): Add `$(LIBUSB)'.
4011         (pkglib_MODULES): Add `usb.mod', `uhci.mod', `ohci.mod',
4012         `usbtest.mod' and `usbms.mod'.
4013         (usb_mod_SOURCES, usb_mod_CFLAGS, usb_mod_LDFLAGS)
4014         (usbtest_mod_SOURCES, usbtest_mod_CFLAGS, usbtest_mod_LDFLAGS)
4015         (uhci_mod_SOURCES, uhci_mod_CFLAGS, uhci_mod_LDFLAGS,
4016         (ohci_mod_SOURCES, ohci_mod_CFLAGS, ohci_mod_LDFLAGS)
4017         (usbms_mod_SOURCES, usbms_mod_CFLAGS, usbms_mod_LDFLAGS): New
4018         variables.
4020         * disk/usbms.c: New file.
4022         * include/grub/usb.h: Likewise.
4024         * include/grub/usbtrans.h: Likewise.
4026         * include/grub/usbdesc.h: Likewise.
4028         * bus/usb/usbtrans.c: Likewise.
4030         * bus/usb/ohci.c: Likewise.
4032         * bus/usb/uhci.c: Likewise.
4034         * bus/usb/usbhub.c: Likewise.
4036         * bus/usb/usb.c: Likewise.
4038         * commands/usbtest.c: Likewise.
4040         * util/usb.c: Likewise.
4042         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_IO'.
4044         * configure.ac: Test for libusb presence.
4046         * util/grub-emu.c (main) [HAVE_LIBUSB_H]: Call `grub_libusb_init'.
4048 2009-02-08  Vesa Jääskeläinen  <chaac@nic.fi>
4050         * kern/mm.c: Add more comments.
4052 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4054         Patch from Javier Martín.
4055         * fs/ext2.c (EXT2_DRIVER_SUPPORTED_INCOMPAT): Add
4056         `EXT4_FEATURE_INCOMPAT_FLEX_BG'.
4058 2009-02-08  Robert Millan  <rmh@aybabtu.com>
4060         * fs/cpio.c: Split tar functionality to ...
4061         * fs/tar.c: ... here (new file).  Update all users.
4063 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4065         * fs/ext2.c (grub_ext2_mount): Avoid mounting filesystems with
4066         backward-incompatible features.
4068         Based on patch from Javier Martín, with some adjustments.
4070 2009-02-07  Michael Scherer  <misc@mandriva.org>
4072         * fs/hfs.c (grub_hfsplus_iterate_dir): Treat hfs+ as case insensitive.
4074 2009-02-07  Robert Millan  <rmh@aybabtu.com>
4076         * conf/common.rmk (grub_probe_SOURCES, grub_fstest_SOURCES): Move
4077         position of `disk/lvm.c' to ensure grub_init_all() always picks it
4078         after the RAID stuff.
4080 2009-02-05  Vesa Jääskeläinen  <chaac@nic.fi>
4082         Fixes problem when running vbetest command as reported by
4083         Vladimir Serbinenko <phcoder@gmail.com>.
4085         * (grub_vbe_set_video_mode): Fixed problem with text modes.
4087 2009-02-04  Felix Zielcke  <fzielcke@z-51.de>
4089         util/getroot.c (grub_util_get_grub_dev): Add support for /dev/mdNpN and
4090         /dev/md/NpN style mdraid devices.
4092 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4094         * util/unifont2pff.rb: Remove.
4096 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4098         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add a missing trailing
4099         `#'.
4101 2009-02-03  Felix Zielcke  <fzielcke@z-51.de>
4103         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/menu_viewer.c'.
4104         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
4105         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
4106         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Likewise.
4107         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4108         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4109         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
4111 2009-02-02  Christian Franke  <franke@computer.org>
4113         * lib/hexdump.c (hexdump): Print at most 3 lines if data is identical.
4115 2009-02-01  Felix Zielcke  <fzielcke@z-51.de>
4117         * INSTALL: Note that we now require at least autoconf 2.59 and
4118         that LZO is optional.
4120 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4122         Base on patch on bug #24154 created by Tomas Tintera
4123         <trosos@seznam.cz>.
4125         * video/i386/pc/vbe.c (grub_video_vbe_scroll): Fix downward scrolling.
4127 2009-02-01  Vesa Jääskeläinen  <chaac@nic.fi>
4129         Based on patch on bug #25318 created by Bernhard Rosenkraenzer
4130         <bero@arklinux.org>.
4132         * normal/parser.y (script_init): Add missing semicolon.
4134 2009-01-31  Colin D Bennett  <colin@gibibit.com>
4136         * normal/main.c: Add include to grub/menu_viewer.h.
4137         (free_menu_entry_classes): Added.
4138         (grub_normal_menu_addentry): Added class property handling.
4139         (grub_normal_execute): Changed to use new menu viewer for menu viewing.
4140         (GRUB_MOD_INIT(normal)): Added register for text based menu viewer.
4142         * normal/menu_viewer.c: New file.
4144         * normal/menu.c (run_menu_entry): Renamed to ...
4145         (grub_menu_execute_entry): ... this and made it as global.
4146         (grub_menu_run): Renamed to ...
4147         (show_text_menu): ... this and made it local.
4148         (show_text_menu): Adapt to new function names.
4149         (grub_normal_terminal_menu_viewer): New global variable.
4151         * include/grub/menu.h: New file.
4153         * include/grub/menu_viewer.h: New file.
4155         * include/grub/normal.h: Added include to grub/menu.h.
4156         (grub_menu_entry): Moved to include/grub/menu.h.
4157         (grub_menu_entry_t): Likewise.
4158         (grub_menu): Likewise.
4159         (grub_menu_t): Likewise.
4160         (grub_normal_terminal_menu_viewer): Added.
4161         (grub_menu_execute_entry): Likewise.
4162         (grub_menu_run): Removed.
4164         * DISTLIST: Added include/grub/menu.h.
4165         Added include/grub/menu_viewer.h.
4166         Added normal/menu_viewer.c.
4168 2009-01-31  Vesa Jääskeläinen  <chaac@nic.fi>
4170         * normal/execute.c (grub_script_execute_menuentry): Changed to use
4171         arglist for menutitle arguments.
4173         * normal/main.c (grub_normal_menu_addentry): Likewise.
4175         * normal/parser.y (menuentry): Likewise.
4177         * normal/script.c (grub_script_create_cmdmenu): Likewise.
4179         * include/grub/script.h (grub_script_cmd_menuentry): Likewise.
4180         (grub_script_create_cmdmenu): Likewise.
4182         * include/grub/normal.h (grub_normal_menu_addentry): Likewise.
4184         * conf/i386-pc.rmk (normal_mod_SOURCES): Adapt Colin D Bennett's
4185         changes.
4187         * conf/x86_64-efi.rmk (normal_mod_SOURCES): Likewise.
4189         * conf/i386-coreboot.rmk (normal_mod_SOURCES): Likewise.
4191         * conf/i386-efi.rmk (normal_mod_SOURCES): Likewise.
4193         * conf/i386-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4195         * conf/powerpc-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4197         * conf/sparc64-ieee1275.rmk (normal_mod_SOURCES): Likewise.
4199 2009-01-30  Christian Franke  <franke@computer.org>
4201         * normal/arg.c (grub_arg_show_help): Add indentation if '\n' appears
4202         in option help text.
4204 2009-01-27  Pavel Roskin  <proski@gnu.org>
4206         * disk/fs_uuid.c (search_fs_uuid): Ignore case of the UUID.
4208 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4210         * commands/lsmmap.c: Add include to grub/machine/memory.h.
4212         * fs/i386/pc/pxe.c (grub_pxefs_open): Fix sign problem.
4214         * term/i386/pc/at_keyboard.c (GRUB_MOD_FINI(at_keyboard)): Use proper
4215         unregister function.
4217 2009-01-27  Vesa Jääskeläinen  <chaac@nic.fi>
4219         * disk/scsi.c (grub_scsi_read): Fix sign problem.
4221         * term/i386/pc/vga_text.c (grub_vga_text_init_fini). Fix declaration.
4223         * util/grub-mkfont.c (usage): Fix typo.
4225         * util/elf/grub-mkimage.c (load_modules): Fix warning.
4227 2009-01-26  Daniel Mierswa  <impulze@impulze.org>
4229         * fs/fat.c (grub_fat_uuid): Fix shift of the first two bytes.
4231         * commands/search.c (search_fs_uuid): Ignore case of the UUID.
4233         * kern/misc.c (grub_strcasecmp): New function.
4234         (grub_strcasecmp): Use grub_size_t instead of int for length.
4235         Fix return value.
4236         * include/grub/misc.h: Update function prototypes.
4238 2009-01-26  Robert Millan  <rmh@aybabtu.com>
4240         * configure.ac: Fix cross-compilation check.
4242 2009-01-22  Christian Franke  <franke@computer.org>
4244         * kern/misc.c (grub_vsprintf): Fix size and termination of `format2'
4245         (precision) digit string.  Allow `.format2' without `format1' (width).
4246         Limit input chars for `%s' output to `format2' if specified.  This is
4247         compatible with standard printf ().
4249 2009-01-22  Christian Franke  <franke@computer.org>
4251         * disk/ata.c (grub_ata_wait_status): Replace by ...
4252         (grub_ata_wait_not_busy): ... this function.  Checks only BSY bit,
4253         other status bits may be invalid while BSY is asserted.
4254         (grub_ata_check_ready): New function.
4255         (grub_ata_cmd): Removed.
4256         (grub_ata_wait_drq): New function.
4257         (grub_ata_strncpy): Remove inline.
4258         (grub_ata_pio_read): Reduce to actual block transfer.  BSY wait
4259         and error check now done by grub_ata_wait_drq ().
4260         (grub_ata_pio_write): Likewise.
4261         (grub_atapi_identify): Set DEV before check for !BSY.  Use
4262         grub_ata_wait_drq () to wait for data.
4263         (grub_ata_device_initialize): Add status register check to
4264         detect missing SATA slave devices.  Add debug messages.
4265         (grub_atapi_wait_drq): Use grub_ata_wait_not_busy ().
4266         (grub_atapi_packet): Set DEV before check for !BSY.  Replace
4267         transfer loop by grub_ata_pio_write ().
4268         (grub_ata_identify): Set DEV before check for !BSY. Use
4269         grub_ata_wait_drq () to wait for data.
4270         (grub_ata_setaddress): Set DEV before check for !BSY.
4271         (grub_ata_readwrite): Remove duplicate code, handle batch/rest and
4272         read/write in one loop.  Fix invalid command on write.  Fix incomplete
4273         command on (size % batch) == 0.  Add missing error check after write of
4274         last block.  Add debug messages.
4275         (grub_atapi_read):  Replace transfer loop by grub_ata_pio_read ().
4277 2009-01-19  Christian Franke  <franke@computer.org>
4279         * disk/ata.c (GRUB_ATAPI_REG_*): New defines.
4280         (GRUB_ATAPI_IREASON_*): Likewise.
4281         (grub_ata_pio_write): Fix timeout error return.
4282         (grub_atapi_identify): Add grub_ata_wait () after cmd.
4283         (grub_atapi_wait_drq): New function.
4284         (grub_atapi_packet): New parameter `size'.
4285         Use grub_atapi_wait_drq () and direct write instead of
4286         grub_ata_pio_write ().
4287         (grub_atapi_read): Replace grub_ata_pio_read () by a loop which
4288         reads the number of bytes requested by the device for each DRQ
4289         assertion.
4290         (grub_atapi_write): Remove old implementation, return not
4291         implemented instead.
4293 2009-01-19  Christian Franke  <franke@computer.org>
4295         * disk/scsi.c (grub_scsi_read10): Use scsi->blocksize instead
4296         of 512 to calculate data size.
4297         (grub_scsi_read12): Likewise.
4298         (grub_scsi_write10): Likewise.
4299         (grub_scsi_write12): Likewise.
4300         (grub_scsi_read): Adjust size according to blocksize.
4301         Add checks for invalid blocksize and unaligned transfer.
4303 2009-01-19  Vesa Jääskeläinen  <chaac@nic.fi>
4305         * font/font.c (grub_font_loader_init): Re-position unknown glyph.
4307         * term/gfxterm.c (write_char): Fix background rendering for wide
4308         width glyphs.
4310 2009-01-19  Robert Millan  <rmh@aybabtu.com>
4312         * config.guess: Update to latest version from config git.
4313         * config.sub: Likewise.
4315 2009-01-17  Felix Zielcke  <fzielcke@z-51.de>
4317         * Makefile.in: Change font compilation to use new grub-mkfont instead
4318         of java version.
4320         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: Remove.
4321         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4322         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4323         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4324         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4325         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4326         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4327         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4328         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4330 2009-01-16  Christian Franke  <franke@computer.org>
4332         * disk/ata.c (enum grub_ata_commands): Remove EXEC_DEV_DIAGNOSTICS.
4333         (enum grub_ata_timeout_milliseconds): New enum.
4334         (grub_ata_wait_status): Add parameter milliseconds.
4335         (grub_ata_cmd): Remove variable `err'.  Remove wait for !DRQ to allow
4336         recovery from timed-out commands.
4337         (grub_ata_pio_read): Add parameter milliseconds.  Fix error return,
4338         return grub_errno instead of REG_ERROR.
4339         (grub_ata_pio_write): Add parameter milliseconds.
4340         (grub_atapi_identify): Fix size of ATAPI IDENTIFY sector.
4341         Pass milliseconds to grub_ata_wait_status () and
4342         grub_ata_pio_read ().
4343         (grub_atapi_packet): Pass milliseconds to grub_ata_pio_write ().
4344         (grub_ata_identify): Remove variable `ataerr'.  Pass milliseconds to
4345         grub_ata_wait_status ().  Fix IDENTIFY timeout check.
4346         (grub_ata_device_initialize): Remove EXECUTE DEVICE DIAGNOSTICS.
4347         It is not suitable for device detection, because DEV bit is ignored,
4348         the command may run too long, and not all devices set the signature
4349         properly.
4350         (grub_ata_pciinit): Clear grub_errno before grub_ata_device_initialize ().
4351         (grub_ata_setaddress): Pass milliseconds to grub_ata_wait_status ().
4352         Fix device selection, DEV bit must be set first to address the registers
4353         of the correct device.
4354         (grub_ata_readwrite): Pass milliseconds to grub_ata_wait_status () and
4355         grub_ata_pio_read/write ().
4356         (grub_atapi_read): Pass milliseconds to grub_ata_pio_read ().
4357         (grub_atapi_write): Pass milliseconds to grub_ata_pio_write ().
4359 2009-01-13  Carles Pina i Estany  <carles@pina.cat>
4361         * util/grub-editenv.c (main): Use fseeko(), not fseek().
4363 2009-01-13  Bean  <bean123ch@gmail.com>
4365         * util/grub-mkfont.c (write_font): forget to remove some debug code.
4367 2009-01-13  Bean  <bean123ch@gmail.com>
4369         * Makefile.in: (enable_grub_mkfont): New variable.
4370         (freetype_cflags): Likewise.
4371         (freetype_libs): Likewise.
4373         * common.rmk (bin_UTILITIES): Add `grub-mkfont' if requested.
4374         (grub_mkfont_SOURCES): New variable.
4375         (grub_mkfont_CFLAGS): Likewise.
4376         (grub_mkfont_LDFLAGS): Likewise.
4378         * configure.ac (--enable-grub-mkfont): New option. Check for freetype2
4379         library if `--enable-grub-mkfont' is requested.
4380         (enable_grub_mkfont): New variable.
4381         (freetype_cflags): Likewise.
4382         (freetype_libs): Likewise.
4384         * util/grub-mkfont.c: New file.
4386 2009-01-12  Christian Franke  <franke@computer.org>
4388         * disk/ata.c (grub_ata_pciinit): Fix bit numbers of compatibility
4389         mode check.  Fix setting of compat_use[].
4391 2009-01-10  Robert Millan  <rmh@aybabtu.com>
4393         Update a few copyright years which we forgot to do in 2008 (only for
4394         files whose changes made in 2008 were copyright-significant)
4396         * Makefile.in: Add 2008 to Copyright line.
4397         * disk/ieee1275/ofdisk.c: Likewise.
4398         * disk/efi/efidisk.c: Likewise.
4399         * kern/dl.c: Likewise.
4400         * kern/sparc64/ieee1275/init.c: Likewise.
4401         * kern/mm.c: Likewise.
4402         * kern/efi/mm.c: Likewise.
4403         * boot/i386/pc/boot.S: Likewise.
4404         * genfslist.sh: Likewise.
4405         * fs/iso9660.c: Likewise.
4406         * fs/hfs.c: Likewise.
4407         * fs/jfs.c: Likewise.
4408         * fs/minix.c: Likewise.
4409         * fs/ufs.c: Likewise.
4410         * gensymlist.sh.in: Likewise.
4411         * genkernsyms.sh.in: Likewise.
4412         * include/grub/misc.h: Likewise.
4413         * include/grub/types.h: Likewise.
4414         * include/grub/symbol.h: Likewise.
4415         * include/grub/elf.h: Likewise.
4416         * include/grub/kernel.h: Likewise.
4417         * include/grub/disk.h: Likewise.
4418         * include/grub/dl.h: Likewise.
4419         * include/grub/i386/linux.h: Likewise.
4420         * include/grub/i386/pc/biosdisk.h: Likewise.
4421         * include/grub/efi/api.h: Likewise.
4422         * include/grub/efi/pe32.h: Likewise.
4423         * include/grub/util/misc.h: Likewise.
4424         * normal/execute.c: Likewise.
4425         * normal/arg.c: Likewise.
4426         * normal/completion.c: Likewise.
4427         * normal/lexer.c: Likewise.
4428         * normal/parser.y: Likewise.
4429         * normal/misc.c: Likewise.
4430         * commands/i386/pc/vbeinfo.c: Likewise.
4431         * commands/hexdump.c: Likewise.
4432         * commands/terminal.c: Likewise.
4433         * commands/ls.c: Likewise.
4434         * commands/help.c: Likewise.
4435         * partmap/pc.c: Likewise.
4436         * loader/efi/chainloader.c: Likewise.
4437         * loader/multiboot_loader.c: Likewise.
4438         * loader/i386/pc/multiboot2.c: Likewise.
4439         * term/efi/console.c: Likewise.
4440         * term/i386/pc/serial.c: Likewise.
4441         * util/lvm.c: Likewise.
4442         * util/console.c: Likewise.
4443         * util/i386/efi/grub-mkimage.c: Likewise.
4444         * util/raid.c: Likewise.
4446 2009-01-06  Vesa Jääskeläinen  <chaac@nic.fi>
4448         * commands/videotest.c: Removed include to grub/machine/memory.h.
4450         * conf/i386-pc.rmk (pkglib_MODULES): Removed video.mod, gfxterm.mod,
4451         videotest.mod, bitmap.mod, tga.mod, jpeg.mod, png.mod.
4452         (video_mod_SOURCES): Removed.
4453         (video_mod_CFLAGS): Likewise.
4454         (video_mod_LDFLAGS): Likewise.
4455         (gfxterm_mod_SOURCES): Likewise.
4456         (gfxterm_mod_CFLAGS): Likewise.
4457         (gfxterm_mod_LDFLAGS): Likewise.
4458         (videotest_mod_SOURCES): Likewise.
4459         (videotest_mod_CFLAGS): Likewise.
4460         (videotest_mod_LDFLAGS): Likewise.
4461         (bitmap_mod_SOURCES): Likewise.
4462         (bitmap_mod_CFLAGS): Likewise.
4463         (bitmap_mod_LDFLAGS): Likewise.
4464         (tga_mod_SOURCES): Likewise.
4465         (tga_mod_CFLAGS): Likewise.
4466         (tga_mod_LDFLAGS): Likewise.
4467         (jpeg_mod_SOURCES): Likewise.
4468         (jpeg_mod_CFLAGS): Likewise.
4469         (jpeg_mod_LDFLAGS): Likewise.
4470         (png_mod_SOURCES): Likewise.
4471         (png_mod_CFLAGS): Likewise.
4472         (png_mod_LDFLAGS): Likewise.
4474         * conf/common.rmk (pkglib_MODULES): Added video.mod, videotest.mod,
4475         bitmap.mod, tga.mod, jpeg.mod, png.mod, font.mod, gfxterm.mod
4476         (video_mod_SOURCES): Added.
4477         (video_mod_CFLAGS): Likewise.
4478         (video_mod_LDFLAGS): Likewise.
4479         (videotest_mod_SOURCES): Likewise.
4480         (videotest_mod_CFLAGS): Likewise.
4481         (videotest_mod_LDFLAGS): Likewise.
4482         (bitmap_mod_SOURCES): Likewise.
4483         (bitmap_mod_CFLAGS): Likewise.
4484         (bitmap_mod_LDFLAGS): Likewise.
4485         (tga_mod_SOURCES): Likewise.
4486         (tga_mod_CFLAGS): Likewise.
4487         (tga_mod_LDFLAGS): Likewise.
4488         (jpeg_mod_SOURCES): Likewise.
4489         (jpeg_mod_CFLAGS): Likewise.
4490         (jpeg_mod_LDFLAGS): Likewise.
4491         (png_mod_SOURCES): Likewise.
4492         (png_mod_CFLAGS): Likewise.
4493         (png_mod_LDFLAGS): Likewise.
4494         (gfxterm_mod_SOURCES): Likewise.
4495         (gfxterm_mod_CFLAGS): Likewise.
4496         (gfxterm_mod_LDFLAGS): Likewise.
4498         * term/gfxterm.c: Removed include to grub/machine/memory.h,
4499         grub/machine/console.h.
4501 2009-01-04  Jerone Young  <jerone@gmail.com>
4503         Make on screen instructions clearer
4505         Based on patch created by Jidanni <jidanni@jidanni.org>
4507         * normal/menu.c: print clearer instructions on the screen
4509 2009-01-02  Colin D Bennett  <colin@gibibit.com>
4511         New font engine.
4513         Additional changes by Vesa Jääskeläinen <chaac@nic.fi> to adapt to
4514         build system and fixed gfxterm.c to work with different sized fonts.
4516         * configure.ac: Changed UNIFONT_HEX to UNIFONT_BDF.
4518         * configure: Re-generated.
4520         * DISTLIST: Removed font/manager.c.
4521         Added font/font.c.
4522         Added font/font_cmd.c.
4524         * Makefile.in: Changed UNIFONT_HEX to UNIFONT_BDF.  Added Font tool
4525         compilation.
4527         * include/grub/misc.h (grub_utf8_to_ucs4): Changed prototype.  Changed users.
4529         * kern/misc.c (grub_utf8_to_ucs4): Changed prototype.
4531         * kern/term.c: Changed users of grub_utf8_to_ucs4.
4533         * normal/menu.c: Likewise.
4535         * conf/common.rmk (font_mod_SOURCES): Removed font/manager.c.
4536         (font_mod_SOURCES): Added font/font_cmd.c, font/font.c.
4538         * include/grub/font.h: Replaced with new file.
4540         * include/grub/video.h (GRUB_VIDEO_MODE_TYPE_ALPHA): Changed value.
4541         (GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED): Likewise.
4542         (GRUB_VIDEO_MODE_TYPE_COLOR_MASK): Likewise.
4543         (GRUB_VIDEO_MODE_TYPE_1BIT_BITMAP): Added.
4544         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_1BIT_PACKED.
4545         (grub_video_mode_info): Added bg_red, bg_green, bg_blue, bg_alpha,
4546         fg_red, fg_green, fg_blue, fg_alpha.
4547         (grub_video_adapter): Removed blit_glyph.
4548         (grub_video_blit_glyph): Removed.
4550         * font/manager.c: Removed file.
4552         * font/font.c: New file.
4554         * font/font_cmd.c: Likewise.
4556         * video/video.c (grub_video_blit_glyph): Removed.
4558         * video/i386/pc/vbe.c (grub_video_vbe_map_rgb): Added 1-bit support.
4559         (grub_video_vbe_map_rgba): Likewise.
4560         (grub_video_vbe_unmap_color_int): Likewise.
4561         (grub_video_vbe_blit_glyph): Removed.
4562         (grub_video_vbe_adapter): Removed blit_glyph.
4564         * video/i386/pc/vbeutil.c (get_data_ptr): Added 1-bit support.
4565         (get_pixel): Likewise.
4566         (set_pixel): Likewise.
4568         * commands/videotest.c (grub_cmd_videotest): Added more tests for fonts.
4570         * term/gfxterm.c: Adapted to new font engine.
4572         * term/i386/pc/vesafb.c: Marked as deprecated.  Made it compile.
4574         * term/i386/pc/vga.c: Likewise.
4576         * util/fonttool/src/org/gnu/grub/fonttool/BDFLoader.java: New file.
4578         * util/fonttool/src/org/gnu/grub/fonttool/CharDefs.java: Likewise.
4580         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4582         * util/fonttool/src/org/gnu/grub/fonttool/CharacterRange.java: Likewise.
4584         * util/fonttool/src/org/gnu/grub/fonttool/Converter.java: Likewise.
4586         * util/fonttool/src/org/gnu/grub/fonttool/Font.java: Likewise.
4588         * util/fonttool/src/org/gnu/grub/fonttool/Glyph.java: Likewise.
4590         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Sections.java: Likewise.
4592         * util/fonttool/src/org/gnu/grub/fonttool/PFF2Writer.java: Likewise.
4594         * util/grub.d/00_header.in: Changed to use new loadfont command.
4596         * util/grub-mkconfig_lib.in: Changed font extension.
4598 2008-12-28  Felix Zielcke  <fzielcke@z-51.de>
4600         * util/getroot.c (grub_util_get_grub_dev): Add support for
4601         /dev/md/dNNpNN style partitionable mdraid devices.
4603 2008-12-12  Alex Smith  <alex@alex-smith.me.uk>
4605         * fs/i386/pc/pxe.c (grub_pxefs_open): Handle the one open connection
4606         at a time limit of the PXE TFTP API correctly.
4607         (grub_pxefs_close): Likewise.
4609 2008-11-29  Robert Millan  <rmh@aybabtu.com>
4611         * disk/ata.c (grub_ata_pciinit): Handle errors raised by
4612         grub_ata_device_initialize() calls.
4614 2008-11-28  Krzysztof Smiechowicz  <deadwood@wp.pl>
4616         * fs/affs.c (grub_affs_iterate_dir): Return failure when directory
4617         iteration failed.
4618         * fs/sfs.c (grub_sfs_iterate_dir): Likewise.
4620 2008-11-28  Robert Millan  <rmh@aybabtu.com>
4622         Fix build on powerpc-ieee1275.  Based on patch created by
4623         Manoel Abranches <mrabran@linux.vnet.ibm.com>.
4624         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
4625         `kern/ieee1275/mmap.c'.
4626         * include/grub/powerpc/ieee1275/memory.h: New file.
4628         Provide grub-install on coreboot.
4629         * conf/i386-coreboot.rmk (sbin_SCRIPTS): Add `grub-install'.
4630         (grub_install_SOURCES): New variable.
4631         * util/i386/pc/grub-install.in: Add a few condition checks to make it
4632         usable on coreboot.
4634 2008-11-25  Felix Zielcke  <fzielcke@z-51.de>
4636         * util/grub-fstest.c (grub_term_get_current_input): Change return type
4637         to `grub_term_input_t'.
4638         (grub_term_get_current_output): Change return type to
4639         `grub_term_output_t'.
4641 2008-11-22  Robert Millan  <rmh@aybabtu.com>
4643         Fix breakage on coreboot due to declaration mismatch.
4644         * term/i386/pc/vga_text.c (grub_vga_text_init_fini): New function.
4645         (grub_vga_text_term): Use grub_vga_text_init_fini() instead of
4646         grub_vga_text_cls().
4648         * kern/i386/loader.S (grub_multiboot_backward_relocator): Improve
4649         comments.  Avoid copying one more byte than necessary (just in case).
4651         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Change link address
4652         to 0x200000 (avoids trouble with some OFW implementations, and matches
4653         with the one in Yaboot).
4654         Reported by Manoel Abranches
4656 2008-11-20  Robert Millan  <rmh@aybabtu.com>
4658         * kern/i386/coreboot/init.c (grub_time_tics): Remove variable.
4659         (grub_get_rtc, grub_exit): Abort with grub_fatal() if called.
4661         * util/grub-mkconfig_lib.in (grub_warn): New function.
4662         (convert_system_path_to_grub_path): Use grub_warn() when issuing
4663         warnings, to obtain consistent formatting.
4664         * util/grub.d/00_header.in: Likewise.
4665         * util/update-grub_lib.in: Likewise.
4667         * loader/i386/linux.c (allocate_pages): Fix a warning.
4668         Move comment text to `#error' stanza.
4670         Harmonize ieee1275's grub_available_iterate() with the generic
4671         grub_machine_mmap_iterate() interface (fixes a recently-introduced
4672         build problem on i386-ieee1275):
4673         * kern/ieee1275/openfw.c (grub_available_iterate): Moved from here ...
4674         * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): ... here.  Add third
4675         parameter `type'.  Update all users of this function.
4676         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
4677         `kern/ieee1275/mmap.c'.
4678         * kern/ieee1275/init.c
4679         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): Replace
4680         with ...
4681         (grub_machine_mmap_iterate): ... this.
4682         * include/grub/i386/pc/memory.h (grub_machine_mmap_iterate): Change
4683         return type to `grub_err_t'.  Update all implementations of this
4684         function prototype.
4685         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_iterate):
4686         Likewise.
4688         Add `lsmmap' command (lists firmware-provided memory map):
4689         * commands/lsmmap.c: New file.
4690         * conf/i386-pc.rmk (pkglib_MODULES): Add `lsmmap.mod'.
4691         (lsmmap_mod_SOURCES, lsmmap_mod_CFLAGS, lsmmap_mod_LDFLAGS): New
4692         variables.
4693         * conf/powerpc-ieee1275.rmk: Likewise.
4694         * conf/i386-coreboot.rmk: Likewise.
4695         * conf/i386-ieee1275.rmk: Likewise.
4697 2008-11-19  Robert Millan  <rmh@aybabtu.com>
4699         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Fix a typo.
4700         * loader/i386/linux.c (grub_rescue_cmd_initrd): Implement a few needed
4701         constraints to initrd allocation (based on code from
4702         loader/i386/pc/linux.c).  Without them, initrd was allocated too high
4703         for Linux to find it.
4705 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4707         * fs/cpio.c (grub_cpio_open): Compare `name' and `fn' by hand in
4708         order to cope with duplicate slashes.
4710 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4712         * include/grub/i386/coreboot/memory.h (GRUB_MEMORY_MACHINE_LOWER_SIZE):
4713         Redefine to match with GRUB_MEMORY_MACHINE_UPPER_START (0x100000).  We
4714         don't want to mess with lower memory, because it is used in the Linux
4715         loader.
4717         * loader/i386/linux.c (allocate_pages): Allocate `real_mode_mem' in
4718         an appropriate place in lower memory, between 0x10000 and 0x90000,
4719         like loader/i386/efi/linux.c does.  Linux often panics if real_mode_mem
4720         is in our heap (probably as a result of it being corrupted during
4721         decompression).  Add #error instance with comment to explain why this
4722         loader isn't currently usable on PC/BIOS.
4724 2008-11-14  Robert Millan  <rmh@aybabtu.com>
4726         * term/i386/pc/serial.c [! GRUB_MACHINE_PCBIOS]
4727         (GRUB_SERIAL_PORT_NUM): Fix miscalculation.
4729 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4731         Make loader/i386/linux.c buildable on i386-pc (although disabled).
4733         * include/grub/i386/pc/init.h: Include `<grub/machine/memory.h>'.
4734         (struct grub_machine_mmap_entry, grub_machine_mmap_iterate): Move
4735         from here ...
4736         * include/grub/i386/pc/memory.h: ... to here.
4738 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4740         Fix build problems on i386-ieee1275 and *-efi (introduced by vga_text
4741         split).
4743         * include/grub/i386/pc/console.h: Include `<grub/i386/vga_common.h>'.
4744         (grub_console_cur_color, grub_console_real_putchar)
4745         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4746         (grub_console_setcolorstate, grub_console_setcolor)
4747         (grub_console_getcolor): Move from here ...
4748         * include/grub/i386/vga_common.h: ... to here (new file).
4750         * term/i386/pc/vga_text.c: Replace `<grub/machine/console.h>' with
4751         `<grub/i386/vga_common.h>' and `<grub/cpu/io.h>' with
4752         `<grub/i386/io.h>'.
4753         * term/i386/vga_common.c: Replace `<grub/machine/console.h>' with
4754         `<grub/i386/vga_common.h>'.
4756 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4758         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `term/i386/vga_common.c'.
4759         * conf/i386.rmk (pkglib_MODULES): Add `vga_text.mod'.
4760         (vga_text_mod_SOURCES, vga_text_mod_CFLAGS, vga_text_mod_LDFLAGS): New
4761         variables.
4762         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4763         `term/i386/pc/console.c' with `term/i386/vga_common.c'.
4765         * kern/i386/coreboot/init.c (grub_machine_init): Replace call to
4766         grub_console_init() with call to grub_vga_text_init().
4767         (grub_machine_fini): Replace call to
4768         grub_console_fini() with call to grub_vga_text_fini() and
4769         grub_at_keyboard_fini().
4771         * include/grub/i386/pc/console.h: Include `<grub/term.h>'.
4772         (grub_console_putchar, grub_console_getcharwidth, grub_console_getwh)
4773         (grub_console_setcolorstate, grub_console_setcolor)
4774         (grub_console_getcolor): New function prototypes.
4776         * term/i386/pc/vga_text.c: Include `<grub/dl.h>'.
4777         (grub_vga_text_getxy, grub_vga_text_gotoxy, grub_vga_text_cls)
4778         (grub_vga_text_setcursor): Static-ize.
4779         (grub_vga_text_term): New structure.
4780         (GRUB_MOD_INIT(vga_text), GRUB_MOD_FINI(vga_text)): New functions.
4782         * term/i386/pc/console.c: Remove `<grub/machine/machine.h>'.
4783         (grub_console_cur_color, grub_console_standard_color)
4784         (grub_console_normal_color, grub_console_highlight_color)
4785         (map_char, grub_console_putchar, grub_console_getcharwidth)
4786         (grub_console_getwh, grub_console_setcolorstate, grub_console_setcolor)
4787         (grub_console_getcolor): Move from here ...
4788         * term/i386/vga_common.c: ... to here (same function names).
4790 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4792         Use newly-added Multiboot support in coreboot.
4794         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Replace
4795         `kern/i386/coreboot/mmap.c' with `kern/i386/multiboot_mmap.c'.
4797         * kern/i386/coreboot/startup.S: Enable Multiboot header, fix its
4798         alignment, set `MULTIBOOT_MEMORY_INFO' flag.
4799         (codestart): Store the MBI in `startup_multiboot_info' when we're
4800         being loaded using Multiboot.
4802         * kern/i386/coreboot/init.c (grub_machine_init): Move
4803         grub_at_keyboard_init() call to beginning of function (useful for
4804         debugging).  Call grub_machine_mmap_init() before attempting to use
4805         grub_machine_mmap_iterate().
4806         (grub_lower_mem, grub_upper_mem): Move from here ...
4807         * kern/i386/multiboot_mmap.c (grub_lower_mem, grub_upper_mem): ... to
4808         here (new file).
4810         * include/grub/i386/coreboot/memory.h (grub_machine_mmap_init): New
4811         function prototype.
4813 2008-11-12  Robert Millan  <rmh@aybabtu.com>
4815         Fix a regression introduced by the at_keyboard.mod split.  Because
4816         some terminals are default on some platforms and non-default on
4817         others, the first terminal being registered determines which is
4818         going to be default.
4820         * kern/term.c (grub_term_register_input): If this is the first
4821         terminal being registered, set it as the current one.
4822         (grub_term_register_output): Likewise.
4824         * term/efi/console.c (grub_console_init): Do not call
4825         grub_term_set_current_output() or grub_term_set_current_input().
4826         * term/ieee1275/ofconsole.c (grub_console_init): Likewise.
4827         * term/i386/pc/console.c (grub_console_init): Likewise.
4828         (grub_console_fini): Do not call grub_term_set_current_input()
4829         (but leave grub_term_set_current_output() to restore text mode).
4831 2008-11-10  Robert Millan  <rmh@aybabtu.com>
4833         * util/grub.d/00_header.in: Add backward compatibility check for
4834         versions of terminal.mod that don't understand `terminal_input' or
4835         `terminal_output'.
4837 2008-11-09  Robert Millan  <rmh@aybabtu.com>
4839         * commands/terminal.c (GRUB_MOD_FINI(terminal)): Unregister
4840         `terminal_input' / `terminal_output', not `terminal'.
4842 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4844         * Makefile.in (include_DATA): Fix srcdir=. assumption.
4845         (DISTCLEANFILES): Add `build_env.mk'.
4847 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4849         * term/i386/pc/vesafb.c (grub_vesafb_term): Change type to
4850         `struct grub_term_output'.  Remove `.checkkey' and `.getkey'
4851         members.  Update all users.
4852         * util/console.c (grub_ncurses_term): Split in ...
4853         (grub_ncurses_term_input): ... this, and ...
4854         (grub_ncurses_term_output): ... this.  Update all users.
4855         * term/ieee1275/ofconsole.c: Remove stale `#endif'.
4857 2008-11-08  Robert Millan  <rmh@aybabtu.com>
4859         * Makefile.in (PKGLIB): Add $(pkglib_BUILDDIR).
4860         (PKGDATA): Add $(pkgdata_SRCDIR).
4861         (pkglib_BUILDDIR): New variable.
4862         (pkgdata_SRCDIR): New variable.
4863         (build_env.mk): New target.
4864         (include_DATA): New variable.
4865         (install-local): Install $(include_DATA) files in $(includedir).
4867 2008-11-07  Pavel Roskin  <proski@gnu.org>
4869         * gendistlist.sh: Use C locale for sorting to ensure consistent
4870         output on all systems.
4872         * util/grub.d/00_header.in: Remove incorrect space before
4873         "serial".
4875 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4877         * include/multiboot2.h (struct multiboot_header): Add `flags' member as
4878         per specification.
4879         * loader/multiboot2.c (grub_multiboot2): Fix Multiboot2 header check.
4880         * loader/multiboot_loader.c (find_multi_boot2_header): New function
4881         (based on find_multi_boot1_header).
4882         (grub_rescue_cmd_multiboot_loader): Check for Multiboot2 header,
4883         using find_multi_boot2_header(), and abort if neither Multiboot or
4884         Multiboot headers were found.
4886 2008-11-07  Robert Millan  <rmh@aybabtu.com>
4888         Modularize at_keyboard.mod:
4890         * conf/i386.rmk (pkglib_MODULES): Add `at_keyboard.mod'.
4891         (at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
4892         (at_keyboard_mod_LDFLAGS): New variables.
4894         Actual terminal split:
4896         * include/grub/term.h (struct grub_term): Split in ...
4897         (struct grub_term_input): ... this, and ...
4898         (struct grub_term_output): ... this.  Update all users.
4899         (grub_term_set_current): Split in ...
4900         (grub_term_set_current_input): ... this, and ...
4901         (grub_term_set_current_output): ... this.
4902         (grub_term_get_current): Split in ...
4903         (grub_term_get_current_input): ... this, and ...
4904         (grub_term_get_current_output): ... this.
4905         (grub_term_register): Split in ...
4906         (grub_term_register_input): ... this, and ...
4907         (grub_term_register_output): ... this.
4908         (grub_term_unregister): Split in ...
4909         (grub_term_unregister_input): ... this, and ...
4910         (grub_term_unregister_output): ... this.
4911         (grub_term_iterate): Split in ...
4912         (grub_term_iterate_input): ... this, and ...
4913         (grub_term_iterate_output): ... this.
4915         * kern/term.c (grub_term_list): Split in ...
4916         (grub_term_list_input): ... this, and ...
4917         (grub_term_list_output): ... this.  Update all users.
4918         (grub_cur_term): Split in ...
4919         (grub_cur_term_input): ... this, and ...
4920         (grub_cur_term_output): ... this.  Update all users.
4921         (grub_term_set_current): Split in ...
4922         (grub_term_set_current_input): ... this, and ...
4923         (grub_term_set_current_output): ... this.
4924         (grub_term_get_current): Split in ...
4925         (grub_term_get_current_input): ... this, and ...
4926         (grub_term_get_current_output): ... this.
4927         (grub_term_register): Split in ...
4928         (grub_term_register_input): ... this, and ...
4929         (grub_term_register_output): ... this.
4930         (grub_term_unregister): Split in ...
4931         (grub_term_unregister_input): ... this, and ...
4932         (grub_term_unregister_output): ... this.
4933         (grub_term_iterate): Split in ...
4934         (grub_term_iterate_input): ... this, and ...
4935         (grub_term_iterate_output): ... this.
4937         * kern/misc.c (grub_abort): Split use of grub_term_get_current() into
4938         a check for input and one for output (and only attempt to get keys
4939         from user when input works).
4941         * util/grub-probe.c (grub_term_get_current): Split in ...
4942         (grub_term_get_current_input): ... this, and ...
4943         (grub_term_get_current_output): ... this.
4944         * util/grub-fstest.c: Likewise.
4945         * util/i386/pc/grub-setup.c: Likewise.
4946         * util/grub-editenv.c: Likewise.
4948         Portability adjustments:
4950         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Remove
4951         `term/i386/pc/at_keyboard.c'.
4952         * kern/ieee1275/init.c [__i386__] (grub_machine_init): Remove call to
4953         grub_keyboard_controller_init() (now handled by terminal .init).
4954         * kern/i386/coreboot/init.c (grub_machine_init): Add call to
4955         grub_at_keyboard_init().
4956         * include/grub/i386/ieee1275/console.h (grub_keyboard_controller_init)
4957         (grub_console_checkkey, grub_console_getkey): Remove (now provided by
4958         at_keyboard.mod via input terminal interface).
4959         * include/grub/i386/coreboot/console.h: Convert into a stub for
4960         `<grub/i386/pc/console.h>'.
4962         Migrate full terminals to new API:
4964         * term/efi/console.c (grub_console_term): Split into ...
4965         (grub_console_term_input): ... this, and ...
4966         (grub_console_term_output): ... this.  Update all users.
4967         * term/ieee1275/ofconsole.c: Remove __i386__ hack.
4968         (grub_ofconsole_init): Split into ...
4969         (grub_ofconsole_init_input): ... this, and ...
4970         (grub_ofconsole_init_output): ... this.
4971         (grub_ofconsole_term): Split into ...
4972         (grub_ofconsole_term_input): ... this, and ...
4973         (grub_ofconsole_term_output): ... this.  Update all users.
4974         * term/i386/pc/serial.c (grub_serial_term): Split into ...
4975         (grub_serial_term_input): ... this, and ...
4976         (grub_serial_term_output): ... this.  Update all users.
4977         * term/i386/pc/console.c (grub_console_term): Split into ...
4978         (grub_console_term_input): ... this, and ...
4979         (grub_console_term_output): ... this.  Update all users.
4980         (grub_console_term_input): Only enable it on PC/BIOS platform.
4981         (grub_console_init): Remove grub_keyboard_controller_init() call.
4983         Migrate input terminals to new API:
4985         * term/i386/pc/at_keyboard.c: Replace `cpu' and `machine' with
4986         `i386' and `i386/pc' to enable build on x86_64 (this driver is
4987         i386-specific anyway).
4988         (grub_console_checkkey): Rename to ...
4989         (grub_at_keyboard_checkkey): ... this.  Static-ize.  Update all
4990         users.
4991         (grub_keyboard_controller_orig): New variable.
4992         (grub_console_getkey): Rename to ...
4993         (grub_at_keyboard_getkey): ... this.  Static-ize.  Update all
4994         users.
4995         (grub_keyboard_controller_init): Static-ize.  Save original
4996         controller value so that it can be restored ...
4997         (grub_keyboard_controller_fini): ... here (new function).
4998         (grub_at_keyboard_term): New structure.
4999         (GRUB_MOD_INIT(at_keyboard), GRUB_MOD_FINI(at_keyboard)): New
5000         functions.
5002         Migrate output terminals to new API:
5004         * term/i386/pc/vga.c (grub_vga_term): Change type to
5005         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5006         members.  Update all users.
5007         * term/gfxterm.c (grub_video_term): Change type to
5008         `struct  grub_term_output'.  Remove `.checkkey' and `.getkey'
5009         members.  Update all users.
5010         * include/grub/i386/pc/console.h (grub_console_checkkey)
5011         (grub_console_getkey): Do not export (no longer needed by gfxterm,
5012         etc).
5014         Migrate `terminal' command and userland tools to new API:
5016         * commands/terminal.c (grub_cmd_terminal): Split into ...
5017         (grub_cmd_terminal_input): ... this, and ...
5018         (grub_cmd_terminal_output): ... this.
5019         (GRUB_MOD_INIT(terminal)): Split `terminal' command in two commands:
5020         `terminal_input' and `terminal_output'.
5021         * util/grub.d/00_header.in: Adjust `terminal' calls to new
5022         `terminal_input' / `terminal_output' API.
5023         * util/grub-mkconfig.in: Export ${GRUB_TERMINAL_INPUT} and
5024         ${GRUB_TERMINAL_OUTPUT} instead of ${GRUB_TERMINAL} (and if user
5025         provided ${GRUB_TERMINAL}, convert it).
5027 2008-11-04  Robert Millan  <rmh@aybabtu.com>
5029         * util/grub.d/10_freebsd.in: New file.  Generate grub configuration
5030         for FreeBSD.
5031         * conf/common.rmk (grub-mkconfig_SCRIPTS): Add 10_freebsd.
5033 2008-11-03  Bean  <bean123ch@gmail.com>
5035         * kern/elf.c (grub_elf32_load): Revert to previous code.
5036         (grub_elf64_load): Likewise.
5038         * loader/i386/bsd.c (grub_bsd_elf32_hook): Change return address.
5040 2008-11-01  Robert Millan  <rmh@aybabtu.com>
5042         * Makefile.in (CPPFLAGS): Fix builddir=. assumption.
5043         (TARGET_CPPFLAGS): Likewise.
5044         * genmk.rb (mod_src): Fix builddir=. and srcdir=. assumptions.
5046 2008-11-01  Carles Pina i Estany  <carles@pina.cat>
5048         * normal/menu.c (run_menu): Add Previous and Next Page keys in menu.
5050 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5052         * disk/lvm.c (grub_lvm_scan_device): Fix error recovery by delaying the
5053         addition of objects until the code is not going to be able to fail.
5055 2008-10-29  Guillem Jover  <guillem.jover@nokia.com>
5057         * disk/lvm.c (grub_lvm_scan_device): Fix possible NULL value handling
5058         (add a missing NULL check, and correct them by moving the pointer
5059         operations after the actual check).
5061 2008-10-29  Robert Millan  <rmh@aybabtu.com>
5063         * util/i386/pc/grub-install.in: Handle empty string as output from
5064         make_system_path_relative_to_its_root().
5066 2008-10-05  Hans Lambermont  <hans@lambermont.dyndns.org>
5068         * disk/lvm.c (grub_lvm_scan_device): Allocate buffer space for the
5069         circular metadata worst case scenario. If the metadata is circular
5070         then copy the wrap in place.
5071         * include/grub/lvm.h: Add GRUB_LVM_MDA_HEADER_SIZE, from the LVM2
5072         project lib/format_text/layout.h
5073         Circular metadata bug found and patch debugged by Jan Derk Gerlings.
5075 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5077         * util/i386/pc/grub-install.in: Source grub-mkconfig_lib instead of update-grub_lib.
5079 2008-10-03  Felix Zielcke  <fzielcke@z-51.de>
5081         * util/update-grub_lib.in: Mention filename in warning message.
5083 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5085         * NEWS: Update for rename of update-grub to grub-mkconfig.
5087 2008-09-29  Felix Zielcke  <fzielcke@z-51.de>
5089         * util/update-grub_lib.in: Copy to ...
5090         * util/grub-mkconfig_lib.in: ... this.  Update all users.
5091         * util/update-grub_lib.in: Make it a stub to `grub-mkconfig_lib.in'.
5092         * util/update-grub.in: Rename to ...
5093         * util/grub-mkconfig.in: ... this.  Update all users.  Remove `-y'
5094         option. Add `--output' option to allow users to specify the generated
5095         configuration file.  Default to stdout.
5096         (update_grub_dir): Rename to ...
5097         (grub_mkconfig_dir): ... this.
5098         (grub_cfg): Default to an empty string.
5099         * conf/common.rmk (update-grub): Rename to ...
5100         (grub-mkconfig): ... this.
5101         (update-grub_lib): Copy to ...
5102         (grub-mkconfig_lib): ... this.
5103         (update-grub_SCRIPTS): Copy to ...
5104         (grub-mkconfig_SCRIPTS): ... this. Update all users.
5105         (update-grub_DATA): Rename to ...
5106         (grub-mkconfig_DATA): ... this.
5108 2008-09-28  Robert Millan  <rmh@aybabtu.com>
5110         * fs/iso9660.c (struct grub_iso9660_primary_voldesc): Rename `created'
5111         to `modified'.  Add the real `created' field.
5112         (grub_iso9660_uuid): Use `modified' rather than `created' for
5113         constructing the UUID.
5115 2008-09-28  Felix Zielcke  <fzielcke@z-51.de>
5117         fs/jfs.c (grub_jfs_find_file): Treat multiple slashes like one.
5118         Based on code from Tomas Ebenlendr <ebik@ucw.cz>.
5120 2008-09-28  Bean  <bean123ch@gmail.com>
5122         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a bug in the previous patch.
5123         Thanks to Christian Franke for finding this bug.
5125 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5127         * util/grub-mkdevicemap.c (make_device_map): Actually replace all
5128         instances of grub_util_get_disk_name() (see previous commit).
5130 2008-09-25  Robert Millan  <rmh@aybabtu.com>
5132         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Remove
5133         `util/i386/get_disk_name.c'.
5134         * conf/i386-efi.rmk: Likewise.
5135         * conf/x86_64-efi.rmk: Likewise.
5136         * conf/i386-coreboot.rmk: Likewise.
5137         * conf/i386-ieee1275.rmk: Likewise.
5138         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Remove
5139         `util/ieee1275/get_disk_name.c'.
5140         * include/grub/util/misc.h (grub_util_get_disk_name): Remove.
5141         * util/ieee1275/get_disk_name.c: Remove file.
5142         * util/i386/get_disk_name.c: Remove file.
5143         * util/grub-mkdevicemap.c (make_device_map): Back to hardcoding
5144         "hd%d" for device.map entries, rather than using
5145         grub_util_get_disk_name().
5147 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5149         * disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Fix `unused parameter'
5150         warning.
5151         * commands/i386/pc/pxecmd.c (dmraid_nvidia): Likewise.
5153 2008-09-24  Carles Pina i Estany  <carles@pina.cat>
5155         * include/grub/i386/pc/console.h (GRUB_TERM_NPAGE):
5156         Changed to 0x5100.
5157         (GRUB_TERM_PPAGE): Changed to 0x4900.
5159 2008-09-24  Robert Millan  <rmh@aybabtu.com>
5161         * include/grub/powerpc/ieee1275/console.h (GRUB_CONSOLE_KEY_*): Remove
5162         macros (they were i386-pc specific).
5163         * include/grub/sparc64/ieee1275/console.h: Likewise.
5164         * include/grub/efi/console.h: Likewise.
5166 2008-09-22  Bean  <bean123ch@gmail.com>
5168         * fs/ntfs.c (grub_ntfs_iterate_dir): Fix a rare case where $BITMAP is
5169         resident and in attribute list.
5171         * include/grub/ntfs.h (BMP_LEN): Removed.
5173 2008-09-22  Bean  <bean123ch@gmail.com>
5175         * disk/ata.c (grub_atapi_open): Initialize devfnd, no need to set
5176         scsi->name and scsi->luns, as they will be set in grub_scsi_open.
5178         * disk/scsi.c (grub_scsi_open): Don't call p->close (scsi) here when
5179         error occurs, as grub_disk_open will call grub_disk_close, which will
5180         call p->close (scsi).
5182 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5184         * configure.ac (AC_INIT): Quote `GRUB' string and version number.
5185         (AC_PREREQ): Bumped to 2.59.
5186         (AC_TRY_COMPILE): Replace obsolete macro with ...
5187         (AC_COMPILE_IFELSE): ... this.
5188         * aclocal.m4 (AC_TRY_LINK): Replace obsolete macro with ...
5189         (AC_LINK_IFELSE): ... this.
5191 2008-09-21  Felix Zielcke  <fzielcke@z-51.de>
5193         * autogen.sh: Add a call to `gendistlist.sh'.
5195 2008-09-19  Christian Franke  <franke@computer.org>
5197         * aclocal.m4 (grub_CHECK_ENABLE_EXECUTE_STACK): New function.
5198         * configure.ac: Call grub_CHECK_ENABLE_EXECUTE_STACK.
5199         * include/grub/misc.h [NEED_ENABLE_EXECUTE_STACK]:
5200         Export __enable_execute_stack() to modules.
5201         * kern/misc.c [NEED_ENABLE_EXECUTE_STACK] (__enable_execute_stack):
5202         New function.
5204 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5206         * Makefile.in (RMKFILES): Add `i386.rmk' and `x86_64-efi.rmk'.
5207         Sort the list.
5209 2008-09-09  Felix Zielcke  <fzielcke@z-51.de>
5211         * util/hostdisk.c: Replace #include <grub/util/biosdisk.h> with
5212         #include <grub/util/hostdisk.h>.
5214 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5216         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Skip
5217         segments when their filesz is zero (grub_file_read() interprets
5218         zero-size as "read until EOF", which results in memory corruption).
5219         Use `lowest_segment' rather than 0 for calculating the current
5220         segment load address.
5222 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5224         * util/hostdisk.c (open_device): Replace a grub_util_info() call
5225         with grub_dprintf("hostdisk", ...), as it was so verbose that it
5226         clobbered useful information.
5228 2008-09-08  Robert Millan  <rmh@aybabtu.com>
5230         * include/grub/util/biosdisk.h: Move to ...
5231         * include/grub/util/hostdisk.h: ... here.  Update all users.
5232         * util/biosdisk.c: Move to ...
5233         * util/hostdisk.c: ... here.  Update all users.
5235 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5237         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): Remove
5238         variables.
5239         (grub_multiboot): Move `mbi' allocation upwards, so that mmap address
5240         and length can be stored directly in the `mbi->mmap_addr' and
5241         `mbi->mmap_length' struct fields.
5243 2008-09-07  Robert Millan  <rmh@aybabtu.com>
5245         * conf/i386.rmk: New file.  Provides declaration for building
5246         `cpuid.mod'.
5247         * conf/i386-pc.rmk (pkglib_MODULES): Remove `cpuid.mod'.
5248         (cpuid_mod_SOURCES, cpuid_mod_CFLAGS, cpuid_mod_LDFLAGS): Remove
5249         variables.
5250         Include `conf/i386.mk'.
5251         * conf/i386-efi.rmk: Likewise.
5252         * conf/x86_64-efi.rmk: Likewise.
5253         * conf/i386-coreboot.rmk: Likewise.
5254         * conf/i386-ieee1275.rmk: Likewise.
5256 2008-09-07  Vesa Jääskeläinen  <chaac@nic.fi>
5258         Based on patch created by Colin D Bennett <colin@gibibit.com>.
5259         Adds optimization support for BGR based modes.
5261         * include/grub/i386/pc/vbeblit.h (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8) Removed.
5262         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5263         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5264         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5265         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5266         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5267         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5268         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5269         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5270         (grub_video_i386_vbeblit_index_index): Likewise.
5271         (grub_video_i386_vbeblit_replace_directN): Added.
5272         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5273         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5274         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5275         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5276         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5277         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5278         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5279         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5280         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5281         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5282         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5283         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5284         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5286         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8) Removed.
5287         (grub_video_i386_vbefill_R8G8B8): Likewise.
5288         (grub_video_i386_vbefill_index): Likewise.
5289         (grub_video_i386_vbefill_direct32): Added.
5290         (grub_video_i386_vbefill_direct24): Likewise.
5291         (grub_video_i386_vbefill_direct16): Likewise.
5292         (grub_video_i386_vbefill_direct8): Likewise.
5294         * include/grub/video.h (grub_video_blit_format): Removed
5295         GRUB_VIDEO_BLIT_FORMAT_R8G8B8A8, GRUB_VIDEO_BLIT_FORMAT_R8G8B8.
5296         (grub_video_blit_format): Added GRUB_VIDEO_BLIT_FORMAT_RGBA_8888,
5297         GRUB_VIDEO_BLIT_FORMAT_BGRA_8888, GRUB_VIDEO_BLIT_FORMAT_RGB_888,
5298         GRUB_VIDEO_BLIT_FORMAT_BGR_888, GRUB_VIDEO_BLIT_FORMAT_RGB_565,
5299         GRUB_VIDEO_BLIT_FORMAT_BGR_565.
5301         * video/video.c (grub_video_get_blit_format): Updated to use new
5302         blit formats.  Added handling for 16 bit color modes.
5304         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Updated to use new
5305         fillers.
5306         (common_blitter): Updated to use new blitters.
5308         * video/i386/pc/vbeblit.c (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8):
5309         Removed.
5310         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): Likewise.
5311         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
5312         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
5313         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
5314         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
5315         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
5316         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
5317         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
5318         (grub_video_i386_vbeblit_index_index): Likewise.
5319         (grub_video_i386_vbeblit_replace_directN): Added.
5320         (grub_video_i386_vbeblit_replace_BGRX8888_RGBX8888): Likewise.
5321         (grub_video_i386_vbeblit_replace_BGRX8888_RGB888): Likewise.
5322         (grub_video_i386_vbeblit_replace_BGR888_RGBX8888): Likewise.
5323         (grub_video_i386_vbeblit_replace_BGR888_RGB888): Likewise.
5324         (grub_video_i386_vbeblit_replace_RGBX8888_RGB888): Likewise.
5325         (grub_video_i386_vbeblit_replace_RGB888_RGBX8888): Likewise.
5326         (grub_video_i386_vbeblit_replace_index_RGBX8888): Likewise.
5327         (grub_video_i386_vbeblit_replace_index_RGB888): Likewise.
5328         (grub_video_i386_vbeblit_blend_BGRA8888_RGBA8888): Likewise.
5329         (grub_video_i386_vbeblit_blend_BGR888_RGBA8888): Likewise.
5330         (grub_video_i386_vbeblit_blend_RGBA8888_RGBA8888): Likewise.
5331         (grub_video_i386_vbeblit_blend_RGB888_RGBA8888): Likewise.
5332         (grub_video_i386_vbeblit_blend_index_RGBA8888): Likewise.
5334         * video/i386/pc/vbefill.c (grub_video_i386_vbefill_R8G8B8A8): Removed.
5335         (grub_video_i386_vbefill_R8G8B8): Likewise.
5336         (grub_video_i386_vbefill_index): Likewise.
5337         (grub_video_i386_vbefill_direct32): Added.
5338         (grub_video_i386_vbefill_direct24): Likewise.
5339         (grub_video_i386_vbefill_direct16): Likewise.
5340         (grub_video_i386_vbefill_direct8): Likewise.
5342         * video/readers/jpeg.c (grub_jpeg_decode_sos): Adapt to new blitter
5343         types.
5345         * video/readers/tga.c (grub_video_reader_tga): Adapt to new blitter
5346         types.
5348         * video/readers/png.c (grub_png_decode_image_header): Adapt to new
5349         blitter types.
5351         * video/bitmap.c (grub_video_bitmap_create): Adapt to new blitter
5352         types.
5354 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5356         * disk/raid.c (insert_array): Set `array->chunk_size' to 64 for
5357         RAID level 1.
5359 2008-09-06  Felix Zielcke  <fzielcke@z-51.de>
5361         * fs/iso9660.c (grub_iso9660_date): New structure.
5362         (grub_iso9660_primary_voldesc): Add `grub_iso9660_date' member.
5363         (grub_iso9660_uuid): New function.
5365 2008-09-05  Bean  <bean123ch@gmail.com>
5367         * fs/fshelp.c (grub_fshelp_find_file): Handle case insensitive names.
5369         * fs/ntfs.c (list_file): Ignore names in DOS namespace, set the case
5370         insensitive bit for names in Win32 and Win32 & DOS namespace.
5372         * include/grub/fshelp.h (GRUB_FSHELP_CASE_INSENSITIVE): New macro.
5374         * include/grub/types.h (LONG_MAX): Likewise.
5376 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5378         * util/getroot.c: Include <config.h>.
5379         (grub_util_get_grub_dev): Rewrite to use asprintf for mdraid devices,
5380         add support for /dev/md/N devices and handle LVM double dash escaping.
5382 2008-09-04  Felix Zielcke  <fzielcke@z-51.de>
5384         * config.guess: Update to latest version from config git.
5385         * config.sub: Likewise.
5387 2008-09-03  Robert Millan  <rmh@aybabtu.com>
5389         * disk/scsi.c (grub_scsi_open): Remove size limit when printing
5390         `disk->total_sectors'.
5392 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5394         * include/grub/normal.h: Fixed incorrect comment for
5395         GRUB_COMMAND_FLAG_NO_ARG_PARSE.
5397 2008-09-01  Colin D Bennett  <colin@gibibit.com>
5399         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Replaced constant
5400         values with defines.
5402         * include/grub/i386/pc/vbe.h (GRUB_VBE_MODEATTR_SUPPORTED): Added.
5403         (GRUB_VBE_MODEATTR_RESERVED_1): Likewise.
5404         (GRUB_VBE_MODEATTR_BIOS_TTY_OUTPUT_SUPPORT): Likewise.
5405         (GRUB_VBE_MODEATTR_COLOR): Likewise.
5406         (GRUB_VBE_MODEATTR_GRAPHICS): Likewise.
5407         (GRUB_VBE_MODEATTR_VGA_COMPATIBLE): Likewise.
5408         (GRUB_VBE_MODEATTR_VGA_WINDOWED_AVAIL): Likewise.
5409         (GRUB_VBE_MODEATTR_LFB_AVAIL): Likewise.
5410         (GRUB_VBE_MODEATTR_DOUBLE_SCAN_AVAIL): Likewise.
5411         (GRUB_VBE_MODEATTR_INTERLACED_AVAIL): Likewise.
5412         (GRUB_VBE_MODEATTR_TRIPLE_BUF_AVAIL): Likewise.
5413         (GRUB_VBE_MODEATTR_STEREO_AVAIL): Likewise.
5414         (GRUB_VBE_MODEATTR_DUAL_DISPLAY_START): Likewise.
5415         (GRUB_VBE_MEMORY_MODEL_TEXT): Likewise.
5416         (GRUB_VBE_MEMORY_MODEL_CGA): Likewise.
5417         (GRUB_VBE_MEMORY_MODEL_HERCULES): Likewise.
5418         (GRUB_VBE_MEMORY_MODEL_PLANAR): Likewise.
5419         (GRUB_VBE_MEMORY_MODEL_NONCHAIN4_256): Likewise.
5420         (GRUB_VBE_MEMORY_MODEL_YUV): Likewise.
5422 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5424         * loader/i386/pc/multiboot.c (grub_get_multiboot_mmap_len): Fix
5425         declaration.
5426         (grub_multiboot): Fix a few warnings.
5428 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5430         * loader/i386/pc/multiboot.c: Update comment not to say that
5431         boot_device support is unimplemented.
5433 2008-08-31  Robert Millan  <rmh@aybabtu.com>
5435         * loader/i386/pc/multiboot.c: Update comment not to say that a.out
5436         or memory map support are unimplemented.
5438 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5440         * util/i386/pc/grub-mkrescue.in: Support multiple overlay directories.
5442 2008-08-31  Colin D Bennett  <colin@gibibit.com>
5444         * commands/i386/pc/vbeinfo.c (grub_cmd_vbeinfo): Show VBE version and
5445         total video memory in 'vbeinfo' output; show color format details for
5446         each video mode.
5448 2008-08-30  Pavel Roskin  <proski@gnu.org>
5450         * util/genmoddep.c: Remove for real this time.
5451         * DISTLIST: Remove util/genmoddep.c.
5453 2008-08-30  Robert Millan  <rmh@aybabtu.com>
5455         * kern/i386/pc/startup.S (multiboot_header): Force 4-byte alignment
5456         as required by Multiboot spec (it was already 4-byte aligned, but
5457         only by chance).
5459 2008-08-29  Pavel Roskin  <proski@gnu.org>
5461         * kern/powerpc/ieee1275/crt0.S: Rename to ...
5462         * kern/powerpc/ieee1275/startup.S: ... this.
5463         * conf/powerpc-ieee1275.rmk: Adjust for the above.
5464         * DISTLIST: Likewise.
5466         * kern/powerpc/ieee1275/crt0.S: Include grub/symbol.h and
5467         grub/cpu/kernel.h.  Add start label for consistency with other
5468         platforms.  Add grub_prefix immediately after start.  Add jump
5469         to the code after grub_prefix.
5470         * include/grub/powerpc/kernel.h: Provide valid values for
5471         GRUB_KERNEL_CPU_PREFIX and GRUB_KERNEL_CPU_DATA_END.
5473 2008-08-29  Bean  <bean123ch@gmail.com>
5475         * configure.ac: Change host_os to cygwin for mingw.
5476         (asprintf): New check for function.
5478         * include/grub/symbol.h: Replace #ifndef __CYGWIN__ with
5479         #if ! defined (__CYGWIN__) && ! defined (__MINGW32__).
5481         * include/grub/util/misc.h: #include <config.h> and <grub/types.h>,
5482         declare asprintf if HAVE_ASPRINTF is not set, declare fseeko, ftello,
5483         sync, sleep and grub_util_get_disk_size for mingw.
5485         * util/biosdisk.c (grub_util_biosdisk_open): Use grub_util_get_disk_size
5486         to get size in mingw.
5487         (open_device): Use flag O_BINARY if it's defined.
5488         (find_root_device): Add dummy code for mingw.
5490         * util/grub-mkdevicemap.c (get_floppy_disk_name): Return 0 for mingw.
5491         (get_ide_disk_name): Return //./PHYSICALDRIVE%d for mingw.
5492         (get_scsi_disk_name): Return 0 for mingw.
5494         * util/hostfs.c: #include <grub/util/misc.h>.
5495         (grub_hostfs_open): Use "rb" flag to open file, use
5496         grub_util_get_disk_size to get disk size for mingw.
5498         * util/misc.c: #include <windows.h> and <winioctl.h> in mingw.
5499         (asprintf): New function if HAVE_ASPRINTF is not set.
5500         (sync): New function for mingw.
5501         (sleep): Likewise.
5502         (grub_util_get_disk_size): Likewise.
5504 2008-08-28  Pavel Roskin  <proski@gnu.org>
5506         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
5507         kern/time.c.
5509 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5511         * util/biosdisk.c (find_grub_drive): Declare missing `i' variable.
5513 2008-08-28  Robert Millan  <rmh@aybabtu.com>
5515         Change find_grub_drive() syntax so it doesn't prevent it from
5516         detecting NULL names as errors.
5518         * util/biosdisk.c (find_grub_drive): Move free slot search code
5519         from here ...
5520         (find_free_slot): ... to here.
5521         (read_device_map): Use find_free_slot() to search for free slots.
5523 2008-08-27  Marco Gerards  <marco@gnu.org>
5525         * conf/common.rmk (pkglib_MODULES): Add scsi.mod.
5526         (scsi_mod_SOURCES): New variable.
5527         (scsi_mod_CFLAGS): Likewise
5528         (scsi_mod_LDFLAGS): Likewise.
5530         * disk/scsi.c: New file.
5532         * include/grub/scsi.h: Likewise.
5534         * include/grub/scsicmd.h: Likewise.
5536         * disk/ata.c: Include <grub/scsi.h>.
5537         (grub_atapi_packet): Do not use grub_ata_cmd, use registers
5538         instead.
5539         (grub_ata_iterate): Skip ATAPI devices.
5540         (grub_ata_open): Only handle ATAPI devices.
5541         (struct grub_atapi_read): Removed.
5542         (grub_atapi_readsector): Likewise.
5543         (grub_ata_read): No longer handle ATAPI devices.
5544         (grub_ata_write): Likewise.
5545         (grub_atapi_iterate): New function.
5546         (grub_atapi_read): Likewise.
5547         (grub_atapi_write): Likewise.
5548         (grub_atapi_open): Likewise.
5549         (grub_atapi_close): Likewise.
5550         (grub_atapi_dev): New variable.
5551         (GRUB_MOD_INIT(ata)): Register ATAPI as SCSI device.
5552         (GRUB_MOD_FINI(ata)): Unregister ATAPI.
5554         * include/grub/disk.h (enum grub_disk_dev_id): Add
5555         `GRUB_DISK_DEVICE_SCSI_ID'.
5557 2008-08-26  Robert Millan  <rmh@aybabtu.com>
5559         * util/biosdisk.c (grub_util_biosdisk_open, open_device)
5560         (grub_util_biosdisk_get_grub_dev): Make error messages a bit more
5561         descriptive.
5563 2008-08-23  Bean  <bean123ch@gmail.com>
5565         * conf/common.rmk (grub_probe_SOURCES): Add disk/mdraid_linux.c.
5566         (grub_fstest_SOURCES): Add disk/raid5_recover.c, disk/raid6_recover.c,
5567         disk/mdraid_linux.c and disk/dmraid_nvidia.c and lib/crc.c.
5568         (pkglib_MODULES): Add raid5rec.mod, raid6rec.mod, mdraid.mod and
5569         dm_nv.mod.
5570         (raid5rec_mod_SOURCES): New macro.
5571         (raid5rec_mod_CFLAGS): Likewise.
5572         (raid5rec_mod_LDFLAGS): Likewise.
5573         (raid6rec_mod_SOURCES): Likewise.
5574         (raid6rec_mod_CFLAGS): Likewise.
5575         (raid6rec_mod_LDFLAGS): Likewise.
5576         (mdraid_mod_SOURCES): Likewise.
5577         (mdraid_mod_CFLAGS): Likewise.
5578         (mdraid_mod_LDFLAGS): Likewise.
5579         (dm_nv_mod_SOURCES): Likewise.
5580         (dm_nv_mod_CFLAGS): Likewise.
5581         (dm_nv_mod_LDFLAGS): Likewise.
5583         * conf/i386-pc.rmk (grub_setup_SOURCES): Add disk/mdraid_linux.c.
5584         (grub_emu_SOURCES):  Add disk/raid5_recover.c, disk/raid6_recover.c,
5585         disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5587         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add disk/raid5_recover.c,
5588         disk/raid6_recover.c, disk/mdraid_linux.c and disk/dmraid_nvidia.c.
5590         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
5592         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
5594         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5596         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
5598         * disk/raid5_recover.c: New file.
5600         * disk/raid6_recover.c: Likewise.
5602         * disk/mdraid_linux.c: Likewise.
5604         * disk/dmraid_nvidia.c: Likewise.
5606         * disk/i386/pc/biosdisk.c: Set total_sectors of cdrom device to
5607         ULONG_MAX.
5609         * disk/raid.c (grub_raid_open): Use the size of the smallest disk to
5610         calculate the size of raid device.
5611         (grub_raid_read): Simplify raid0 code. Support raid4, raid6 and four
5612         different layout of raid5.
5613         (grub_raid_scan_device): Remove code specific to mdraid.
5614         (grub_raid_list): New variable.
5615         (free_array): New function.
5616         (grub_raid_register): Likewise.
5617         (grub_raid_unregister): Likewise.
5618         (grub_raid_rescan): Likewise.
5619         (GRUB_MOD_INIT): Don't iterate device here.
5620         (GRUB_MOD_FINI): Use free_array to release resource.
5622         * include/grub/raid.h: Remove macro and structure specific to mdraid.
5623         (grub_raid5_recover_func_t): New function variable type.
5624         (grub_raid6_recover_func_t): Likewise.
5625         (grub_raid5_recover_func): New variable.
5626         (grub_raid6_recover_func): Likewise.
5627         (grub_raid_register): New function.
5628         (grub_raid_unregister): Likewise.
5629         (grub_raid_rescan): Likewise.
5630         (grub_raid_block_xor): Likewise.
5632         * util/grub-fstest.c: Add #include <grub/raid.h> and <grub/lib/crc.h>.
5633         (CMD_CRC): New macro.
5634         (part): Removed.
5635         (read_file): Handle device as well as file.
5636         (cmd_crc): New function.
5637         (fstest): Handle multiple disks.
5638         (options): Remove part, raw and long, add root and diskcount.
5639         (usage): Add crc, remove -p, -r, -l, add -r and -c.
5640         (main): Find the first non option entry and ignore subsequent options,
5641         add handling for the new options, support multiple disks.
5643         * util/grub-probe.c (probe): Add mdraid to abstraction_name.
5645 2008-08-23  Bean  <bean123ch@gmail.com>
5647         * normal/x86_64/setjmp.S (grub_longjmp): Return 1 when val = 0.
5649         * genfslist.sh: Ignore kernel.mod.
5651         * genpartmaplist.sh: Likewise.
5653 2008-08-23  Robert Millan  <rmh@aybabtu.com>
5655         * util/getroot.c (find_root_device): Skip anything that starts with
5656         a dot, not just directories.  This avoids things like /dev/.tmp.md0.
5658 2008-08-22  Felix Zielcke  <fzielcke@z-51.de>
5660         * util/update-grub.in (GRUB_GFXMODE): Export variable.
5661         * util/grub.d/00_header.in: Allow the administrator to change default
5662         gfxmode via ${GRUB_GFXMODE}.
5664 2008-08-21  Felix Zielcke  <fzielcke@z-51.de>
5666         * fs/ntfs.c (grub_ntfs_mount): Fix a memory leak.
5668 2008-08-21  Robert Millan  <rmh@aybabtu.com>
5670         * loader/i386/linux.c: New file.  Implements generic 32-bit Linux
5671         loader.
5672         * conf/i386-coreboot.rmk (_linux_mod_SOURCES): Replace
5673         `loader/i386/pc/linux.c' with `loader/i386/linux.c'.
5675 2008-08-20  Carles Pina i Estany  <carles@pina.cat>
5677         * menu/normal.c (run_menu): Replace hardcoded numbers with macros
5678         (16 for GRUB_TERM_UP and 14 for GRUB_TERM_DOWN)
5680 2008-08-19  Robert Millan  <rmh@aybabtu.com>
5682         * term/gfxterm.c (DEFAULT_CURSOR_COLOR): Remove.
5683         (struct grub_virtual_screen): Remove `cursor_color'.
5684         (grub_virtual_screen_setup): Remove `virtual_screen.cursor_color'
5685         initialization.
5686         (write_cursor): Use `virtual_screen.fg_color' to draw cursor.
5688 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5690         Unify (identical) linux_normal.c files.
5691         * loader/i386/efi/linux_normal.c: Move from here ...
5692         * loader/linux_normal.c: ... to here.  Update all users.
5693         * loader/i386/pc/linux_normal.c: Delete.  Update all users.
5694         * loader/i386/ieee1275/linux_normal.c: Likewise.
5696 2008-08-18  Robert Millan  <rmh@aybabtu.com>
5698         * include/grub/i386/linux.h (LINUX_LOADER_ID_LILO)
5699         (LINUX_LOADER_ID_LOADLIN, LINUX_LOADER_ID_BOOTSECT)
5700         (LINUX_LOADER_ID_SYSLINUX, LINUX_LOADER_ID_ETHERBOOT)
5701         (LINUX_LOADER_ID_ELILO, LINUX_LOADER_ID_GRUB, LINUX_LOADER_ID_UBOOT)
5702         (LINUX_LOADER_ID_XEN, LINUX_LOADER_ID_GUJIN, LINUX_LOADER_ID_QEMU):
5703         New macros.
5704         (GRUB_LINUX_CL_OFFSET, GRUB_LINUX_CL_END_OFFSET): Move from here ...
5705         * loader/i386/pc/linux.c (GRUB_LINUX_CL_OFFSET)
5706         (GRUB_LINUX_CL_END_OFFSET): ... to here.
5707         * loader/i386/efi/linux.c (GRUB_EFI_CL_OFFSET): Rename to ...
5708         (GRUB_LINUX_CL_OFFSET): ... this.  Update all users.
5709         (GRUB_EFI_CL_END_OFFSET): Rename to ...
5710         (GRUB_LINUX_CL_END_OFFSET): ... this.  Update all users.
5711         (grub_rescue_cmd_linux): Macroify `type_of_loader' initialization.
5712         Initialize `params->video_cursor_x' and `params->video_cursor_y'
5713         portably using grub_getxy().
5714         Replace `-EFI' with `-bzImage' in boot message.
5716 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5718         * include/grub/x86_64/kernel.h: New file (<grub/i386/kernel.h> stub).
5720 2008-08-17  Robert Millan  <rmh@aybabtu.com>
5722         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pc/mmap.c'.
5724         * include/grub/i386/pc/init.h (GRUB_MACHINE_MEMORY_AVAILABLE)
5725         (GRUB_MACHINE_MEMORY_RESERVED): New macros.
5726         (grub_machine_mmap_iterate): New function declaration.
5727         * include/grub/multiboot.h (struct grub_multiboot_mmap_entry): New
5728         structure.
5729         (GRUB_MMAP_MEMORY_AVAILABLE, GRUB_MMAP_MEMORY_RESERVED): New
5730         macros.
5732         * kern/i386/pc/init.c (grub_machine_init): Replace hardcoded region
5733         type check value with `GRUB_MACHINE_MEMORY_AVAILABLE'.
5734         Move e820 parsing from here ...
5735         * kern/i386/pc/mmap.c: New file.
5736         (grub_machine_mmap_iterate): ... to here.
5738         * include/grub/i386/coreboot/memory.h: Remove `<grub/err.h>'.
5739         (GRUB_LINUXBIOS_MEMORY_AVAILABLE): Rename (for consistency) to ...
5740         (GRUB_MACHINE_MEMORY_AVAILABLE): ... this.  Update all users.
5741         (grub_available_iterate): Redeclare to return `void', and redeclare
5742         its hook to use grub_uint64_t as addr and size parameters, and rename
5743         to ...
5744         (grub_machine_mmap_iterate): ... this.  Update all users.
5746         * kern/i386/coreboot/mmap.c (grub_mmap_iterate): Simplify parser loop
5747         to make it more readable.  Rename to ...
5748         (grub_machine_mmap_iterate): ... this.
5750         * loader/i386/pc/multiboot.c (mmap_addr, mmap_length): New variables.
5751         (grub_get_multiboot_mmap_len, grub_fill_multiboot_mmap): New functions.
5752         (grub_multiboot): Allocate an extra region after the payload, and fill
5753         it with a Multiboot memory map.  Adjust a.out loader to calculate size
5754         with the extra space.
5755         (grub_multiboot_load_elf32): Adjust elf32 loader to calculate size
5756         with the extra space.
5758 2008-08-17  Carles Pina i Estany  <carles@pina.cat>
5760         * menu/normal.c (run_menu): Add Home and End keys in grub-menu.
5762 2008-08-17  Felix Zielcke  <fzielcke@z-51.de>
5764         * gendistlist.sh: Add *.y, *.tex, *.texi, grub.cfg, README, *.sc,
5765         mdate-sh to the list `find' searches for.
5766         * DISTLIST: Regenerated.
5768 2008-08-16  Felix Zielcke  <fzielcke@z-51.de>
5770         * gendistlist.sh (EXTRA_DISTFILES): Remove gensymlist.sh,
5771         genkernsyms.sh.  Add geninit.sh, geninitheader.sh, genkernsyms.sh.in,
5772         genmoddep.awk, gensymlist.sh.in.
5773         (DISTDIRS): Add bus, docs, hook, lib.
5774         * DISTLIST: Regenerated.
5775         * NEWS: Add cygwin support and change the `os-prober' entry a bit.
5777 2008-08-16  Robert Millan  <rmh@aybabtu.com>
5779         * disk/raid.c (grub_raid_init): Handle/report errors set by
5780         grub_device_iterate().
5781         * disk/lvm.c (grub_lvm_init): Likewise.
5783 2008-08-15  Bean  <bean123ch@gmail.com>
5785         * conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5786         and datehook.mod.
5787         (datetime_mod_SOURCES): New macro.
5788         (datetime_mod_CFLAGS): Likewise.
5789         (datetime_mod_LDFLAGS): Likewise.
5790         (date_mod_SOURCES): Likewise.
5791         (date_mod_CFLAGS): Likewise.
5792         (date_mod_LDFLAGS): Likewise.
5793         (datehook_mod_SOURCES): Likewise.
5794         (datehook_mod_CFLAGS): Likewise.
5795         (datehook_mod_LDFLAGS): Likewise.
5797         * conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5798         and datehook.mod.
5799         (datetime_mod_SOURCES): New macro.
5800         (datetime_mod_CFLAGS): Likewise.
5801         (datetime_mod_LDFLAGS): Likewise.
5802         (date_mod_SOURCES): Likewise.
5803         (date_mod_CFLAGS): Likewise.
5804         (date_mod_LDFLAGS): Likewise.
5805         (datehook_mod_SOURCES): Likewise.
5806         (datehook_mod_CFLAGS): Likewise.
5807         (datehook_mod_LDFLAGS): Likewise.
5809         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5810         and datehook.mod.
5811         (datetime_mod_SOURCES): New macro.
5812         (datetime_mod_CFLAGS): Likewise.
5813         (datetime_mod_LDFLAGS): Likewise.
5814         (date_mod_SOURCES): Likewise.
5815         (date_mod_CFLAGS): Likewise.
5816         (date_mod_LDFLAGS): Likewise.
5817         (datehook_mod_SOURCES): Likewise.
5818         (datehook_mod_CFLAGS): Likewise.
5819         (datehook_mod_LDFLAGS): Likewise.
5821         * conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5822         and datehook.mod.
5823         (datetime_mod_SOURCES): New macro.
5824         (datetime_mod_CFLAGS): Likewise.
5825         (datetime_mod_LDFLAGS): Likewise.
5826         (date_mod_SOURCES): Likewise.
5827         (date_mod_CFLAGS): Likewise.
5828         (date_mod_LDFLAGS): Likewise.
5829         (datehook_mod_SOURCES): Likewise.
5830         (datehook_mod_CFLAGS): Likewise.
5831         (datehook_mod_LDFLAGS): Likewise.
5833         * conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
5834         and datehook.mod.
5835         (datetime_mod_SOURCES): New macro.
5836         (datetime_mod_CFLAGS): Likewise.
5837         (datetime_mod_LDFLAGS): Likewise.
5838         (date_mod_SOURCES): Likewise.
5839         (date_mod_CFLAGS): Likewise.
5840         (date_mod_LDFLAGS): Likewise.
5841         (datehook_mod_SOURCES): Likewise.
5842         (datehook_mod_CFLAGS): Likewise.
5843         (datehook_mod_LDFLAGS): Likewise.
5845         * kern/env.c (grub_env_insert): Fix a bug in prevp pointer.
5847         * commands/date.c: New file.
5849         * hook/datehook.c: Likewise.
5851         * include/grub/lib/datetime.h: Likewise.
5853         * include/grub/i386/cmos.h: Likewise.
5855         * lib/datetime.c: Likewise.
5857         * lib/i386/datetime.c: Likewise.
5859         * lib/efi/datetime.c: Likewise.
5861 2008-08-14  Robert Millan  <rmh@aybabtu.com>
5863         * conf/common.rmk (bin_UTILITIES): Add `grub-mkelfimage'.
5864         (grub_mkelfimage_SOURCES): New variable.
5865         (util/elf/grub-mkimage.c_DEPENDENCIES): Likewise.
5867         * conf/i386-coreboot.rmk (bin_UTILITIES, grub_mkimage_SOURCES)
5868         (grub_mkimage_LDFLAGS, util/elf/grub-mkimage.c_DEPENDENCIES): Remove.
5869         * conf/powerpc-ieee1275.rmk: Likewise.
5870         * conf/i386-ieee1275.rmk: Likewise.
5872         * kern/ieee1275/init.c: Include `<grub/cpu/kernel.h>'.
5873         * kern/i386/coreboot/init.c: Likewise.
5875         * kern/i386/ieee1275/startup.S: Replace `<grub/machine/kernel.h>'
5876         with `<grub/cpu/kernel.h>'.
5877         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Renamed
5878         to ...
5879         (GRUB_KERNEL_CPU_PREFIX, GRUB_KERNEL_CPU_DATA_END): ... this.
5880         * kern/i386/coreboot/startup.S: Likewise.
5882         * include/grub/powerpc/ieee1275/kernel.h (GRUB_MOD_ALIGN)
5883         (GRUB_MOD_GAP): Remove.
5884         * include/grub/powerpc/kernel.h: New file.
5885         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX)
5886         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5887         * include/grub/i386/kernel.h: New file.
5888         * include/grub/i386/coreboot/kernel.h (GRUB_MOD_ALIGN)
5889         (GRUB_MOD_GAP, GRUB_KERNEL_MACHINE_PREFIX)
5890         (GRUB_KERNEL_MACHINE_DATA_END): Remove.
5892         * util/ieee1275/grub-install.in (grub_mkimage): Initialize to use
5893         `grub-mkelfimage'.
5894         Use --directory when invoking grub_mkimage.
5896         * util/elf/grub-mkimage.c: Include `<grub/cpu/kernel.h>'.
5897         (add_segments): Replace GRUB_KERNEL_MACHINE_DATA_END and
5898         GRUB_KERNEL_MACHINE_PREFIX with GRUB_KERNEL_CPU_DATA_END
5899         and GRUB_KERNEL_CPU_PREFIX.
5901 2008-08-14  Felix Zielcke  <fzielcke@z-51.de>
5903         * include/grub/err.h (grub_err_printf): New function prototype.
5904         * util/misc.c (grub_err_printf): New function.
5905         * kern/misc.c [! GRUB_UTIL] (grub_err_printf): New alias for
5906         grub_printf.
5907         * kern/err.c (grub_print_error): Use grub_err_printf.
5909 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5911         * docs/grub.cfg: Remove `/dev/' prefix in GNU/Hurd boot entry.
5913 2008-08-13  Robert Millan  <rmh@aybabtu.com>
5915         * docs/grub.cfg: Use the native device name for the example GNU/Hurd
5916         boot entry.
5918 2008-08-12  Robert Millan  <rmh@aybabtu.com>
5920         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Move part
5921         of the relocation code from here ...
5922         (grub_multiboot): ... to here.
5923         (forward_relocator, backward_relocator): Move from here ...
5924         * kern/i386/loader.S (grub_multiboot_forward_relocator)
5925         (grub_multiboot_backward_relocator): ... to here.
5926         (grub_multiboot_real_boot): Use %edx for entry offset.  Put Multiboot
5927         magic in %eax.  Use %ebp for jumping (so %edx is not trashed).
5928         * include/grub/i386/loader.h (grub_multiboot_forward_relocator)
5929         (grub_multiboot_forward_relocator_end)
5930         (grub_multiboot_backward_relocator)
5931         (grub_multiboot_backward_relocator_end): New variables.
5933 2008-08-12  Bean  <bean123ch@gmail.com>
5935         * disk/raid.c (grub_raid_read): Fix a bug in raid0 code.
5937 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5939         * kern/i386/linuxbios/startup.S: Move from here ...
5940         * kern/i386/coreboot/startup.S: ... to here.
5942         * kern/i386/linuxbios/init.c: Move from here ...
5943         * kern/i386/coreboot/init.c: ... to here.
5945         * kern/i386/linuxbios/table.c: Move from here ...
5946         * kern/i386/coreboot/mmap.c: ... to here.
5948         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Update moved files.
5950 2008-08-11  Robert Millan  <rmh@aybabtu.com>
5952         * kern/device.c (grub_device_open): Do not handle grub_disk_open()
5953         errors.  Leave it to the upper layer to handle them.
5955 2008-08-09  Christian Franke  <franke@computer.org>
5957         * Makefile.in: Add `target_os' and `enable_grub_pe2elf'.
5958         * conf/common.rmk: Install `grub-pe2elf' only if requested.
5959         Install `grub.d/10_windows' only on Cygwin.
5960         * configure.ac: Add subst of `target_os'.
5961         Check `target_os' also before setting TARGET_OBJ2ELF.
5962         Add `--enable-grub-pe2elf'.
5964 2008-08-08  Robert Millan  <rmh@aybabtu.com>
5966         * kern/disk.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5967         (grub_last_time): Change type to grub_uint64_t.
5968         (grub_disk_open): Migrate code from to using grub_get_time_ms().
5969         (grub_disk_close): Likewise.
5971         * normal/menu.c: Replace `<grub/machine/time.h>' with `<grub/time.h>'.
5972         (run_menu): Migrate code from to using grub_get_time_ms().
5974         * util/misc.c (grub_get_time_ms): New function.
5976 2008-08-08  Marco Gerards  <marco@gnu.org>
5978         * disk/ata.c (grub_ata_regget): Change return type to
5979         `grub_uint8_t'.
5980         (grub_ata_regget2): Likewise.
5981         (grub_ata_wait_status): New function.
5982         (grub_ata_wait_busy): Removed function, updated all users to use
5983         `grub_ata_wait_status'.
5984         (grub_ata_wait_drq): Likewise.
5985         (grub_ata_cmd): New function.
5986         (grub_ata_pio_read): Change return type to `grub_uint8_t'.  Add
5987         error handling.
5988         (grub_ata_pio_write): Add error handling.
5989         (grub_atapi_identify): Likewise.
5990         (grub_atapi_packet): Use `grub_ata_cmd' and improve error
5991         handling.
5992         (grub_ata_identify): Use `grub_ata_cmd' and improve error
5993         handling.  Actually use the detected registers.  Reorder the
5994         detection logic such that it is easier to read.
5995         (grub_ata_pciinit): Do not assign the same ID to each controller.
5996         (grub_ata_setaddress): Use `grub_ata_cmd' and improve error
5997         handling.
5998         (grub_atapi_readsector): Check the result of `grub_ata_pio_read'.
6000         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TIMEOUT'.
6002 2008-08-08  Marco Gerards  <marco@gnu.org>
6004         * NEWS: Update.
6006 2008-08-07  Bean  <bean123ch@gmail.com>
6008         * include/grub/x86_64/pci.h: New file.
6010 2008-08-07  Christian Franke  <franke@computer.org>
6012         * kern/i386/pit.c (TIMER2_SPEAKER): New define.
6013         (TIMER2_GATE): Likewise.
6014         (grub_pit_wait): Add enable/disable of the timer2 gate
6015         bit of port 0x61.  This fixes a possible infinite loop.
6017 2008-08-07  Bean  <bean123ch@gmail.com>
6019         * conf/x86_64-efi.rmk (kernel_mod_SOURCES): Add kern/time.c,
6020         kern/i386/tsc.c and kern/i386/pit.c.
6022         * include/grub/i386/tsc.h (grub_cpu_is_cpuid_supported): Handle
6023         x86_64 platform.
6025         * kern/i386/efi/init.c: Replace <grub/cpu/tsc.h> with
6026         <grub/i386/tsc.h>.
6028         * kern/i386/pit.c: Replace <grub/cpu/io.h> with <grub/i386/io.h>.
6030 2008-08-07  Bean  <bean123ch@gmail.com>
6032         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add kern/time.c.
6034         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add kern/time.c,
6036         * include/grub/i386/pit.h: Use macro KERNEL_CPU_PIT_HEADER to avoid
6037         multiple inclusion. Add #include <grub/types.h>.
6039 2008-08-06  Christian Franke  <franke@computer.org>
6041         * conf/common.rmk: Build and install `10_windows'.
6042         * util/grub.d/10_windows.in: New script.
6044 2008-08-06  Pavel Roskin  <proski@gnu.org>
6046         * kern/i386/pit.c: Include `<grub/i386/pit.h>'.
6048 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6050         * conf/i386-coreboot.rmk (kernel_elf_ASFLAGS): New variable.
6051         * kern/i386/tsc.c: Include `<grub/i386/pit.h>'.
6053 2008-08-06  Bean  <bean123ch@gmail.com>
6055         * fs/i386/pc/pxe.c (grub_pxe_data): New member block_size.
6056         (grub_pxefs_fs_int): Remove dummy definition.
6057         (grub_pxefs_open): Use data->block_size to store the current block
6058         size setting.
6059         (grub_pxefs_read): Use block size stored in data->block_size. As the
6060         value of grub_pxe_blksize can be changed after the file is opened.
6062 2008-08-06  Bean  <bean123ch@gmail.com>
6064         * fs/i386/pc/pxe.c (curr_file): new variable.
6065         (grub_pxefs_open): Simply the handling of pxe file system. Don't
6066         require the dummy internal file system anymore.
6067         (grub_pxefs_read): Removed.
6068         (grub_pxefs_close): Likewise.
6069         (grub_pxefs_fs_int): Likewise.
6070         (grub_pxefs_read_int): Renamed to grub_pxefs_read. Reinitialize tftp
6071         connection when we switch file.
6072         (grub_pxefs_close_int): Renamed to grub_pxefs_close.
6074 2008-08-06  Robert Millan  <rmh@aybabtu.com>
6076         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and
6077         `halt.mod'.
6078         (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS)
6079         (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables.
6081         * kern/i386/halt.c: New file.
6082         * kern/i386/reboot.c: Likewise.
6083         * include/grub/i386/reboot.h: Likewise.
6084         * include/grub/i386/halt.h: Likewise.
6086         * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]:
6087         Include `<grub/cpu/halt.h>'.
6088         * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]
6089         [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'.
6091         * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'.
6092         (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA)
6093         (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ)
6094         (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT)
6095         (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY)
6096         (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move
6097         from here ...
6098         * include/grub/i386/at_keyboard.h: ... to here.
6100 2008-08-05  Robert Millan  <rmh@aybabtu.com>
6102         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/i386/pit.c'.
6103         * conf/i386-efi.rmk (kernel_mod_SOURCES): Likewise.
6104         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Likewise. Also add
6105         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6106         `kern/generic/millisleep.c'.
6108         * kern/i386/tsc.c (calibrate_tsc): Rewrite using grub_pit_wait()
6109         instead of grub_get_rtc().
6110         (grub_tsc_init): Initialize `tsc_boot_time'.
6112         * kern/i386/linuxbios/init.c (grub_millisleep): Remove stub.
6113         (grub_machine_init): Use grub_tsc_init() rather than
6114         installing an RTC-based handler via grub_install_get_time_ms().
6116         * kern/i386/pit.c: New file.
6117         * include/grub/i386/pit.h: Likewise.
6119 2008-08-05  Bean  <bean123ch@gmail.com>
6121         * boot/i386/pc/pxeboot.S (_start): Use drive number 0x7F for pxe.
6123         * conf/i386-pc.rmk (kernel_img_HEADERS): Add machine/pxe.h.
6124         (pkglib_MODULES): Add pxe.mod and pxecmd.mod.
6125         (pxe_mod_SOURCES): New macro.
6126         (pxe_mod_CFLAGS): Likewise.
6127         (pxe_mod_LDFLAGS): Likewise.
6128         (pxecmd_mod_SOURCES): Likewise.
6129         (pxecmd_mod_CFLAGS): Likewise.
6130         (pxecmd_mod_LDFLAGS): Likewise.
6132         * kern/i386/pc/startup.S (grub_pxe_scan): New function.
6133         (grub_pxe_call): Likewise.
6135         * include/grub/disk.h (grub_disk_dev_id): Add GRUB_DISK_DEVICE_PXE_ID.
6137         * commands/i386/pc/pxecmd.c: New file.
6139         * fs/i386/pc/pxe.c: Likewise.
6141         * include/grub/i386/pc/pxe.h: Likewise.
6143 2008-08-05  Bean  <bean123ch@gmail.com>
6145         * util/console.c (grub_console_cur_color): New variable.
6146         (grub_console_standard_color): Likewise.
6147         (grub_console_normal_color): Likewise.
6148         (grub_console_highlight_color): Likewise.
6149         (color_map): Likewise.
6150         (use_color): Likewise.
6151         (NUM_COLORS): New macro.
6152         (grub_ncurses_setcolorstate): Handle color properly.
6153         (grub_ncurses_setcolor): Don't change color here, just remember the
6154         settings, color will be set in grub_ncurses_setcolorstate.
6155         (grub_ncurses_getcolor): New function.
6156         (grub_ncurses_init): Initialize color pairs.
6157         (grub_ncurses_term): New member grub_ncurses_getcolor.
6159 2008-08-05  Colin D Bennett  <colin@gibibit.com>
6161         High resolution timer support.  Implemented for x86 CPUs using TSC.
6162         Extracted generic grub_millisleep() so it's linked in only as needed.
6163         This requires a Pentium compatible CPU; if the RDTSC instruction is
6164         not supported, then it falls back on the generic grub_get_time_ms()
6165         implementation that uses the machine's RTC.
6167         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/time.c',
6168         `kern/i386/tsc.c', `kern/generic/rtc_get_time_ms.c' and
6169         `kern/generic/millisleep.c'.
6171         * conf/i386-efi.rmk (kernel_mod_SOURCES): Add `kern/i386/tsc.c',
6172         `kern/generic/rtc_get_time_ms.c' and `kern/generic/millisleep.c'.
6174         * conf/x86_64-efi.rml (kernel_mod_SOURCES): Add
6175         `kern/generic/millisleep.c' and `kern/generic/rtc_get_time_ms.c'.
6177         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6179         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Add
6180         `kern/generic/millisleep.c'.
6182         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
6184         * conf/i386-coreboot.rmk (kernel_elf_SOURCES): Add `kern/time.c'.
6186         * kern/generic/rtc_get_time_ms.c: New file.
6188         * kern/generic/millisleep.c: New file.
6190         * kern/misc.c: Don't include
6191         <kern/time.h> anymore.
6192         (grub_millisleep_generic): Removed.
6194         * commands/sleep.c (grub_interruptible_millisleep): Uses
6195         grub_get_time_ms() instead of grub_get_rtc().
6197         * include/grub/i386/tsc.h (grub_get_tsc): New file.  New inline
6198         function.
6199         (grub_cpu_is_cpuid_supported): New inline function.
6200         (grub_cpu_is_tsc_supported): New inline function.
6201         (grub_tsc_init): New function prototype.
6202         (grub_tsc_get_time_ms): New function prototype.
6204         * kern/i386/tsc.c (grub_get_time_ms): New file.
6206         * include/grub/time.h: Include <grub/types.h.
6207         (grub_millisleep_generic): Removed.
6208         (grub_get_time_ms): New prototype.
6209         (grub_install_get_time_ms): New prototype.
6210         (grub_rtc_get_time_ms): New prototype.
6212         * kern/time.c (grub_get_time_ms): New function.
6213         (grub_install_get_time_ms): New function.
6215         * kern/i386/efi/init.c: Include <grub/cpu/tsc.h>.  Don't include
6216         <grub/time.h> anymore.
6217         (grub_millisleep): Removed.
6218         (grub_machine_init): Call grub_tsc_init.
6220         * kern/i386/linuxbios/init.c (grub_machine_init): Install the RTC
6221         get_time_ms() implementation.
6223         * kern/sparc64/ieee1275/init.c (grub_millisleep): Removed.
6224         (ieee1275_get_time_ms): New function.
6225         (grub_machine_init): Install get_time_ms() implementation.
6227         * kern/i386/pc/init.c: Include <grub/cpu/tsc.h>.
6228         (grub_machine_init): Call grub_tsc_init().
6229         (grub_millisleep): Removed.
6231         * kern/ieee1275/init.c (grub_millisleep): Removed.
6232         (grub_machine_init): Install ieee1275_get_time_ms()
6233         implementation.
6234         (ieee1275_get_time_ms): New function.
6235         (grub_get_rtc): Now calls ieee1275_get_time_ms(), which does the
6236         real work.
6238 2008-08-05  Marco Gerards  <marco@gnu.org>
6240         * disk/ata.c: Include <grub/pci.h>.
6241         (enum grub_ata_commands): Add `GRUB_ATA_CMD_EXEC_DEV_DIAGNOSTICS'.
6242         (grub_ata_initialize): Rewritten.
6243         (grub_ata_device_initialize): New function.
6245 2008-08-04  Pavel Roskin  <proski@gnu.org>
6247         * kern/main.c: Include grub/mm.h.
6249 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6251         * conf/i386-coreboot.rmk (COMMON_ASFLAGS, COMMON_CFLAGS)
6252         (COMMON_LDFLAGS): Harmonize with i386-pc version (fixes a code
6253         corruption problem).
6255 2008-08-04  Robert Millan  <rmh@aybabtu.com>
6257         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Fix misc
6258         warnings introduced in my last commit.
6260 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6262         Make PCI available on all i386 architectures.
6264         * include/grub/i386/pc/pci.h: Move from here ...
6265         * include/grub/i386/pci.h: ... to here.
6267         * include/grub/i386/pc/pci.h: Remove.
6268         * include/grub/i386/efi/pci.h: Remove.
6269         * include/grub/x86_64/efi/pci.h: Remove.
6271         * include/grub/pci.h: Replace `<grub/machine/pci.h>' with
6272         `<grub/cpu/pci.h>'.
6274         * conf/i386-coreboot.rmk (pkglib_MODULES): Add `pci' and `lspci'.
6275         (pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS, lspci_mod_SOURCES)
6276         (lspci_mod_CFLAGS, lspci_mod_LDFLAGS): New variables.
6278         * conf/i386-ieee1275.rmk: Likewise.
6280 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6282         * term/i386/pc/vga_text.c (CRTC_CURSOR_DISABLE): New macro.
6283         (grub_console_setcursor): Make it possible to set cursor off.
6285 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6287         * util/grub.d/00_header.in: Be platform-agnostic.  Probe for existence
6288         of modules instead of assuming which platform provides what.
6289         * util/update-grub.in: Likewise.
6291 2008-08-03  Robert Millan  <rmh@aybabtu.com>
6293         * kern/i386/pc/init.c (make_install_device): Check for `grub_prefix'
6294         instead of `grub_install_dos_part' to determine whether a drive needs
6295         to be prepended to prefix (`grub_install_dos_part' is not reliable,
6296         because it can be overridden when loading GRUB via Multiboot).
6298 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6300         * util/i386/pc/grub-install.in: Remove trailing slash from prefix.
6302 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6304         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Add a pair
6305         of informational grub_dprintf() calls.
6307 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6309         * disk/memdisk.c (memdisk_size): Don't initialize.
6310         (GRUB_MOD_INIT(memdisk)): Find memdisk using grub_module_iterate().
6312         * include/grub/i386/pc/kernel.h
6313         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): Remove macro.
6314         (GRUB_KERNEL_MACHINE_PREFIX, GRUB_KERNEL_MACHINE_DATA_END): Shift.
6315         (grub_memdisk_image_size, grub_arch_memdisk_addr)
6316         (grub_arch_memdisk_size): Remove.
6318         * include/grub/kernel.h (struct grub_module_header): Remove `offset'
6319         field (was only used to transfer a constant).  Add `type' field to
6320         support multiple module types.
6321         (grub_module_iterate): New function.
6323         * kern/device.c (grub_device_open): Do not hide error messages
6324         when grub_disk_open() fails.  Use grub_print_error() instead.
6326         * kern/i386/pc/init.c (grub_arch_modules_addr)
6327         (grub_arch_memdisk_size): Remove functions.
6328         (grub_arch_modules_addr): Return the module address in high memory
6329         (now that it isn't copied anymore).
6331         * kern/i386/pc/startup.S (grub_memdisk_image_size): Remove variable.
6332         (codestart): Don't add grub_memdisk_image_size to %ecx in LZMA
6333         decompression routine (grub_total_module_size already includes that
6334         now).  Don't copy modules back to low memory.
6336         * kern/main.c: Include `<grub/mm.h>'.
6337         (grub_load_modules): Split out (and use) ...
6338         (grub_module_iterate): ... this function, which iterates through
6339         module objects and runs a hook.
6340         Comment out grub_mm_init_region() call, as it would cause non-ELF
6341         modules to be overwritten.
6343         * util/i386/pc/grub-mkimage.c (generate_image): Instead of appending
6344         the memdisk image in its own region, make it part of the module list.
6345         * util/elf/grub-mkimage.c (options): Add "memdisk"|'m' option.
6346         (main): Parse --memdisk|-m option, and pass user-provided path as
6347         parameter to generate_image().
6348         (add_segments): Pass `memdisk_path' down to load_modules().
6349         (load_modules): Embed memdisk image in module section when requested.
6350         * util/i386/efi/grub-mkimage.c (make_mods_section): Initialize
6351         `header.type' instead of `header.offset'.
6353         * conf/powerpc-ieee1275.rmk (pkglib_MODULES): Add `memdisk.mod'.
6354         (memdisk_mod_SOURCES, memdisk_mod_CFLAGS)
6355         (memdisk_mod_LDFLAGS): New variables.
6356         * conf/i386-coreboot.rmk: Likewise.
6357         * conf/i386-ieee1275.rmk: Likewise.
6359 2008-08-02  Robert Millan  <rmh@aybabtu.com>
6361         * loader/i386/pc/multiboot.c (playground, forward_relocator)
6362         (backward_relocator): New variables.  Used to allocate and relocate
6363         the payload, respectively.
6364         (grub_multiboot_load_elf32): Load into heap instead of requested
6365         address, install the appropriate relocator code in each bound of
6366         the payload, and set the entry point such that
6367         grub_multiboot_real_boot() will jump to one of them.
6369         * kern/i386/loader.S (grub_multiboot_payload_size)
6370         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6371         (grub_multiboot_payload_entry_offset): New variables.
6372         (grub_multiboot_real_boot): Set cpu context to what the relocator
6373         expects, and jump to the relocator instead of the payload.
6375         * include/grub/i386/loader.h (grub_multiboot_payload_size)
6376         (grub_multiboot_payload_orig, grub_multiboot_payload_dest)
6377         (grub_multiboot_payload_entry_offset): Export.
6379 2008-08-01  Bean  <bean123ch@gmail.com>
6381         * normal/menu_entry.c (editor_getline): Don't return the original
6382         string as result, as it will be released by lexer once it has done
6383         using it.
6385 2008-08-01  Robert Millan  <rmh@aybabtu.com>
6387         * util/grub.d/10_linux.in: Use prepare_grub_to_access_device() from
6388         within menuentries, not before them.
6389         util/grub.d/10_hurd.in: Likewise.
6391 2008-08-01  Bean  <bean123ch@gmail.com>
6393         * conf/common.rmk (pkglib_MODULES): Add bufio.mod.
6394         (bufio_mod_SOURCES): New macro.
6395         (bufio_mod_CFLAGS): Likewise.
6396         (bufio_mod_LDFLAGS): Likewise.
6398         * include/grub/bufio.h: New file.
6400         * io/bufio.c: Likewise.
6402         * video/png.c: Replace <grub/file.h> with <grub/bufio.h>.
6403         (grub_video_reader_png): Use grub_buffile_open to open file.
6405         * video/jpeg.c: Replace <grub/file.h> with <grub/bufio.h>.
6406         (grub_video_reader_jpeg): Use grub_buffile_open to open file.
6408         * video/tga.c: Replace <grub/file.h> with <grub/bufio.h>.
6409         (grub_video_reader_tga): Use grub_buffile_open to open file.
6411         * font/manager.c: Include <grub/bufio.h>.
6412         (add_font): Use grub_buffile_open to open file.
6414 2008-07-31  Robert Millan  <rmh@aybabtu.com>
6416         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): When loading
6417         ELF segments, use a macro for arbitrarily accessing any of them instead
6418         of preparing a pointer that allows access to one at a time.
6419         (grub_multiboot_load_elf64): Likewise.
6421 2008-07-31  Bean  <bean123ch@gmail.com>
6423         * boot/i386/pc/lnxboot.S (real_code_2): Replace 0x50 with
6424         GRUB_KERNEL_MACHINE_DATA_END.
6426 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6428         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_DATA_END):
6429         Increase from 0x50 to 0x60.
6430         * util/i386/pc/grub-install.in: Detect cross-disk installs, and
6431         use UUIDs to identify the root drive for them.  If that's not
6432         possible, abort.
6433         * util/i386/pc/grub-setup.c (setup): Do not special-case, or even
6434         check, for cross-disk installs.
6436 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6438         * kern/ieee1275/init.c (grub_machine_set_prefix): If `grub_prefix'
6439         is non-empty, use it to set the `prefix' environment variable instead
6440         of the usual approach.
6441         * kern/i386/linuxbios/init.c (make_install_device): Remove function.
6442         (grub_machine_set_prefix): Use `grub_prefix' to set the `prefix'
6443         environment variable instead of dummy make_install_device().
6445         * kern/i386/ieee1275/startup.S: Include `<grub/machine/kernel.h>'.
6446         (start): Insert a data section, with `grub_prefix' variable.
6447         * kern/i386/linuxbios/startup.S: Likewise.
6449         * include/grub/powerpc/ieee1275/kernel.h [!ASM_FILE] (grub_prefix):
6450         New variable reference.
6451         * include/grub/i386/ieee1275/kernel.h (GRUB_KERNEL_MACHINE_PREFIX):
6452         New macro.  Defines offset of `grub_prefix' within startup.S (relative
6453         to `start').
6454         (GRUB_KERNEL_MACHINE_DATA_END): New macro.  Defines the end of data
6455         section within startup.S (relative to `start').
6456         * include/grub/i386/coreboot/kernel.h: Likewise.
6458         * util/elf/grub-mkimage.c (add_segments): Receive `prefix' parameter.
6459         Overwrite grub_prefix with its contents, at the beginning of the
6460         first segment.
6461         (main): Understand -p|--prefix.
6463 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6465         * util/grub.d/10_hurd.in: Source ${libdir}/grub/update-grub_lib.
6467 2008-07-30  Robert Millan  <rmh@aybabtu.com>
6469         * term/i386/pc/vga_text.c (grub_console_cls): Use
6470         grub_console_gotoxy() to go back to beginning of the screen.
6471         Found by Patrick Georgi <patrick.georgi@coresystems.de>
6473 2008-07-29  Christian Franke  <franke@computer.org>
6475         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
6476         Add conversion of emulated mount points on Cygwin.
6478 2008-07-29  Christian Franke  <franke@computer.org>
6480         * util/update-grub.in: Add a check for admin
6481         group on Cygwin.
6482         Remove old `grub.cfg.new' before creation.
6483         Add `-f' to `mv' to handle the different filesystem
6484         semantics of Windows.
6486 2008-07-29  Bean  <bean123ch@gmail.com>
6488         * normal/main.c (get_line): Fix buffer overflow bug.
6490 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6492         * partmap/apple.c (GRUB_APPLE_HEADER_MAGIC): New macro.
6493         (struct grub_apple_header): New struct.  Describes the layout of
6494         the partmap header.
6495         (apple_partition_map_iterate): Check the header magic as well as the
6496         partition magic (which was already being checked).
6498 2008-07-28  Pavel Roskin  <proski@gnu.org>
6500         * genmk.rb: Add a warning to the beginning of the output that
6501         it's a generated file and should not be edited.
6503 2008-07-28  Robert Millan  <rmh@aybabtu.com>
6505         * disk/raid.c (grub_raid_scan_device): Do not abort when two disks
6506         with the same number are found, just use issue a warning with
6507         grub_dprintf(), as this error has been reported to be non-fatal.
6509 2008-07-27  Robert Millan  <rmh@aybabtu.com>
6511         * disk/ata.c (grub_ata_dumpinfo): Use grub_dprintf() for debugging
6512         information.
6514 2008-07-27  Bean  <bean123ch@gmail.com>
6516         * fs/fat.c (GRUB_FAT_MAXFILE): New constant.
6517         (grub_fat_find_dir): Ignore case when comparing filename.
6519 2008-07-27  Bean  <bean123ch@gmail.com>
6521         * fs/xfs.c (grub_xfs_dir_header): Change field i8count back to
6522         smallino, as it's more descriptive, and i8count can be confused with
6523         the other field count.
6524         (grub_xfs_iterate_dir): Adjust grub_xfs_dir_entry pointer for small
6525         inode type.
6527 2008-07-27  Bean  <bean123ch@gmail.com>
6529         * commands/crc.c: New file.
6531         * lib/crc.c: Likewise.
6533         * include/grub/lib/crc.h: Likewise.
6535         * util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.
6537         * commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
6538         (hexdump): Move this function to ...
6540         * lib/hexdump.c: ... here.
6542         * include/grub/hexdump.h: Renamed to ...
6544         * include/grub/lib/hexdump.h: ... this.
6546         * commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h
6548         * util/grub-editenv.c: Likewise.
6550         * include/envblk.h: Renamed to ...
6552         * include/lib/envblk.h: ... this.
6554         * util/envblk.c: Renamed to ...
6556         * lib/envblk.c: ... this.
6558         * conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
6559         lib/hexdump.c.
6560         (grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
6561         (pkglib_MODULES): Add crc.mod.
6562         (hexdump_mod_SOURCES): Add lib/hexdump.c.
6563         (loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
6564         (crc_mod_SOURCES): New macro.
6565         (crc_mod_CFLAGS): Likewise.
6566         (crc_mod_LDFLAGS): Likewise.
6568         * conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.
6570         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
6572         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
6574         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
6576         * conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
6578 2008-07-27  Felix Zielcke  <fzielcke@z-51.de>
6580         * commands/help.c: Include <grub/term.h>.
6581         (TERM_WIDTH): Removed.  Updated all users.
6583 2008-07-27  Pavel Roskin  <proski@gnu.org>
6585         * util/getroot.c (find_root_device): Rephrase a comment to avoid
6586         spurious warnings about a comment within a comment.
6588 2008-07-25  Robert Millan  <rmh@aybabtu.com>
6590         * util/getroot.c (find_root_device): Skip devices that match
6591         /dev/dm-[0-9].  This lets the real device be found for any type of
6592         abstraction (LVM, EVMS, RAID..).
6593         (grub_guess_root_device): Do not traverse /dev/mapper (for LVM)
6594         and /dev/evms (for EVMS) before traversing /dev.  If a /dev/dm-[0-9]
6595         device is found first, find_root_device() will now skip it.
6597 2008-07-24  Pavel Roskin  <proski@gnu.org>
6599         * include/grub/types.h: Use __builtin_bswap32() and
6600         __builtin_bswap64() with gcc 4.3 and newer.
6602 2008-07-24  Christian Franke  <franke@computer.org>
6604         * util/i386/pc/grub-install.in: If `--debug' is specified,
6605         pass `--verbose' to grub-setup.
6606         Abort script if make_system_path_relative_to_its_root() fails.
6608 2008-07-24  Bean  <bean123ch@gmail.com>
6610         * configure.ac: Fixed a bug caused by the previous cygwin patch,
6611         variable `target_platform' should be `platform'.
6613 2008-07-24  Bean  <bean123ch@gmail.com>
6615         * video/reader/png.c (DEFLATE_HLIT_MAX): Change value.
6616         (grub_png_init_fixed_block): New function.
6617         (grub_png_decode_image_data): Handle fixed huffman code compression.
6619 2008-07-24  Bean  <bean123ch@gmail.com>
6621         * common.rmk (bin_UTILITIES): Add grub-pe2elf.
6622         (grub_pe2elf_SOURCES): New macro.
6623         (CLEANFILES): Add grub-pe2elf.
6625         * include/grub/efi/pe32.h (GRUB_PE32_SCN_ALIGN_1BYTES): New constant.
6626         (GRUB_PE32_SCN_ALIGN_2BYTES): Likewise.
6627         (GRUB_PE32_SCN_ALIGN_4BYTES): Likewise.
6628         (GRUB_PE32_SCN_ALIGN_8BYTES): Likewise.
6629         (GRUB_PE32_SCN_ALIGN_16BYTES): Likewise.
6630         (GRUB_PE32_SCN_ALIGN_32BYTES): Likewise.
6631         (GRUB_PE32_SCN_ALIGN_64BYTES): Likewise.
6632         (GRUB_PE32_SCN_ALIGN_SHIFT): Likewise.
6633         (GRUB_PE32_SCN_ALIGN_MASK): Likewise.
6634         (GRUB_PE32_SYM_CLASS_EXTERNAL): Likewise.
6635         (GRUB_PE32_SYM_CLASS_STATIC): Likewise.
6636         (GRUB_PE32_SYM_CLASS_FILE): Likewise.
6637         (GRUB_PE32_DT_FUNCTION): Likewise.
6638         (GRUB_PE32_REL_I386_DIR32): Likewise.
6639         (GRUB_PE32_REL_I386_REL32): Likewise.
6640         (grub_pe32_symbol): New structure.
6641         (grub_pe32_reloc): Likewise.
6643         * util/grub-pe2elf.c: New file.
6645         * configure.ac: Set TARGET_OBJ2ELF if host os is cygwin. Don't test for
6646         start symbol in non pc platform.
6648         * genmk.rb: Use TARGET_OBJ2ELF to convert native object format to elf.
6650         The following patches are from Christian Franke.
6652         * include/grub/dl.h: Remove .previous, gas supports this only
6653         for ELF format.
6655         * include/grub/symbol.h [__CYGWIN__] (#define FUNCTION/VARIABLE):
6656         Remove .type, gas supports this only for ELF format.
6658         * kern/dl.c (grub_dl_resolve_dependencies): Add check for trailing
6659         nullbytes in symbol table. This fixes an infinite loop if table is
6660         zero filled.
6662         * Makefile.in: Add autoconf replacements TARGET_IMG_LDSCRIPT,
6663         TARGET_IMG_LDFLAGS and EXEEXT.
6665         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Replace -Wl,-N by
6666         TARGET_IMG_LDFLAGS_AC.
6667         (grub_CHECK_STACK_ARG_PROBE): New function.
6669         * conf/i386-pc.rmk: Replace -Wl,-N by TARGET_IMG_LDFLAGS.
6671         * conf/i386-pc-cygwin-ld-img.sc: New linker script.
6673         * configure.ac: Add check for linker script "conf/${target}-img-ld.c"
6674         to set TARGET_IMG_LD* accordingly.
6675         Add check for Cygwin to set TARGET_MOD_OBJCOPY accordingly.
6676         Add call to grub_CHECK_STACK_ARG_PROBE.
6677         Use TARGET_IMG_LDFLAGS to check start, bss_start, end symbols.
6679         * genkernsyms.sh.in: Handle HAVE_ASM_USCORE case.
6681         * genmk.rb: Add EXEEXT to CLEANFILES.
6683 2008-07-23  Robert Millan  <rmh@aybabtu.com>
6685         * Makefile.in (UNICODE_ARROWS, UNICODE_LINES): New variables (they
6686         define the codes for arrows and lines used for the menu).
6687         (ascii.pff): Generate fonts for $(UNICODE_ARROWS) and $(UNICODE_LINES)
6688         as well.
6690         * util/update-grub_lib.in (font_path): Prefer ascii.pff over complete
6691         fonts, because the latter are too slow.
6693 2008-07-21  Bean  <bean123ch@gmail.com>
6695         * kern/i386/pc/startup.S (gate_a20_try_bios): Change test order for
6696         a20. Run keyboard test last, as it will cause macbook to halt.
6698 2008-07-18  Pavel Roskin  <proski@gnu.org>
6700         * kern/dl.c: Go back to using GRUB_CPU_SIZEOF_VOID_P.  We cannot
6701         load foreign architecture modules correctly anyway.  Keep
6702         support for loading host architecture modules, whether we
6703         compile them or not.
6705 2008-07-17  Pavel Roskin  <proski@gnu.org>
6707         * configure.ac: Use -m32 or -m64 regardless of whether we had to
6708         change target_cpu.  The compiler default can mismatch target_cpu
6709         in any case.
6711         * disk/efi/efidisk.c: Fix format warnings on x86_64.
6712         * kern/efi/efi.c: Likewise.
6714         * aclocal.m4 (grub_PROG_TARGET_CC): New macro.  Check if the
6715         target compiler is functional.
6716         * configure.ac: Call grub_PROG_TARGET_CC once all target flags
6717         are set up.
6719         * configure.ac: Default to efi platform for x86_64-apple.  Allow
6720         powerpc64 CPU, default to ieee1275 platform for it.  Split CPU
6721         adjustments from the rest, only do them if target is not
6722         explicitly given.  Merge other adjustments with the final sanity
6723         check.  Remove an extraneous check for supported CPU.  Be
6724         specific which CPU and which platform is not supported.
6726         * configure.ac: Default to pc platform for x86_64.
6728 2008-07-17  Robert Millan  <rmh@aybabtu.com>
6730         Partial LinuxBIOS -> Coreboot rename.
6732         * conf/i386-linuxbios.rmk: Renamed to ...
6733         * conf/i386-coreboot.rmk: ... this.
6734         * Makefile.in (RMKFILES): s/i386-linuxbios.rmk/i386-coreboot.rmk/g.
6735         * configure.ac: Accept "coreboot" as input platform (but maintain
6736         compatibility with "linuxbios").
6737         * include/grub/i386/linuxbios: Renamed to ...
6738         * include/grub/i386/coreboot: ... this.
6740 2008-07-17  Bean  <bean123ch@gmail.com>
6742         * conf/i386/efi.rmk (pkglib_MODULES): add pci.mod and lspci.mod.
6743         (appleldr_mod_SOURCE): New variable.
6744         (appleldr_mod_CFLAGS): Likewise.
6745         (appleldr_mod_LDFLAGS): Likewise.
6746         (pci_mod_SOURCES): Likewise.
6747         (pci_mod_CFLAGS): Likewise.
6748         (pci_mod_LDFLAGS): Likewise.
6749         (lspci_mod_SOURCES): Likewise.
6750         (lspci_mod_CFLAGS): Likewise.
6751         (lspci_mod_LDFLAGS): Likewise.
6753         * conf/x86_64-efi.rmk: New file.
6755         * disk/efi/efidisk.c (grub_efidisk_read): Wrap efi calls with efi_call_N
6756         macro.
6757         (grub_efidisk_write): Likewise.
6759         * include/efi/api.h (efi_call_0): New macro.
6760         (efi_call_1): Likewise.
6761         (efi_call_2): Likewise.
6762         (efi_call_3): Likewise.
6763         (efi_call_4): Likewise.
6764         (efi_call_5): Likewise.
6765         (efi_call_6): Likewise.
6767         * include/grub/efi/chainloader.h (grub_chainloader_cmd): Rename to
6768         grub_rescue_cmd_chainloader.
6770         * include/grub/efi/pe32.h (GRUB_PE32_MACHINE_X86_64): New macro.
6771         (grub_pe32_optional_header): Change some fields based on i386 or
6772         x86_64 platform.
6773         (GRUB_PE32_PE32_MAGIC): Likewise.
6775         * include/grub/efi/uga_draw.h: New file.
6777         * include/grub/elf.h (STN_ABS): New constant.
6778         (R_X86_64_NONE): Relocation constant for x86_64.
6779         (R_X86_64_64): Likewise.
6780         (R_X86_64_PC32): Likewise.
6781         (R_X86_64_GOT32): Likewise.
6782         (R_X86_64_PLT32): Likewise.
6783         (R_X86_64_COPY): Likewise.
6784         (R_X86_64_GLOB_DAT): Likewise.
6785         (R_X86_64_JUMP_SLOT): Likewise.
6786         (R_X86_64_RELATIVE): Likewise.
6787         (R_X86_64_GOTPCREL): Likewise.
6788         (R_X86_64_32): Likewise.
6789         (R_X86_64_32S): Likewise.
6790         (R_X86_64_16): Likewise.
6791         (R_X86_64_PC16): Likewise.
6792         (R_X86_64_8): Likewise.
6793         (R_X86_64_PC8): Likewise.
6795         * include/grub/i386/efi/pci.h: New file.
6797         * include/grub/i386/linux.h (GRUB_LINUX_EFI_SIGNATURE):
6798         Change it value based on platform.
6799         (GRUB_LINUX_EFI_SIGNATURE_0204): New constant.
6800         (GRUB_E820_RAM): Likewise.
6801         (GRUB_E820_RESERVED): Likewise.
6802         (GRUB_E820_ACPI): Likewise.
6803         (GRUB_E820_NVS): Likewise.
6804         (GRUB_E820_EXEC_CODE): Likewise.
6805         (GRUB_E820_MAX_ENTRY): Likewise.
6806         (grub_e820_mmap): New structure.
6807         (linux_kernel_header): Change the efi field according to different
6808         kernel version, also field from linux_kernel_header.
6810         * include/grub/kernel.h (grub_module_info): Add padding for x86_64.
6812         * include/grub/pci.h (GRUB_PCI_ADDR_SPACE_MASK): New constant.
6813         (GRUB_PCI_ADDR_SPACE_MEMORY): Likewise.
6814         (GRUB_PCI_ADDR_SPACE_IO): Likewise.
6815         (GRUB_PCI_ADDR_MEM_TYPE_MASK): Likewise.
6816         (GRUB_PCI_ADDR_MEM_TYPE_32): Likewise.
6817         (GRUB_PCI_ADDR_MEM_TYPE_1M): Likewise.
6818         (GRUB_PCI_ADDR_MEM_TYPE_64): Likewise.
6819         (GRUB_PCI_ADDR_MEM_PREFETCH): Likewise.
6820         (GRUB_PCI_ADDR_MEM_MASK): Likewise.
6821         (GRUB_PCI_ADDR_IO_MASK): Likewise.
6823         * include/grub/x86_64/efi/kernel.h: New file.
6825         * include/grub/x86_64/efi/loader.h: Likewise.
6827         * include/grub/x86_64/efi/machine.h: Likewise.
6829         * include/grub/x86_64/efi/pci.h: Likewise.
6831         * include/grub/x86_64/efi/time.h: Likewise.
6833         * include/grub/x86_64/linux.h: Likewise.
6835         * include/grub/x86_64/setjmp.h: Likewise.
6837         * include/grub/x86_64/time.h: Likewise.
6839         * include/grub/x86_64/types.h: Likewise.
6841         * kern/dl.c (GRUB_CPU_SIZEOF_VOID_P): Changed to
6842          GRUB_TARGET_SIZEOF_VOID_P.
6844         * kern/efi/efi.c (grub_efi_locate_protocol): Wrap efi calls.
6845         (grub_efi_locate_handle): Likewise.
6846         (grub_efi_open_protocol): Likewise.
6847         (grub_efi_set_text_mode): Likewise.
6848         (grub_efi_stall): Likewise.
6849         (grub_exit): Likewise.
6850         (grub_reboot): Likewise.
6851         (grub_halt): Likewise.
6852         (grub_efi_exit_boot_services): Likewise.
6853         (grub_get_rtc): Likewise.
6855         * kern/efi/mm.c (MEMORY_MAP_SIZE): Change to 0x3000 for new models.
6856         (GRUB_CPU_SIZEOF_VOID_P): Changed to GRUB_TARGET_SIZEOF_VOID_P.
6857         (grub_efi_allocate_pages): Wrap efi calls.
6858         (grub_efi_free_pages): Wrap efi calls.
6859         (grub_efi_get_memory_map): Wrap efi calls.
6861         * kern/x86_64/dl.c: New file.
6863         * kern/x86_64/efi/callwrap.S: Likewise.
6865         * kern/x86_64/efi/startup.S: Likewise.
6867         * loader/efi/appleloader.c: Likewise.
6869         * loader/efi/chainloader.c (cmdline): New variable.
6870         (grub_chainloader_unload): Wrap efi calls.
6871         (grub_chainloader_boot): Likewise.
6872         (grub_rescue_cmd_chainloader): Wrap efi calls, handle
6873         command line.
6875         * loader/efi/chainloader_normal.c (chainloader_command):
6876         Change grub_chainloader_cmd to grub_rescue_cmd_chainloader, pass
6877         command line.
6879         * loader/i386/efi/linux.c (allocate_pages): Change allocation
6880         method.
6881         (grub_e820_add_region): New function.
6882         (grub_linux_boot): Construct e820 map from efi map, handle x86_64
6883         booting.
6884         (grub_find_video_card): New function.
6885         (grub_linux_setup_video): New function.
6886         (grub_rescue_cmd_linux): Probe for video information.
6888         * normal/x86_64/setjmp.S: New file.
6890         * term/efi/console.c (map_char): New function.
6891         (grub_console_putchar): Map unicode char.
6892         (grub_console_checkkey): Wrap efi calls.
6893         (grub_console_getkey): Likewise.
6894         (grub_console_getwh): Likewise.
6895         (grub_console_gotoxy): Likewise.
6896         (grub_console_cls): Likewise.
6897         (grub_console_setcolorstate): Likewise.
6898         (grub_console_setcursor): Likewise.
6900         * util/i386/efi/grub-mkimage.c: Add support for x86_64.
6902 2008-07-16  Pavel Roskin  <proski@gnu.org>
6904         * loader/i386/efi/linux.c (allocate_pages): Fix warnings in
6905         format strings.
6907         * util/i386/efi/grub-mkimage.c (get_target_address): Return a
6908         pointer, not an integer.  This fixes a warning and prevents
6909         precision loss on 64-bit systems.
6910         (relocate_addresses): Remove unneeded cast.
6912 2008-07-15  Pavel Roskin  <proski@gnu.org>
6914         * kern/i386/ieee1275/init.c: Include grub/cache.h.
6916         * term/ieee1275/ofconsole.c: Disable code unused on i386.
6918         * kern/ieee1275/ieee1275.c (grub_ieee1275_get_integer_property):
6919         Fix comparison between signed and unsigned.
6921         * include/grub/i386/ieee1275/console.h: Declare
6922         grub_console_init() and grub_console_fini().
6924         * loader/i386/ieee1275/linux.c (grub_set_bootpath): Remove.
6925         It's empty and unused.
6927         * fs/ext2.c (grub_ext2_read_block): Initialize blknr in the
6928         beginning to avoid warnings with some compilers.
6930         * loader/ieee1275/multiboot2.c: Include grub/machine/loader.h.
6931         [__i386__] (grub_mb2_arch_boot): Avoid unnecessary cast.
6933 2008-07-14  Pavel Roskin  <proski@gnu.org>
6935         * kern/env.c (grub_register_variable_hook): Don't copy empty
6936         string, it leaks memory.  Pass "" to grub_env_set(), it should
6937         handle constant strings.
6939         * commands/blocklist.c (grub_cmd_blocklist): Fix format warning.
6940         * commands/cmp.c (grub_cmd_cmp): Likewise.
6941         * kern/dl.c (grub_dl_flush_cache): Likewise.
6942         (grub_dl_load_core): Likewise.
6943         * kern/elf.c (grub_elf32_load_phdrs): Likewise.
6944         (grub_elf64_load_phdrs): Likewise.
6946 2008-07-13  Pavel Roskin  <proski@gnu.org>
6948         * lib/LzmaEnc.c (LzmaEnc_SetProps): Fix warning about comparison
6949         between signed and unsigned.
6950         (LzmaEnc_Finish): Fix warning about an unused parameter.
6952 2008-07-13  Bean  <bean123ch@gmail.com>
6954         * Makefile.in (enable_lzo): New rule.
6956         * conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.
6958         * configure.ac (ENABLE_LZO): New option --enable-lzo.
6960         * boot/i386/pc/lnxboot.S: #include <config.h>.
6962         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
6963         its value according to the compression algorithm used, lzo or lzma.
6965         * util/i386/pc/grub-mkimage.c (compress_kernel): Use different
6966         compression algorithm according to configure macro.
6968         * kern/i386/pc/startup.S (codestart): Likewise.
6970         * kern/i386/pc/lzma_decode.S: New file.
6972         * include/grub/lib/LzFind.h: Likewise.
6974         * include/grub/lib/LzHash.h: Likewise.
6976         * include/grub/lib/LzmaDec.h: Likewise.
6978         * include/grub/lib/LzmaEnc.h: Likewise.
6980         * include/grub/lib/LzmaTypes.h: Likewise.
6982         * lib/LzFind.c: Likewise.
6984         * lib/LzmaDec.c: Likewise.
6986         * lib/LzmaEnc.c: Likewise.
6988 2008-07-13  Bean  <bean123ch@gmail.com>
6990         * fs/ext2.c (EXT4_EXTENTS_FLAG): New macro.
6991         (grub_ext4_extent_header): New structure.
6992         (grub_ext4_extent): Likewise.
6993         (grub_ext4_extent_idx): Likewise.
6994         (grub_ext4_find_leaf): New function.
6995         (grub_ext2_read_block): Handle extents.
6997 2008-07-12  Robert Millan  <rmh@aybabtu.com>
6999         * util/i386/pc/grub-mkrescue.in: s/grub-install/grub-mkrescue/g.
7001 2008-07-11  Robert Millan  <rmh@aybabtu.com>
7003         * util/grub.d/40_custom.in: New file. Example on how to add custom
7004         entries to /etc/grub.d.
7005         * conf/common.rmk (%, update-grub_SCRIPTS, CLEANFILES): Install
7006         40_custom (implicitly, by merging all the grub.d rules).
7008 2008-07-11  Pavel Roskin  <proski@gnu.org>
7010         * commands/read.c (grub_getline): Fix invalid memory access.
7011         Don't add newline to the variable value.
7013         * term/i386/pc/serial.c (GRUB_SERIAL_PORT_NUM): New constant.
7014         [!GRUB_MACHINE_PCBIOS] (serial_hw_io_addr): Add COM2 and COM3.
7015         (serial_hw_get_port): Check validity of the port number.
7016         (grub_cmd_serial): Check return value of serial_hw_get_port().
7018 2008-07-07  Pavel Roskin  <proski@gnu.org>
7020         * boot/i386/pc/diskboot.S (notification_string): Replace
7021         "Loading kernel" with just "loading".  This is shorter, less
7022         confusing and saves a few bytes for possible future changes.
7024 2008-07-05  Pavel Roskin  <proski@gnu.org>
7026         * disk/ata.c (grub_ata_dumpinfo): Don't output addressing and
7027         size for ATAPI devices, they are undefined.  Output sector
7028         number in decimal form.
7030         * disk/ata.c: Use named constants for status bits.
7032 2008-07-04  Pavel Roskin  <proski@gnu.org>
7034         * kern/i386/linuxbios/init.c (grub_machine_init): Cast addr to
7035         grub_addr_t before casting it to the void pointer to fix a
7036         warning.  Non-addressable regions are discarded earlier.
7037         (grub_arch_modules_addr): Cast _end to grub_addr_t.
7038         * kern/i386/linuxbios/table.c: Include grub/misc.h.
7039         (check_signature): Don't shadow table_header.
7040         (grub_linuxbios_table_iterate): Cast numeric constants to
7041         grub_linuxbios_table_header_t.
7042         * include/grub/i386/linuxbios/init.h: Add noreturn attribute to
7043         grub_stop().
7045         * kern/ieee1275/init.c: Cast _start and _end to grub_addr_t to
7046         prevent warnings.
7048         * include/grub/misc.h (ALIGN_UP): Avoid unnecessary cast to a
7049         pointer, which can cause warnings.  Support 64-bit addresses.
7051         * util/elf/grub-mkimage.c: Use GRUB_TARGET_SIZEOF_LONG instead
7052         of sizeof(long).  This fixes PowerPC image generation on x86_64.
7054 2008-07-04  Robert Millan  <rmh@aybabtu.com>
7056         This fixes a performance issue when pc & gpt partmap iterators
7057         didn't abort iteration even after our hook found what it was
7058         looking for (often causing expensive probes of non-existent drives).
7060         Some callers relied on previous buggy behaviour, since they would
7061         raise an error when their own hooks caused early abortion of its
7062         iteration.
7064         * kern/device.c (grub_device_open): Improve error message.
7065         * disk/lvm.c (grub_lvm_open): Likewise.
7066         * disk/raid.c (grub_raid_open): Likewise.
7068         * partmap/pc.c (pc_partition_map_iterate): Abort parent iteration
7069         when hook requests it, independently of grub_errno.
7070         (pc_partition_map_probe): Do not fail when find_func() caused
7071         early abortion of pc_partition_map_iterate().
7073         * partmap/gpt.c (gpt_partition_map_iterate): Abort parent iteration
7074         when hook requests it, independently of grub_errno.
7075         (gpt_partition_map_probe): Do not fail when find_func() caused
7076         early abortion of gpt_partition_map_iterate().
7078         * kern/partition.c (grub_partition_iterate): Abort parent iteration
7079         when hook requests it, independently of grub_errno.  Do not fail when
7080         part_map_iterate_hook() caused early abortion of p->iterate().
7082         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Do not fail
7083         when grub_partition_iterate() returned with non-zero.
7085 2008-07-03  Pavel Roskin  <proski@gnu.org>
7087         * disk/ata.c (grub_ata_pio_write): Check status before writing,
7088         like we do in grub_ata_pio_read().
7089         (grub_ata_readwrite): Always write individual sectors.  Fix the
7090         sector count for the remainder.
7091         (grub_ata_write): Enable writing to ATA devices.  Correctly
7092         report error for ATAPI devices.
7094 2008-07-02  Pavel Roskin  <proski@gnu.org>
7096         * boot/i386/pc/cdboot.S: Add _start entry to fix a linker
7097         warning.
7099         * disk/ata.c (grub_ata_readwrite): Don't increment sector number
7100         for every read sector, we already increment it for the whole
7101         batch.  This fixes reading more than 256 sectors at once.
7103         * util/grub-editenv.c (cmd_info): Cast argument to long
7104         explicitly.  ptrdiff_t reduces to int on i386.
7106         * util/grub-editenv.c (main): Be specific which parameter is
7107         missing.
7109         * disk/memdisk.c (memdisk_addr): Make a pointer to fix warnings.
7110         (memdisk): Make memdisk_orig_addr a pointer.
7112         * fs/reiserfs.c (grub_reiserfs_read): Fix misuse of grub_size_t
7113         for file offsets, use grub_off_t instead.  Fix printf format
7114         warnings.
7116         * fs/reiserfs.c: Remove #warning, TODO list items don't belong
7117         there.  Real unexpected warnings should not drown in the noise
7118         about known problems.
7120         * commands/hexdump.c (grub_cmd_hexdump): Fix misuse of
7121         grub_disk_addr_t for memory addresses.
7123         * loader/aout.c (grub_aout_load): Cast load_addr to pointer
7124         explicitly to fix a warning.
7126         * util/grub-editenv.c (cmd_info): Fix warning in printf format.
7128         * Makefile.in (MODULE_LDFLAGS): New variable.
7129         * aclocal.m4 (grub_PROG_LD_BUILD_ID_NONE): New macro.  Check if
7130         the linker accepts --build-id=none.
7131         * configure.ac: Call grub_PROG_LD_BUILD_ID_NONE.  Substitute
7132         MODULE_LDFLAGS.
7133         * genmk.rb: Use MODULE_LDFLAGS when linking modules.
7135         * fs/xfs.c (struct grub_xfs_dir_header): Use names similar to
7136         those in Linux XFS code.  Provide a way to access 64-bit parent
7137         inode.
7138         (grub_xfs_iterate_dir): Use the new names.  Avoid reading past
7139         the end of struct grub_xfs_dir_header.
7141 2008-07-02  Bean  <bean123ch@gmail.com>
7143         * include/grub/ieee1275.h (grub_ieee1275_flag): New constant
7144         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7145         and GRUB_IEEE1275_FLAG_NO_ANSI.
7147         * kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set flag
7148         GRUB_IEEE1275_FLAG_CANNOT_INTERPRET, GRUB_IEEE1275_FLAG_FORCE_CLAIM
7149         and GRUB_IEEE1275_FLAG_NO_ANSI for Open Hackware.
7151         * kern/ieee1275/ieee1275.c (grub_ieee1275_interpret): Return
7152         immediately if GRUB_IEEE1275_FLAG_CANNOT_INTERPRET is set.
7154         * kern/ieee1275/init.c (grub_claim_heap): Claim memory directly if
7155         GRUB_IEEE1275_FLAG_FORCE_CLAIM is set.
7157         * term/ieee1275/ofconsole.c (grub_ofconsole_writeesc): Don't output
7158         esc sequence on non ANSI terminal.
7159         (grub_ofconsole_gotoxy): Emulate backspace key on non ANSI terminal.
7161         * util/elf/grub-mkimage.c (add_segments): Move ELF header to the
7162         beginning of file.
7164 2008-07-02  Bean  <bean123ch@gmail.com>
7166         * conf/common.rmk (bin_UTILITIES): Add grub-editenv.
7167         (grub_editenv_SOURCES): New variable.
7168         (pkglib_MODULES): Add loadenv.mod.
7169         (loadenv_mod_SOURCES): New variable.
7170         (loadenv_mod_CFLAGS): Likewise.
7171         (loadenv_mod_LDFLAGS): Likewise.
7173         * include/grub/envblk.h: New file.
7175         * util/envblk.c: New file.
7177         * util/grub-editenv.c: New file.
7179         * commands/loadenv.c: New file.
7181 2008-07-01  Pavel Roskin  <proski@gnu.org>
7183         * include/multiboot2.h (struct multiboot_tag_module): Use char,
7184         not unsigned char.  This fixes warnings and is consistent with
7185         other tags.
7187         * disk/fs_uuid.c (search_fs_uuid): Correctly increment count.
7189         * normal/parser.y: Define YYENABLE_NLS as 0 to fix warnings.
7191         * term/tparm.c (analyze): Always set *popcount.
7193         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Remove useless
7194         cast to fix a warning.
7196         * loader/i386/pc/multiboot2.c (grub_mb2_arch_module_alloc): Use
7197         cast to suppress a warning.
7199         * fs/afs.c (grub_afs_read_block): Return grub_disk_addr_t, as
7200         grub_fshelp_read_file() expects.
7202         * fs/fat.c: Fix UUID calculation on big-endian systems.  We
7203         write uuid as a 32-bit value in CPU byte order, so declare and
7204         use it as such.
7206         * disk/raid.c: Cast grub_dprintf() arguments to unsigned long
7207         long if the format specifier expects it.
7208         * partmap/gpt.c (gpt_partition_map_iterate): Likewise.
7209         * partmap/pc.c (pc_partition_map_iterate): Likewise.
7210         * fs/ntfs.c (grub_ntfs_uuid): Cast data->uuid to unsigned long
7211         long to fix a warning.
7212         * fs/reiserfs.c (grub_reiserfs_read): Change casts in
7213         grub_dprintf() arguments to fix warnings.
7215 2008-06-30  Pavel Roskin  <proski@gnu.org>
7217         * util/i386/pc/grub-setup.c (setup): Write install_dos_part and
7218         install_bsd_part immediately before core.img is embedded or
7219         modified on disk.  This fixes core.img verification if core.img
7220         cannot be embedded.
7222         * util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
7223         core_path to calculate the blocklist.
7224         Patch from Javier Martín <lordhabbit@gmail.com>
7226 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7228         * fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
7229         block to disk block.
7230         (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
7231         Patch from Niels Böhm <bitbucket@arcor.de>
7233 2008-06-29  Robert Millan  <rmh@aybabtu.com>
7235         * util/update-grub_lib.in (font_path): Search for fonts in
7236         /boot/grub first, which is more likely to be readable (we aren't
7237         deciding where fonts live, just looking for them).
7239 2008-06-26  Pavel Roskin  <proski@gnu.org>
7241         * util/biosdisk.c (read_device_map): Don't leave dead map
7242         entries for devices failing stat() check.
7244         * util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
7245         core_path_dev for the core.img path on the target device.
7247 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7249         * disk/fs_uuid.c: New file.
7250         * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
7251         (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
7252         (fs_uuid_mod_LDFLAGS): New variables.
7253         * include/grub/disk.h (grub_disk_dev_id): Add
7254         `GRUB_DISK_DEVICE_UUID_ID'.
7255         * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
7256         implement iterate().
7258 2008-06-26  Robert Millan  <rmh@aybabtu.com>
7260         * util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
7261         "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
7262         Linux image includes no initrd.
7264 2008-06-21  Javier Martín  <lordhabbit@gmail.com>
7266         * util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
7267         call to resolve the core image location that effectively appended the
7268         name twice.
7270 2008-06-21  Robert Millan  <rmh@aybabtu.com>
7272         * util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
7273         call from here ...
7275         * util/grub.d/10_hurd.in: ... to here ...
7276         * util/grub.d/10_linux.in: ... and here.
7278 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7280         * kern/main.c (grub_main): Export `prefix' variable immediately
7281         after it has been set by grub_machine_set_prefix().
7283 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7285         * commands/search.c (search_label, search_fs_uuid, search_file): Print
7286         search result when not saving to variable, not the other way around.
7287         When saving to variable, abort iteration as soon as a match is found.
7289 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7291         * util/update-grub_lib.in (prepare_grub_to_access_device): Remove
7292         check for partition that provides /boot/grub.  Its logic is flawed,
7293         as it prevents prepare_grub_to_access_device() from being called
7294         multiple times.
7296 2008-06-19  Robert Millan  <rmh@aybabtu.com>
7298         * util/update-grub_lib.in (prepare_grub_to_access_device): Issue
7299         "insmod" command directly when abstraction modules are needed,
7300         instead of relying on GRUB_PRELOAD_MODULES (which had no effect
7301         since it had already been processed).
7303 2008-06-19  Pavel Roskin  <proski@gnu.org>
7305         * conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
7306         changed.  This is needed in case GRUB_LIBDIR changes.
7307         * conf/i386-ieee1275.rmk: Likewise.
7308         * conf/i386-linuxbios.rmk: Likewise.
7309         * conf/i386-pc.rmk: Likewise.
7310         * conf/powerpc-ieee1275.rmk: Likewise.
7312 2008-06-18  Pavel Roskin  <proski@gnu.org>
7314         * conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
7315         kernel_elf_symlist.c to symlist.c for consistency with other
7316         architectures.  Update all users.
7317         * conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
7319 2008-06-18  Robert Millan  <rmh@aybabtu.com>
7321         * util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
7322         it in prefix.
7324         * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
7325         `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
7326         a RAID device, run setup() for all members independently on whether
7327         LVM abstraction is being used.
7328         (setup): Don't handle prefix at all; let grub-mkimage take care of it.
7329         If grub-mkimage has set `*install_dos_part == -2', don't override this
7330         value.
7331         Perform *install_dos_part adjustments independently on whether
7332         we're embedding or not.
7333         Clarify error message when image is too big for embedding.
7334         Remove duplicate *install_dos_part stanza.
7336 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7338         * term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
7339         (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
7340         variables.
7341         (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
7342         values in grub_ofconsole_normal_color and
7343         grub_ofconsole_highlight_color (they're not directly related to
7344         background and foreground).
7345         (grub_ofconsole_setcolorstate): Extract background and foreground
7346         from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
7348 2008-06-17  Robert Millan  <rmh@aybabtu.com>
7350         * util/update-grub_lib.in (prepare_grub_to_access_device): Use
7351         /boot/grub for the check in last commit, not /boot (they could be
7352         different partitions).
7354 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7356         * util/update-grub_lib.in (prepare_grub_to_access_device): If we were
7357         asked to setup access for the same partition that provides /boot,
7358         don't bother using UUIDs since our root already has the value we
7359         want.
7361 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7363         * util/biosdisk.c (convert_system_partition_to_system_disk): Detect
7364         I2O devices.
7365         Patch from Sven Mueller <sven@debian.org>.
7367 2008-06-16  Robert Millan  <rmh@aybabtu.com>
7369         * util/update-grub.in: Check for $EUID instead of $UID.
7370         Reported by Vincent Zweije.
7372 2008-06-16  Bean  <bean123ch@gmail.com>
7374         * fs/ext2.c (grub_ext2_blockgroup): Revert to pre-journal state.
7375         (grub_ext2_read_block): Likewise.
7376         (grub_ext2_read_inode): Likewise.
7377         (grub_ext2_mount): Likewise.
7378         (grub_ext2_close): Likewise.
7379         (grub_ext3_get_journal): Removed.
7381         * fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre-journal state.
7382         (grub_reiserfs_read_symlink): Likewise.
7383         (grub_reiserfs_mount): Likewise.
7384         (grub_reiserfs_open): Likewise.
7385         (grub_reiserfs_read): Likewise.
7386         (grub_reiserfs_close): Likewise.
7387         (grub_reiserfs_get_journal): Removed.
7389         * fs/fshelp.c (grub_fshelp_read): Removed.
7390         (grub_fshelp_map_block): Likewise.
7392         * include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
7393         (grub_fshelp_journal): Likewise.
7394         (grub_fshelp_read): Likewise.
7395         (grub_fshelp_map_block): Likewise.
7397 2008-06-16  Pavel Roskin  <proski@gnu.org>
7399         * conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
7400         floating point anymore.
7401         * include/grub/powerpc/libgcc.h: Leave only necessary exports.
7403 2008-06-15  Pavel Roskin  <proski@gnu.org>
7405         * commands/ls.c (grub_ls_list_files): Use integer calculations
7406         for human readable format, avoid floating point use.
7407         * kern/misc.c (grub_ftoa): Remove.
7408         (grub_vsprintf): Remove floating point support.
7410 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7412         * util/grub.d/10_linux.in: Use the underlying device for loop-AES
7413         devices.
7414         Reported by Max Vozeler.
7416 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7418         * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
7419         in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
7420         skipped later.
7421         (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
7422         the beginning of the prefix.
7424         * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
7425         It is assumed that if we have a memdisk, grub-mkimage has set
7426         grub_prefix to include the "(memdisk)" drive in it.
7428 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7430         * term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
7431         Initialize keyboard controller after registering the terminal, so that
7432         grub_printf() can be called from grub_keyboard_controller_init().
7434 2008-06-15  Robert Millan  <rmh@aybabtu.com>
7436         * fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
7437         extent-btree which is written as big endian on disk.
7438         Reported by Alain Greppin  <al@chilibi.org>.
7440 2008-06-14  Robert Millan  <rmh@aybabtu.com>
7442         * util/i386/efi/grub-install.in (modules): Remove `_chain'.
7443         * util/i386/pc/grub-install.in (modules): Likewise.
7445 2008-06-13  Pavel Roskin  <proski@gnu.org>
7447         * commands/ls.c (grub_ls_list_files): Fix format warnings.
7449 2008-06-13  Bean  <bean123ch@gmail.com>
7451         * commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.
7453         * fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.
7455         * fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
7456         to indicate sparse block.
7458 2008-06-12  Pavel Roskin  <proski@gnu.org>
7460         * fs/ext2.c (grub_ext2_read_inode): Don't normalize block
7461         number, grub_fshelp_read() does it for us.
7463         * fs/fshelp.c (grub_fshelp_read): New function.  Implement
7464         linear disk read with journal translation.
7465         * fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
7466         * include/grub/fshelp.h: Declare grub_fshelp_read().
7468 2008-06-09  Pavel Roskin  <proski@gnu.org>
7470         * fs/minix.c (grub_minix_mount): Handle error reading
7471         superblock.
7473 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7475         * util/i386/pc/grub-setup.c (main): If install drive is an LVM,
7476         don't append the RAID prefix afterwards.
7477         Reported by Clint Adams.
7479 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7481         Based on description from Pavel:
7482         * kern/disk.c (grub_disk_check_range): Rename to ...
7483         (grub_disk_adjust_range): ... this.  Add a comment explaining the
7484         tasks performed by this function.
7486 2008-06-08  Robert Millan  <rmh@aybabtu.com>
7488         * include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
7489         `num_serial' (for consistency with other variables).
7490         (struct grub_ntfs_data): Add `uuid' member.
7491         * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
7492         (grub_ntfs_uuid): New function.
7493         (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
7495 2008-06-07  Pavel Roskin  <proski@gnu.org>
7497         * util/biosdisk.c (open_device): Revert last change to the
7498         function, it broke installation.  The sector needs to be
7499         different dependent on which device is opened.
7501 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7503         Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
7504         rest of GRUB, and breakage doesn't happen if its value were modified.
7506         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
7507         Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
7508         a constant (same value).
7509         * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
7510         `GRUB_KERNEL_MACHINE_DATA_END' (same value).
7512 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7514         * util/biosdisk.c (open_device): Do not modify sector offset when
7515         accessing a partition.  kern/disk.c already handles this for us.
7517 2008-06-06  Robert Millan  <rmh@aybabtu.com>
7519         * util/grub-emu.c (grub_machine_init): Move code in this function from
7520         here ...
7521         (main): ... to here (before grub_util_biosdisk_init() call, to prevent
7522         segfault in case grub_printf() is called).
7524         * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
7525         grub_probe.  Update all users not to explicitly add it again.
7526         (grub_device): New variable; contains corresponding device for grubdir.
7527         (fs_module, partmap_module, devabstraction_module): Pass
7528         `--device ${grub_device}' to grub_probe to avoid traversing /dev
7529         every time.
7531 2008-06-05  Robert Millan  <rmh@aybabtu.com>
7533         * normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
7534         is found, print it (same layout as with labels).
7536 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7538         * util/biosdisk.c (get_drive): Rename to ...
7539         (find_grub_drive): ... this.  Update all users.
7541         (get_os_disk): Rename to ...
7542         (convert_system_partition_to_system_disk): ... this.  Update all users.
7544         (find_drive): Rename to ...
7545         (find_system_device): ... this.  Update all users.
7547 2008-06-04  Robert Millan  <rmh@aybabtu.com>
7549         * util/biosdisk.c (get_os_disk): Handle IDA devices.
7550         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7551         (make_device_map): Likewise.
7553 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7555         *  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
7556         before dereferencing it.
7558         * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
7559         union with fat12/fat16-specific ones.  Add some new fields, including
7560         `num_serial' for both versions.
7561         (struct grub_fat_data): Add `uuid' member.
7562         (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
7563         names.  Initialize `data->uuid' using `num_serial'.
7564         (grub_fat_uuid): New function.
7565         (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.
7567         * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
7568         (grub_reiserfs_uuid): New function.
7569         (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
7570         member.
7572         * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
7573         (grub_xfs_uuid): New function.
7574         (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
7576 2008-06-01  Robert Millan  <rmh@aybabtu.com>
7578         * util/update-grub_lib.in (prepare_grub_to_access_device): Generate
7579         code that is backward compatible with pre-uuid search command.
7581 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7583         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
7584         floppies after everything else, to ensure floppy drive isn't accessed
7585         unnecessarily (patch from Bean).
7587 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7589         * commands/search.c (search_label, search_fs_uuid, search_file): Do
7590         not print device names when we were asked to set a variable.
7592 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7594         * term/ieee1275/ofconsole.c (grub_ofconsole_setcursor): Implement
7595         using "cursor-on" and "cursor-off" commands (understood at least by
7596         the Open Firmware flavour on OLPC).
7598 2008-05-31  Michael Gorven  <michael@gorven.za.net>
7600         * term/terminfo.c (grub_terminfo_set_current): Correct vt100 cursor
7601         on and off sequences.
7603 2008-05-31  Robert Millan  <rmh@aybabtu.com>
7605         * util/update-grub_lib.in: Replace `grub-probe' with `${grub_probe}'.
7606         * util/update-grub.in: Likewise.
7608 2008-05-30  Pavel Roskin  <proski@gnu.org>
7610         * util/biosdisk.c (linux_find_partition): Simplify logic and
7611         make the code more universal.  Keep special processing for
7612         devfs, but use a simple rule for all other devices.  If the
7613         device ends with a number, append 'p' and the partition number.
7614         Otherwise, append only the partition number.
7616 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7618         * util/update-grub.in (GRUB_DISABLE_LINUX_UUID): Export variable.
7619         * util/grub.d/10_linux.in: If GRUB_DEVICE_UUID is set, and
7620         GRUB_DISABLE_LINUX_UUID isn't true, use the filesystem UUIDs as
7621         the `root' parameter to Linux.
7623 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7625         * commands/search.c (options): Rename --fs_uuid to --fs-uuid.
7626         * util/update-grub_lib.in (prepare_grub_to_access_device): Replace
7627         --fs_uuid with --fs-uuid.
7628         * util/update-grub.in: Allow filesystem UUID probes to fail (since not
7629         all filesystems support them).
7631 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7633         * fs/ext2.c (grub_ext2_uuid): Use `04x' instead of '02x' as
7634         grub_printf() flags, since we're printing in units of 2 bytes.
7636 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7638         * util/grub.d/00_header.in: Remove obsolete comment referencing
7639         convert_system_path_to_grub_path().
7640         * util/update-grub.in: Likewise.
7641         * util/update-grub_lib.in (is_path_readable_by_grub): New function.
7642         (convert_system_path_to_grub_path): Add a warning message explaining
7643         that this function is deprecated.  Rely on is_path_readable_by_grub()
7644         for the readability checks.
7645         (font_path): Use is_path_readable_by_grub() for the readability
7646         check rather than convert_system_path_to_grub_path().
7648 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7650         * util/update-grub_lib.in (prepare_grub_to_access_device): New function.
7651         * util/update-grub.in: Set `GRUB_FONT_PATH' to the system path, without
7652         converting it first.
7653         * util/grub.d/00_header.in: Use prepare_grub_to_access_device() to setup
7654         grub.cfg for access to font file, and afterwards call it again to set
7655         the root device.
7657 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7659         * commands/search.c (options): Add --fs_uuid option.
7660         (search_fs_uuid): New function.
7661         (grub_cmd_search): Fix --set argument passing.
7662         Use search_fs_uuid() when requested via --fs_uuid.
7663         (grub_search_init): Update help message.
7664         * fs/ext2.c (struct grub_ext2_sblock): Rename `unique_id' to `uuid'
7665         and redeclare it as an array of 16-bit words.
7666         (grub_ext2_uuid): New function.
7667         (grub_ext2_fs): Reference grub_ext2_uuid() in `uuid' struct member.
7668         * include/grub/fs.h (struct grub_fs): Add `uuid' struct member.
7669         * util/update-grub.in (GRUB_DEVICE_UUID, GRUB_DEVICE_BOOT)
7670         (GRUB_DEVICE_BOOT_UUID): New variables.
7671         (GRUB_DRIVE. GRUB_DRIVE_BOOT. GRUB_DRIVE_BOOT_GRUB): Remove.
7672         * util/grub.d/00_header.in: Set root using `search --fs_uuid' command
7673         whenever possible.
7674         * util/grub.d/10_hurd.in: Avoid explicit use of root drive.  Instead,
7675         just assume `root' variable has the right value.
7676         * util/grub.d/10_linux.in: Likewise.
7677         * util/grub-probe.c (probe): Probe for filesystem UUID when requested
7678         via PRINT_FS_UUID.
7679         (main): Recognise `-t fs_uuid' argument.
7681 2008-05-30  Robert Millan  <rmh@aybabtu.com>
7683         * util/biosdisk.c (map): Redefine structure to hold information
7684         about GRUB drive name.
7685         (get_drive): Reimplement without assuming (and verifying) BIOS-like
7686         drive names.
7687         (call_hook): Remove.
7688         (grub_util_biosdisk_iterate): Access drive names via `.drive' struct
7689         member.  Assume drive has partitions.
7690         (grub_util_biosdisk_open): Access device names via `.device' struct
7691         member.
7692         (open_device): Likewise.
7693         (find_drive): Likewise.
7694         (read_device_map): Adjust map[] usage to match the new struct
7695         definition.  Don't check for duplicates (still possible, but not cheap
7696         anymore).
7697         (grub_util_biosdisk_fini): Free malloced buffers referenced by map[].
7698         (make_device_name): Remove assumption of BIOS-like drive names.
7700 2008-05-30  Pavel Roskin  <proski@gnu.org>
7702         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Remove, as
7703         compiling execute.c doesn't need grub_script.tab.h anymore.
7704         (normal/command.c_DEPENDENCIES): Likewise.
7705         (normal/function.c_DEPENDENCIES): Likewise.
7706         * conf/i386-ieee1275.rmk: Likewise.
7707         * conf/i386-linuxbios.rmk: Likewise.
7708         * conf/i386-pc.rmk: Likewise.
7709         * conf/powerpc-ieee1275.rmk: Likewise.
7710         * conf/sparc64-ieee1275.rmk: Likewise.
7712 2008-05-29  Pavel Roskin  <proski@gnu.org>
7714         * disk/lvm.c (grub_lvm_scan_device): Check for the buffer end
7715         when scanning metadata for volume group name.
7717         * include/grub/script.h: Don't include grub_script.tab.h.  It's
7718         a generated file, which may only be included from the files with
7719         DEPENDENCIES rules in the makefile.  Don't use typedef YYSTYPE,
7720         use union YYSTYPE, as the later allows forward declaration.
7721         * normal/lexer.c: Don't use typedef YYSTYPE, use union YYSTYPE.
7723 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7725         * term/i386/pc/at_keyboard.c: Include `grub/machine/machine.h'.
7726         (OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): New macros.
7727         [GRUB_MACHINE_IEEE1275] (keyboard_map): Add OLPC scan codes
7728         (grub_console_checkkey): Add grub_dprintf() call to report unknown
7729         scan codes.
7731 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7733         * term/i386/pc/at_keyboard.c (grub_console_checkkey): Add support for
7734         control key combinations.
7736 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7738         * util/powerpc/ieee1275/grub-install.in: Move from here ...
7739         * util/ieee1275/grub-install.in: ... to here.
7740         * powerpc-ieee1275.rmk (grub_install_SOURCES): Update location.
7741         * i386-ieee1275.rmk (sbin_SCRIPTS): New variable.
7742         (grub_install_SOURCES): Likewise.
7744 2008-05-29  Robert Millan  <rmh@aybabtu.com>
7746         * fs/affs.c: Update copyright year.
7747         * fs/ext2.c: Likewise.
7748         * fs/fshelp.c: Likewise.
7749         * fs/hfsplus.c: Likewise.
7750         * fs/ntfs.c: Likewise.
7751         * fs/xfs.c: Likewise.
7752         * include/grub/fshelp.h: Likewise.
7753         * util/grub-mkdevicemap.c: Likewise.
7755 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7757         * util/update-grub.in: Allow chmod call to fail, since /boot/grub/
7758         might need to be fatfs to support some firmware implementations
7759         (e.g. OFW or EFI).
7761 2008-05-28  Robert Millan  <rmh@aybabtu.com>
7763         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle MMC
7764         devices.
7765         * util/grub-mkdevicemap.c (get_mmc_disk_name)
7766         (make_device_map): Likewise.
7768 2008-05-20  Bean  <bean123ch@gmail.com>
7770         * fs/fshelp.c (grub_fshelp_map_block): New function.
7771         (grub_fshelp_find_file): Use 64-bit type for pos and block address.
7772         Use `>>' and `&' operator to avoid 64-bit divide and modulo.
7774         * include/grub/fshelp.h (grub_fshelp_journal_type): New enum.
7775         (GRUB_FSHELP_JOURNAL_UNUSED_MAPPING): New macro.
7776         (grub_fshelp_journal): New structure.
7777         (grub_fshelp_map_block): New function prototype.
7778         (grub_fshelp_read_file): Use grub_disk_addr_t as block type.
7779         (grub_fshelp_map_block): Likewise.
7781         * fs/ext2.c (EXT3_FEATURE_COMPAT_HAS_JOURNAL): New macro.
7782         (EXT3_JOURNAL_MAGIC_NUMBER): Likewise.
7783         (EXT3_JOURNAL_DESCRIPTOR_BLOCK): Likewise.
7784         (EXT3_JOURNAL_COMMIT_BLOCK): Likewise.
7785         (EXT3_JOURNAL_SUPERBLOCK_V1): Likewise.
7786         (EXT3_JOURNAL_SUPERBLOCK_V2): Likewise.
7787         (EXT3_JOURNAL_REVOKE_BLOCK): Likewise.
7788         (EXT3_JOURNAL_FLAG_ESCAPE): Likewise.
7789         (EXT3_JOURNAL_FLAG_SAME_UUID): Likewise.
7790         (EXT3_JOURNAL_FLAG_DELETED): Likewise.
7791         (EXT3_JOURNAL_FLAG_LAST_TAG): Likewise.
7792         (grub_ext2_sblock): New members for journal support.
7793         (grub_ext3_journal_header): New structure.
7794         (grub_ext3_journal_revoke_header): Likewise.
7795         (grub_ext3_journal_block_tag): Likewise.
7796         (grub_ext3_journal_sblock): Likewise.
7797         (grub_fshelp_node): New members logfile and journal.
7798         (grub_ext2_read_block): Change block type to grub_disk_addr_t. Use
7799         grub_fshelp_map_block to get real block number.
7800         (grub_ext2_blockgroup): Use grub_fshelp_map_block to get real block
7801         number.
7802         (grub_ext2_read_inode): Likewise.
7803         (grub_ext3_get_journal): New function.
7804         (grub_read_inode): Initialize journal using grub_ext3_get_journal.
7805         (grub_ext2_close): Release memory used by journal.
7807         * fs/reiserfs.c (REISERFS_MAGIC_STRING): Changed to "ReIsEr".
7808         (REISERFS_MAGIC_DESC_BLOCK): New macro.
7809         (grub_reiserfs_transaction_header): Renamed to
7810         grub_reiserfs_description_block, replace field data with real_blocks.
7811         (grub_reiserfs_commit_block): New structure.
7812         (grub_reiserfs_data): New member journal.
7813         (grub_reiserfs_get_item): Use grub_fshelp_map_block to get real block
7814         number.
7815         (grub_reiserfs_read_symlink): Likewise.
7816         (grub_reiserfs_iterate_dir): Likewise.
7817         (grub_reiserfs_open): Likewise.
7818         (grub_reiserfs_read): Likewise.
7819         (grub_reiserfs_get_journal): New function.
7820         (grub_reiserfs_mount): Use "ReIsEr" as super block magic, as there are
7821         three varieties ReIsErFs, ReIsEr2Fs and ReIsEr3Fs. Initialize journal
7822         using grub_reiserfs_get_journal.
7823         (grub_reiserfs_close): Release memory used by journal.
7825         * fs/affs.c (grub_affs_read_block): Change block type to
7826         grub_disk_addr_t. Use grub_divmod64 to do 64-bit division.
7828         * fs/afs.c (grub_afs_read_block): Change block type to grub_disk_addr_t.
7830         * fs/hfsplus.c (grub_hfsplus_read_block): Likewise.
7832         * fs/ntfs.c (grub_ntfs_read_block): Likewise.
7834         * fs/udf.c (grub_udf_read_block): Change block type to
7835         grub_disk_addr_t. Use type cast to avoid warning.
7837         * fs/xfs.c (grub_xfs_read_block): Likewise.
7839 2008-05-16  Christian Franke  <franke@computer.org>
7841         * commands/cat.c (grub_cmd_cat): Remove non-ESC keys from keyboard queue
7842         to ensure that break with ESC will always work.
7843         * commands/sleep.c (grub_interruptible_millisleep): Likewise.
7844         Remove ESC from keyboard queue.
7846 2008-05-16  Christian Franke  <franke@computer.org>
7848         * util/biosdisk.c: [__CYGWIN__] Add includes.
7849         (grub_util_biosdisk_open): Use Linux code also for Cygwin.
7850         (get_os_disk): Move variable declarations to OS specific
7851         parts to avoid warning.
7852         [__GNU__] (get_os_disk): Fix /dev/sdXsN case.
7853         [__CYGWIN__] (get_os_disk): Add Cygwin /dev/sdXN device names.
7854         (grub_util_biosdisk_get_grub_dev): Use Linux code also for
7855         Cygwin.
7856         * util/getroot.c: [__CYGWIN__] Add includes.
7857         (strip_extra_slashes): Fix "/" case.
7858         [__CYGWIN__] (get_win32_path): New function.
7859         [__CYGWIN__] (grub_get_prefix): Add conversion to win32 path.
7860         [__CYGWIN__] (find_root_device): Disable.
7861         [__CYGWIN__] (get_bootsec_serial): New function.
7862         [__CYGWIN__] (find_cygwin_root_device): Likewise.
7863         [__linux__] (grub_guess_root_device): Add early returns to simplify
7864         structure.
7865         [__CYGWIN__] (grub_guess_root_device): Call find_cygwin_root_device.
7866         [__linux__] (grub_util_get_dev_abstraction): Enable LVM and RAID
7867         check for Linux only.
7869 2008-05-15  Bean  <bean123ch@gmail.com>
7871         * kern/i386/pc/startup.S (grub_console_getkey): Workaround for the
7872         keyboard hang problem in apple's intel mac.
7874 2008-05-09  Robert Millan  <rmh@aybabtu.com>
7876         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle Virtio
7877         devices.
7878         * util/grub-mkdevicemap.c (get_virtio_disk_name)
7879         (make_device_map): Likewise.
7880         Reported by Aurelien Jarno <aurel32@debian.org>
7882 2008-05-07  Ian Campbell  <ijc@hellion.org.uk>
7884         * util/biosdisk.c (get_os_disk): Recognise xvd type disks.
7885         * util/grub-mkdevicemap.c (get_xvd_disk_name): New function.
7886         (make_device_map): Output entries for xvd type disks.
7888 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7890         * util/biosdisk.c (linux_find_partition, get_os_disk): Handle CCISS
7891         devices.
7892         * util/grub-mkdevicemap.c (get_cciss_disk_name)
7893         (make_device_map): Likewise.
7894         Reported by Roland Dreier <rdreier@cisco.com>
7896 2008-05-07  Robert Millan  <rmh@aybabtu.com>
7898         * disk/lvm.c (grub_lvm_scan_device): Detect errors in an additional
7899         grub_strstr() call.  Correct a few mistakes in failure path handling.
7901 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7903         * util/update-grub_lib.in (make_system_path_relative_to_its_root):
7904         Do not print a trailing slash (therefore, the root directory is an
7905         empty string).
7906         (convert_system_path_to_grub_path): Do not remove trailing slash
7907         from make_system_path_relative_to_its_root() output.
7909         * util/i386/pc/grub-install.in: Add trailing slash to output from
7910         make_system_path_relative_to_its_root().
7912 2008-05-06  Robert Millan  <rmh@aybabtu.com>
7914         * util/grub-fstest.c (grub_refresh): Call `fflush (stdout)'.  This
7915         ensures that output lines aren't intermangled with those sent to
7916         stderr (via grub_util_info()).
7917         * util/grub-probe.c (grub_refresh): Likewise.
7918         * util/i386/pc/grub-setup.c (grub_refresh): Likewise.
7920 2008-05-05  Christian Franke  <franke@computer.org>
7922         * util/grub-mkdevicemap.c (get_floppy_disk_name) [__CYGWIN__]:
7923         Add Cygwin device names.
7924         (get_ide_disk_name) [__CYGWIN__]: Likewise.
7925         (get_scsi_disk_name) [__CYGWIN__]: Likewise.
7926         (check_device): Return error instead of success on empty name.
7927         (make_device_map): Move label inside linux specific code to
7928         prevent compiler warning.
7930 2008-04-30  Robert Millan  <rmh@aybabtu.com>
7932         Based on patch from Fabian Greffrath <greffrath@leat.rub.de>
7933         * util/grub.d/10_linux.in: Add ${GRUB_CMDLINE_LINUX_DEFAULT} to the
7934         first boot option.
7935         * util/update-grub.in: Export GRUB_CMDLINE_LINUX_DEFAULT.
7937 2008-04-29  Robert Millan  <rmh@aybabtu.com>
7939         * docs/grub.cfg: New file (example GRUB configuration).
7941 2008-04-26  Robert Millan  <rmh@aybabtu.com>
7943         * DISTLIST: Sort (sort -u < DISTLIST | sponge DISTLIST).  Add
7944         `loader/i386/ieee1275/linux.c', `loader/i386/ieee1275/linux_normal.c'
7945         and `disk/ieee1275/nand.c'.
7947 2008-04-25  Bean  <bean123ch@gmail.com>
7949         * Makefile.in (RMKFILES): Add missing arch i386-ieee1275 and
7950         i386-linuxbios.
7952         * commands/hexdump.c (grub_cmd_hexdump): Support dumping of device,
7953         change the buffer size to 4096 for cdrom device.
7955         * conf/i386-ieee1275.rmk (pkglib_MODULES): Add _linux.mod, linux.mod
7956         and nand.mod.
7957         (_linux_mod_SOURCES): New variable.
7958         (_linux_mod_CFLAGS): Likewise.
7959         (_linux_mod_LDFLAGS): Likewise.
7960         (linux_mod_SOURCES): Likewise.
7961         (linux_mod_CFLAGS): Likewise.
7962         (linux_mod_LDFLAGS): Likewise.
7963         (nand_mod_SOURCES): Likewise.
7964         (nand_mod_CFLAGS): Likewise.
7965         (nand_mod_LDFLAGS): Likewise.
7967         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Return
7968         GRUB_ERR_UNKNOWN_DEVICE instead of GRUB_ERR_BAD_DEVICE if no device
7969         type property. (nand device in olpc don't have this property)
7971         * include/grub/disk.h (grub_disk_dev_id): New macro
7972         GRUB_DISK_DEVICE_NAND_ID.
7974         * include/grub/i386/ieee1275/loader.h (grub_rescue_cmd_linux): New
7975         function prototype.
7976         (grub_rescue_cmd_initrd): Likewise.
7978         * include/grub/i386/linux.h (GRUB_LINUX_OFW_SIGNATURE): New macro.
7979         (linux_kernel_params): Add new member ofw_signature, ofw_num_items,
7980         ofw_cif_handler and ofw_idt, adjust padding number.
7982         * include/grub/i386/pc/memory.h (grub_upper_mem): Export it if
7983         GRUB_MACHINE_IEEE1275 is defined.
7985         * include/grub/ieee1275/ieee1275.h (grub_available_iterate):
7986         Use NESTED_FUNC_ATTR attribute on the hook parameter.
7988         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Use NESTED_FUNC_ATTR
7989         on nested function heap_init.
7990         (grub_upper_mem): New variable for i386-ieee1275.
7991         (grub_get_extended_memory): New function for i386-ieee1275.
7992         (grub_machine_init): Call grub_get_extended_memory for i386-ieee1275.
7994         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Use
7995         NESTED_FUNC_ATTR on the hook parameter. Don't quit if no device type
7996         property.
7998         * loader/i386/ieee1275/linux.c: New file.
8000         * loader/i386/ieee1275/linux_normal.c: New file.
8002         * disk/ieee1275/nand.c: New file.
8004 2008-04-18  Thomas Schwinge  <tschwinge@gnu.org>
8006         * util/i386/pc/grub-mkrescue.in (grub_mkimage): Don't overwrite correct
8007         value.
8008         * util/powerpc/ieee1275/grub-mkrescue.in (grub_mkimage): Likewise.
8010 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8012         Restructures early code path on ieee1275 to unify grub_main() as
8013         the first C function that is executed in every platform.
8015         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_init): New prototype.
8016         * kern/i386/ieee1275/startup.S (_start): Jump to grub_main() instead of
8017         cmain().
8018         * kern/powerpc/ieee1275/crt0.S (_start): Likewise.
8019         * kern/ieee1275/cmain.c (cmain): Rename to ...
8020         * kern/ieee1275/cmain.c (grub_ieee1275_init): ... this.
8021         * kern/ieee1275/init.c (grub_machine_init): Call grub_ieee1275_init()
8022         at the beginning.
8024 2008-04-18  Robert Millan  <rmh@aybabtu.com>
8026         * util/update-grub.in: Fix syntax error when setting
8027         `GRUB_PRELOAD_MODULES'.
8028         Reported by Stephane Chazelas <stephane@artesyncp.com>
8030 2008-04-17  Lubomir Kundrak  <lkundrak@redhat.com>
8032         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): take only .text
8033         section into account, newer toolchains generate unique build ids
8034         * configure.ac: remove the test for --build-id=none acceptance,
8035         we want build ids to be preserved
8036         * genmk.rb: add -R .note.gnu.build-id to objcopy, so build id
8037         far from other sections don't cause the raw binary images grow
8038         size
8040 2008-04-15  Robert Millan  <rmh@aybabtu.com>
8042         * disk/lvm.c: Update copyright year.
8043         * kern/misc.c: Likewise.
8045 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8047         * disk/lvm.c (grub_lvm_scan_device): Add forgotten failure path when
8048         there is no memory left for physical volume name.
8050 2008-04-14  Vesa Jaaskelainen  <chaac@nic.fi>
8052         * disk/lvm.c (grub_lvm_scan_device): Fix logical volume's physical
8053         volume name mapping to support bigger than 9 character names properly.
8055 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8057         * disk/i386/pc/biosdisk.c (grub_biosdisk_rw): Fix CHS limit check,
8058         as per http://www.allensmith.net/Storage/HDDlimit/Int13h.htm
8060 2008-04-13  Christian Franke  <franke@computer.org>
8062         * util/i386/pc/grub-mkrescue.in: Add --emulation=floppy
8063         to create a floppy emulation boot CD when non emulation mode
8064         does not work.
8065         Enable Joliet CD filesystem extension.
8067 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8069         * kern/misc.c (grub_strncat): Fix off-by-one error.
8070         Reported by Zhang Huan <zhanghuan@nrchpc.ac.cn>
8072         * kern/env.c (grub_env_context_close): Clear current context, not
8073         previous one.
8074         Patch from Zhang Huan <zhanghuan@nrchpc.ac.cn>
8076         * kern/misc.c (grub_strcat): Minor speed optimization (same code size).
8078 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8080         Improve robustness when handling LVM.
8082         * disk/lvm.c (grub_lvm_getvalue): Return 0 when `*p' is NULL
8083         (and leave `*p' unmodified).
8084         (grub_lvm_iterate): Don't assume `vg->lvs != NULL' when iterating
8085         through it.
8086         (grub_lvm_memberlist): Don't assume `lv->vg->pvs != NULL' when
8087         iterating through it.
8088         (grub_lvm_open): Don't assume `vg->lvs != NULL' when iterating
8089         through it.
8090         (grub_lvm_scan_device): Check the return value (and fail gracefully
8091         when due) on each grub_lvm_getvalue() or grub_strstr() call.
8092         Don't assume `vg->pvs != NULL' when iterating through it.
8094 2008-04-13  Robert Millan  <rmh@aybabtu.com>
8096         * gendistlist.sh (EXTRA_DISTFILES): Add `genpartmaplist.sh'.
8097         * genmk.rb (partmap): New variable.
8098         (CLEANFILES, PARTMAPFILES): Add #{partmap}.
8099         (#{partmap}): New target rule.
8100         * genpartmaplist.sh: New file.
8101         * Makefile.in (pkglib_DATA): Add partmap.lst.
8102         (partmap.lst): New target rule.
8103         * util/i386/pc/grub-mkrescue.in: Generate grub.cfg that loads needed
8104         modules (including all partition maps), instead of preloading them.
8106 2007-04-13  Fabian Greffrath  <fabian.greffrath@web.de>
8108         * util/grub.d/30_os-prober.in: New script. Use `os-prober' and
8109         `linux-boot-prober' (if installed) to detect other operating
8110         systems which are installed on the computer and add them to
8111         the boot menu.
8112         * conf/common.rmk: Build and install 30_os-prober.
8114 2008-04-12  Robert Millan  <rmh@aybabtu.com>
8116         * kern/powerpc/ieee1275/init.c: Move from here ...
8117         * kern/ieee1275/init.c: ... to here.  Update all users.
8119         * kern/powerpc/ieee1275/cmain.c: Move from here ...
8120         * kern/ieee1275/cmain.c: ... to here.  Update all users.
8122         * kern/powerpc/ieee1275/openfw.c: Move from here ...
8123         * kern/ieee1275/openfw.c: ... to here.  Update all users.
8125         * loader/powerpc/ieee1275/multiboot2.c: Move from here ...
8126         * loader/ieee1275/multiboot2.c: ... to here.  Update all users.
8128 2008-04-10  Pavel Roskin  <proski@gnu.org>
8130         * configure.ac: Always use "_cv_" in cache variables for
8131         compatibility with Autoconf 2.62.
8133 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8135         Revert grub/machine/init.h addition by Pavel (since it breaks on
8136         i386-ieee1275 and others):
8137         * util/i386/pc/misc.c: Remove grub/machine/init.h.
8138         * util/powerpc/ieee1275/misc.c: Likewise.
8140 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8142         * util/grub-probe.c (probe): Improve error message.
8144 2008-04-07  Robert Millan  <rmh@aybabtu.com>
8146         * util/biosdisk.c (read_device_map): Skip devices that don't exist
8147         (this prevents the presence of a bogus entry from ruining the whole
8148         thing).
8150 2008-04-06  Pavel Roskin  <proski@gnu.org>
8152         * util/biosdisk.c: Include grub/util/biosdisk.h.
8153         * util/grub-fstest.c (execute_command): Make static.
8154         * util/grub-mkdevicemap.c (check_device): Likewise.
8155         * util/i386/pc/misc.c: Include grub/machine/init.h.
8156         * util/powerpc/ieee1275/misc.c: Likewise.
8157         * util/lvm.c: Include grub/util/lvm.h.
8158         * util/misc.c: Include grub/kernel.h, grub/misc.h and
8159         grub/cache.h.
8160         * util/raid.c: Include grub/util/raid.h.
8161         (grub_util_getdiskname): Make static.
8163         * util/grub-emu.c (main): Remove calls to grub_hostfs_init() and
8164         grub_hostfs_fini(), as they are called from grub_init_all() and
8165         grub_fini_all() respectively.  This fixes an infinite loop in
8166         grub-fstest due to double registration of hostfs.
8167         Reported by Christian Franke <Christian.Franke@t-online.de>
8169 2008-04-05  Pavel Roskin  <proski@gnu.org>
8171         * bus/pci.c (grub_pci_iterate): For multifunction devices, probe
8172         all 8 functions.  Otherwise, probe function 0 only.
8174 2008-04-04  Pavel Roskin  <proski@gnu.org>
8176         * commands/lspci.c (grub_lspci_iter): Print the bus number
8177         correctly.
8179         * commands/lspci.c (grub_pci_classes): Fix typos.
8180         (grub_lspci_iter): Don't print func twice.  Print vendor ID
8181         before device ID, as it's normally done.
8183         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
8184         Fix signedness warnings.
8185         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate):
8186         Likewise.
8187         * util/ieee1275/get_disk_name.c: Include config.h so that
8188         _GNU_SOURCE is defined and getline() is declared.  Mark an
8189         unused argument as such.  Fix a signedness warning.
8191 2008-04-02  Pavel Roskin  <proski@gnu.org>
8193         * genkernsyms.sh.in: Use more robust assignments for CC and
8194         srcdir.  Quote srcdir.
8195         * gensymlist.sh.in: Likewise.  Assert at the compile time that
8196         the symbol table is not empty.
8198         * disk/raid.c (grub_raid_memberlist): Fix a signedness warning.
8199         * fs/cpio.c (grub_cpio_read): Likewise.
8201 2008-04-01  Pavel Roskin  <proski@gnu.org>
8203         * disk/ata.c (grub_ata_open): Don't lose precision in disk->id.
8204         * disk/host.c (grub_host_open): Likewise.
8205         * disk/loopback.c (grub_loopback_open): Likewise.
8206         * disk/memdisk.c (grub_memdisk_open): Use a string pointer for
8207         disk->id as in disk/host.c, not a multi-character constant.
8209         * util/grub-fstest.c (cmd_cmp): Use fseeko(), not fseek().  The
8210         later is obsolete, potentially dangerous and sets a bad example.
8211         * util/i386/efi/grub-mkimage.c (make_header): Likewise.
8212         * util/misc.c (grub_util_get_image_size): Likewise.
8214         * disk/loopback.c (options): Improve help for "--partitions".
8216         * normal/arg.c (grub_arg_show_help): Fix spacing of the long
8217         options to align them with the short options, e.g. "echo -e".
8219 2008-03-31  Bean  <bean123ch@gmail.com>
8221         * video/reader/png.c (grub_png_data): New member is_16bit and
8222         image_data.
8223         (grub_png_decode_image_header): Detect 16 bit png image.
8224         (grub_png_convert_image): New function to convert 16 bit image to 8 bit.
8225         (grub_png_decode_png): Call grub_png_convert_image for 16 bit image.
8226         (grub_video_reader_png): Release memory occupied by image_data.
8228         * fs/ntfs.c (find_attr): Handle non-resident attribute list larger than
8229         4096 bytes.
8230         (grub_nfs_mount): Skip the test for sector per cluster.
8232         * include/grub/ntfs.h (MAX_SPC): Removed.
8234 2008-03-31  Bean  <bean123ch@gmail.com>
8236         * conf/common.rmk (pkgdata_MODULES): Add afs.mod.
8237         (grub_probe_SOURCES): Add fs/afs.c.
8238         (grub_fstest_SOURCES): Likewise.
8239         (afs_mod_SOURCES): New variable.
8240         (afs_mod_CFLAGS): Likewise.
8241         (afs_mod_LDFLAGS): Likewise.
8243         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/afs.c.
8244         (grub_emu_SOURCES): Likewise.
8246         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8248         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8250         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8252         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8254         * fs/afs.c: New file.
8256 2008-03-30  Pavel Roskin  <proski@gnu.org>
8258         * disk/host.c: Include grub/misc.h to fix a warning.
8259         * util/hostfs.c: Use GRUB_MOD_INIT and GRUB_MOD_FINI to fix
8260         warnings about implicit declarations.
8262         * fs/udf.c (grub_udf_mount): Fix warning about a shadowing a
8263         variable.
8264         * include/grub/i386/loader.h: Change declaration of
8265         grub_linux_boot() to match what grub_loader_set() expects.
8266         * util/getroot.c (grub_guess_root_device): Return const char* to
8267         fix a warning.
8268         * util/grub-probe.c (probe): Fix a warning about uninitialized
8269         abstraction_name variable.
8270         * util/i386/get_disk_name.c (grub_util_get_disk_name): Mark
8271         second argument as unused to fix a warning.
8273         * loader/i386/pc/multiboot2.c (grub_mb2_arch_elf64_hook): Add
8274         missing grub_error() call.
8276         * util/update-grub_lib.in: Define datarootdir, since Autoconf
8277         2.60 and newer uses it to define datadir.
8279         * commands/sleep.c: Fix warning about implicit declaration.
8280         * disk/memdisk.c: Likewise.
8281         * loader/aout.c: Likewise.
8282         * loader/i386/bsd_normal.c: Likewise.
8283         * util/grub-probe.c: Likewise.
8285         * commands/i386/cpuid.c (has_longmode): Make static.
8286         * disk/i386/pc/biosdisk.c (cd_drive): Likewise.
8287         * include/grub/i386/bsd.h (bios_memmap_t): Remove, it's unused.
8289         * kern/i386/pc/startup.S (real_to_prot): Use %cs prefix to load
8290         GDT.  This is more robust, as %ds can change.
8291         (grub_biosdisk_rw_int13_extensions): Don't clear %ds before
8292         calling real_to_prot().
8293         (grub_biosdisk_get_diskinfo_int13_extensions): Likewise.
8295 2008-03-28  Pavel Roskin  <proski@gnu.org>
8297         * kern/i386/pc/startup.S: Assert that uncompressed functions
8298         don't spill beyond GRUB_KERNEL_MACHINE_RAW_SIZE.
8299         * kern/i386/pc/lzo1x.S: Remove all .align directives in the
8300         code, as they push parts of the code (error handlers) beyond
8301         GRUB_KERNEL_MACHINE_RAW_SIZE.  Speed is not as important in this
8302         code as correctness and size.
8304 2008-03-28  Pavel Roskin  <proski@gnu.org>
8306         * kern/i386/pc/startup.S
8307         (grub_biosdisk_get_diskinfo_int13_extensions): When converting
8308         data block address to the real mode, keep offset minimal.  This
8309         works around a bug in AWARD BIOS on old Athlon systems, which
8310         makes CD detection hang.
8312 2008-03-26  Pavel Roskin  <proski@gnu.org>
8314         * normal/color.c (grub_parse_color_name_pair): Make `name' a
8315         const.
8316         * include/grub/normal.h: Add grub_parse_color_name_pair()
8317         declaration.
8319 2008-03-24  Bean  <bean123ch@gmail.com>
8321         * disk/i386/pc/biosdisk.c (cd_start): Removed.
8322         (cd_count): Removed.
8323         (cd_drive): New variable.
8324         (grub_biosdisk_get_drive): Don't check for (cdN) device.
8325         (grub_biosdisk_call_hook): Likewise.
8326         (grub_biosdisk_iterate): Change cdrom detection method.
8327         (grub_biosdisk_open): Replace cd_start with cd_drive.
8328         (GRUB_MOD_INIT): Use grub_biosdisk_get_cdinfo_int13_extension to
8329         detect cdrom device.
8331         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_MACHINE_CDROM_START):
8332         Removed.
8333         (GRUB_BIOSDISK_MACHINE_CDROM_END): Removed.
8334         (GRUB_BIOSDISK_CDTYPE_NO_EMUL): New macro.
8335         (GRUB_BIOSDISK_CDTYPE_1_2_M): Likewise.
8336         (GRUB_BIOSDISK_CDTYPE_1_44_M): Likewise.
8337         (GRUB_BIOSDISK_CDTYPE_2_88_M): Likewise.
8338         (GRUB_BIOSDISK_CDTYPE_HARDDISK): Likewise.
8339         (GRUB_BIOSDISK_CDTYPE_MASK): Likewise.
8340         (grub_biosdisk_cdrp): New structure.
8341         (grub_biosdisk_get_cdinfo_int13_extensions): New function.
8343         * include/grub/i386/pc/kernel.h (grub_boot_drive): Export this variable.
8345         * kern/i386/pc/init.c (make_install_device): Don't use (cdN) as root
8346         device.
8348         * kern/i386/pc/startup.S (grub_biosdisk_get_cdinfo_int13_extensions):
8349         New function.
8351 2008-03-20  Robert Millan  <rmh@aybabtu.com>
8353         Remove 2 TiB limit in ata.mod.
8354         * disk/ata.c (grub_ata_device): Promote `size' to grub_uint64_t.
8355         (grub_ata_dumpinfo): Print sector count with 0x%llx.
8356         (grub_ata_identify): Interpret `&info16[100]' as a pointer to
8357         grub_uint64_t instead of grub_uint32_t.
8359 2008-03-05  Bean  <bean123ch@gmail.com>
8361         * loader/i386/pc/multiboot.c (grub_multiboot_get_bootdev): New function.
8362         (grub_multiboot): Set boot device.
8364         * boot/i386/pc/lnxboot.S (real_code_2): Set %dh to 0xFF.
8366 2008-03-02  Bean  <bean123ch@gmail.com>
8368         * fs/reiserfs.c (grub_reiserfs_read_symlink): Add 0 at the end of
8369         symlink_buffer.
8371 2008-03-01  Yoshinori K. Okuji  <okuji@enbug.org>
8373         * DISTLIST: Added docs/fdl.texi, docs/grub.texi, docs/mdate-sh and
8374         texinfo.tex.
8376         * docs/grub.texi: New file. Copied from GRUB Legacy, and slightly
8377         modified.
8379         * docs/fdl.texi: New file.
8381         * docs/mdate-sh: New file. Copied from gnulib.
8382         * docs/texinfo.tex: Likewise.
8384         * config.guess: Updated from gnulib.
8385         * install-sh: Likewise.
8387 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8389         * conf/i386-linuxbios.rmk (pkglib_MODULES): Add aout.mod.
8390         (aout_mod_SOURCES): New variable.
8391         (aout_mod_CFLAGS): Likewise.
8392         (aout_mod_LDFLAGS): Likewise.
8394         * conf/i386-ieee1275.rmk: Likewise.
8396 2008-02-28  Robert Millan  <rmh@aybabtu.com>
8398         * util/update-grub.in: Reorganise terminal validity check.  Accept
8399         `ieee1275:console' (OLPC) and `*:gfxterm' as valid too.
8400         Based on suggestion by Franklin PIAT.
8402 2008-02-28  Fabian Greffrath  <greffrath@leat.rub.de>
8404         * include/grub/util/getroot.h (grub_util_check_block_device): Export new
8405         function.
8406         * util/getroot.c (grub_util_check_block_device): New function that
8407         returns the given argument if it is a block device and returns NULL else.
8408         * util/grub-probe.c (argument_is_device): New variable.
8409         (probe): Promote device_name from a variable to an argument. Receive
8410         device_name from grub_util_check_block_device() if path is NULL and from
8411         grub_guess_root_device() else. Do not free() device_name anymore.
8412         (options): Introduce new parameter '-d, --device'.
8413         (main): Add description of the new parameter to the help screen.
8414         Rename path variable to argument. Set argument_is_device if the '-d'
8415         option is given. Pass argument to probe() depending on
8416         argument_is_device.
8418 2008-02-24  Bean  <bean123ch@gmail.com>
8420         * fs/iso9660.c (GRUB_ISO9660_VOLDESC_BOOT): New macro.
8421         (GRUB_ISO9660_VOLDESC_PRIMARY): Likewise.
8422         (GRUB_ISO9660_VOLDESC_SUPP): Likewise.
8423         (GRUB_ISO9660_VOLDESC_PART): Likewise.
8424         (GRUB_ISO9660_VOLDESC_END): Likewise.
8425         (grub_iso9660_primary_voldesc): New member escape.
8426         (grub_iso9660_data): New member joliet.
8427         (grub_iso9660_convert_string): New function.
8428         (grub_iso9660_mount): Detect joliet extension.
8429         (grub_iso9660_iterate_dir): Convert filename when joliet is detected.
8430         (grub_iso9660_iso9660_label): Likewise.
8432         * conf/common.rmk (pkgdata_MODULES): Add udf.mod.
8433         (grub_setup_SOURCES): Add fs/udf.c.
8434         (grub_fstest_SOURCES): Likewise.
8435         (udf_mod_SOURCES): New variable.
8436         (udf_mod_CFLAGS): Likewise.
8437         (udf_mod_LDFLAGS): Likewise.
8439         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/udf.c.
8440         (grub_emu_SOURCES): Likewise.
8442         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
8444         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8446         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8448         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8450         * fs/udf.c: New file.
8452 2008-02-24  Robert Millan  <rmh@aybabtu.com>
8454         * conf/i386-efi.rmk (normal/function.c_DEPENDENCIES)
8455         (normal/lexer.c_DEPENDENCIES): New variables.
8456         * conf/i386-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8457         (normal/lexer.c_DEPENDENCIES): Likewise.
8458         * conf/i386-linuxbios.rmk (normal/function.c_DEPENDENCIES)
8459         (normal/lexer.c_DEPENDENCIES): Likewise.
8460         * conf/i386-pc.rmk (normal/function.c_DEPENDENCIES)
8461         (normal/lexer.c_DEPENDENCIES): Likewise.
8462         * conf/powerpc-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8463         (normal/lexer.c_DEPENDENCIES): Likewise.
8464         * conf/sparc64-ieee1275.rmk (normal/function.c_DEPENDENCIES)
8465         (normal/lexer.c_DEPENDENCIES): Likewise.
8467 2008-02-23  Robert Millan  <rmh@aybabtu.com>
8469         * partmap/gpt.c (grub_gpt_magic): Add `0x' qualifier to each member,
8470         since they were intended to be in hex.  This didn't break previously
8471         because of a bug in gpt_partition_map_iterate() (see below).
8473         (gpt_partition_map_iterate): Replace `grub_memcmp' with `! grub_memcmp'
8474         when checking the validity of GPT header.
8475         Remove `partno', since it always provides the same information as `i'.
8477 2008-02-21  Yoshinori K. Okuji  <okuji@enbug.org>
8479         * include/grub/efi/time.h: Fix a wrong comment.
8481 2008-02-19  Pavel Roskin  <proski@gnu.org>
8483         * kern/rescue.c (grub_enter_rescue_mode): Improve initial
8484         message.
8486 2008-02-19  Bean  <bean123ch@gmail.com>
8488         * conf/i386-pc.rmk (pkglib_MODULES): Add aout.mod _bsd.mod and bsd.mod.
8489         (aout_mod_SOURCES): New variable.
8490         (aout_mod_CFLAGS): Likewise.
8491         (aout_mod_LDFLAGS): Likewise.
8492         (_bsd_mod_SOURCES): New variable.
8493         (_bsd_mod_CFLAGS): Likewise.
8494         (_bsd_mod_LDFLAGS): Likewise.
8495         (bsd_mod_SOURCES): New variable.
8496         (bsd_mod_CFLAGS): Likewise.
8497         (bsd_mod_LDFLAGS): Likewise.
8499         * include/grub/aout.h: New file.
8501         * include/grub/i386/loader.h (grub_unix_real_boot): New function.
8503         * include/grub/i386/bsd.h: New file.
8505         * include/grub/i386/pc/init.h (grub_get_mmap_entry): Use EXPORT_FUNC
8506         to make it public.
8508         * kern/elf.c (grub_elf32_load): Get the physical address after the hook
8509         function is called, so that it's possible to change it inside the hook.
8510         (grub_elf64_load): Likewise.
8511         (grub_elf_file): Don't close the file if elf header is not found.
8512         (grub_elf_close): Close the file if grub_elf_file fails (The new
8513         grub_elf_file won't close it).
8514         (grub_elf32_size): Use NESTED_FUNC_ATTR for nested function calcsize.
8515         (grub_elf64_size): Likewise.
8517         * kern/i386/loader.S (grub_unix_real_boot): New function.
8519         * loader/aout.c: New file.
8521         * loader/i386/bsd.c: New file.
8523         * loader/i386/bsd_normal.c: New file.
8525         * loader/i386/pc/multiboot.c (grub_multiboot): Handle a.out format.
8527         * loader/multiboot2.c (grub_multiboot2): Reset grub_errno so that it
8528         can test other formats.
8530 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8532         * partmap/gpt.c: Include `<grub/gpt_partition.h>'.
8533         (grub_gpt_partition_type_empty): Redefine with macro from
8534         `<grub/gpt_partition.h>'.
8535         (gpt_partition_map_iterate): Adjust partition type comparison.
8537         Export `entry' as partmap-specific `part.data' struct.
8538         (grub_gpt_header, grub_gpt_partentry): Move from here ...
8540         * include/grub/gpt_partition.h (grub_gpt_header)
8541         (grub_gpt_partentry): ... to here (new file).
8543         * util/i386/pc/grub-setup.c: Include `<grub/gpt_partition.h>'.
8545         (grub_gpt_partition_type_bios_boot): New const variable, defined
8546         with macro from `<grub/gpt_partition.h>'.
8548         (setup): Replace `first_start' with `embed_region', which keeps
8549         track of the embed region (and is partmap-agnostic).
8551         Replace find_first_partition_start() with find_usable_region(),
8552         which finds a usable region for embedding using partmap-specific
8553         knowledge (supports PC/MSDOS and GPT).
8555         Fix all assumptions that the embed region start at sector 1, using
8556         `embed_region.start' from now on.  Similarly, use `embed_region.end'
8557         rather than `first_start' to calculate available size.
8559         In grub_util_info() message, replace "into after the MBR" with an
8560         indication of the specific sector our embed region starts at.
8562 2008-02-19  Robert Millan  <rmh@aybabtu.com>
8564         * DISTLIST: Replace `commands/ieee1275/halt.c' and
8565         `commands/ieee1275/reboot.c' with `commands/halt.c' and
8566         `commands/reboot.c'.
8567         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8568         (halt_mod_SOURCES): Likewise.
8569         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES, reboot_mod_SOURCES)
8570         (halt_mod_SOURCES): Likewise.
8572 2008-02-17  Christian Franke  <franke@computer.org>
8574         * commands/cat.c (grub_cmd_cat): Add break on GRUB_TERM_ESC key.
8576 2008-02-17  Robert Millan  <rmh@aybabtu.com>
8578         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8579         set `first_start' to 0 for non-PC/MSDOS partition maps.
8581 2008-02-16  Robert Millan  <rmh@aybabtu.com>
8583         * util/i386/pc/grub-setup.c (setup): In find_first_partition_start(),
8584         do not assume partition map is PC/MSDOS before performing checks that
8585         are specific to that layout.
8587 2008-02-13  Robert Millan  <rmh@aybabtu.com>
8589         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Remove
8590         `commands/i386/pc/halt.c' and `commands/i386/pc/reboot.c'.
8591         * kern/i386/linuxbios/init.c (grub_halt, grub_reboot): Remove stubs.
8593 2008-02-13  Yoshinori K. Okuji  <okuji@enbug.org>
8595         * configure.ac: Only a cosmetic change on the handling of
8596         -fno-stack-protector.
8598 2008-02-12  Alexandre Boeglin  <alex@boeglin.org>
8600         * conf/i386-efi.rmk (grub_emu_SOURCES): Replace
8601         commands/i386/pc/halt.c and reboot.c by commands/halt.c and
8602         reboot.c.
8603         (grub_install_SOURCES): Add halt.mod and reboot.mod.
8604         (halt_mod_SOURCES): New variable.
8605         (halt_mod_CFLAGS): Likewise.
8606         (halt_mod_LDFLAGS): Likewise.
8607         (reboot_mod_SOURCES): Likewise.
8608         (reboot_mod_CFLAGS): Likewise.
8609         (reboot_mod_LDFLAGS): Likewise.
8611         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Replace
8612         commands/ieee1275/halt.c and reboot.c by commands/halt.c and
8613         reboot.c.
8614         (halt_mod_SOURCES): Likewise.
8615         (reboot_mod_SOURCES): Likewise.
8617         * conf/i386-pc.rmk (grub_emu_SOURCES): Replace
8618         commands/i386/pc/reboot.c by commands/reboot.c.
8619         (reboot_mod_SOURCES): Likewise.
8621         * commands/i386/pc/reboot.c: merge this file ...
8623         * commands/ieee1275/reboot.c: ... and this file ...
8625         * commands/reboot.c: ... to this file.
8626         Add some precompiler directive to include the correct header for
8627         each machine.
8629         * commands/ieee1275/halt.c: move this file ...
8631         * commands/halt.c: ... to here.
8632         Add some precompiler directive to include the correct header for
8633         each machine.
8635         * include/grub/efi/efi.h (grub_reboot): New function declaration.
8636         (grub_halt): Likewise.
8638         * kern/efi/efi.c (grub_reboot): New function.
8639         (grub_halt): Likewise.
8641 2008-02-12  Robert Millan  <rmh@aybabtu.com>
8643         * util/getroot.c (grub_guess_root_device): Inspect /dev/evms before
8644         /dev (like it is done for /dev/mapper).  This doesn't provide support
8645         for EVMS, but at least it is now easy to identify the problem when it
8646         arises.
8648 2008-02-11  Robert Millan  <rmh@aybabtu.com>
8650         * util/biosdisk.c (grub_util_biosdisk_open, linux_find_partition)
8651         (grub_util_biosdisk_get_grub_dev): Check open() exit status by
8652         comparing it with -1, not 0.
8654 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8656         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `disk/raid.c' and
8657         `disk/lvm.c'.
8658         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
8659         * conf/i386-pc.rmk (grub_setup_SOURCES): Likewise.
8661         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Move `disk/raid.c' and
8662         `disk/lvm.c' to the end of the list.
8663         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
8664         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
8666 2008-02-10  Robert Millan  <rmh@aybabtu.com>
8668         * kern/main.c (grub_load_normal_mode): Do not reset `grub_errno'.  Call
8669         grub_print_error() instead.  This will let user know why we're entering
8670         rescue mode.
8671         Based on suggestions from Sam Morris.
8673 2008-02-10  Alexandre Boeglin  <alex@boeglin.org>
8675         * normal/arg.c (grub_arg_parse): If one of the args is "--", call add_arg()
8676         on remaining N args, instead of "--" arg N times.
8678 2008-02-09  Vesa Jaaskelainen  <chaac@nic.fi>
8680         * font/manager.c (unknown_glyph): Added variable for unknown glyph.
8681         (fill_with_default_glyph): Changed to use unknown_glyph for fill
8682         pattern for unknown glyphs.
8684 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8686         * configure.ac: Probe for `help2man'.
8687         * Makefile.in (builddir): New variable.
8688         (HELP2MAN): Likewise.  Set to `true' when @HELP2MAN@ doesn't provide it,
8689         or otherwise add a few flags/options to it.
8690         (install-local): For every executable utility or script that is
8691         installed, invoke $(HELP2MAN) to install a manpage based on --help
8692         output.
8694         * util/i386/pc/grub-install.in: Move down `update-grub_lib' sourcing, so
8695         that it doesn't prevent --help from working in build tree.
8697         * util/i386/pc/grub-mkrescue.in (usage): Replace `grub-devel@gnu.org'
8698         with `bug-grub@gnu.org'.
8699         * util/powerpc/ieee1275/grub-mkrescue.in (usage): Likewise.
8700         * util/update-grub.in (usage): New function.
8701         Implement proper argument check, with support for --help and --version
8702         (as well as existing -y).
8704 2008-02-09  Christian Franke  <franke@computer.org>
8706         * commands/cat.c (grub_cmd_cat): Print '\r' as hex to
8707         avoid overwriting previous output.
8708         * kern/rescue.c (grub_rescue_cmd_cat): Likewise.
8710 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8712         * normal/menu.c (run_menu): If timeout is set to zero, don't bother
8713         drawing the menu.
8715 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8717         * commands/sleep.c: New file.
8718         * conf/common.rmk (pkglib_MODULES): Add `commands/sleep.c'.
8719         (sleep_mod_SOURCES): New variable.
8720         (sleep_mod_CFLAGS): Likewise.
8721         (sleep_mod_LDFLAGS): Likewise.
8723 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8725         * disk/raid.c (grub_raid_scan_device): Add a pair of sanity checks for
8726         situations in which we can deduce the RAID size and the superblock
8727         doesn't match it.
8729 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8731         * disk/lvm.c [GRUB_UTIL] (grub_lvm_memberlist): New function.  Construct
8732         and return a grub_diskmemberlist_t composed of LVM physical volumes.
8733         [GRUB_UTIL] (grub_lvm_dev): Add `memberlist' member.
8735         * disk/raid.c [GRUB_UTIL] (grub_raid_memberlist): New function.  Construct
8736         and return a grub_diskmemberlist_t composed of physical array members.
8737         [GRUB_UTIL] (grub_raid_dev): Add `memberlist' member.
8739         * include/grub/disk.h [GRUB_UTIL] (grub_disk_memberlist): New struct
8740         prototype.
8741         [GRUB_UTIL] (struct grub_disk_dev): Add `memberlist' function pointer.
8742         [GRUB_UTIL] (struct grub_disk_memberlist): New struct declaration.
8743         [GRUB_UTIL] (grub_disk_memberlist_t): New typedef.
8745         * util/grub-probe.c (probe): Move partmap probing code from here ...
8746         (probe_partmap): ... to here.
8747         (probe): Use probe_partmap() once for the disk we're probing, and
8748         additionally, when such disk contains a memberlist() struct member,
8749         once for each disk that is contained in the structure returned by
8750         memberlist().
8752 2008-02-09  Robert Millan  <rmh@aybabtu.com>
8754         * util/grub-probe.c (main): When `verbosity > 1', set `debug'
8755         environment variable to 'all' in order to obtain debug output from
8756         non-util/ code.
8757         * util/i386/pc/grub-setup.c (main): Likewise.
8759 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8761         * disk/raid.c (grub_raid_scan_device): Check for
8762         `array->device[sb.this_disk.number]' rather than for
8763         `array->device[sb.this_disk.number]->name', since the latter is not
8764         guaranteed to be accessible.
8766 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8768         * disk/raid.c: Update copyright.
8769         * fs/cpio.c: Likewise.
8770         * include/grub/raid.h: Likewise.
8771         * loader/i386/pc/multiboot.c: Likewise.
8772         * util/hostfs.c: Likewise.
8774 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8776         * include/grub/raid.h (struct grub_raid_array): Change type of `device'
8777         to a grub_disk_t array.
8778         * disk/raid.c (grub_raid_read): Replace `device[x].disk' accesses with
8779         `device[x]'.
8780         (grub_raid_scan_device): Replace `device[x].name' accesses with
8781         `device[x]->name'.  Simplify initialization of `array->device[x]'.
8783 2008-02-08  Robert Millan  <rmh@aybabtu.com>
8785         * disk/raid.c (grub_raid_open, grub_raid_scan_device): Add a few
8786         grub_dprintf() calls.
8787         * kern/disk.c (grub_disk_read): Include grub_errmsg in out of range
8788         error message.
8790 2008-02-07  Christian Franke  <franke@computer.org>
8792         * util/hostfs.c (grub_hostfs_open): Use fseeko and ftello
8793         instead of fseek and ftell to support large files.
8794         (grub_hostfs_read): Likewise.
8796 2008-02-07  Robert Millan  <rmh@aybabtu.com>
8798         Patch from Jeroen Dekkers.
8799         * disk/raid.c (grub_raid_scan_device): Reset `grub_errno' on disk
8800         failure, since successfully reading all array members might not be
8801         required.
8803 2008-02-06  Robert Millan  <rmh@aybabtu.com>
8805         * util/grub-probe.c (probe): Simplify partmap probing (with the
8806         assumption that the first word up to the underscore equals to
8807         the module name).
8809 2008-02-06  Christian Franke  <franke@computer.org>
8811         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_NONE
8812         (and set *ofs = 0) instead of GRUB_ERR_FILE_NOT_FOUND on
8813         last block of a cpio or tar stream.
8814         Check for "TRAILER!!!" instead of any empty data
8815         block to detect last block of a cpio stream.
8816         (grub_cpio_dir): Fix constness of variable np.
8817         (grub_cpio_open): Return GRUB_ERR_FILE_NOT_FOUND if
8818         cpio or tar trailer is detected.  This fixes a crash
8819         on open of a non existing file.
8821 2008-02-05  Bean  <bean123ch@gmail.com>
8823         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Get physical
8824         address of entry.
8825         (grub_multiboot_load_elf64): Likewise.
8826         (grub_multiboot): Initialize mbi structure.
8828         * util/grub-fstest.c: Don't include unused header file script.h.
8830         * conf/common.rmk (grub-fstest.c_DEPENDENCIES): Move to the beginning
8831         of file.
8832         (grub_fstest_SOURCES): Likewise.
8834 2008-02-05  Robert Millan  <rmh@aybabtu.com>
8836         * include/grub/term.h (GRUB_TERM_LEFT, GRUB_TERM_RIGHT)
8837         (GRUB_TERM_UP, GRUB_TERM_DOWN, GRUB_TERM_HOME, GRUB_TERM_END)
8838         (GRUB_TERM_DC, GRUB_TERM_PPAGE, GRUB_TERM_NPAGE, GRUB_TERM_ESC)
8839         (GRUB_TERM_TAB, GRUB_TERM_BACKSPACE): New macros.
8841         * kern/i386/pc/startup.S: Include `<grub/term.h>'.
8842         (translation_table): Replace hardcoded values with macros
8843         provided by `<grub/term.h>'.
8845         * term/i386/pc/at_keyboard.c: Include `<grub/term.h>'.
8846         (keyboard_map): Correct/add a few values, with macros provided
8847         by `<grub/term.h>'.
8848         (keyboard_map_shift): Zero values that don't differ from their
8849         `keyboard_map' equivalents.
8850         (grub_console_checkkey): Optimize KEYBOARD_STATUS_CAPS_LOCK toggling.
8851         Discard the second scan code that is always sent by Caps lock.
8852         Only use `keyboard_map_shift' when it provides a non-zero value,
8853         otherwise fallback to `keyboard_map'.
8855 2008-02-04  Bean  <bean123ch@gmail.com>
8857         * Makefile.in (enable_grub_fstest): New variable.
8859         * conf/common.rmk (grub_fstest_init.lst): New rule.
8860         (grub_fstest_init.h): Likewise.
8861         (grub_fstest_init.c): Likewise.
8862         (util/grub-fstest.c_DEPENDENCIES): New variable.
8863         (grub_fstest_SOURCES): Likewise.
8865         * configure.ac (enable_grub_fstest): Check for --enable-grub-fstest.
8867         * util/grub-fstest.c: New file.
8869 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8871         Make grub-setup handle a separate root device.
8873         * util/i386/pc/grub-setup.c (setup): Always open the root device,
8874         so that the root device can be compared with the destination
8875         device.
8876         When embedding the core image, if the root and destination devices
8877         are different, set ROOT_DRIVE to ROOT_DEV->DISK->ID. Otherwise, to
8878         0xFF.
8879         When not embedding, set ROOT_DRIVE to 0xFF.
8881 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8883         Add support for having a grub directory in a different drive. This
8884         is still only the data handling part.
8886         * kern/i386/pc/startup.S (multiboot_trampoline): Set %dh to 0xFF.
8887         (codestart): Save %dh in GRUB_ROOT_DRIVE.
8888         (grub_root_drive): New variable.
8890         * kern/i386/pc/init.c (make_install_device): Use GRUB_ROOT_DRIVE
8891         instead of GRUB_BOOT_DRIVE to construct a device name. Set
8892         GRUB_ROOT_DRIVE to GRUB_BOOT_DRIVE if it is 0xFF, otherwise use it
8893         as it was.
8895         * include/grub/i386/pc/kernel.h (grub_root_drive): New prototype.
8897         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_ROOT_DRIVE): New
8898         macro.
8899         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Set to 0x4f.
8901         * boot/i386/pc/pxeboot.S (_start): Set %dh to 0xFF. For now, this
8902         is bogus, because PXE booting does not specify any drive
8903         correctly.
8905         * boot/i386/pc/lnxboot.S (reg_edx): Set the second byte to 0xFF. I
8906         am not sure if this is really correct.
8908         * boot/i386/pc/cdboot.S: Set %dh to 0xFF, because the root drive
8909         is always identical to the boot drive when booting from a CD.
8911         * boot/i386/pc/boot.S (MOV_MEM_TO_AL): Removed. Not needed any
8912         longer.
8913         (root_drive): New variable.
8914         (real_start): Unconditionally set %dh to ROOT_DRIVE.
8915         (setup_sectors): Push %dx right after popping it, because %dh will
8916         be modified later.
8917         (copy_buffer): Restore %dx.
8919 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8921         * util/i386/pc/grub-mkrescue.in: Rewrite most of image generation to
8922         use `cdboot.img' for cdrom images.
8924 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8926         * util/grub.d/00_header.in: Issue scripting commands for GRUB to
8927         only setup gfxterm when `font' command has succeeded.
8929 2008-02-03  Robert Millan  <rmh@aybabtu.com>
8931         * loader/multiboot_loader.c [GRUB_MACHINE_LINUXBIOS]
8932         (grub_rescue_cmd_multiboot_loader)
8933         (grub_rescue_cmd_module_loader): Enable multiboot1 calls.
8935 2008-02-03  Pavel Roskin  <proski@gnu.org>
8937         * kern/i386/pc/startup.S (grub_chainloader_real_boot): Pop
8938         %edx and %esi from stack only after grub_gate_a20() is called.
8939         grub_gate_a20() clobbers %edx.
8941 2008-02-03  Yoshinori K. Okuji  <okuji@enbug.org>
8943         * configure.ac (AC_INIT): Bumped to 1.96.
8945         * DISTLIST: Added boot/i386/pc/cdboot.S, bus/pci.c,
8946         commands/lspci.c,disk/memdisk.c, include/grub/pci.h,
8947         include/grub/i386/pc/pci.h, video/readers/jpeg.c, and
8948         video/readers/png.c.
8950 2008-02-03  Bean  <bean123ch@gmail.com>
8952         * conf/i386-pc.rmk (pkglib_IMAGES): Add cdboot.img.
8953         (cdboot_img_SOURCES): New variable.
8954         (cdboot_img_ASFLAGS): New variable.
8955         (cdboot_img_LDFLAGS): New variable.
8957         * boot/i386/pc/cdboot.S: New file.
8959         * disk/i386/pc/biosdisk.c (cd_start): New variable.
8960         (cd_count): Likewise.
8961         (grub_biosdisk_get_drive): Add support for cd device.
8962         (grub_biosdisk_call_hook): Likewise.
8963         (grub_biosdisk_iterate): Likewise.
8964         (grub_biosdisk_open): Likewise.
8965         (GRUB_BIOSDISK_CDROM_RETRY_COUNT): New macro.
8966         (grub_biosdisk_rw): Support reading from cd device.
8967         (GRUB_MOD_INIT): Iterate cd devices.
8969         * include/grub/i386/pc/biosdisk.h (GRUB_BIOSDISK_FLAG_CDROM): New macro.
8970         (GRUB_BIOSDISK_MACHINE_CDROM_START): Likewise.
8971         (GRUB_BIOSDISK_MACHINE_CDROM_END): Likewise.
8973         * kern/i386/pc/init.c (make_install_device): Check for cd device.
8975 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8977         * commands/read.c: New file.
8978         * conf/common.rmk (pkglib_MODULES): Add `commands/read.c'.
8979         (read_mod_SOURCES): New variable.
8980         (read_mod_CFLAGS): Likewise.
8981         (read_mod_LDFLAGS): Likewise.
8983 2008-02-02  Robert Millan  <rmh@aybabtu.com>
8985         * normal/main.c (grub_normal_execute): Check for `menu->size' when
8986         determining whether menu has to be displayed.
8988 2008-02-02  Marco Gerards  <marco@gnu.org>
8990         * bus/pci.c: New file.
8992         * include/grub/pci.h: Likewise.
8994         * include/grub/i386/pc/pci.h: Likewise.
8996         * commands/lspci.c: Likewise.
8998         * conf/i386-pc.rmk (pkglib_MODULES): Add `pci.mod' and
8999         `lspci.mod'.
9000         (pci_mod_SOURCES): New variable.
9001         (pci_mod_CFLAGS): Likewise.
9002         (pci_mod_LDFLAGS): Likewise.
9003         (lspci_mod_SOURCES): Likewise.
9004         (lspci_mod_CFLAGS): Likewise.
9005         (lspci_mod_LDFLAGS): Likewise.
9007 2008-02-02  Bean  <bean123ch@gmail.com>
9009         * fs/ufs.c (INODE_BLKSZ): Fix incorrect value.
9010         (grub_ufs_get_file_block): Fix indirect block calculation problem.
9012         * fs/xfs.c (grub_xfs_sblock): New member log2_dirblk.
9013         (grub_xfs_btree_node): New structure.
9014         (grub_xfs_btree_root): New structure.
9015         (grub_xfs_inode): New members nblocks, extsize, nextents and btree.
9016         (GRUB_XFS_EXTENT_OFFSET): Use exts instead of inode->data.extents.
9017         (GRUB_XFS_EXTENT_BLOCK): Likewise.
9018         (GRUB_XFS_EXTENT_SIZE): Likewise.
9019         (grub_xfs_read_block): Support btree format type.
9020         (grub_xfs_iterate_dir): Use NESTED_FUNC_ATTR in call_hook.
9021         Use directory block as basic unit.
9023         * fs/fshelp.c (grub_fshelp_read_file): Bug fix for sparse block.
9025         * aclocal.m4 (grub_i386_CHECK_REGPARM_BUG): Define NESTED_FUNC_ATTR as
9026         __attribute__ ((__regparm__ (1))).
9028 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9030         Correct a mistake in previous commit.
9032         * conf/i386-pc.rmk (normal/execute.c_DEPENDENCIES): Move to the
9033         top.
9034         (normal/command.c_DEPENDENCIES): New variable.
9036 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9038         * conf/i386-efi.rmk (normal/execute.c_DEPENDENCIES): Move to the
9039         top.
9040         (normal/command.c_DEPENDENCIES): New variable.
9041         (grub-emu_DEPENDENCIES, normal_mod_DEPENDENCIES): Remove variables.
9042         * conf/i386-ieee1275.rmk: Likewise.
9043         * conf/i386-linuxbios.rmk: Likewise.
9044         * conf/i386-pc.rmk: Likewise.
9045         * conf/sparc64-ieee1275.rmk: Likewise.
9046         * conf/powerpc-ieee1275.rmk: Likewise.
9047         (grub_emu_SOURCES): Add `fs/fshelp.c'.
9049         * genmk.rb: Add `$(#{src}_DEPENDENCIES)' in targets that require it.
9051 2008-02-01  Robert Millan  <rmh@aybabtu.com>
9053         * kern/disk.c (grub_disk_read, grub_disk_write): Add grub_dprintf()
9054         call at beginning of function.
9056 2008-01-31  Pavel Roskin  <proski@gnu.org>
9058         * util/powerpc/ieee1275/grub-mkrescue.in: New file.
9059         * conf/powerpc-ieee1275.rmk (bin_SCRIPTS): New variable.
9060         (grub_mkrescue_SOURCES): Likewise.
9061         * DISTLIST: Add util/powerpc/ieee1275/grub-mkrescue.in.
9063 2008-01-30  Robert Millan  <rmh@aybabtu.com>
9065         * conf/i386-pc.rmk (sbin_UTILITIES): Remove `grub-probe'.
9066         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Moved from here ...
9067         * conf/common.rmk (util/grub-probe.c_DEPENDENCIES)
9068         (grub_probe_SOURCES): ... to here.
9070         * conf/i386-efi.rmk (sbin_UTILITIES): Remove `grub-probe'.
9071         (util/grub-probe.c_DEPENDENCIES, grub_probe_SOURCES): Remove.
9072         * conf/i386-ieee1275.rmk: Likewise.
9073         * conf/i386-linuxbios.rmk: Likewise.
9074         * conf/powerpc-ieee1275.rmk: Likewise.
9076 2008-01-30  Tristan Gingold  <gingold@free.fr>
9078         * kern/rescue.c: Silently accept empty lines.
9080 2008-01-29  Bean  <bean123ch@gmail.com>
9082         * boot/i386/pc/lnxboot.S (data_start): Code cleanup.
9083         (real_code_2): Code cleanup and change comment style.
9084         (move_memory): Avoid using 32-bit address mode.
9086 2008-01-29  Bean  <bean123ch@gmail.com>
9088         * conf/i386-pc.rmk (pkglib_MODULES): Add `png.mod'.
9089         (png_mod_SOURCES): New variable.
9090         (png_mod_CFLAGS): Likewise.
9091         (png_mod_LDFLAGS): Likewise.
9093         * video/readers/png.c: New file.
9095 2008-01-28  Robert Millan  <rmh@aybabtu.com>
9097         * include/grub/i386/linuxbios/kernel.h (GRUB_MOD_GAP): New macro.
9098         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Remove
9099         `ifndef GRUB_MOD_GAP' hack.
9100         * util/elf/grub-mkimage.c (add_segments): Likewise.
9102 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9104         * kern/powerpc/ieee1275/init.c (grub_arch_modules_addr): Skip
9105         `GRUB_MOD_GAP' for platforms in which it's not defined.
9106         * util/elf/grub-mkimage.c (add_segments): Likewise.
9108 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9110         Get grub-emu to build again (including parallel builds).
9112         * conf/i386-pc.rmk (util/grub-emu.c_DEPENDENCIES): Remove variable.
9113         Split into ...
9114         (util/grub-emu.c_DEPENDENCIES): ... this, ...
9115         (normal/execute.c_DEPENDENCIES): ... this, ...
9116         (grub-emu_DEPENDENCIES): ... and this.
9118         * conf/i386-efi.rmk: Likewise.
9119         * conf/i386-linuxbios.rmk: Likewise.
9120         * conf/i386-ieee1275.rmk: Likewise.
9121         * conf/powerpc-ieee1275.rmk: Likewise.
9122         (grub_emu_SOURCES): Remove duplicated `kern/file.c'.
9124 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9126         * NEWS: Add a few items.
9128 2008-01-27  Robert Millan  <rmh@aybabtu.com>
9130         Fix parallel builds with grub-emu.  Based on earlier commit for
9131         grub-probe and grub-setup.
9133         * conf/i386-pc.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9134         (util/grub-emu.c_DEPENDENCIES): ... this.
9135         * conf/i386-efi.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9136         (util/grub-emu.c_DEPENDENCIES): ... this.
9137         * conf/i386-linuxbios.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9138         (util/grub-emu.c_DEPENDENCIES): ... this.
9139         * conf/i386-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9140         (util/grub-emu.c_DEPENDENCIES): ... this.
9141         * conf/powerpc-ieee1275.rmk (grub-emu_DEPENDENCIES): Renamed to ...
9142         (util/grub-emu.c_DEPENDENCIES): ... this.
9144 2008-01-27  Pavel Roskin  <proski@gnu.org>
9146         * include/grub/powerpc/ieee1275/kernel.h: Introduce GRUB_MOD_GAP
9147         to create a gap between _end and the modules added to the image
9148         with grub-mkrescue.  That fixes "CLAIM failed" on PowerMAC.
9149         * kern/powerpc/ieee1275/init.c: Use GRUB_MOD_GAP.
9150         * util/elf/grub-mkimage.c (add_segments): Likewise.
9152 2008-01-26  Pavel Roskin  <proski@gnu.org>
9154         * kern/dl.c (grub_dl_load): Don't abort if prefix is not set,
9155         just return an error.
9157 2008-01-26  Bean  <bean123ch@gmail.com>
9159         * fs/reiserfs.c (grub_fshelp_node): New member next_offset.
9160         (grub_reiserfs_get_item): Save offset of the next item.
9161         (grub_reiserfs_iterate_dir): Use next_offset to find next item.
9163 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9165         * conf/i386-pc.rmk (grub_setup_SOURCES, grub_emu_SOURCES): Regroup to
9166         make all filesystem sources appear together (possibly fixing omissions
9167         while at it).
9168         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9169         * conf/i386-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9170         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9171         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9173         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.  Additionally,
9174         add `kern/file.c'.
9175         * conf/i386-efi.rmk (grub_probe_SOURCES): Likewise.
9176         * conf/i386-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9177         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Likewise.
9178         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Likewise.
9180         * util/grub-probe.c: Include `<grub/file.h>' and `<sys/stat.h>'.
9181         (probe): Add a sanity check to make sure of our ability to read
9182         requested files when probing for filesystem type.
9184         * genmk.rb: Update copyright year (2007).
9186         * include/grub/fs.h (grub_fat_init, grub_fat_fini, grub_ext2_init)
9187         (grub_ext2_fini, grub_ufs_init, grub_ufs_fini, grub_minix_init)
9188         (grub_minix_fini, grub_hfs_init, grub_hfs_fini, grub_jfs_init)
9189         (grub_jfs_fini, grub_xfs_init, grub_xfs_fini, grub_affs_init)
9190         (grub_affs_fini, grub_sfs_init, grub_sfs_fini, grub_iso9660_init)
9191         : Remove function prototypes.
9193 2008-01-25  Robert Millan  <rmh@aybabtu.com>
9195         Revert my previous commits (based on wrong assumption of how grub_errno
9196         works).
9198         * kern/disk.c (grub_disk_open): Stop resetting grub_errno.
9199         * kern/file.c (grub_file_open): Likewise.
9201 2008-01-24  Pavel Roskin  <proski@gnu.org>
9203         * include/grub/ieee1275/ieee1275.h: Introduce flag for firmwares
9204         that hang if GRUB tries to setup colors.
9205         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Don't set
9206         colors for firmwares that don't support it.
9207         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag):
9208         Recognize Open Hack'Ware, set flags to work around its
9209         limitations.
9211 2008-01-24  Robert Millan  <rmh@aybabtu.com>
9213         * kern/file.c (grub_file_open): Do not account previous failures of
9214         unrelated functions when grub_errno is checked for.
9215         Reported by Oleg Strikov.
9217 2008-01-24  Bean  <bean123ch@gmail.com>
9219         * fs/ufs.c (GRUB_UFS_VOLNAME_LEN): New macro.
9220         (grub_ufs_sblock): New member volume name.
9221         (grub_ufs_find_file): Fix string copy bug.
9222         (grub_ufs_label): Implement this function properly.
9224         * fs/hfs.c (grub_hfs_cnid_type): New enum.
9225         (grub_hfs_iterate_records): Use the correct file number for extents
9226         and catalog file. Fix problem in next index calculation.
9227         (grub_hfs_find_node): Replace recursive function call with loop.
9228         (grub_hfs_iterate_dir): Replace recursive function call with loop.
9230 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9232         * include/grub/i386/ieee1275/loader.h: Include `<grub/types.h>',
9233         `<grub/symbol.h>' and `<grub/multiboot.h>'.
9234         (grub_multiboot2_real_boot): New function prototype.
9236         * include/grub/i386/pc/memory.h: Include `<grub/machine/machine.h>'.
9237         [!GRUB_MACHINE_IEEE1275] (grub_lower_mem, grub_upper_mem): Disable.
9239         * kern/i386/ieee1275/init.c (grub_os_area_addr)
9240         (grub_os_area_size, grub_lower_mem, grub_upper_mem): Remove variables.
9242 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9244         * kern/mm.c (grub_mm_init_region): Replace grub_dprintf() call with
9245         #ifdef'ed out grub_printf().
9247 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9249         * term/i386/pc/at_keyboard.c (grub_keyboard_isr): #ifdef out
9250         grub_dprintf calls, since they make "debug=all" mode unusable.
9251         (grub_console_checkkey): Likewise.
9253 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9255         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add
9256         `term/i386/pc/at_keyboard.c'.
9257         (pkglib_MODULES): Add `serial.mod'.
9258         (serial_mod_SOURCES): New variable.
9259         (serial_mod_CFLAGS): Likewise.
9260         (serial_mod_LDFLAGS): Likewise.
9262         * include/grub/i386/ieee1275/console.h: Add `<grub/symbol.h>'.  Remove
9263         `<grub/powerpc/ieee1275/console.h>'.
9264         (grub_keyboard_controller_init): New function prototype.
9265         (grub_console_checkkey): Likewise.
9266         (grub_console_getkey): Likewise.
9268         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize AT
9269         keyboard on i386.
9271         * term/ieee1275/ofconsole.c (grub_ofconsole_term): On i386, use
9272         grub_ofconsole_checkkey() and grub_ofconsole_getkey() for input.
9274 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9276         * kern/i386/pc/init.c (make_install_device): When memdisk image is
9277         present, "(memdisk)/boot/grub" becomes the default prefix.
9279         * util/i386/pc/grub-mkrescue.in: Switch to a minimal core.img plus
9280         a memdisk tarball with all the modules.  Add --overlay=DIR option that
9281         allows users to overlay additional files into the image.
9283 2008-01-23  Robert Millan  <rmh@aybabtu.com>
9285         * conf/i386-ieee1275.rmk (kernel_elf_SOURCES): Add `machine/loader.h'
9286         and `machine/memory.h'.
9287         (pkglib_MODULES): Add `multiboot.mod' and `_multiboot.mod'.
9288         (_multiboot_mod_SOURCES): New variable.
9289         (_multiboot_mod_CFLAGS): Likewise.
9290         (_multiboot_mod_LDFLAGS): Likewise.
9291         (multiboot_mod_SOURCES): Likewise.
9292         (multiboot_mod_CFLAGS): Likewise.
9293         (multiboot_mod_LDFLAGS): Likewise.
9295         * include/grub/i386/ieee1275/loader.h: New file.
9297         * include/grub/i386/ieee1275/machine.h: Likewise.
9299         * include/grub/i386/ieee1275/memory.h: Likewise.
9301         * include/grub/i386/pc/init.h (grub_os_area_addr): Remove (redundant)
9302         variable declaration.
9303         (grub_os_area_size): Likewise.
9305         * kern/i386/ieee1275/init.c (grub_os_area_addr, grub_os_area_size)
9306         (grub_lower_mem, grub_upper_mem): New variables.
9307         (grub_stop_floppy): New function (just to make
9308         grub_multiboot2_real_boot() happy).
9310         * kern/i386/ieee1275/startup.S: Include `<grub/machine/memory.h>',
9311         `<grub/cpu/linux.h>', `<multiboot.h>' and `<multiboot2.h>'.
9312         (grub_stop): New function.
9313         Include `"../realmode.S"' and `"../loader.S"'.
9315         * loader/multiboot_loader.c: Include `<grub/machine/machine.h>'.
9316         Replace `__i386__' #ifdefs with `GRUB_MACHINE_PCBIOS'.
9318         * loader/powerpc/ieee1275/multiboot2.c (grub_mb2_arch_boot): On i386,
9319         rely on grub_multiboot2_real_boot() for final boot.
9321 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9323         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): When
9324         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag is set, skip any
9325         device that doesn't look like an SD card.
9326         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
9327         `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' flag.
9328         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_set_flag): Detect
9329         OLPC laptop, and set `GRUB_IEEE1275_FLAG_OFDISK_SDCARD_ONLY' when
9330         found.
9332 2008-01-22  Robert Millan  <rmh@aybabtu.com>
9334         * kern/powerpc/ieee1275/init.c (grub_claim_heap): Add sanity check to
9335         avoid claiming over our own code.
9337 2008-01-22  Bean  <bean123ch@gmail.com>
9339         * conf/i386-pc.rmk (pkglib_MODULES): Add `jpeg.mod'.
9340         (jpeg_mod_SOURCES): New variable.
9341         (jpeg_mod_CFLAGS): Likewise.
9342         (jpeg_mod_LDFLAGS): Likewise.
9344         * video/readers/jpeg.c : New file.
9346 2008-01-22  Bean  <bean123ch@gmail.com>
9348         * fs/cpio.c (grub_cpio_find_file): Return GRUB_ERR_FILE_NOT_FOUND when
9349         there are no more items.
9351 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9353         * kern/mm.c (grub_mm_init_region): Improve debug message.
9355 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9357         * conf/i386-pc.rmk (GRUB_MEMORY_MACHINE_LINK_ADDR): New variable.
9358         (kernel_img_LDFLAGS): Use `GRUB_MEMORY_MACHINE_LINK_ADDR' as link
9359         address.
9360         (grub_mkimage_CFLAGS): Propagate `GRUB_MEMORY_MACHINE_LINK_ADDR' as
9361         a C macro.
9362         * include/grub/i386/pc/memory.h (GRUB_MEMORY_MACHINE_UPPER): New macro.
9363         Indicates start of upper memory.
9364         * util/i386/pc/grub-mkimage.c: Include `<grub/machine/memory.h>'.
9365         (generate_image): Abort when image size is big enough to corrupt
9366         upper memory.
9368         * include/grub/i386/pc/vga.h: Include `<grub/machine/memory.h>'.
9369         (GRUB_MEMORY_MACHINE_VGA_ADDR): Alias for `GRUB_MEMORY_MACHINE_UPPER'.
9370         * term/i386/pc/vga.c (VGA_MEM): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9371         instead of hardcoding 0xA0000.
9372         * video/i386/pc/vbe.c: Include `<grub/machine/vga.h>'.
9373         (grub_vbe_set_video_mode): Use `GRUB_MEMORY_MACHINE_VGA_ADDR'
9374         instead of hardcoding 0xA0000.
9376 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9378         * disk/memdisk.c (memdisk_size): New variable.
9379         (grub_memdisk_open): Replace grub_arch_memdisk_size() call with
9380         `memdisk_size'.
9381         (grub_memdisk_init): Initialize `memdisk_size'.  Reallocate memdisk
9382         image to dynamic memory.
9383         (grub_memdisk_fini): Replace grub_arch_memdisk_size() call with
9384         `memdisk_size'.  Free memdisk block.
9386 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9388         Fix detection of very small filesystems (like tar).
9390         * fs/reiserfs.c (grub_reiserfs_mount): When disk is too small to
9391         contain a ReiserFS, abort with GRUB_ERR_BAD_FS rather than
9392         GRUB_ERR_OUT_OF_RANGE (which made the upper layer think there's
9393         a problem with this disk).
9395 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9397         * disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Add debug message
9398         on grub_biosdisk_rw_standard() error.
9400 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9402         * include/grub/ieee1275/ieee1275.h: Add 2008 to Copyright line for
9403         recent changes.
9404         * kern/elf.c: Likewise.
9405         * kern/ieee1275/ieee1275.c: Likewise.
9406         * kern/powerpc/ieee1275/openfw.c: Likewise.
9407         * term/ieee1275/ofconsole.c: Likewise.
9409 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9411         * include/grub/i386/pc/kernel.h: Include `<grub/symbol.h>'.
9413         * include/grub/kernel.h (grub_arch_memdisk_addr)
9414         (grub_arch_memdisk_size): Moved from here ...
9416         * include/grub/i386/pc/kernel.h (grub_arch_memdisk_addr)
9417         (grub_arch_memdisk_size): ... to here.
9419 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9421         Mostly based on bugfix from Bean.
9423         * kern/elf.c (grub_elf32_phdr_iterate): Use `NESTED_FUNC_ATTR'
9424         attribute with hook() parameter.
9425         (grub_elf32_load): Use `NESTED_FUNC_ATTR' with grub_elf32_load_segment()
9426         declaration.
9427         (grub_elf64_phdr_iterate): Use `NESTED_FUNC_ATTR'
9428         attribute with hook() parameter.
9429         (grub_elf64_load): Use `NESTED_FUNC_ATTR' with grub_elf64_load_segment()
9430         declaration.
9432 2008-01-21  Robert Millan  <rmh@aybabtu.com>
9434         * conf/i386-pc.rmk (kernel_img_HEADERS): Add `machine/kernel.h'.
9435         (pkglib_MODULES): Add `memdisk.mod'.
9436         (memdisk_mod_SOURCES): New variable.
9437         (memdisk_mod_CFLAGS): Likewise.
9438         (memdisk_mod_LDFLAGS): Likewise.
9440         * disk/memdisk.c: New file.
9442         * include/grub/disk.h (grub_disk_dev_id): Add
9443         `GRUB_DISK_DEVICE_MEMDISK_ID'.
9445         * include/grub/i386/pc/kernel.h
9446         (GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE): New macro.
9447         (GRUB_KERNEL_MACHINE_PREFIX): Increment by 4.
9448         (grub_kernel_image_size): New variable declaration.
9449         (grub_total_module_size): Likewise.
9450         (grub_memdisk_image_size): Likewise.
9452         * include/grub/i386/pc/memory.h
9453         (GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR): New macro.
9455         * include/grub/kernel.h: Include `<grub/symbol.h>'.
9456         (grub_arch_memdisk_addr): New variable declaration.
9457         (grub_arch_memdisk_size): Likewise.
9459         * kern/i386/pc/init.c (grub_arch_memdisk_addr): New function.
9460         (grub_arch_memdisk_size): Likewise.
9462         * kern/i386/pc/startup.S (grub_memdisk_image_size): New variable.
9463         (codestart): Replace hardcoded `0x100000' with
9464         `GRUB_MEMORY_MACHINE_DECOMPRESSION_ADDR' macro.
9466         * util/i386/pc/grub-mkimage.c: Include `<grub/misc.h>'.
9467         (generate_image): Add `memdisk_path' parameter.  When `memdisk_path' is
9468         not NULL, append the contents of the file it refers to, at the end of
9469         the compressed kernel image.  Initialize `grub_memdisk_image_size'
9470         variable (at `GRUB_KERNEL_MACHINE_MEMDISK_IMAGE_SIZE' offset).
9471         (options): Add "memdisk"|'m' option.
9472         (main): Parse --memdisk|-m option, and pass user-provided path as
9473         parameter to generate_image().
9475 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9477         * kern/sparc64/ieee1275/openfw.c (grub_devalias_iterate): Copy debug
9478         grub_dprintf() calls from here ...
9479         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): ... to here.
9481 2008-01-20  Robert Millan  <rmh@aybabtu.com>
9483         Fix detection of "real mode" when /options/real-mode? doesn't exist.
9485         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_mmu): New variable
9486         declaration.
9487         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_mmu): New variable.
9488         (grub_ieee1275_find_options): If `grub_ieee1275_mmu' is 0, set
9489         `GRUB_IEEE1275_FLAG_REAL_MODE'.
9490         (cmain): Initialize `grub_ieee1275_mmu' (using /chosen/mmu integer
9491         property).
9492         * kern/powerpc/ieee1275/openfw.c (grub_map): Rely on pre-initialized
9493         `grub_ieee1275_mmu' rather than obtaining a handler on every call.
9495 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9497         Get rid of confusing function (superseded by
9498         `grub_ieee1275_get_integer_property')
9499         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_decode_int_4): Remove
9500         prototype.
9501         * kern/ieee1275/ieee1275.c (grub_ieee1275_decode_int_4): Remove
9502         function.
9503         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid use of
9504         grub_ieee1275_decode_int_4(), by obtaining integer properties directly
9505         in native endianness from grub_ieee1275_get_integer_property().
9507 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9509         * kern/powerpc/ieee1275/openfw.c (grub_halt): Issue "power-off"
9510         command after "shut-down", since implementations differ on which
9511         the command for halt is.
9513 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9515         * include/grub/i386/linuxbios/console.h: Add header protection.
9516         (grub_keyboard_controller_init): New function prototype.
9517         * term/i386/pc/at_keyboard.c (KEYBOARD_COMMAND_ISREADY): New macro.
9518         (KEYBOARD_COMMAND_READ): Likewise.
9519         (KEYBOARD_COMMAND_WRITE): Likewise.
9520         (KEYBOARD_SCANCODE_SET1): Likewise.
9521         (grub_keyboard_controller_write): New function.
9522         (grub_keyboard_controller_read): Likewise.
9523         (grub_keyboard_controller_init): Likewise.
9525         * term/i386/pc/console.c: Include `<grub/machine/machine.h>'.
9526         (grub_console_init): On coreboot/LinuxBIOS, call
9527         grub_keyboard_controller_init().
9529 2008-01-19  Robert Millan  <rmh@aybabtu.com>
9531         PowerPC changes provided by Pavel Roskin.
9533         * kern/powerpc/ieee1275/cmain.c (cmain): Don't take any arguments.
9534         * kern/powerpc/ieee1275/crt0.S: Store r5 in grub_ieee1275_entry_fn,
9535         don't rely on cmain() doing it.
9536         * kern/i386/ieee1275/startup.S (_start): Store %eax in
9537         grub_ieee1275_entry_fn, don't rely on cmain() doing it.
9539 2008-01-16  Robert Millan  <rmh@aybabtu.com>
9541         * include/grub/i386/linuxbios/memory.h
9542         (GRUB_MEMORY_MACHINE_LINUXBIOS_TABLE_ADDR): Remove macro.
9543         * kern/i386/linuxbios/table.c (grub_linuxbios_table_iterate): Do not
9544         receive `table_header' as argument.  Instead, probe for it in the
9545         known memory ranges where it can be present.
9546         (grub_available_iterate): Do not pass a fixed `table_header' address
9547         to grub_linuxbios_table_iterate().
9549 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9551         * configure.ac: Add `i386-ieee1275' to the list of supported targets.
9552         * conf/i386-ieee1275.rmk: New file.
9553         * include/grub/i386/ieee1275/console.h: Likewise.
9554         * include/grub/i386/ieee1275/ieee1275.h: Likewise.
9555         * include/grub/i386/ieee1275/kernel.h: Likewise.
9556         * include/grub/i386/ieee1275/time.h: Likewise.
9557         * kern/i386/ieee1275/init.c: Likewise.
9558         * kern/i386/ieee1275/startup.S: Likewise.
9560 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9562         * kern/misc.c (grub_vsprintf): Do not reset `longlongfmt' to zero
9563         when pointers are 32-bit (but still do set it to one when they are
9564         64-bit).
9566 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9568         * include/grub/ieee1275/ieee1275.h
9569         (grub_ieee1275_get_integer_property): New function prototype.
9571         * kern/ieee1275/ieee1275.c: Include `<grub/types.h>'.
9572         (grub_ieee1275_get_integer_property): New function.  Wraps around
9573         grub_ieee1275_get_property() to handle endianness.
9575         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Replace
9576         grub_ieee1275_get_property() with grub_ieee1275_get_integer_property()
9577         where appropriate.
9578         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Likewise.
9579         (grub_map): Likewise.
9580         * kern/sparc64/ieee1275/openfw.c (grub_map): Likewise.
9582 2008-01-15  Bean  <bean123ch@gmail.com>
9584         * normal/execute.c (grub_script_exec_argument_to_string): Check for undefined variable.
9585         (grub_script_execute_cmdline): Reset grub_errno.
9587         * normal/main.c (read_config_file): Reset grub_errno.
9589         * normal/parse.y (script_init): New.
9590         (script): Move function and menuentry here.
9591         (delimiter): New.
9592         (command): Add delimiter at the end of command.
9593         (commands): Adjust to match the new command.
9594         (commandblock): Remove grub_script_lexer_record_start.
9595         (menuentry): Add grub_script_lexer_record_start, use the new commands.
9596         (if): Use the new commands.
9598         * conf/common.rmk (pkgdata_MODULES): Add echo.mod.
9600 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9602         * normal/menu.c (run_menu): Move timeout message from here ...
9603         (print_timeout): ... to here.
9604         (run_menu): Use print_timeout() once during initial draw to print
9605         the whole message, and again in every clock tick to update only
9606         the number of seconds.
9608 2008-01-15  Robert Millan  <rmh@aybabtu.com>
9610         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Obtain
9611         actual size of `available' from grub_ieee1275_get_property(), and
9612         restrict parsing to that bound.
9614 2008-01-15  Christian Franke  <franke@computer.org>
9616         * util/grub-emu.c: Replace <argp.h> by <getopt.h>.
9617         (argp_program_version): Remove variable.
9618         (argp_program_bug_address): Likewise.
9619         (options): Convert from struct argp_option to struct option.
9620         (struct arguments): Remove.
9621         (parse_opt): Remove.
9622         (usage): New function.
9623         (main): Replace struct args members by simple variables.
9624         Replace argp_parse() by getopt_long().
9625         Add switch to evaluate options.
9626         Add missing "(...)" around root_dev in prefix string.
9628 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9630         * kern/powerpc/ieee1275/init.c (grub_exit): Reimplement as a wrapper
9631         for grub_ieee1275_exit(), in order to improve portability.
9633 2008-01-14  Robert Millan  <rmh@aybabtu.com>
9635         * util/grub.d/10_linux.in (prefix): Define.
9636         (exec_prefix): Likewise.  Both definitions are later used by `libdir'.
9638 2008-01-13  Pavel Roskin  <proski@gnu.org>
9640         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Don't use
9641         grub_errno if no errors have been detected.
9643 2008-01-12  Robert Millan  <rmh@aybabtu.com>
9645         * include/grub/util/getroot.h (grub_dev_abstraction_types): New enum.
9646         (grub_util_get_dev_abstraction): New function prototype.
9648         * util/getroot.c: Include `<grub/util/getroot.h>'
9649         (grub_util_get_grub_dev): Move detection of abstraction type to ...
9650         (grub_util_get_dev_abstraction): ... here (new function).
9652         * util/grub-probe.c: Convert PRINT_* to an enum.  Add
9653         `PRINT_ABSTRACTION'.
9654         (probe): Probe for abstraction type when requested.
9655         (main): Understand `--target=abstraction'.
9657         * util/i386/efi/grub-install.in: Add abstraction module to core
9658         image when it is found to be necessary.
9659         * util/i386/pc/grub-install.in: Likewise.
9660         * util/powerpc/ieee1275/grub-install.in: Likewise.
9662         * util/update-grub_lib.in (font_path): Return system path without
9663         converting to GRUB path.
9664         * util/update-grub.in: Convert system path returned by font_path()
9665         to a GRUB path.  Use `grub-probe -t abstraction' to determine what
9666         abstraction module is needed for loading fonts (if any).  Export
9667         that as `GRUB_PRELOAD_MODULES'.
9668         * util/grub.d/00_header.in: Process `GRUB_PRELOAD_MODULES' (print
9669         insmod commands).
9671 2008-01-12  Yoshinori K. Okuji  <okuji@enbug.org>
9673         Remove some unused code from reiserfs.
9675         * fs/reiserfs.c (struct grub_reiserfs_key)
9676         [GRUB_REISERFS_KEYV2_BITFIELD]: Removed offset and type.
9677         (struct grub_reiserfs_node_body): Removed.
9678         (grub_reiserfs_get_key_v2_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9679         Likewise.
9680         (grub_reiserfs_get_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9681         Likewise.
9682         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9683         Likewise.
9684         (grub_reiserfs_set_key_offset) [GRUB_REISERFS_KEYV2_BITFIELD]:
9685         Likewise.
9686         (grub_reiserfs_set_key_type) [GRUB_REISERFS_KEYV2_BITFIELD]:
9687         Likewise.
9688         (grub_reiserfs_iterate_dir) [GRUB_REISERFS_KEYV2_BITFIELD]:
9689         Likewise.
9690         (grub_reiserfs_open) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9691         (grub_reiserfs_read) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9692         (grub_reiserfs_dir) [GRUB_REISERFS_KEYV2_BITFIELD]: Likewise.
9694 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9696         * util/update-grub_lib.in (grub_file_is_not_garbage): New function.
9697         Determines if a file is garbage left by packaging systems, etc.
9698         * util/update-grub.in: Use grub_file_is_not_garbage() as a condition
9699         for processing /etc/grub.d scripts.
9700         * util/grub.d/10_hurd.in: Fix `GRUB_DISTRIBUTOR' comparison.
9701         * util/grub.d/10_linux.in: Likewise.  Use grub_file_is_not_garbage()
9702         as a condition for processing Linux images.
9704 2008-01-10  Pavel Roskin  <proski@gnu.org>
9706         * include/grub/powerpc/libgcc.h (__ucmpdi2): New export.  Needed
9707         to compile reiserfs.c on PowerPC.
9709 2008-01-10  Robert Millan  <rmh@aybabtu.com>
9711         * kern/device.c (grub_device_iterate): Do not abort device iteration
9712         when one of the devices cannot be opened.
9713         * kern/disk.c (grub_disk_open): Do not account previous failures of
9714         unrelated functions when grub_errno is checked for.
9716 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9718         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): For
9719         `! grub_linux_is_bzimage', change order of address comparison to make
9720         it more intuitive, and improve "too big zImage" error message.
9722 2008-01-08  Robert Millan  <rmh@aybabtu.com>
9724         * Makefile.in (uninstall): Handle `$(update-grub_SCRIPTS)' and
9725         `$(update-grub_DATA)'.
9726         (distcheck): Fix race condition when invoking `$(MAKE)' on multiple
9727         targets.
9729 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9731         * boot/i386/pc/boot.S (boot_drive_check): Add a comment indicating
9732         which instruction is modified by grub-setup during installation
9733         (since it wasn't obvious by only looking at this file).
9735 2008-01-07  Robert Millan  <rmh@aybabtu.com>
9737         * TODO: Rewrite.  Just refer to the wiki and the BTS instead of
9738         listing actual TODO items.
9740 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9742         * fs/reiserfs.c (grub_reiserfs_get_key_v2_type): Handle endianness
9743         correctly.
9744         (grub_reiserfs_get_key_offset): Likewise.
9745         (grub_reiserfs_set_key_offset): Likewise.
9746         (grub_reiserfs_set_key_type): Likewise.
9747         (grub_reiserfs_iterate_dir): Return 1 if found, otherwise 0.
9749         (GRUB_REISERFS_KEYV2_BITFIELD): Undefined. Probably it would be
9750         better to remove the bitfield version completely.
9752 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9754         * fs/reiserfs.c (grub_reiserfs_iterate_dir): ENTRY_ITEM must be
9755         allocated from the heap, due to the fshelp implementation.
9756         (grub_reiserfs_dir): Free NODE, due to the same reason.
9758 2008-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
9760         Mostly from Vincent Pelletier:
9762         * fs/reiserfs.c: New file.
9764         * conf/common.rmk (pkglib_MODULES): Added reiserfs.mod.
9765         (reiserfs_mod_SOURCES): New variable.
9766         (reiserfs_mod_CFLAGS): Likewise.
9767         (reiserfs_mod_LDFLAGS): Likewise.
9769         * DISTLIST: Added boot/i386/pc/lnxboot.S, commands/hexdump.c,
9770         disk/ata.c, fs/cpio.c, fs/ntfscomp.c, fs/reiserfs.c,
9771         include/grub/ntfs.h, include/grub/i386/pc/machine.h, and
9772         normal/color.c.
9774 2008-01-06  Robert Millan  <rmh@aybabtu.com>
9776         * normal/color.c: Remove `<grub/env.h>'.
9778 2008-01-05  Jeroen Dekkers  <jeroen@dekkers.cx>
9780         * include/grub/normal.h: Include <grub/env.h>.
9782 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9784         * util/i386/pc/grub-setup.c (usage): Replace obsolete `(hd0,0)' in
9785         usage example with `(hd0,1)'.
9786         Reported by Samuel Thibault.
9788 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9790         * kern/i386/loader.S (grub_linux_is_bzimage): New variable.
9791         (grub_linux_boot_zimage): Rename to ...
9792         (grub_linux_boot): ... this.
9793         (grub_linux_boot_bzimage): Merge with `grub_linux_boot_zimage'.
9794         (grub_linux_boot_zimage): Conditionalize zImage copy.
9796         * include/grub/i386/loader.h (grub_linux_is_bzimage): Add prototype.
9797         (grub_linux_boot_bzimage): Remove prototype.
9798         (grub_linux_boot_zimage): Rename to ...
9799         (grub_linux_boot): ... this.
9801         * loader/i386/pc/linux.c (big_linux): Replace with `grub_linux_is_bzimage'.
9802         (grub_linux_boot): Remove function.
9804 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9806         * include/grub/normal.h (grub_env_write_color_normal): New prototype.
9807         (grub_env_write_color_highlight): Likewise.
9808         (grub_wait_after_message): Likewise.
9810         * normal/color.c: New file.
9812         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9813         (normal_mod_DEPENDENCIES): Likewise.
9815         * conf/i386-efi.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9816         (normal_mod_DEPENDENCIES): Likewise.
9818         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9819         (normal_mod_DEPENDENCIES): Likewise.
9821         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `normal/color.c'.
9822         (normal_mod_DEPENDENCIES): Likewise.
9824         * normal/menu_entry.c (run): Rely on grub_wait_after_message()
9825         for waiting after a message is printed.
9826         * normal/main.c (read_config_file): Likewise.
9827         (grub_normal_init): Register grub_env_write_color_normal() and
9828         grub_env_write_color_highlight() hooks.  Mark `color_normal' and
9829         `color_highlight' variables as global.
9831         * normal/menu.c (grub_wait_after_message): New function.
9832         (grub_color_menu_normal): New variable.  Replaces ...
9833         (GRUB_COLOR_MENU_NORMAL): ... this macro.
9834         (grub_color_menu_highlight): New variable.  Replaces ...
9835         (GRUB_COLOR_MENU_HIGHLIGHT): ... this macro.
9836         (draw_border): Set color state to `GRUB_TERM_COLOR_NORMAL' instead of
9837         `GRUB_TERM_COLOR_STANDARD'.
9838         (print_message): Use `grub_setcolorstate' to reload colors.  Rename
9839         `normal_code' and `highlight_code' to `old_color_normal' and
9840         `old_color_highlight', respectively.
9841         (grub_menu_init_page): Update colors when drawing the menu, based on
9842         `menu_color_normal' and `menu_color_highlight' variables.
9843         (grub_menu_run): Rely on grub_wait_after_message() for waiting after
9844         a message is printed.
9846 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9848         * kern/env.c (grub_env_context_open): Propagate hooks for global
9849         variables to new context.
9851         * kern/main.c (grub_set_root_dev): Export `root' variable.
9853 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9855         * util/biosdisk.c (get_os_disk): Check for devfs-style IDE and SCSI
9856         discs unconditionally, since udev and others have options to provide
9857         them.
9859 2008-01-05  Robert Millan  <rmh@aybabtu.com>
9861         * normal/completion.c (iterate_dir): Skip `.' and `..' directories.
9863 2008-01-04  Christian Franke  <franke@computer.org>
9865         * kern/i386/pc/init.c (grub_machine_init): Fix evaluation
9866         of eisa_mmap.
9868 2008-01-03  Pavel Roskin  <proski@gnu.org>
9870         * kern/i386/linuxbios/init.c: Put "void" to all function
9871         declarations with no arguments.
9872         * kern/powerpc/ieee1275/init.c: Likewise.
9873         * term/i386/pc/at_keyboard.c: Likewise.
9874         * term/i386/pc/vga_text.c: Likewise.
9875         * util/grub-mkdevicemap.c: Likewise.
9877 2008-01-02  Robert Millan  <rmh@aybabtu.com>
9879         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf32): Improve error
9880         message when loaded image is out of bounds.
9881         (grub_multiboot_load_elf64): Likewise.
9883 2008-01-02  Pavel Roskin  <proski@gnu.org>
9885         * util/grub.d/10_linux.in: Try version without ".old" when
9886         looking for initrd.  It's better to use initrd from the newer
9887         kernel of the same version than no initrd at all.
9889 2008-01-01  Robert Millan  <rmh@aybabtu.com>
9891         * util/biosdisk.c (get_os_disk): Fix check for IDE or SCSI discs.
9893 2008-01-01  Vesa Jaaskelainen  <chaac@nic.fi>
9895         * include/grub/video.h: Added grub_video_unmap_color and
9896         grub_video_get_active_render_target.
9897         (grub_video_adapter): Added unmap_color and get_active_render_target.
9899         * video/video.c: Added grub_video_unmap_color and
9900         grub_video_get_active_render_target.
9901         (grub_video_get_info): Changed method to accept NULL pointer as an
9902         argument to allow detection of active video adapter.
9904         * video/i386/pc/vbe.c: Renamed grub_video_vbe_unmap_color as
9905         grub_video_vbe_unmap_color_int.
9906         Added grub_video_vbe_unmap_color and
9907         grub_video_vbe_get_active_render_target.
9908         (grub_video_vbe_adapter): Added unmap_color and
9909         get_active_render_target.
9911         * video/i386/pc/vbeblit.c: Replaced grub_video_vbe_unmap_color usage
9912         with grub_video_vbe_unmap_color_int.
9914         * term/gfxterm.c (DEFAULT_STANDARD_COLOR): Added.
9915         (DEFAULT_NORMAL_COLOR): Likewise.
9916         (DEFAULT_HIGHLIGHT_COLOR) Likewise.
9917         (DEFAULT_FG_COLOR): Removed.
9918         (DEFAULT_BG_COLOR): Likewise.
9919         (DEFAULT_CURSOR_COLOR): Changed value.
9920         (grub_virtual_screen): Added standard_color_setting,
9921         normal_color_setting, highlight_color_setting and term_color.
9922         (grub_virtual_screen): Removed fg_color_setting and bg_color_setting.
9923         (bitmap_width): Added.
9924         (bitmap_height): Likewise.
9925         (bitmap): Likewise.
9926         (set_term_color): Likewise.
9927         (grub_virtual_screen_setup): Changed to use new terminal coloring
9928         settings.
9929         (grub_gfxterm_init): Added init for bitmap.
9930         (grub_gfxterm_fini): Added destroy for bitmap.
9931         (redraw_screen_rect): Updated to use background bitmap and new
9932         terminal coloring.
9933         (scroll_up): Added optimization for case when there is no bitmap.
9934         (grub_gfxterm_cls): Fixed to use correct background color.
9935         (grub_virtual_screen_setcolorstate): Changed to use new terminal
9936         coloring.
9937         (grub_virtual_screen_setcolor): Likewise.
9938         (grub_virtual_screen_getcolor): Added.
9939         (grub_gfxterm_background_image_cmd): Likewise.
9940         (grub_video_term): Added setcolor and getcolor.
9941         (MOD_INIT): Added registration of background_image command.
9942         (MOD_TERM): Added unregistration for background_image command.
9944 2007-12-30  Pavel Roskin  <proski@gnu.org>
9946         * loader/multiboot_loader.c: Fix multiboot command
9947         unregistration.  Fix all typos in the word "multiboot".
9949 2007-12-29  Pavel Roskin  <proski@gnu.org>
9951         * util/grub.d/10_linux.in: Refactor search for initrd.  Add
9952         support for initrd names used in Fedora.
9954 2007-12-26  Bean  <bean123ch@gmail.com>
9956         * conf/common.rmk (pkgdata_MODULES): Add cpio.mod.
9957         (cpio_mod_SOURCES): New variable.
9958         (cpio_mod_CFLAGS): Likewise.
9959         (cpio_mod_LDFLAGS): Likewise.
9961         * fs/cpio.c: New file.
9963         * conf/i386-pc.rmk (grub_emu_SOURCES): Add cpio.c.
9965         * conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.
9967         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Likewise.
9969         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
9971 2007-12-25  Robert Millan  <rmh@aybabtu.com>
9973         * include/grub/term.h (struct grub_term): Add `getcolor' function.
9974         (grub_getcolor): New function.
9976         * kern/term.c (grub_getcolor): New function.
9977         * normal/menu.c (GRUB_COLOR_MENU_NORMAL): New macro.
9978         (GRUB_COLOR_MENU_HIGHLIGHT): New macro.
9979         (print_entry): Set normal and highlight colors to
9980         `GRUB_COLOR_MENU_NORMAL' and `GRUB_COLOR_MENU_HIGHLIGHT',
9981         respectively, before printing and restore them to old
9982         values afterwards.
9983         (grub_menu_init_page): Likewise.  Fill an additional colored space
9984         that would otherwise be left blank.
9986         * term/efi/console.c (grub_console_getcolor): New function.
9987         (struct grub_console_term.getcolor): New variable.
9988         * term/i386/pc/console.c (grub_console_getcolor): New function.
9989         (struct grub_console_term.getcolor): New variable.
9990         * term/ieee1275/ofconsole.c (grub_ofconsole_getcolor): New function.
9991         (struct grub_console_term.getcolor): New variable.
9993         * term/i386/pc/serial.c (grub_serial_setcolor): Remove function.
9994         (struct grub_console_term.setcolor): Remove variable.
9995         * term/i386/pc/vesafb.c (grub_virtual_screen_setcolor): Remove function.
9996         (struct grub_console_term.setcolor): Remove variable.
9997         * term/i386/pc/vga.c (grub_vga_setcolor): Remove function.
9998         (struct grub_console_term.setcolor): Remove variable.
9999         * term/gfxterm.c (grub_virtual_screen_setcolor): Remove function.
10000         (struct grub_console_term.setcolor): Remove variable.
10002 2007-12-25  Robert Millan  <rmh@aybabtu.com>
10004         * configure.ac: Search for possible unifont.hex locations, and
10005         define UNIFONT_HEX if found.
10007         * Makefile.in (UNIFONT_HEX): Define variable.
10008         (DATA): Rename to ...
10009         (PKGLIB): ... this.  Update all users.
10010         (PKGDATA): New variable.
10011         (pkgdata_IMAGES): Rename to ...
10012         (pkglib_IMAGES): ... this. Update all users.
10013         (pkgdata_MODULES): Rename to ...
10014         (pkglib_MODULES): ... this. Update all users.
10015         (pkgdata_PROGRAMS): Rename to ...
10016         (pkglib_PROGRAMS): ... this. Update all users.
10017         (pkgdata_DATA): Rename to ...
10018         (pkglib_DATA): ... this. Update all users.
10019         (CLEANFILES): Redefine to `$(pkglib_DATA) $(pkgdata_DATA)'.
10020         (unicode.pff, ascii.pff): New rules.
10021         (all-local): Add `$(PKGDATA)' dependency.
10022         (install-local): Process `$(PKGDATA)'.
10024         * util/update-grub_lib.in (font_path): Search for *.pff files in
10025         a few more locations, including `${pkgdata}'.
10027 2007-12-23  Robert Millan  <rmh@aybabtu.com>
10029         Patch from Bean  <bean123ch@gmail.com>:
10030         * disk/loopback.c (grub_loopback_read): Add missing bit shift to
10031         `size'.
10033 2007-12-21  Bean  <bean123ch@gmail.com>
10035         * conf/common.rmk (pkgdata_MODULES): Add ntfscomp.mod.
10036         (ntfscomp_mod_SOURCES): New variable.
10037         (ntfscomp_mod_CFLAGS): Likewise.
10038         (ntfscomp_mod_LDFLAGS): Likewise.
10040         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfscomp.c.
10041         (grub_probe_SOURCES): Likewise.
10042         (grub_emu_SOURCES): Likewise.
10044         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10045         (grub_emu_SOURCES): Likewise.
10047         * conf/i386-linuxbios.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10048         (grub_emu_SOURCES): Likewise.
10050         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfscomp.c.
10051         (grub_emu_SOURCES): Likewise.
10053         * fs/ntfs.c (grub_ntfscomp_func): New variable.
10054         (read_run_list): Renamed to grub_ntfs_read_run_list.
10055         (decomp_nextvcn): Moved to ntfscomp.c.
10056         (decomp_getch): Likewise.
10057         (decomp_get16): Likewise.
10058         (decomp_block): Likewise.
10059         (read_block): Likewise.
10060         (read_data): Partially moved to ntfscomp.c.
10061         (fixup): Change unsigned to grub_uint16_t.
10062         (read_mft): Change unsigned long to grub_uint32_t.
10063         (read_attr): Likewise.
10064         (read_data): Likewise.
10065         (read_run_data): Likewise.
10066         (read_run_list): Likewise.
10067         (read_mft): Likewise.
10069         * fs/ntfscomp.c: New file.
10071         * include/grub/ntfs.h: New file.
10073 2007-12-16  Robert Millan  <rmh@aybabtu.com>
10075         * util/grub-mkdevicemap.c (make_device_map): Iterate up to 20 for
10076         IDE disk check, since Linux is known to support 20 IDE disks.
10077         Reported by Colin Watson.
10079 2007-12-15  Bean  <bean123ch@gmail.com>
10081         * conf/i386-pc.rmk (pkgdata_IMAGES): Add lnxboot.img.
10082         (lnxboot_img_SOURCES): New variable.
10083         (lnxboot_img_ASFLAGS): Likewise.
10084         (lnxboot_img_LDFLAGS): Likewise.
10086         * boot/i386/pc/lnxboot.S: New file.
10088 2007-11-24  Pavel Roskin  <proski@gnu.org>
10090         * configure.ac: Test if '--build-id=none' is supported by the
10091         linker.  If yes, add it to TARGET_LDFLAGS.  Build ID causes
10092         objcopy to generate incorrect binary files (binutils
10093         2.17.50.0.18-1 as shipped by Fedora 8).
10094         * aclocal.m4 (grub_PROG_OBJCOPY_ABSOLUTE): Use LDFLAGS when
10095         linking, so that build ID doesn't break the test.
10097 2007-11-24  Pavel Roskin  <proski@gnu.org>
10099         * include/grub/i386/time.h: use "void" in the argument list
10100         of grub_cpu_idle().
10101         * include/grub/powerpc/time.h: Likewise.
10102         * include/grub/sparc64/time.h: Likewise.
10104 2007-11-18  Christian Franke  <franke@computer.org>
10106         * util/console.c (grub_ncurses_getkey): Change curses KEY_* mapping,
10107         now return control chars instead of GRUB_CONSOLE_KEY_* constants.
10108         This fixes the problem that function keys did not work in grub-emu.
10110 2007-11-18  Christian Franke  <franke@computer.org>
10112         * disk/host.c (grub_host_open): Remove attribute unused from
10113         name parameter. Add check for "host". This fixes the problem
10114         that grub-emu does not find partitions.
10116 2007-11-18  Christian Franke  <franke@computer.org>
10118         * util/hostfs.c (is_dir): New function.
10119         (grub_hostfs_dir):  Handle missing dirent.d_type case.
10120         (grub_hostfs_read): Add missing fseek().
10121         (grub_hostfs_label): Clear label pointer.  This fixes a crash
10122         of grub-emu on "ls (host)".
10124 2007-11-18  Christian Franke  <franke@computer.org>
10126         * include/grub/i386/pc/init.h (struct grub_machine_mmap_entry):
10127         Add attribute packed, gcc 3.4.4 on Cygwin aligns this
10128         to 64 bit boundary by default.
10130 2007-11-18  Bean  <bean123ch@gmail.com>
10132         * conf/common.rmk (pkgdata_MODULES): Add hexdump.mod.
10133         (hexdump_mod_SOURCES): New variable.
10134         (hexdump_mod_CFLAGS): Likewise.
10135         (hexdump_mod_LDFLAGS): Likewise.
10137         * conf/i386-pc.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10139         * conf/i386-efi.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10141         * conf/i386-linuxbios.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10143         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add command/hexdump.c.
10145         * include/grub/hexdump.h: New file.
10147         * commands/hexdump.c: New file.
10149 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10151         * commands/i386/pc/play.c (beep_off): Switch order of arguments
10152         in grub_outb() calls.
10153         (beep_on): Likewise.
10155 2007-11-10  Christian Franke  <franke@computer.org>
10157         * normal/menu.c (run_menu): Check for empty menu to avoid crash.
10158         (grub_menu_run): Likewise.
10160 2007-11-10  Robert Millan  <rmh@aybabtu.com>
10162         * include/grub/i386/efi/machine.h: New file.
10163         * include/grub/i386/linuxbios/machine.h: Likewise.
10164         * include/grub/i386/pc/machine.h: Likewise.
10165         * include/grub/powerpc/ieee1275/machine.h: Likewise.
10166         * include/grub/sparc64/ieee1275/machine.h: Likewise.
10168         * term/i386/pc/serial.c: Include <grub/machine/machine.h>.
10169         (serial_hw_io_addr): New variable.
10170         (serial_hw_get_port): Obtain port address from `serial_hw_io_addr'
10171         instead of `(unsigned short *) 0x400'.
10173 2007-11-10  Bean  <bean123ch@gmail.com>
10175         * fs/ntfs.c (read_block): Fix a bug caused by adjacent blocks.
10177 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10179         * conf/i386-pc.rmk (pkgdata_MODULES): Added vga.mod.
10180         (vga_mod_SOURCES): Added.
10181         (vga_mod_CFLAGS): Likewise.
10182         (vga_mod_LDFLAGS): Likewise.
10184         * term/i386/pc/vga.c (get_map_mask): Switch order of arguments in
10185         grub_outb() calls.
10186         (set_map_mask): Likewise.
10187         (set_read_map): Likewise.
10188         (set_read_address): Likewise.
10189         (vga_font): Removed variable.
10190         (get_vga_glyph): Removed function.
10191         (invalidate_char): Likewise.
10192         (write_char): Changed to use grub_font_get_glyph() for font
10193         information.
10194         (grub_vga_putchar): Likewise.
10195         (grub_vga_getcharwidth): Likewise.
10197 2007-11-10  Vesa Jaaskelainen  <chaac@nic.fi>
10199         * conf/i386-pc.rmk (boot_img_LDFLAGS): Use COMMON_LDFLAGS for target
10200         flags.
10201         (pxeboot_img_LDFLAGS): Likewise.
10202         (diskboot_img_LDFLAGS): Likewise.
10203         (kernel_img_LDFLAGS): Likewise.
10205 2007-11-06  Robert Millan  <rmh@aybabtu.com>
10207         * term/i386/pc/serial.c (serial_hw_put): Switch order of arguments
10208         in grub_outb() calls.
10209         (serial_hw_init): Likewise.
10211 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10213         * util/update-grub.in: Allow files in ${update_grub_dir} to contain
10214         spaces.  Skip non-regular files.
10216 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10218         * kern/disk.c (grub_disk_firmware_fini)
10219         (grub_disk_firmware_is_tainted): New variables.
10221         * include/grub/disk.h (grub_disk_firmware_fini)
10222         (grub_disk_firmware_is_tainted): Likewise.
10224         * disk/i386/pc/biosdisk.c (GRUB_MOD_FINI(biosdisk)): Moved from here ...
10225         (grub_disk_biosdisk_fini): ... to here.
10226         (GRUB_MOD_FINI(biosdisk)): Implement using grub_disk_biosdisk_fini().
10227         (GRUB_MOD_INIT(biosdisk)): Abort when `grub_disk_firmware_is_tainted'
10228         is set.  Register grub_disk_biosdisk_fini() in
10229         `grub_disk_firmware_fini'.
10231         * disk/ata.c: Remove `<grub/machine/biosdisk.h>'.
10232         (GRUB_MOD_INIT(ata)): Remove grub_biosdisk_fini() call.
10233         Use `grub_disk_firmware_is_tainted' and `grub_disk_firmware_fini'
10234         to finish existing firmware disk interface.
10236         * conf/i386-linuxbios.rmk (pkgdata_MODULES): Add `ata.mod'.
10237         (ata_mod_SOURCES): New variable.
10238         (ata_mod_CFLAGS): Likewise.
10239         (ata_mod_LDFLAGS): Likewise.
10241 2007-11-05  Robert Millan  <rmh@aybabtu.com>
10243         * disk/ata.c: Remove `<grub/machine/time.h>'.  Include `<grub/time.h>'.
10244         (grub_ata_wait): Reimplement using grub_millisleep().
10246         * include/grub/misc.h (grub_div_roundup): Fix parenthesization.
10247         * include/grub/i386/time.h (grub_cpu_idle): Disable `hlt' instruction.
10249 2007-11-03  Marco Gerards  <marco@gnu.org>
10251         * term/i386/pc/vga_text.c: Include <grub/cpu/io.h>.
10252         (CRTC_ADDR_PORT): New macro.
10253         (CRTC_DATA_PORT): Likewise.
10254         (CRTC_CURSOR): Likewise.
10255         (CRTC_CURSOR_ADDR_HIGH): Likewise.
10256         (CRTC_CURSOR_ADDR_LOW): Likewise.
10257         (update_cursor): New function.
10258         (grub_console_real_putchar): Call `update_cursor'.
10259         (grub_console_gotoxy): Likewise.
10260         (grub_console_cls): Set the default color when clearing the
10261         screen.
10262         (grub_console_setcursor): Implemented.
10264 2007-11-03  Marco Gerards  <marco@gnu.org>
10266         * disk/ata.c (grub_ata_pio_read): Don't wait for the command to
10267         become activate.
10268         (grub_ata_pio_write): Likewise.
10270         (grub_atapi_identify): Wait after issuing an ATA command.
10271         (grub_atapi_packet): Likewise.
10272         (grub_ata_identify): Likewise.
10273         (grub_ata_readwrite): Likewise.
10275 2007-11-03  Marco Gerards  <marco@gnu.org>
10277         * disk/ata.c (grub_ata_pio_read): Detect and return the error code.
10278         (grub_ata_pio_write): Likewise.
10279         (grub_ata_readwrite): Use `grub_error', instead of
10280         returning `grub_errno'.
10282 2007-11-03  Marco Gerards  <marco@gnu.org>
10284         * disk/ata.c (grub_ata_readwrite): Call grub_ata_pio_read and
10285         grub_ata_pio_write once for every single sector, instead of for
10286         multiple sectors.
10288 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10290         * configure.ac: Add `i386-linuxbios' to the list of supported targets.
10292         * conf/i386-linuxbios.rmk: New file.
10294         * kern/i386/pc/hardware.c: Likewise.
10295         * term/i386/pc/at_keyboard.c: Likewise.
10296         * term/i386/pc/vga_text.c: Likewise.
10298         * include/grub/i386/linuxbios/boot.h: Likewise.
10299         * include/grub/i386/linuxbios/console.h: Likewise.
10300         * include/grub/i386/linuxbios/init.h: Likewise.
10301         * include/grub/i386/linuxbios/kernel.h: Likewise.
10302         * include/grub/i386/linuxbios/loader.h: Likewise.
10303         * include/grub/i386/linuxbios/memory.h: Likewise.
10304         * include/grub/i386/linuxbios/serial.h: Likewise.
10305         * include/grub/i386/linuxbios/time.h: Likewise.
10307         * kern/i386/linuxbios/init.c: Likewise.
10308         * kern/i386/linuxbios/startup.S: Likewise.
10309         * kern/i386/linuxbios/table.c: Likewise.
10311 2007-10-31  Marco Gerards  <marco@gnu.org>
10313         * conf/i386-pc.rmk (pkgdata_MODULES): Add `ata.mod'.
10314         (ata_mod_SOURCES): New variable.
10315         (ata_mod_CFLAGS): Likewise.
10316         (ata_mod_LDFLAGS): Likewise.
10318         * disk/ata.c: New file.
10320         * include/grub/disk.h (grub_disk_dev_id): Add
10321         `GRUB_DISK_DEV_ATA_ID'.
10323 2007-10-31  Robert Millan  <rmh@aybabtu.com>
10325         * include/grub/i386/pc/init.h (grub_lower_mem): Moved from here ...
10326         * include/grub/i386/pc/memory.h (grub_lower_mem): ... to here.
10328         * include/grub/i386/pc/init.h (grub_upper_mem): Moved from here ...
10329         * include/grub/i386/pc/memory.h (grub_upper_mem): ... to here.
10331         * include/grub/i386/pc/memory.h: Include `<grub/symbol.h>' and
10332         `<grub/types.h>'.
10334         * loader/i386/pc/multiboot.c: Include `<grub/machine/memory.h>'.
10336 2007-10-27  Robert Millan  <rmh@aybabtu.com>
10338         * include/grub/types.h (ULONG_MAX): Define macro.
10340 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10342         * kern/i386/pc/startup.S: Remove `"kern/i386/realmode.S"'.  Include
10343         `"../realmode.S"'.
10344         Remove `"kern/i386/loader.S"'.  Include `"../loader.S"'.
10346 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10348         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove `disk/i386/pc/biosdisk.c'.
10349         (pkgdata_MODULES): Add `biosdisk.mod'.
10350         (biosdisk_mod_SOURCES, biosdisk_mod_CFLAGS, biosdisk_mod_LDFLAGS): New
10351         variables.
10353         * disk/i386/pc/biosdisk.c: Include `<grub/dl.h>'.
10354         (grub_biosdisk_init): Replace with ...
10355         (GRUB_MOD_INIT(biosdisk)): ... this.
10356         (grub_biosdisk_fini): Replace with ...
10357         (GRUB_MOD_FINI(biosdisk)): ... this.
10359         * kern/i386/pc/init.c: Remove `<grub/machine/biosdisk.h>'.
10360         (grub_machine_init): Remove call to grub_biosdisk_init().
10361         (grub_machine_fini): Remove call to grub_machine_fini().
10363         * util/i386/pc/grub-install.in (modules): Add `biosdisk'.
10365 2007-10-22  Robert Millan  <rmh@aybabtu.com>
10367         * include/grub/time.h: New file.
10368         * include/grub/i386/time.h: Likewise.
10369         * include/grub/powerpc/time.h: Likewise.
10370         * include/grub/sparc64/time.h: Likewise.
10372         * include/grub/i386/pc/time.h (KERNEL_TIME_HEADER): Rename all
10373         instances to ...
10374         (KERNEL_MACHINE_TIME_HEADER): ... this.
10375         * include/grub/powerpc/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10376         instances to ...
10377         (KERNEL_MACHINE_TIME_HEADER): ... this.
10378         * include/grub/sparc64/ieee1275/time.h (KERNEL_TIME_HEADER): Rename all
10379         instances to ...
10380         (KERNEL_MACHINE_TIME_HEADER): ... this.
10382         * kern/i386/efi/init.c: Include `<grub/time.h>'.
10383         (grub_millisleep): New function.
10384         * kern/i386/pc/init.c: Include `<grub/time.h>'.
10385         (grub_millisleep): New function.
10386         * kern/powerpc/ieee1275/init.c: Include `<grub/time.h>'.
10387         Remove `grub/machine/time.h' include.
10388         (grub_millisleep): New function.
10389         * kern/sparc64/ieee1275/init.c: Include `<grub/time.h>'.
10390         Remove `grub/machine/time.h' include.
10391         (grub_millisleep): New function.
10393         * include/grub/misc.h (grub_div_roundup): New function.
10395         * kern/misc.c: Include `<grub/time.h>'.
10396         (grub_millisleep_generic): New function.
10398         * conf/i386-efi.rmk (kernel_mod_HEADERS): Remove `i386/efi/time.h'.
10399         Add `time.h'.
10400         * conf/i386-pc.rmk (kernel_img_HEADERS): Remove `machine/time.h'.
10401         Add `time.h'.
10402         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Remove
10403         `machine/time.h'.  Add `time.h'.
10404         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
10406 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10408         * include/grub/misc.h (grub_max): New function.
10410 2007-10-21  Robert Millan  <rmh@aybabtu.com>
10412         * util/misc.c (grub_util_info): Call fflush() before returning.
10414 2007-10-20  Robert Millan  <rmh@aybabtu.com>
10416         * genmk.rb (Image): Copy `extra_flags' from here ...
10417         (PModule): ... to here.  Use it in `#{obj}: #{src}' rule.
10419         * commands/i386/cpuid.c (grub_cmd_cpuid): Add __attribute__ ((unused))
10420         to `argc' and `args' arguments.
10422 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10424         * kern/i386/loader.S: New file.
10426         * kern/i386/pc/startup.S (grub_linux_prot_size): Moved from here ...
10427         * kern/i386/loader.S (grub_linux_prot_size)... to here.
10428         * kern/i386/pc/startup.S (grub_linux_tmp_addr): Moved from here ...
10429         * kern/i386/loader.S (grub_linux_tmp_addr)... to here.
10430         * kern/i386/pc/startup.S (grub_linux_real_addr): Moved from here ...
10431         * kern/i386/loader.S (grub_linux_real_addr)... to here.
10432         * kern/i386/pc/startup.S (grub_linux_boot_zimage): Moved from here ...
10433         * kern/i386/loader.S (grub_linux_boot_zimage)... to here.
10434         * kern/i386/pc/startup.S (grub_linux_boot_bzimage): Moved from here ...
10435         * kern/i386/loader.S (grub_linux_boot_bzimage)... to here.
10436         * kern/i386/pc/startup.S (grub_multiboot_real_boot): Moved from here ...
10437         * kern/i386/loader.S (grub_multiboot_real_boot)... to here.
10438         * kern/i386/pc/startup.S (grub_multiboot2_real_boot): Moved from here ...
10439         * kern/i386/loader.S (grub_multiboot2_real_boot)... to here.
10441         * kern/i386/realmode.S: New file.
10443         * kern/i386/pc/startup.S (protstack): Moved from here ...
10444         * kern/i386/realmode.S (protstack)... to here.
10445         * kern/i386/pc/startup.S (gdt): Moved from here ...
10446         * kern/i386/realmode.S (gdt)... to here.
10447         * kern/i386/pc/startup.S (prot_to_real): Moved from here ...
10448         * kern/i386/realmode.S (prot_to_real)... to here.
10450         * kern/i386/pc/startup.S: Include `kern/i386/loader.S' and
10451         `kern/i386/realmode.S'.
10453 2007-10-17  Robert Millan  <rmh@aybabtu.com>
10455         * include/grub/i386/loader.h: New file.
10457         * include/grub/i386/pc/loader.h (grub_linux_prot_size)
10458         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10459         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10460         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10461         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): Moved from here ...
10462         * include/grub/i386/loader.h (grub_linux_prot_size)
10463         (grub_linux_tmp_addr, grub_linux_real_addr, grub_os_area_addr)
10464         (grub_os_area_size, grub_linux_boot_zimage, grub_linux_boot_bzimage)
10465         (grub_multiboot_real_boot, grub_multiboot2_real_boot)
10466         (grub_rescue_cmd_linux, grub_rescue_cmd_initrd): ... to here.
10468         * include/grub/i386/pc/loader.h: Include `grub/cpu/loader.h'.
10470 2007-10-15  Robert Millan  <rmh@aybabtu.com>
10472         * normal/misc.c (grub_normal_print_device_info): Do not probe for
10473         filesystem when dev->disk is unset.
10474         Do probe for filesystem even when dev->disk->has_partitions is set.
10475         In case a filesystem is found, always report it.
10476         In case it isn't, if dev->disk->has_partitions is set, report that
10477         a partition table was found instead of reporting that no filesystem
10478         could be identified.
10480 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10482         * conf/powerpc-ieee1275.rmk (grub_mkimage_SOURCES): Replace reference
10483         to util/powerpc/ieee1275/grub-mkimage.c with util/elf/grub-mkimage.c.
10485         * include/grub/types.h (grub_host_to_target16): New macro.
10486         (grub_host_to_target32): Likewise.
10487         (grub_host_to_target64): Likewise.
10488         (grub_target_to_host16): Likewise.
10489         (grub_target_to_host32): Likewise.
10490         (grub_target_to_host64): Likewise.
10492         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
10493         Renamed from to ...
10494         (GRUB_MOD_ALIGN): ...this.  Update all users.
10496         * util/elf/grub-mkimage.c (load_note): Replace grub_cpu_to_be32 with
10497         grub_host_to_target32.
10498         Replace grub_be_to_cpu32 with grub_target_to_host32.
10499         (load_modules): Likewise.
10500         (add_segments): Replace grub_be_to_cpu16 with grub_target_to_host16.
10501         Replace grub_be_to_cpu32 with grub_target_to_host32.
10502         Replace grub_cpu_to_be16 with grub_host_to_target16.
10503         Replace grub_cpu_to_be32 grub_host_to_target32.
10505 2007-10-12  Robert Millan  <rmh@aybabtu.com>
10507         * util/powerpc/ieee1275/grub-mkimage.c: Moved to ...
10508         * util/elf/grub-mkimage.c: ... here.
10510         * DISTLIST: Add `util/elf/grub-mkimage.c'.  Remove
10511         `util/powerpc/ieee1275/grub-mkimage.c'.
10513 2007-10-07  Robert Millan  <rmh@aybabtu.com>
10515         * kern/powerpc/ieee1275/init.c: Rename HEAP_LIMIT to HEAP_MAX_ADDR,
10516         and make it easier to figure out.
10517         Add HEAP_MIN_SIZE and HEAP_MAX_ADDR definitions.
10518         (grub_claim_heap): Use HEAP_MAX_ADDR rather than taking a parameter.
10519         Do not avoid claiming a region above HEAP_MAX_ADDR if that would
10520         leave us with less than HEAP_MIN_SIZE total heap.
10521         Avoid our total amount of heap to surpass HEAP_MAX_SIZE.
10523 2007-10-03  Robert Millan  <rmh@aybabtu.com>
10525         * include/grub/i386/io.h: New file.
10526         * commands/i386/pc/play.c (inb): Removed.
10527         (outb): Removed.
10528         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10529         with grub_outb().
10530         * term/i386/pc/serial.c  (inb): Removed.
10531         (outb): Removed.
10532         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10533         with grub_outb().
10534         * term/i386/pc/vga.c  (inb): Removed.
10535         (outb): Removed.
10536         Include grub/cpu/io.h.  Replace inb() with grub_inb() and outb()
10537         with grub_outb().
10539 2007-10-02  Robert Millan  <rmh@aybabtu.com>
10541         * conf/i386-efi.rmk (grub_emu_SOURCES): Add util/hostfs.c.
10542         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
10543         Reported by Marcin Kurek.
10545 2007-09-07  Robert Millan  <rmh@aybabtu.com>
10547         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_test_flag): Detect
10548         SmartFirmware version updates (as released by Sven Luther), and avoid
10549         setting GRUB_IEEE1275_FLAG_NO_PARTITION_0 or
10550         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS unless the running version is
10551         known broken.
10553 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10555         From Hitoshi Ozeki:
10556         * kern/i386/pc/init.c (compact_mem_regions): Decrease NUM_REGIONS
10557         when merging two regions.
10559 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10561         * kern/rescue.c (grub_enter_rescue_mode): Free ARGS.
10562         * normal/completion.c (grub_normal_do_completion): Likewise.
10563         Reported by Hitoshi Ozeki.
10565 2007-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
10567         Do not use devices at boot in chainloading.
10569         * loader/i386/pc/chainloader.c (boot_drive): New variable.
10570         (boot_part_addr): Likewise.
10571         (grub_chainloader_boot): Simply call grub_chainloader_real_boot
10572         with BOOT_DRIVE and BOOT_PART_ADDR.
10573         (grub_chainloader_cmd): Set BOOT_DRIVE and BOOT_PART_ADDR.
10574         Reported by Hitoshi Ozeki <h-ozeki@ck2.so-net.ne.jp>.
10576 2007-08-29  Robert Millan  <rmh@aybabtu.com>
10578         Patch from Simon Peter <dn.tlp@gmx.net>:
10579         * genmk.rb (Utility): Append $(#{src}_DEPENDENCIES) to #{obj} targets.
10580         * conf/i386-pc.rmk: Replace grub-probe_DEPENDENCIES with
10581         util/grub-probe.c_DEPENDENCIES.  Replace grub-setup_DEPENDENCIES with
10582         util/i386/pc/grub-setup.c_DEPENDENCIES.
10583         * conf/i386-efi.rmk: Replace grub-probe_DEPENDENCIES with
10584         util/grub-probe.c_DEPENDENCIES.
10585         * conf/powerpc-ieee1275.rmk: Likewise.
10587 2007-08-28  Robert Millan  <rmh@aybabtu.com>
10589         * util/i386/get_disk_name.c: New.  Implement grub_util_get_disk_name()
10590         to tell grub-mkdevicemap how to name devices.
10591         * util/ieee1275/get_disk_name.c: Likewise (using "ofpathname -a"
10592         feature).
10594         * conf/i386-efi.rmk (grub_mkdevicemap_SOURCES): Add
10595         util/i386/get_disk_name.c.
10596         * conf/i386-pc.rmk (grub_mkdevicemap_SOURCES): Likewise.
10597         * conf/powerpc-ieee1275.rmk (grub_mkdevicemap_SOURCES): Add
10598         util/ieee1275/get_disk_name.c.
10600         * include/grub/util/misc.h: grub_util_get_disk_name() declaration.
10602         * DISTLIST: Add util/i386/get_disk_name.c and
10603         util/ieee1275/get_disk_name.c.
10605         * util/grub-mkdevicemap.c: Replace device naming logic with
10606         grub_util_get_disk_name() calls.
10608 2007-08-20  Robert Millan  <rmh@aybabtu.com>
10610         * normal/menu.c (run_menu): Refer to seconds as "s" not "seconds"
10611         (so that it works for both plural and singular quantities).
10613 2007-08-05  Robert Millan  <rmh@aybabtu.com>
10615         * util/grub.d/10_linux.in (test_gt): Strip out vmlinu[xz]- prefix
10616         so that [xz] isn't taken into account when determining order.
10618 2007-08-02  Marco Gerards  <marco@gnu.org>
10620         * DISTLIST: Add `disk/host.c', `fs/ntfs.c', `include/multiboot.h',
10621         `include/multiboot2.h', `include/grub/elfload.h',
10622         `include/multiboot.h', `include/grub/multiboot.h',
10623         `include/grub/multiboot_loader.h', `include/grub/multiboot2.h',
10624         `include/grub/i386/pc/biosdisk.h', `include/grub/util/biosdisk.h',
10625         `kern/elf.c', `loader/multiboot_loader.c',
10626         `loader/multiboot_loader_normal.c', `loader/multiboot2.c',
10627         `loader/i386/pc/multiboot2.c',
10628         `loader/powerpc/ieee1275/multiboot2.c', `util/hostfs.c' and
10629         `util/i386/pc/grub-mkrescue.in'.  Remove
10630         `include/grub/biosdisk.h', `include/grub/i386/pc/multiboot.h',
10631         `include/grub/i386/pc/util/biosdisk.h' and
10632         `include/grub/powerpc/ieee1275/multiboot.h'.
10634 2007-08-02  Bean  <bean123ch@gmail.com>
10636         * conf/common.rmk (pkgdata_MODULES): Add ntfs.mod.
10637         (ntfs_mod_SOURCES): New variable.
10638         (ntfs_mod_CFLAGS): Likewise.
10639         (ntfs_mod_LDFLAGS): Likewise.
10641         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ntfs.c.
10642         (grub_probe_SOURCES): Likewise.
10643         (grub_emu_SOURCES): Likewise.
10645         * conf/i386-efi.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10646         (grub_emu_SOURCES): Likewise.
10648         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add fs/ntfs.c.
10649         (grub_emu_SOURCES): Likewise.
10651         * conf/misc.c (grub_utf16_to_utf8): Fix unicode conversion bug.
10653         * fs/ntfs.c: New file.
10655 2007-08-02  Bean  <bean123ch@gmail.com>
10657         * disk.h (grub_disk): Use NESTED_FUNC_ATTR.
10659         * file.h (grub_file): Likewise.
10661         * fshelp.h (grub_fshelp_read_file): Likewise.
10663         * util/i386/pc/grub-setup.c (setup): Likewise.
10664         (save_first_sector): Likewise.
10665         (save_blocklists): Likewise.
10667         * fs/affs.c (grub_affs_read_file): Likewise.
10669         * fs/ext2.c (grub_ext2_read_file): Likewise.
10671         * fs/fat.c (grub_fat_read_data): Likewise.
10673         * fs/fshelp.c (grub_fshelp_read_file): Likewise.
10675         * fs/hfs.c (grub_hfs_read_file): Likewise.
10677         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
10679         * fs/jfs.c (grub_jfs_read_file): Likewise.
10681         * fs/minix.c (grub_minix_read_file): Likewise.
10683         * fs/sfs.c (grub_sfs_read_file): Likewise.
10685         * fs/ufs.c (grub_ufs_read_file): Likewise.
10687         * fs/xfs.c (grub_xfs_read_file): Likewise.
10689         * command/blocklist.c (read_blocklist): Likewise.
10690         (print_blocklist): Likewise.
10692 2007-08-02  Marco Gerards  <marco@gnu.org>
10694         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/host.c' and
10695         `util/hostfs.c'.
10697         * disk/host.c: New file.
10699         * util/hostfs.c: Likewise.
10701         * fs/hfsplus.c (grub_hfsplus_mount): When reading out of disk,
10702         return `GRUB_ERR_BAD_FS'.
10703         * fs/sfs.c (grub_sfs_mount): Likewise.
10704         * fs/xfs.c (grub_xfs_mount): Likewise.
10706         * include/grub/disk.h (enum grub_disk_dev_id): Add
10707         `GRUB_DISK_DEVICE_HOST_ID'.
10709         * util/grub-emu.c (main): Initialize and de-initialize hostfs.
10711 2007-07-24  Jerone Young  <jerone@gmail.com>
10713         * conf/i386-pc.rmk: Add Multiboot loader and multiboot 2 to multiboot
10714         modules for compilation.
10715         * conf/powerpc-ieee1275.rmk: Likewise.
10717         * include/multiboot.h: Move multiboot definitions to one file. Rename
10718         many definitions to not get grub specific.
10719         * include/multiboot2.h: Create header with multiboot 2 definitions.
10720         * include/grub/multiboot.h: Header for grub specific function
10721         prototypes and definitions.
10722         * include/grub/multiboot2.h: Likewise.
10723         * include/grub/multiboot_loader.h: Likewise.
10724         * include/grub/i386/pc/multiboot.h: Removed.
10725         * include/grub/powerpc/ieee1275/multiboot.h: Removed.
10727         * loader/multiboot_loader.c: Created to act as a proxy for multiboot 1
10728         and 2 to allow for one multiboot and module commands.
10729         * loader/multiboot2.c: Add multiboot2 functionality.
10730         * loader/i386/pc/multiboot.c: Modify for new multiboot header location
10731         and definition names.
10732         * loader/i386/pc/multiboot2.c: Created to add i386 specific multiboot
10733         2 functions.
10734         * loader/powerpc/ieee1275/multiboot2.c: Created to add powerpc
10735         ieee1275 specific multiboot2 code.
10737         * kern/i386/pc/startup.S: Change headers and definition names for
10738         multiboot. Add function grub_multiboot2_real_boot for multiboot 2.
10740 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10742         * geninitheader.sh: Process file specified in first parameter rather
10743         than hardcoding grub_modules_init.lst.
10744         * geninit.sh: Likewise.  Also, construct header name dynamically rather
10745         than hardcoding grub_modules_init.h.
10747         * conf/common.rmk: Rename grub_modules_init.[ch] files associated with
10748         grub-emu to grub_emu_init.[ch].  Add rules to build analogous
10749         grub_probe_init.[ch] and grub_setup_init.[ch].
10751         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace
10752         grub_modules_init.h with grub_emu_init.h.
10753         (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new
10754         grub_probe_init.[ch] files.
10755         * conf/i386-efi.rmk: Likewise.
10756         * conf/i386-pc.rmk: Likewise.
10757         (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new
10758         grub_setup_init.[ch] files.
10760         * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h.
10761         * util/grub-probe.c: Include grub_probe_init.h.  Use grub_init_all()
10762         to initialize modules rather than a list of hardcoded functions.
10763         * util/i386/pc/grub-setup.c: Include grub_setup_init.h.  Use
10764         grub_init_all() to initialize modules rather than a list of hardcoded
10765         functions.
10767 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10769         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set
10770         GRUB_IEEE1275_FLAG_NO_PARTITION_0 flag when running on SmartFirmware.
10772 2007-07-22  Robert Millan  <rmh@aybabtu.com>
10774         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): Add
10775         GRUB_IEEE1275_FLAG_BROKEN_OUTPUT flag.
10776         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options): Set this
10777         flag when running on SmartFirmware.
10778         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Avoid running
10779         "output-device output" command when GRUB_IEEE1275_FLAG_BROKEN_OUTPUT
10780         was set.
10782         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
10783         Increase partno when GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS flag is set,
10784         rather than decreasing it.
10786         * util/i386/pc/grub-setup.c (setup): When embedding is required, but
10787         there's not enough space to do it, fail in the same way as when it
10788         can't be done because there are no partitions.
10790         * util/powerpc/ieee1275/grub-install.in: Improve error message shown
10791         when nvsetenv failed.
10793 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10795         * conf/i386-pc.rmk (CLEANFILES): Removed for grub-mkrescue,
10796         because this rule is automatically generated.
10797         (grub-mkrescue): Removed for the same reason as above.
10799 2007-07-22  Yoshinori K. Okuji  <okuji@enbug.org>
10801         Migrate to GNU General Public License Version 3.
10803         * COPYING: Replaced with the plain text version of GPLv3.
10805         * config.guess: Updated from gnulib.
10806         * config.sub: Likewise.
10808         * geninit.sh: Output a GPLv3 copyright notice.
10809         * geninitheader.sh: Likewise.
10810         * genmodsrc.sh: Likewise.
10811         * gensymlist.sh.in: Likewise.
10813         * boot/i386/pc/boot.S: Upgraded to GPLv3.
10814         * boot/i386/pc/diskboot.S: Likewise.
10815         * boot/i386/pc/pxeboot.S: Likewise.
10816         * commands/blocklist.c: Likewise.
10817         * commands/boot.c: Likewise.
10818         * commands/cat.c: Likewise.
10819         * commands/cmp.c: Likewise.
10820         * commands/configfile.c: Likewise.
10821         * commands/echo.c: Likewise.
10822         * commands/help.c: Likewise.
10823         * commands/ls.c: Likewise.
10824         * commands/search.c: Likewise.
10825         * commands/terminal.c: Likewise.
10826         * commands/test.c: Likewise.
10827         * commands/videotest.c: Likewise.
10828         * commands/i386/cpuid.c: Likewise.
10829         * commands/i386/pc/halt.c: Likewise.
10830         * commands/i386/pc/play.c: Likewise.
10831         * commands/i386/pc/reboot.c: Likewise.
10832         * commands/i386/pc/vbeinfo.c: Likewise.
10833         * commands/i386/pc/vbetest.c: Likewise.
10834         * commands/ieee1275/halt.c: Likewise.
10835         * commands/ieee1275/reboot.c: Likewise.
10836         * commands/ieee1275/suspend.c: Likewise.
10837         * disk/loopback.c: Likewise.
10838         * disk/lvm.c: Likewise.
10839         * disk/raid.c: Likewise.
10840         * disk/efi/efidisk.c: Likewise.
10841         * disk/i386/pc/biosdisk.c: Likewise.
10842         * disk/ieee1275/ofdisk.c: Likewise.
10843         * font/manager.c: Likewise.
10844         * fs/affs.c: Likewise.
10845         * fs/ext2.c: Likewise.
10846         * fs/fat.c: Likewise.
10847         * fs/fshelp.c: Likewise.
10848         * fs/hfs.c: Likewise.
10849         * fs/hfsplus.c: Likewise.
10850         * fs/iso9660.c: Likewise.
10851         * fs/jfs.c: Likewise.
10852         * fs/minix.c: Likewise.
10853         * fs/sfs.c: Likewise.
10854         * fs/ufs.c: Likewise.
10855         * fs/xfs.c: Likewise.
10856         * hello/hello.c: Likewise.
10857         * include/grub/acorn_filecore.h: Likewise.
10858         * include/grub/arg.h: Likewise.
10859         * include/grub/bitmap.h: Likewise.
10860         * include/grub/boot.h: Likewise.
10861         * include/grub/cache.h: Likewise.
10862         * include/grub/device.h: Likewise.
10863         * include/grub/disk.h: Likewise.
10864         * include/grub/dl.h: Likewise.
10865         * include/grub/elfload.h: Likewise.
10866         * include/grub/env.h: Likewise.
10867         * include/grub/err.h: Likewise.
10868         * include/grub/file.h: Likewise.
10869         * include/grub/font.h: Likewise.
10870         * include/grub/fs.h: Likewise.
10871         * include/grub/fshelp.h: Likewise.
10872         * include/grub/gzio.h: Likewise.
10873         * include/grub/hfs.h: Likewise.
10874         * include/grub/kernel.h: Likewise.
10875         * include/grub/loader.h: Likewise.
10876         * include/grub/lvm.h: Likewise.
10877         * include/grub/misc.h: Likewise.
10878         * include/grub/mm.h: Likewise.
10879         * include/grub/net.h: Likewise.
10880         * include/grub/normal.h: Likewise.
10881         * include/grub/parser.h: Likewise.
10882         * include/grub/partition.h: Likewise.
10883         * include/grub/pc_partition.h: Likewise.
10884         * include/grub/raid.h: Likewise.
10885         * include/grub/rescue.h: Likewise.
10886         * include/grub/script.h: Likewise.
10887         * include/grub/setjmp.h: Likewise.
10888         * include/grub/symbol.h: Likewise.
10889         * include/grub/term.h: Likewise.
10890         * include/grub/terminfo.h: Likewise.
10891         * include/grub/tparm.h: Likewise.
10892         * include/grub/types.h: Likewise.
10893         * include/grub/video.h: Likewise.
10894         * include/grub/efi/api.h: Likewise.
10895         * include/grub/efi/chainloader.h: Likewise.
10896         * include/grub/efi/console.h: Likewise.
10897         * include/grub/efi/console_control.h: Likewise.
10898         * include/grub/efi/disk.h: Likewise.
10899         * include/grub/efi/efi.h: Likewise.
10900         * include/grub/efi/pe32.h: Likewise.
10901         * include/grub/efi/time.h: Likewise.
10902         * include/grub/i386/linux.h: Likewise.
10903         * include/grub/i386/setjmp.h: Likewise.
10904         * include/grub/i386/types.h: Likewise.
10905         * include/grub/i386/efi/kernel.h: Likewise.
10906         * include/grub/i386/efi/loader.h: Likewise.
10907         * include/grub/i386/efi/time.h: Likewise.
10908         * include/grub/i386/pc/biosdisk.h: Likewise.
10909         * include/grub/i386/pc/boot.h: Likewise.
10910         * include/grub/i386/pc/chainloader.h: Likewise.
10911         * include/grub/i386/pc/console.h: Likewise.
10912         * include/grub/i386/pc/init.h: Likewise.
10913         * include/grub/i386/pc/kernel.h: Likewise.
10914         * include/grub/i386/pc/loader.h: Likewise.
10915         * include/grub/i386/pc/memory.h: Likewise.
10916         * include/grub/i386/pc/multiboot.h: Likewise.
10917         * include/grub/i386/pc/serial.h: Likewise.
10918         * include/grub/i386/pc/time.h: Likewise.
10919         * include/grub/i386/pc/vbe.h: Likewise.
10920         * include/grub/i386/pc/vbeblit.h: Likewise.
10921         * include/grub/i386/pc/vbefill.h: Likewise.
10922         * include/grub/i386/pc/vbeutil.h: Likewise.
10923         * include/grub/i386/pc/vga.h: Likewise.
10924         * include/grub/ieee1275/ieee1275.h: Likewise.
10925         * include/grub/ieee1275/ofdisk.h: Likewise.
10926         * include/grub/powerpc/libgcc.h: Likewise.
10927         * include/grub/powerpc/setjmp.h: Likewise.
10928         * include/grub/powerpc/types.h: Likewise.
10929         * include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
10930         * include/grub/powerpc/ieee1275/console.h: Likewise.
10931         * include/grub/powerpc/ieee1275/ieee1275.h: Likewise.
10932         * include/grub/powerpc/ieee1275/kernel.h: Likewise.
10933         * include/grub/powerpc/ieee1275/loader.h: Likewise.
10934         * include/grub/powerpc/ieee1275/multiboot.h: Likewise.
10935         * include/grub/powerpc/ieee1275/time.h: Likewise.
10936         * include/grub/powerpc/ieee1275/util/biosdisk.h: Likewise.
10937         * include/grub/sparc64/libgcc.h: Likewise.
10938         * include/grub/sparc64/setjmp.h: Likewise.
10939         * include/grub/sparc64/types.h: Likewise.
10940         * include/grub/sparc64/ieee1275/console.h: Likewise.
10941         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
10942         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
10943         * include/grub/sparc64/ieee1275/time.h: Likewise.
10944         * include/grub/util/biosdisk.h: Likewise.
10945         * include/grub/util/getroot.h: Likewise.
10946         * include/grub/util/lvm.h: Likewise.
10947         * include/grub/util/misc.h: Likewise.
10948         * include/grub/util/raid.h: Likewise.
10949         * include/grub/util/resolve.h: Likewise.
10950         * io/gzio.c: Likewise.
10951         * kern/device.c: Likewise.
10952         * kern/disk.c: Likewise.
10953         * kern/dl.c: Likewise.
10954         * kern/elf.c: Likewise.
10955         * kern/env.c: Likewise.
10956         * kern/err.c: Likewise.
10957         * kern/file.c: Likewise.
10958         * kern/fs.c: Likewise.
10959         * kern/loader.c: Likewise.
10960         * kern/main.c: Likewise.
10961         * kern/misc.c: Likewise.
10962         * kern/mm.c: Likewise.
10963         * kern/parser.c: Likewise.
10964         * kern/partition.c: Likewise.
10965         * kern/rescue.c: Likewise.
10966         * kern/term.c: Likewise.
10967         * kern/efi/efi.c: Likewise.
10968         * kern/efi/init.c: Likewise.
10969         * kern/efi/mm.c: Likewise.
10970         * kern/i386/dl.c: Likewise.
10971         * kern/i386/efi/init.c: Likewise.
10972         * kern/i386/efi/startup.S: Likewise.
10973         * kern/i386/pc/init.c: Likewise.
10974         * kern/i386/pc/lzo1x.S: Likewise.
10975         * kern/i386/pc/startup.S: Likewise.
10976         * kern/ieee1275/ieee1275.c: Likewise.
10977         * kern/powerpc/cache.S: Likewise.
10978         * kern/powerpc/dl.c: Likewise.
10979         * kern/powerpc/ieee1275/cmain.c: Likewise.
10980         * kern/powerpc/ieee1275/crt0.S: Likewise.
10981         * kern/powerpc/ieee1275/init.c: Likewise.
10982         * kern/powerpc/ieee1275/openfw.c: Likewise.
10983         * kern/sparc64/cache.S: Likewise.
10984         * kern/sparc64/dl.c: Likewise.
10985         * kern/sparc64/ieee1275/init.c: Likewise.
10986         * kern/sparc64/ieee1275/openfw.c: Likewise.
10987         * loader/efi/chainloader.c: Likewise.
10988         * loader/efi/chainloader_normal.c: Likewise.
10989         * loader/i386/efi/linux.c: Likewise.
10990         * loader/i386/efi/linux_normal.c: Likewise.
10991         * loader/i386/pc/chainloader.c: Likewise.
10992         * loader/i386/pc/chainloader_normal.c: Likewise.
10993         * loader/i386/pc/linux.c: Likewise.
10994         * loader/i386/pc/linux_normal.c: Likewise.
10995         * loader/i386/pc/multiboot.c: Likewise.
10996         * loader/i386/pc/multiboot_normal.c: Likewise.
10997         * loader/powerpc/ieee1275/linux.c: Likewise.
10998         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
10999         * normal/arg.c: Likewise.
11000         * normal/cmdline.c: Likewise.
11001         * normal/command.c: Likewise.
11002         * normal/completion.c: Likewise.
11003         * normal/execute.c: Likewise.
11004         * normal/function.c: Likewise.
11005         * normal/lexer.c: Likewise.
11006         * normal/main.c: Likewise.
11007         * normal/menu.c: Likewise.
11008         * normal/menu_entry.c: Likewise.
11009         * normal/misc.c: Likewise.
11010         * normal/parser.y: Likewise.
11011         * normal/script.c: Likewise.
11012         * normal/i386/setjmp.S: Likewise.
11013         * normal/powerpc/setjmp.S: Likewise.
11014         * normal/sparc64/setjmp.S: Likewise.
11015         * partmap/acorn.c: Likewise.
11016         * partmap/amiga.c: Likewise.
11017         * partmap/apple.c: Likewise.
11018         * partmap/gpt.c: Likewise.
11019         * partmap/pc.c: Likewise.
11020         * partmap/sun.c: Likewise.
11021         * term/gfxterm.c: Likewise.
11022         * term/terminfo.c: Likewise.
11023         * term/efi/console.c: Likewise.
11024         * term/i386/pc/console.c: Likewise.
11025         * term/i386/pc/serial.c: Likewise.
11026         * term/i386/pc/vesafb.c: Likewise.
11027         * term/i386/pc/vga.c: Likewise.
11028         * term/ieee1275/ofconsole.c: Likewise.
11029         * util/biosdisk.c: Likewise.
11030         * util/console.c: Likewise.
11031         * util/genmoddep.c: Likewise.
11032         * util/getroot.c: Likewise.
11033         * util/grub-emu.c: Likewise.
11034         * util/grub-mkdevicemap.c: Likewise.
11035         * util/grub-probe.c: Likewise.
11036         * util/lvm.c: Likewise.
11037         * util/misc.c: Likewise.
11038         * util/raid.c: Likewise.
11039         * util/resolve.c: Likewise.
11040         * util/update-grub.in: Likewise.
11041         * util/update-grub_lib.in: Likewise.
11042         * util/grub.d/00_header.in: Likewise.
11043         * util/grub.d/10_hurd.in: Likewise.
11044         * util/grub.d/10_linux.in: Likewise.
11045         * util/i386/efi/grub-install.in: Likewise.
11046         * util/i386/efi/grub-mkimage.c: Likewise.
11047         * util/i386/pc/grub-install.in: Likewise.
11048         * util/i386/pc/grub-mkimage.c: Likewise.
11049         * util/i386/pc/grub-mkrescue.in: Likewise.
11050         * util/i386/pc/grub-setup.c: Likewise.
11051         * util/i386/pc/misc.c: Likewise.
11052         * util/powerpc/ieee1275/grub-install.in: Likewise.
11053         * util/powerpc/ieee1275/grub-mkimage.c: Likewise.
11054         * util/powerpc/ieee1275/misc.c: Likewise.
11055         * video/bitmap.c: Likewise.
11056         * video/video.c: Likewise.
11057         * video/i386/pc/vbe.c: Likewise.
11058         * video/i386/pc/vbeblit.c: Likewise.
11059         * video/i386/pc/vbefill.c: Likewise.
11060         * video/i386/pc/vbeutil.c: Likewise.
11061         * video/readers/tga.c: Likewise.
11063 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11065         * conf/i386-efi.rmk: Replace obsolete reference to
11066         util/i386/pc/biosdisk.c with util/biosdisk.c, and util/i386/pc/getroot.c
11067         with util/getroot.c.
11068         * conf/powerpc-ieee1275.rmk: Likewise.
11069         * conf/sparc64-ieee1275.rmk: Likewise.
11071         * util/grub-emu.c (main): Fix unchecked pointer handling.
11073 2007-07-02  Robert Millan  <rmh@aybabtu.com>
11075         * util/i386/efi/grub-install.in: Allow `grub_probe --target=partmap'
11076         invocation to fail, in order to support partition-less media.
11078         * util/i386/pc/grub-install.in: Likewise.
11080         * util/powerpc/ieee1275/grub-install.in: Use grub-probe to determine
11081         which fs or partmap modules are needed (akin to its sister scripts).
11083         Also use grub-probe to get rid of unportable /proc/mounts check.
11085         Print the same informational message that the other scripts do, before
11086         exiting.
11088 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11090         * util/update-grub_lib.in (font_path): New function.  Determine whether
11091         a font file can be found and, if so, echo the GRUB path to it.
11093         * util/update-grub.in: Handle multiple terminals depending on user
11094         input, platform availability and font file presence.  Propagate
11095         variables of our findings to /etc/grub.d/ children.
11097         * util/grub.d/00_header.in: Handle multiple terminals, based on
11098         environment setup by update-grub.
11100 2007-06-23  Robert Millan  <rmh@aybabtu.com>
11102         * conf/i386-pc.rmk (pkgdata_MODULES): Add serial.mod.
11104 2007-06-21  Robert Millan  <rmh@aybabtu.com>
11106         * include/grub/i386/pc/kernel.h: Define GRUB_KERNEL_MACHINE_DATA_END to
11107         indicate end of data section in kernel image.
11108         * include/grub/i386/efi/kernel.h: Define GRUB_KERNEL_MACHINE_PREFIX and
11109         GRUB_KERNEL_MACHINE_DATA_END.
11111         * kern/i386/pc/startup.S: Do not initialize grub_prefix, only reserve
11112         space for it.
11113         * kern/i386/efi/startup.S: Likewise.
11115         * util/i386/pc/grub-mkimage.c: Initialize grub_prefix to /boot/grub
11116         during image generation.  Implement --prefix option to override this
11117         patch.
11118         * util/i386/efi/grub-mkimage.c: Likewise.
11120         * util/update-grub_lib.in (convert_system_path_to_grub_path): Split
11121         code to make path relative to its root into a separate function.
11123         * util/i386/pc/grub-install.in: Use newly provided
11124         make_system_path_relative_to_its_root() to convert ${grubdir}, then
11125         pass the result to grub-install --prefix.
11127 2007-06-13  Robert Millan  <rmh@aybabtu.com>
11129         * include/grub/util/misc.h: Define DEFAULT_DIRECTORY and
11130         DEFAULT_DEVICE_MAP.
11131         * util/grub-emu.c: Use above definitions from misc.h instead of
11132         defining them.
11133         * util/grub-mkdevicemap.c: Likewise.
11134         * util/i386/pc/grub-setup.c: Likewise.
11135         * util/grub-probe.c: Likewise.
11136         (probe): Abort with grub_util_error() when either
11137         grub_guess_root_device or grub_util_get_grub_dev fails.
11139 2007-06-12  Robert Millan  <rmh@aybabtu.com>
11141         * normal/command.c (grub_command_execute): Use NULL rather than 0 for
11142         "pager" assignment.
11143         * util/biosdisk.c (grub_util_biosdisk_get_grub_dev): Likewise for
11144         "pcdata".
11145         * util/grub-probe.c (probe): Likewise for "drive_name".
11147 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11149         * util/i386/pc/grub-mkrescue.in: Pad both floppy images with zeroes,
11150         not just the cdrom one.
11152 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11154         * util/i386/pc/grub-mkrescue.in: Add "set -e".
11155         Add --pkglibdir=DIR option to override pkglibdir.
11156         Mention --image-type=TYPE in help output.
11157         Fix --grub-mkimage (it was a no-op).
11158         Abort gracefully when no parameter is given.
11160 2007-06-11  Robert Millan  <rmh@aybabtu.com>
11162         * util/i386/pc/grub-mkrescue.in: New file.
11163         * conf/i386-pc.rmk: Add its build declarations.  Put it in bin_SCRIPTS.
11164         * Makefile.in: Handle bin_SCRIPTS.
11166 2007-06-10  Vesa Jaaskelainen  <chaac@nic.fi>
11168         * term/gfxterm.c (grub_gfxterm_init): Added support for specifying
11169         list of video modes.
11171 2007-06-06  Robert Millan  <rmh@aybabtu.com>
11173         * util/update-grub_lib.in (convert_system_path_to_grub_path): Abort if
11174         file doesn't exist, or if it is in a filesystem grub can't read.
11176         * util/update-grub.in: Set fallback for GRUB_FS check to "unknown".  Do
11177         not abort if GRUB_DRIVE could not be defined.  Rearrange generated
11178         header comment to fit in 80 columns when the variables are resolved.
11180         * util/grub.d/00_header.in: Only set root variable when GRUB_DRIVE
11181         could be identified by update-grub.  Remove redundant check for
11182         unifont.pff existence (since convert_system_path_to_grub_path now
11183         handles that).
11185 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11187         * conf/i386-efi.rmk (grub_probe_SOURCES): Add partmap/apple.c.
11189         * conf/i386-pc.rmk (grub_probe_SOURCES): Likewise.
11191         * conf/powerpc-ieee1275.rmk (grub_probe_SOURCES): Add partmap/pc.c.
11193 2007-06-04  Robert Millan  <rmh@aybabtu.com>
11195         * conf/powerpc-ieee1275.rmk: Enable grub-mkdevicemap and grub-probe.
11197         * include/grub/partition.h: Declare grub_apple_partition_map_init and
11198         grub_apple_partition_map_fini.
11200         * util/biosdisk.c
11201         (grub_util_biosdisk_open): Replace BLKGETSIZE with BLKGETSIZE64 (needed
11202         to access >2 TiB disks).
11204         Print disk->total_sectors with %llu instead of %lu, since this
11205         variable is always 64-bit (prevents wrong disk size from being displayed
11206         on either >2 TiB disk or big-endian CPU).
11208         (grub_util_biosdisk_get_grub_dev): Convert gpt_partition_map handling
11209         into a generic case that supports all (sane) partition maps.
11211         Stop using grub_cpu_to_le32() on dos_part / bsd_part since it actually
11212         breaks big-endian.
11214         * util/grub-probe.c: Call grub_apple_partition_map_init() before probe()
11215         and grub_apple_partition_map_fini() after that.
11217 2007-06-01  Robert Millan  <rmh@aybabtu.com>
11219         * util/update-grub.in: Export GRUB_CMDLINE_LINUX.
11221         * util/grub.d/00_header.in: Only enable gfxterm when
11222         convert_system_path_to_grub_path() succeeds.
11224 2007-05-20  Robert Millan  <rmh@aybabtu.com>
11226         * util/update-grub_lib.in: New file.
11227         * DISTLIST: Add update-grub_lib.in.
11228         * conf/common.rmk: Generate update-grub_lib and install it in
11229         $(lib_DATA).
11230         * Makefile.in: Add install routine for $(lib_DATA).
11232         * util/grub.d/00_header.in: Use convert_system_path_to_grub_path()
11233         function provided by update-grub_lib to support arbitrary paths of
11234         unifont.pff.
11235         * util/update-grub.in: Use convert_system_path_to_grub_path() to
11236         initialize GRUB_DRIVE_BOOT and GRUB_DRIVE_BOOT_GRUB variables.
11238 2007-05-19  Robert Millan  <rmh@aybabtu.com>
11240         * commands/i386/cpuid.c: New module.
11241         * DISTLIST: Add it.
11242         * conf/i386-efi.rmk: Enable cpuid.mod.
11243         * conf/i386-pc.rmk: Likewise.
11245 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11247         * kern/disk.c (grub_disk_read): Check return value of
11248         grub_realloc().
11250 2007-05-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11252         * util/getroot.c (grub_util_get_grub_dev): Support partitionable
11253         arrays.
11254         * disk/raid.c (grub_raid_open): Likewise.
11256 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11258         * util/biosdisk.c (linux_find_partition): Allocate real_dev on the
11259         stack instead of on the heap.
11261         * kern/disk.c (grub_disk_read): Make sure tmp_buf is big enough
11262         before doing a read on it.
11264         * configure.ac: Only use -fno-stack-protector for the target
11265         environment.
11267 2007-05-17  Jeroen Dekkers  <jeroen@dekkers.cx>
11269         * video/i386/pc/vbe.c (grub_video_vbe_create_render_target): Add
11270         __attribute_ ((unused)) to mode_type argument.
11272         * util/getroot.c (grub_guess_root_device): Fix #endif.
11274         * kern/misc.c (memcmp): Fix prototype.
11276         * include/grub/partition.h [GRUB_UTIL]
11277         (grub_gpt_partition_map_init): Add prototype.
11278         (grub_gpt_partition_map_fini): Likewise.
11280         * fs/jfs.c (struct grub_jfs_inode): Put __attribute__ ((packed)
11281         at the right place.
11283         * fs/fat.c (grub_fat_mount): Replace ~0UL with ~0U.
11284         (grub_fat_read_data): Likewise.
11285         (grub_fat_find_dir): Likewise.
11287         * font/manager.c (find_glyph): Make table a const.
11288         (grub_font_get_glyph): Remove bitmap from if statement.
11290 2007-05-16  Jeroen Dekkers  <jeroen@dekkers.cx>
11292         * util/getroot.c (grub_guess_root_device): Remove RAID and LVM
11293         code, first search for device in /dev/mapper, then in /dev.
11294         (grub_util_get_grub_dev): New function.
11295         * include/grub/util/getroot.h (grub_util_get_grub_dev): Add
11296         prototype.
11297         * util/grub-probe.c (probe): Remove check for RAID, call
11298         grub_util_get_grub_dev() instead of
11299         grub_util_biosdisk_get_grub_dev().
11300         * util/grub-emu.c (main): Call grub_util_get_grub_dev() instead of
11301         grub_util_biosdisk_get_grub_dev().
11302         * util/i386/pc/grub-setup.c (main): Likewise.
11304 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11306         * DISTLIST: Update for the latest changes.
11307         * conf/i386-pc.rmk: Use the new paths for util/getroot.c,
11308         util/grub-mkdevicemap.c, util/grub-probe.c and util/biosdisk.c.
11309         * util/grub-emu.c: Replace grub/i386/pc/util/biosdisk.h with
11310         grub/util/biosdisk.h.
11311         * util/i386/pc/grub-setup.c: Replace grub/machine/util/biosdisk.h with
11312         grub/util/biosdisk.h.
11314 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11316         * util/grub.d/00_header.in: Set default gfxmode to `640x480'.
11318 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11320         * util/i386/efi/grub-install.in: New.
11321         * conf/i386-efi.rmk: Enable grub-mkdevicemap, grub-probe and the
11322         newly added grub-install.
11323         * util/biosdisk.c: Remove unnecessary grub/machine/biosdisk.h
11324         include.
11325         * util/getroot.c: Replace grub/i386/pc/util/biosdisk.h with
11326         grub/util/biosdisk.h.
11327         * util/grub-probe.c: Replace grub/machine/util/biosdisk.h with
11328         grub/util/biosdisk.h.
11330 2007-05-16  Robert Millan  <rmh@aybabtu.com>
11332         * include/grub/i386/pc/util/biosdisk.h: Moved to ...
11333         * include/grub/util/biosdisk.h: ... here.
11334         * util/i386/pc/biosdisk.c: Moved to ...
11335         * util/biosdisk.c: ... here.
11336         * util/i386/pc/getroot.c: Moved to ...
11337         * util/getroot.c: ... here.
11338         * util/i386/pc/grub-mkdevicemap.c: Moved to ...
11339         * util/grub-mkdevicemap.c: ... here.
11340         * util/i386/pc/grub-probe.c: Moved to ...
11341         * util/grub-probe.c: ... here.
11343 2007-05-15  Robert Millan  <rmh@aybabtu.com>
11345         * util/update-grub.in: Remove duplicated line in grub.cfg header
11346         message.
11348 2007-05-13  Robert Millan  <rmh@aybabtu.com>
11350         * util/update-grub.in: Fix a few assumptions about the devices holding
11351         /, /boot and /boot/grub being the same.
11352         * util/grub.d/00_header.in: Likewise.
11353         * util/grub.d/10_hurd.in: Likewise.
11354         * util/grub.d/10_linux.in: Likewise.
11356         * util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
11357         patterns.  Use that to define the `.old' suffix as older than `'.
11359         * util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
11361         * util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
11362         the grub.cfg header message.
11364 2007-05-11  Robert Millan  <rmh@aybabtu.com>
11366         * util/update-grub.in: Create device.map if it doesn't already exist,
11367         before attempting to run grub-probe.
11368         Check for grub-probe and grub-mkdevicemap with the same code
11369         grub-install is using.
11370         Remove test mode.
11372 2007-05-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11374         * Makefile.in: Add the datarootdir autoconf variable.
11376 2007-05-09  Robert Millan  <rmh@aybabtu.com>
11378         * util/i386/pc/grub-probe.c (probe): When detecting partition map,
11379         fail gracefully if dev->disk->partition == NULL.
11381 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11383         * util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
11384         determine partition map module.
11385         * util/i386/pc/grub-install.in: Use this feature to decide which
11386         partition module to load, instead of hardcoding pc and gpt.
11388 2007-05-07  Robert Millan  <rmh@aybabtu.com>
11390         * Makefile.in: Fix assumption that $(srcdir) has a trailing slash when
11391         source directory differs from build directory.
11393 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11395         * util/powerpc/ieee1275/grub-install.in: Fix syntax error in pkglibdir
11396         initialisation.
11398 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11400         * util/update-grub.in: Create ${grub_prefix} if it doesn't exist.
11402 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11404         * util/grub.d/10_linux.in: Allow the administrator to insert Linux
11405         command-line arguments via ${GRUB_CMDLINE_LINUX}.
11407 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11409         * conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
11410         (grub_probe_SOURCES): Likewise.
11411         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
11412         GPT and initialize dos_part and bsd_part accordingly.
11413         * util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
11414         install_bsd_part.
11415         (main): Activate gpt module for use during partition identification,
11416         and deactivate it afterwards.
11417         * util/i386/pc/grub-install.in: Add gpt module to core.img.
11418         * util/i386/pc/grub-probe.c (main): Activate gpt module for use during
11419         partition identification, and deactivate it afterwards.
11421 2007-05-05  Robert Millan  <rmh@aybabtu.com>
11423         * term/i386/pc/console.c (grub_console_fini): Call
11424         grub_term_set_current() before grub_term_unregister().
11426 2007-05-04  Robert Millan  <rmh@aybabtu.com>
11428         * DISTLIST: Add util/update-grub.in, util/grub.d/00_header.in,
11429         util/grub.d/10_hurd.in, util/grub.d/10_linux.in and util/grub.d/README.
11430         * Makefile.in: Build update-grub_SCRIPTS.  Install update-grub_SCRIPTS
11431         and update-grub_DATA.
11432         * conf/common.rmk: Build and install update-grub components.
11433         * conf/common.mk: Regenerate.
11434         * util/update-grub.in: New.  Core of update-grub.
11435         * util/grub.d/00_header.in: New.  Generates grub.cfg header.
11436         * util/grub.d/10_hurd.in: New.  Generates boot entries for the Hurd.
11437         * util/grub.d/10_linux.in: New.  Generates boot entries for Linux.
11438         * util/grub.d/README: New.  Document grub.d directory layout.
11440 2007-05-01  Robert Millan  <rmh@aybabtu.com>
11442         * util/grub-emu.c: Move initialization functions
11443         grub_util_biosdisk_init() and grub_init_all() before
11444         grub_util_biosdisk_get_grub_dev(), which relies on them.
11446 2007-04-19  Robert Millan  <rmh@aybabtu.com>
11448         * util/powerpc/ieee1275/grub-install.in: Initialize ${bindir}, since
11449         it is used later.
11451 2007-04-18  Jerone Young  <jerone@gmail.com>
11453         * kernel/elf.c: Add missing parenthesis for conditional statement
11454         stanza.
11456 2007-04-10  Jerone Young  <jerone@gmail.com>
11458         * util/i386/pc/getroot.c: Update so that if root device is /dev/root ,
11459         continue on and look for device node with real device name.
11461 2007-04-10  Jerone Young  <jerone@gmail.com>
11463         * configure.ac: Add argument for autoconf to use transformation
11464         ability.
11465         * Makefile.in: Add autoconf package transformation code.
11466         * util/i386/pc/grub-install.in: Likewise.
11467         * util/powerpc/ieee1275/grub-install.in: Likewise.
11469 2007-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
11471         * fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
11472         (EXT2_GOOD_OLD_INODE_SIZE): Likewise.
11473         (EXT2_REVISION): Likewise.
11474         (EXT2_INODE_SIZE): Likewise.
11475         (struct grub_ext2_block_group): Added a missing member
11476         "used_dirs".
11477         (grub_ext2_read_inode): Divide by the inode size in a superblock
11478         instead of 128 to obtain INODES_PER_BLOCK.
11479         Use the macro EXT2_INODE_SIZE instead of directly using
11480         SBLOCK->INODE_SIZE.
11482 2007-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
11484         * fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
11485         superblock instead of the structure size to compute an
11486         offset. This fixes the problem that GRUB could not read a
11487         filesystem when inode size is different from 128-byte.
11489 2007-03-05  Marco Gerards  <marco@gnu.org>
11491         * normal/main.c (read_config_file): When "menu" is not set, create
11492         an initial context.
11494 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11496         * kern/powerpc/ieee1275/init.c (HEAP_SIZE): Removed.
11497         (HEAP_LIMIT): New macro.
11498         (grub_claim_heap): Claim memory up to `heaplimit'.
11500 2007-02-21  Hollis Blanchard  <hollis@penguinppc.org>
11502         * conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
11503         * kern/powerpc/ieee1275/init.c (_end): Add declaration.
11504         (_start): Likewise.
11505         (grub_arch_modules_addr): Return address after `_end'.
11506         * util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
11507         (load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
11508         (add_segments): Calculate `_end' from phdr size and location.
11509         (ALIGN_UP): Moved to ...
11510         * include/grub/misc.h: here.
11511         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
11512         New macro.
11513         (GRUB_IEEE1275_MODULE_BASE): Removed.
11515 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11517         * kern/powerpc/ieee1275/openfw.c (grub_available_iterate): Correct
11518         loop boundary.
11520 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11522         * include/grub/elfload.h (grub_elf32_load_hook_t): Return grub_err_t.
11523         All users updated.
11524         (grub_elf64_load_hook_t): Likewise.
11525         * kern/elf.c: Call `grub_error_push' before `grub_error'. Improve
11526         debug output.
11528 2007-02-20  Hollis Blanchard  <hollis@penguinppc.org>
11530         * kern/mm.c: Update copyright.
11531         (grub_mm_debug): Correct syntax error.
11532         (grub_mm_dump_free): New function.
11533         (grub_debug_free): Call `grub_free'.
11534         * include/grub/mm.h: Update copyright.
11535         (grub_mm_dump_free): Add declaration.
11537 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11539         * include/grub/ieee1275/ieee1275.h: Update copyright.
11540         * kern/powerpc/ieee1275/init.c: Likewise.
11541         * kern/powerpc/ieee1275/openfw.c: Likewise.
11543         * loader/powerpc/ieee1275/linux.c: Likewise.
11544         * include/grub/elfload.h: Likewise.
11545         * kern/elf.c: Likewise.
11546         (grub_elf32_load): Pass `base' and `size' parameters.  Update all
11547         callers.
11548         (grub_elf64_load): Likewise.
11549         (grub_elf32_load_segment): Move to a nested function.
11550         (grub_elf64_load_segment): Likewise.
11552 2007-02-12  Hollis Blanchard  <hollis@penguinppc.org>
11554         * include/grub/ieee1275/ieee1275.h (grub_available_iterate): New
11555         prototype.
11556         * kern/powerpc/ieee1275/init.c (grub_heap_start): Removed.
11557         (grub_heap_len): Likewise.
11558         (HEAP_SIZE): New macro.
11559         (grub_claim_heap): New function.
11560         (grub_machine_init): Don't claim heap directly.  Call
11561         `grub_claim_heap'.
11562         * kern/powerpc/ieee1275/openfw.c: Include alloca.h.
11563         (grub_available_iterate): New function.
11565 2007-02-03  Thomas Schwinge  <tschwinge@gnu.org>
11567         * aclocal.m4 (grub_CHECK_STACK_PROTECTOR): New definition.
11568         * configure.ac: Use it for testing the HOST and TARGET compilers.
11570 2006-12-13  Thomas Schwinge  <tschwinge@gnu.org>
11572         * Makefile.in (enable_grub_emu): New variable.
11573         * configure.ac (--enable-grub-emu): New option.
11574         Do the checks for (n)curses only if `--enable-grub-emu' is requested.
11575         * conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
11576         * conf/i386-pc.rmk: Likewise.
11577         * conf/powerpc-ieee1275.rmk: Likewise.
11578         * conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
11580 2006-12-12  Marco Gerards  <marco@gnu.org>
11582         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
11584         * kern/env.c (grub_env_unset): Don't free the member `value' when
11585         the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
11586         pointer.
11588         * normal/main.c (current_menu): Removed.
11589         (free_menu): Unset the `menu' environment variable.
11590         (grub_normal_menu_addentry): Make use of the environment variable
11591         `menu', instead of using the global `current_menu'.  Allocate
11592         memory for the sourcecode of this entry.
11593         (read_config_file): New argument `nested', changed all callers.
11594         Only in the case of a new context, initialize a new menu.  Set the
11595         `menu' environment variable.
11596         (grub_normal_execute): Don't set and unset the environment
11597         variable `menu' here anymore.  Only free the menu when leaving the
11598         context.
11600         * util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
11601         leak.
11603 2006-12-11  Marco Gerards  <marco@gnu.org>
11605         * normal/menu_entry.c (run): Fix off by one bug so the last line
11606         is executed.  Move the loader check to outside the loop.
11608 2006-12-08  Hollis Blanchard  <hollis@penguinppc.org>
11610         * kern/powerpc/ieee1275/cmain.c (cmain): Mark r3 and r4 as `UNUSED'.
11612 2006-11-25  Yoshinori K. Okuji  <okuji@enbug.org>
11614         * util/i386/pc/grub-mkimage.c (generate_image): Fix the offset of
11615         the number of sectors.  Reported by Andrey Shuvikov
11616         <mr_hyro@yahoo.com>.
11618 2006-11-11  Jeroen Dekkers  <jeroen@dekkers.cx>
11620         * kern/disk.c (grub_disk_read): When there is a read error, always
11621         try to read only the necessary data.
11623         * conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
11624         disk/raid.c.
11625         * include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
11626         prototype.
11627         [GRUB_UTIL] (grub_raid_fini): Likewise.
11628         [GRUB_UTIL] (grub_lvm_init): Likewise.
11629         [GRUB_UTIL] (grub_lvm_fini): Likewise.
11630         * util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
11631         RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
11632         (main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
11633         and grub_raid_fini().
11635 2006-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
11637         * include/grub/types.h (__unused): Rename to UNUSED.
11638         * kern/elf.c (grub_elf32_size): Use UNUSED instead of __unused.
11639         (grub_elf64_size): Likewise.
11641 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11643         * kern/elf.c (grub_elf_file): Call grub_file_seek. Call
11644         grub_error_push and grub_error_pop in the error-handling path.
11645         (grub_elf32_load_segment): Only call grub_file_read with non-zero
11646         length.
11648 2006-11-03  Hollis Blanchard  <hollis@penguinppc.org>
11650         * conf/i386-efi.rmk (grub_emu_SOURCES): Add kern/elf.c.
11651         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
11652         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
11653         (kernel_elf_SOURCES): Likewise.
11654         * conf/i386-efi.rmk (kernel_mod_HEADERS): Add elfload.h and cache.h.
11655         * conf/i386-pc.rmk (kernel_mod_HEADERS): Likewise.
11656         * conf/powerpc-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11657         * conf/sparc64-ieee1275.rmk (kernel_elf_HEADERS): Likewise.
11658         * conf/common.rmk (pkgdata_MODULES): Add elf.mod.
11659         (elf_mod_SOURCES): New variable.
11660         (elf_mod_CFLAGS): Likewise.
11661         (elf_mod_LDFLAGS): Likewise.
11662         * include/grub/types.h (__unused): New macro.
11663         * include/grub/elfload.h: New file.
11664         * kern/elf.c: Likewise.
11665         * loader/powerpc/ieee1275/linux.c: Include elfload.h.
11666         (ELF32_LOADMASK): New macro.
11667         (ELF64_LOADMASK): Likewise.
11668         (vmlinux): Removed.
11669         (grub_linux_load32): New function.
11670         (grub_linux_load64): Likewise.
11671         (grub_rescue_cmd_linux): Call grub_linux_load32 or grub_linux_load64.
11672         Use grub_elf_t instead of grub_file_t.
11674 2006-11-02  Hollis Blanchard  <hollis@penguinppc.org>
11676         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): Add
11677         `catch_result' to struct set_color_args.
11679 2006-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
11681         * normal/menu.c: Include grub/script.h.
11682         * normal/menu_entry.c: Likewise.
11683         * include/grub/normal.h: Do not include grub/script.h.
11685 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11687         * kern/disk.c (grub_disk_read): Correct debug printf formatting.
11689 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11691         * kern/disk.c (grub_disk_open): Print debug messages when opening a
11692         disk.
11693         (grub_disk_close): Print debug messages when closing a disk.
11694         (grub_disk_read): Print debug messages when disk read fails.
11695         * kern/fs.c (grub_fs_probe): Print debug messages when detecting
11696         filesystem type.
11697         * kern/partition.c: Include misc.h.
11698         (grub_partition_iterate): Print debug messages when detecting
11699         partition type.
11701 2006-10-27  Hollis Blanchard  <hollis@penguinppc.org>
11703         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Return error if `status'
11704         is negative.
11705         * kern/ieee1275/ieee1275.c (IEEE1275_IHANDLE_INVALID): Change to 0.
11707 2006-10-26  Hollis Blanchard  <hollis@penguinppc.org>
11709         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_encode_devname):
11710         Reverse GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS test.
11712 2006-10-25  Jeroen Dekkers  <jeroen@dekkers.cx>
11714         * disk/lvm.c (grub_lvm_scan_device): Malloc sizeof(*lv) bytes
11715         instead of sizeof(lv). Patch by Michael Guntsche.
11717 2006-10-18  Jeroen Dekkers  <jeroen@dekkers.cx>
11719         * disk/lvm.c: Rename VGS to VG_LIST.
11720         (grub_lvm_iterate): Change VGS->LV to VG-LV.
11721         (grub_lvm_open): Likewise.
11722         Thanks to Michael Guntsche for finding this bug.
11724 2006-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
11726         * configure.ac (AC_INIT): Bumped to 1.95.
11728 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11730         * util/i386/pc/getroot.c (grub_guess_root_device): Don't compare os_dev
11731         with "/dev/.static/dev/md".
11733 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11735         * util/i386/pc/grub-probe.c (probe): Print DEVICE_NAME instead of
11736         DRIVE_NAME when grub_util_biosdisk_get_grub_dev fails. Open
11737         DRIVE_NAME instead of DEVICE_NAME. Make sure that DEVICE_NAME and
11738         DRIVE_NAME are always freed.
11740         * util/i386/pc/biosdisk.c (make_device_name): Add one into
11741         DOS_PART, as a DOS partition is counted from one instead of zero
11742         now. Reported by Robert Millan.
11744 2006-10-14  Robert Millan  <rmh@aybabtu.com>
11746         * util/i386/pc/getroot.c (grub_guess_root_device): Stop using
11747         grub_util_biosdisk_get_grub_dev to convert system device to GRUB device.
11748         * util/grub-emu.c (main): Use grub_util_biosdisk_get_grub_dev with the
11749         string returned by grub_guess_root_device.
11750         * util/i386/pc/grub-setup.c: Likewise.
11751         * util/i386/pc/grub-probefs.c: Likewise.
11753         * util/i386/pc/grub-probefs.c: Rename to ...
11754         * util/i386/pc/grub-probe.c: ... this.
11755         * DISTLIST: Remove grub-probefs, add grub-probe.
11756         * conf/i386-efi.rmk: Likewise.
11757         * conf/i386-pc.rmk: Likewise.
11758         * util/i386/pc/grub-install.in: Likewise.
11760         * util/i386/pc/grub-probe.c: Add --target=(fs|device|drive) option to
11761         choose which information we want to print.
11763 2006-10-14  Yoshinori K. Okuji  <okuji@enbug.org>
11765         * DISTLIST: Added commands/echo.c, disk/lvm.c, disk/raid.c,
11766         include/grub/bitmap.h, include/grub/lvm.h, include/grub/raid.h,
11767         include/grub/i386/pc/vbeutil.h, include/grub/util/lvm.h,
11768         include/grub/util/raid.h, util/lvm.c, util/raid.c, video/bitmap.c,
11769         video/readers/tga.c and video/i386/pc/vbeutil.c.
11771 2006-10-14  Jeroen Dekkers  <jeroen@dekkers.cx>
11773         Added support for RAID and LVM.
11775         * disk/lvm.c: New file.
11776         * disk/raid.c: Likewise.
11777         * include/grub/lvm.h: Likewise.
11778         * include/grub/raid.h: Likewise.
11779         * include/grub/util/lvm.h: Likewise.
11780         * include/grub/util/raid.h: Likewise.
11781         * util/lvm.c: Likewise.
11782         * util/raid.c: Likewise.
11784         * include/grub/disk.h (grub_disk_dev_id): Add
11785         GRUB_DISK_DEVICE_RAID_ID and GRUB_DISK_DEVICE_LVM_ID.
11786         (grub_disk_get_size): New prototype.
11787         * kern/disk.c (grub_disk_open): Check whether grub_partition_probe()
11788         returns a partition.
11789         (grub_disk_get_size): New function.
11791         * kern/i386/pc/init.c (make_install_device): Copy the prefix
11792         verbatim if grub_install_dos_part is -2.
11794         * util/i386/pc/getroot.c (grub_guess_root_device): Support RAID
11795         and LVM devices.
11797         * util/i386/pc/grub-setup.c (setup): New argument
11798         MUST_EMBED. Force embedding of GRUB when the argument is
11799         true. Close FILE before returning.
11800         (main): Add support for RAID and LVM.
11802         * conf/common.rmk: Add RAID and LVM modules.
11803         * conf/i386-pc.rmk (grub_setup_SOURCES): Add util/raid.c and
11804         util/lvm.c.
11805         (grub_emu_SOURCES): Add disk/raid.c and disk/lvm.c.
11807         * kern/misc.c (grub_strstr): New function.
11808         * include/grub/misc.h (grub_strstr): New prototype.
11810 2006-10-10  Tristan Gingold  <tristan.gingold@bull.net>
11812         * include/grub/efi/api.h (GRUB_EFI_ERROR_CODE): Long constant.
11814 2006-10-05  Tristan Gingold  <tristan.gingold@bull.net>
11816         * kern/misc.c (grub_strtoull): Guess the base only if not
11817         specified.
11819 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11821         * kern/powerpc/ieee1275/cmain.c (cmain): Remove incomplete Old World
11822         PowerMac support.
11824 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11826         * disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Cast `size' to long.
11828         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_next_property):
11829         Remove `flags' argument.  All callers changed.
11830         * kern/ieee1275/ieee1275.c (IEEE1275_PHANDLE_ROOT): Removed.
11831         (IEEE1275_IHANDLE_INVALID): New variable.
11832         (IEEE1275_CELL_INVALID): New variable.
11833         (grub_ieee1275_finddevice, grub_ieee1275_get_property,
11834         grub_ieee1275_get_property_length, grub_ieee1275_instance_to_package,
11835         grub_ieee1275_package_to_path, grub_ieee1275_instance_to_path,
11836         grub_ieee1275_peer, grub_ieee1275_child, grub_ieee1275_open,
11837         grub_ieee1275_claim, grub_ieee1275_set_property): Error-check return
11838         codes from Open Firmware.  All callers updated.
11839         (grub_ieee1275_next_property): Directly return Open Firmware return
11840         code.
11841         * kern/powerpc/ieee1275/cmain.c (grub_ieee1275_find_options):
11842         Standardize error checking from `grub_ieee1275_get_property'.
11843         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Rename
11844         `devalias' to `aliases'.  Correct comments.  Consolidate error paths.
11846 2006-10-01  Hollis Blanchard  <hollis@penguinppc.org>
11848         * kern/ieee1275/ieee1275.c (grub_ieee1275_instance_to_path): Rename
11849         `instance_to_package_args' to `instance_to_path_args'.
11851         * kern/powerpc/ieee1275/init.c (grub_machine_init): Use
11852         `grub_ieee1275_chosen'.
11854         * term/ieee1275/ofconsole.c (grub_ofconsole_init): Call
11855         `grub_ieee1275_interpret'.
11857 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11859         * util/powerpc/ieee1275/grub-mkimage.c: Include config.h.
11861 2006-09-25  Hollis Blanchard  <hollis@penguinppc.org>
11863         * include/grub/powerpc/libgcc.h (__floatdisf): New prototype.
11864         (__cmpdi): Likewise.
11866         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Pass 0 as
11867         `flags' to `grub_ieee1275_next_property'.  Change `pathlen' to type
11868         `grub_ssize_t'.
11870         * kern/powerpc/ieee1275/cmain.c: Include grub/misc.h.
11872         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Change `actual'
11873         to type `grub_ssize_t'.
11874         (grub_rescue_cmd_linux): Cast -1 to `grub_off_t'.
11876 2006-09-22  Marco Gerards  <marco@gnu.org>
11878         * normal/script.c (grub_script_create_cmdmenu): Skip leading
11879         newlines.
11881 2006-09-22  Marco Gerards  <marco@gnu.org>
11883         * commands/echo.c: New file.
11885         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/echo.c'.
11887         * conf/common.rmk (echo_mod_SOURCES): New variable.
11888         (echo_mod_CFLAGS): Likewise.
11889         (echo_mod_LDFLAGS): Likewise.
11891 2006-09-22  Marco Gerards  <marco@gnu.org>
11893         * normal/main.c (get_line): Malloc memory instead of using
11894         preallocated memory.  Removed the arguments `cmdline' and
11895         `max_len'.  Updated all callers.
11897 2006-09-22  Marco Gerards  <marco@gnu.org>
11899         * conf/i386-efi.rmk (grub_emu_DEPENDENCIES): New variable.
11900         (normal_mod_DEPENDENCIES): Likewise.
11902         * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Likewise.
11903         (normal_mod_DEPENDENCIES): Likewise.
11905         * conf/sparc64-ieee1275.rmk (normal_mod_DEPENDENCIES): Likewise.
11907 2006-09-22  Johan Rydberg  <jrydberg@gnu.org>
11909         * genmk.rb: Add DEPENDENCIES variables to modules, utilities, and
11910         programs.
11911         * conf/i386-pc.rmk (grub_emu_DEPENDENCIES): Declare.
11912         (normal_mod_DEPENDENCIES): Likewise.
11913         * conf/i386-pc.mk: Regenerate.
11914         * conf/i386-efi.mk: Likewise
11915         * conf/common.mk: Likewise.
11916         * conf/powerpc-ieee1275.mk: Likewise.
11917         * conf/sparc64-ieee1275.mk: Likewise.
11919 2006-09-22  Robert Millan  <rmh@aybabtu.com>
11921         Sync with i386 version.
11922         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Remove grub-emu, add grub-mkimage.
11923         * conf/powerpc-ieee1275.rmk (sbin_UTILITIES): Remove grub-mkimage, add grub-emu.
11925 2006-09-21  Robert Millan  <rmh@aybabtu.com>
11927         Import from GRUB Legacy (lib/device.c):
11928         * util/i386/pc/grub-mkdevicemap.c (get_i2o_disk_name): New function.
11929         (init_device_map) [__linux__]: Add support for I2O devices.
11931 2006-09-14  Marco Gerards  <marco@gnu.org>
11933         * conf/i386-pc.rmk (COMMON_LDFLAGS): Use `-m32' instead of
11934         `-melf_i386'.
11936 2006-09-14  Robert Millan  <rmh@aybabtu.com>
11938         * util/i386/pc/grub-install.in: Skip menu.lst when removing
11939         /boot/grub/*.lst.
11941         * util/i386/pc/getroot.c: Don't recurse into dotdirs (e.g. ".static").
11943         * util/i386/pc/grub-mkdevicemap.c: Make sure the floppy device exists
11944         before adding it to device.map.
11946 2006-08-15  Johan Rydberg  <jrydberg@gnu.org>
11948         * genmk.rb: Let GCC generate dependencies the first time it
11949         compiles a file; using the -MD option.
11950         * conf/common.mk: Regenerate.
11951         * conf/i386-pc.mk: Likewise.
11952         * conf/i386-efi.mk: Likewise.
11953         * conf/powerpc-ieee1275.mk: Likewise.
11954         * conf/sparc64-ieee1275.mk: Likewise.
11956 2006-08-04  Yoshinori K. Okuji  <okuji@enbug.org>
11958         Move the prototypes of grub_setjmp and grub_longjmp to
11959         cpu/setjmp.h, so that each architecture may specify different
11960         attributes.
11962         * include/grub/i386/setjmp.h (grub_setjmp): New prototype.
11963         (grub_longjmp): Likewise.
11964         * include/grub/powerpc/setjmp.h (grub_setjmp): Likewise..
11965         (grub_longjmp): Likewise.
11966         * include/grub/sparc64/setjmp.h (grub_setjmp): Likewise..
11967         (grub_longjmp): Likewise.
11969         * include/grub/setjmp.h [!GRUB_UTIL] (grub_setjmp): Removed.
11970         [!GRUB_UTIL] (grub_longjmp): Removed.
11972 2006-08-01  Pelletier Vincent  <subdino2004@yahoo.fr>
11974         * kern/ieee1275/ieee1275.c (grub_ieee1275_set_color): IEEE1275
11975         "color!" method does not return any value.
11977 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
11979         * include/grub/bitmap.h: New file.
11981         * include/grub/i386/pc/vbeutil.h: Likewise.
11983         * video/bitmap.c: Likewise.
11985         * video/readers/tga.c: Likewise.
11987         * video/i386/pc/vbeutil.c: Likewise.
11989         * commands/videotest.c: Code cleanup and updated to reflect to new
11990         video API.
11992         * term/gfxterm.c: Likewise.
11994         * video/video.c: Likewise.
11996         * conf/i386-pc.rmk (pkgdata_MODULES): Added tga.mod and bitmap.mod.
11997         (vbe_mod_SOURCES): Added video/i386/pc/vbeutil.c.
11998         (bitmap_mod_SOURCES): New entry.
11999         (bitmap_mod_CFLAGS): Likewise.
12000         (bitmap_mod_LDFLAGS): Likewise.
12001         (tga_mod_SOURCES): Likewise.
12002         (tga_mod_CFLAGS): Likewise.
12003         (tga_mod_LDFLAGS): Likewise.
12005         * include/grub/video.h (grub_video_blit_operators): New enum type.
12006         (grub_video_render_target): Changed as forward declaration and moved
12007         actual definition to be video driver specific.
12008         (grub_video_adapter.blit_bitmap): Added blitting operator.
12009         (grub_video_adapter.blit_render_target): Likewise.
12010         (grub_video_blit_bitmap): Likewise.
12011         (grub_video_blit_render_target): Likewise.
12013         * include/grub/i386/pc/vbe.h (grub_video_render_target): Added
12014         driver specific render target definition.
12015         (grub_video_vbe_map_rgba): Added driver internal helper.
12016         (grub_video_vbe_unmap_color): Updated to use
12017         grub_video_i386_vbeblit_info.
12018         (grub_video_vbe_get_video_ptr): Likewise.
12020         * include/grub/i386/pc/vbeblit.h
12021         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8A8): Updated to use
12022         grub_video_i386_vbeblit_info.
12023         (grub_video_i386_vbeblit_R8G8B8_R8G8B8A8): Likewise.
12024         (grub_video_i386_vbeblit_index_R8G8B8A8): Likewise.
12025         (grub_video_i386_vbeblit_R8G8B8A8_R8G8B8): Likewise.
12026         (grub_video_i386_vbeblit_R8G8B8_R8G8B8): Likewise.
12027         (grub_video_i386_vbeblit_index_R8G8B8): Likewise.
12028         (grub_video_i386_vbeblit_index_index): Likewise.
12029         (grub_video_i386_vbeblit_R8G8B8X8_R8G8B8X8): New blitter function.
12030         (grub_video_i386_vbeblit_R8G8B8_R8G8B8X8): Likewise.
12031         (grub_video_i386_vbeblit_index_R8G8B8X8): Likewise.
12032         (grub_video_i386_vbeblit_blend): Added generic blitter for blend
12033         operator.
12034         (grub_video_i386_vbeblit_replace): Added generic blitter for replace
12035         operator.
12037         * video/i386/pc/vbeblit.c: Updated to reflect changes on
12038         include/grub/i386/pc/vbeblit.h.
12040         * include/grub/i386/pc/vbefill.h (grub_video_i386_vbefill_R8G8B8A8):
12041         Updated to use grub_video_i386_vbeblit_info.
12042         (grub_video_i386_vbefill_R8G8B8): Likewise.
12043         (grub_video_i386_vbefill_index): Likewise.
12044         (grub_video_i386_vbefill): Added generic filler.
12046         * video/i386/pc/vbefill.c: Updated to reflect changes on
12047         include/grub/i386/pc/vbefill.h.
12049         * video/i386/pc/vbe.c (grub_video_vbe_get_video_ptr): Updated to use
12050         grub_video_i386_vbeblit_info.
12051         (grub_video_vbe_unmap_color): Likewise.
12052         (grub_video_vbe_blit_glyph): Likewise.
12053         (grub_video_vbe_scroll): Likewise.
12054         (grub_video_vbe_draw_pixel): Removed function.
12055         (grub_video_vbe_get_pixel): Likewise.
12056         (grub_video_vbe_fill_rect): Moved all blitters to vbefill.c and
12057         updated code to use it.
12058         (common_blitter): Added common blitter for render target and bitmap.
12059         (grub_video_vbe_blit_bitmap): Updated to use common_blitter.
12060         (grub_video_vbe_blit_render_target): Likewise.
12062 2006-07-30  Johan Rydberg  <jrydberg@gnu.org>
12064         * kern/efi/efi.c (grub_efi_set_text_mode): Assume console already
12065         is in text mode if there is no console control protocol instance
12066         available.
12068 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12070         * include/grub/video.h: Code cleanup.
12072         * include/grub/i386/pc/vbe.h: Likewise.
12074         * video/i386/pc/vbe.c: Likewise.
12076         * video/i386/pc/vbeblit.c: Likewise.
12078         * video/i386/pc/vbefill.c: Likewise.
12080         * video/video.c: Likewise.  Also added more comments.
12082 2006-07-29  Vesa Jaaskelainen  <chaac@nic.fi>
12084         * disk/i386/pc/biosdisk.c (struct grub_biosdisk_drp): Moved to ...
12085         (struct grub_biosdisk_dap): Likewise.
12087         * include/grub/i386/pc/biosdisk.h: ... to here.  Also corrected
12088         linkage settings for all functions.
12090 2006-07-12  Marco Gerards  <marco@gnu.org>
12092         * configure.ac (--enable-mm-debug): Fix typo.
12094         * genkernsyms.sh.in: Use proper quoting for `CC'.
12096 2006-07-02  Jeroen Dekkers  <jeroen@dekkers.cx>
12098         * conf/i386-pc.rmk (COMMON_ASFLAGS): Add "-m32".
12099         (normal_mod_ASFLAGS): Remove "-m32".
12101 2006-06-14  Yoshinori K. Okuji  <okuji@enbug.org>
12103         * util/misc.c: Include config.h.
12104         [!HAVE_MEMALIGN]: Do not include malloc.h.
12105         (grub_memalign): Use posix_memalign, if present. Then, use
12106         memalign, if present. Otherwise, emit an error.
12108         * util/grub-emu.c: Do not include malloc.h.
12110         * include/grub/util/misc.h: Include unistd.h. This is required for
12111         FreeBSD, because off_t is defined in unistd.h. Reported by Harley
12112         D. Eades III <hde@foobar-qux.org>.
12114         * configure.ac (AC_GNU_SOURCE): Added.
12115         (AC_CHECK_FUNCS): Check posix_memalign and memalign for the host
12116         type.
12118 2006-06-09  Yoshinori K. Okuji  <okuji@enbug.org>
12120         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
12121         ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
12123 2006-06-07  Jeroen Dekkers  <jeroen@dekkers.cx>
12125         * include/grub/types.h (grub_host_addr_t): Rename to
12126         grub_target_addr_t.
12127         (grub_host_off_t): Rename to grub_target_off_t.
12128         (grub_host_size_t): Rename to grub_target_size_t.
12129         (grub_host_ssize_t): Rename to grub_target_ssize_t.
12130         Refer to GRUB_TARGET_SIZEOF_VOID_P to define those variables.
12132         * include/grub/kernel.h (struct grub_module_header): Change type
12133         of OFFSET to grub_target_off_t and type of SIZE to grub_target_size_t.
12134         (grub_module_info): Likewise.
12136 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12138         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): The conditional
12139         of checking LINUX_MEM_SIZE was reverse. Reported by Jesus
12140         Velazquez <jesus.velazquez@gmail.com>.
12142 2006-06-05  Yoshinori K. Okuji  <okuji@enbug.org>
12144         Count partitions from 1 instead of 0 in the string representation
12145         of partitions. Still use 0-based internally.
12147         * partmap/sun.c (grub_sun_is_valid): A cosmetic change.
12148         (sun_partition_map_iterate): Use grub_partition_t instead of
12149         struct grub_partition *. Cast DESC->START_CYLINDER to
12150         grub_uint64_t after converting the endian.
12151         (sun_partition_map_probe): Subtract 1 for PARTNUM.
12152         (sun_partition_map_get_name): Add 1 to P->INDEX.
12154         * partmap/pc.c (grub_partition_parse): Subtract 1 for
12155         PCDATA->DOS_PART.
12156         (pc_partition_map_get_name): Add 1 into PCDATA->DOS_PART.
12158         * partmap/gpt.c (gpt_partition_map_iterate): Initialize PARTNO to
12159         zero instead of one.
12160         (gpt_partition_map_probe): Subtract 1 for PARTNUM.
12161         (gpt_partition_map_get_name): Add 1 into P->INDEX.
12163         * partmap/apple.c (apple_partition_map_iterate): Change the type
12164         of POS to unsigned.
12165         (apple_partition_map_probe): Subtract 1 for PARTNUM.
12166         (apple_partition_map_get_name): Add 1 into P->INDEX.
12168         * partmap/amiga.c (amiga_partition_map_iterate): Change the type
12169         of POS to unsigned.
12170         (amiga_partition_map_iterate): Cast NEXT to grub_off_t to
12171         calculate the offset of a partition.
12172         (amiga_partition_map_probe): Subtract 1 for PARTNUM.
12173         (amiga_partition_map_get_name): Add 1 into P->INDEX.
12175         * partmap/acorn.c (acorn_partition_map_find): Change the type of
12176         SECTOR to grub_disk_addr_t.
12177         (acorn_partition_map_iterate): Likewise.
12178         (acorn_partition_map_probe): Subtract 1 for PARTNUM.
12179         Change the type of SECTOR to grub_disk_addr_t. Declare P on the
12180         top.
12181         (acorn_partition_map_get_name): Add 1 into P->INDEX.
12183         * kern/i386/pc/init.c (make_install_device): Add 1 into
12184         GRUB_INSTALL_DOS_PART.
12186         * fs/iso9660.c (grub_iso9660_mount): Fixed a reversed
12187         conditional.
12189 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12191         Clean up the code to support 64-bit addressing in disks and
12192         files. This change is not enough for filesystems yet.
12194         * util/i386/pc/grub-setup.c (struct boot_blocklist): Change the
12195         type of "start" to grub_uint64_t.
12196         (setup): Change the types of KERNEL_SECTOR and FIRST_SECTOR to
12197         grub_disk_addr_t * and grub_disk_addr_t. Fix the format string in
12198         save_first_sector and save_blocklists. Use grub_le_to_cpu64 to
12199         convert addresses.
12201         * util/i386/pc/biosdisk.c (open_device): Change the type of SECTOR
12202         to grub_disk_addr_t.
12204         * partmap/gpt.c (gpt_partition_map_iterate): Fix the format
12205         string.
12207         * partmap/pc.c (pc_partition_map_iterate): Likewise.
12209         * partmap/amiga.c (amiga_partition_map_iterate): Cast RDSK.MAGIC
12210         to char *.
12212         * normal/script.c (grub_script_parse): Remove unused MEMFREE.
12214         * normal/parser.y (YYLTYPE_IS_TRIVIAL): New macro.
12216         * normal/lexer.c (grub_script_yyerror): Specify unused to LEX.
12218         * loader/i386/pc/multiboot.c (grub_multiboot_load_elf64): Cast -1
12219         to grub_off_t, to detect an error from grub_file_seek.
12220         (grub_multiboot_load_elf32): Likewise.
12222         * kern/misc.c (grub_strtoul): Use grub_strtoull. Return the
12223         maximum unsigned long value when an overflow is detected.
12224         (grub_strtoull): New function.
12225         (grub_divmod64): Likewise.
12226         (grub_lltoa): use grub_divmod64.
12228         * kern/fs.c (struct grub_fs_block): Change the type of "offset" to
12229         grub_disk_addr_t.
12230         (grub_fs_blocklist_open): Increase P if P is not NULL to advance
12231         the pointer to next character. Use grub_strtoull instead of
12232         grub_strtoul.
12233         (grub_fs_blocklist_read): Change the types of SECTOR, OFFSET and
12234         SIZE to grub_disk_addr_t, grub_off_t and grub_size_t,
12235         respectively.
12237         * kern/file.c (grub_file_read): Prevent an overflow of LEN, as the
12238         return value is signed.
12239         (grub_file_seek): Change the type of OLD to grub_off_t. Do not
12240         test if OFFSET is less than zero, as OFFSET is unsigned now.
12242         * kern/disk.c (struct grub_disk_cache): Change the type of
12243         "sector" to grub_disk_addr_t.
12244         (grub_disk_cache_get_index): Change the type of SECTOR to
12245         grub_disk_addr_t. Calculate the hash with SECTOR casted to
12246         unsigned after shifting.
12247         (grub_disk_cache_invalidate): Change the type of SECTOR to
12248         grub_disk_addr_t.
12249         (grub_disk_cache_unlock): Likewise.
12250         (grub_disk_cache_store): Likewise.
12251         (grub_disk_check_range): Change the types of SECTOR, OFFSET, SIZE,
12252         START and LEN to grub_disk_addr_t *, grub_off_t *, grub_size_t,
12253         grub_disk_addr_t and grub_uint64_t, respectively.
12254         (grub_disk_read): Use an unsigned variable REAL_OFFSET for the
12255         body, as the value of OFFSET is tweaked by
12256         grub_disk_check_range. Change the types of START_SECTOR, LEN and
12257         POS to grub_disk_addr_t, grub_size_t and grub_size_t,
12258         respectively.
12259         (grub_disk_write): Use an unsigned variable REAL_OFFSET for the
12260         body, as the value of OFFSET is tweaked by
12261         grub_disk_check_range. Change the types of LEN and N to
12262         grub_size_t.
12264         * io/gzio.c (struct grub_gzio): Change the types of "data_offset"
12265         and "saved_offset" to grub_off_t.
12266         (test_header): Cast BUF to char *.
12267         (get_byte): Cast GZIO->DATA_OFFSET to grub_off_t. Cast GZIO->INBUF
12268         to char *.
12269         (grub_gzio_read): Change the types of OFFSET and SIZE to
12270         grub_off_t and grub_size_t, respectively.
12272         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_FORCE_LBA):
12273         Removed.
12274         (GRUB_BOOT_MACHINE_BOOT_DRIVE): Changed to 0x4c.
12275         (GRUB_BOOT_MACHINE_KERNEL_ADDRESS): Changed to 0x40.
12276         (GRUB_BOOT_MACHINE_KERNEL_SEGMENT): Changed to 0x42.
12277         (GRUB_BOOT_MACHINE_DRIVE_CHECK): Changed to 0x4e.
12278         (GRUB_BOOT_MACHINE_LIST_SIZE): Increased to 12.
12280         * include/grub/types.h (grub_off_t): Unconditionally set to
12281         grub_uint64_t.
12282         (grub_disk_addr_t): Changed to grub_uint64_t.
12284         * include/grub/partition.h (struct grub_partition): Change the
12285         types of "start", "len" and "offset" to grub_disk_addr_t,
12286         grub_uint64_t and grub_disk_addr_t, respectively.
12287         (grub_partition_get_start): Return grub_disk_addr_t.
12288         (grub_partition_get_len): Return grub_uint64_t.
12290         * include/grub/misc.h (grub_strtoull): New prototype.
12291         (grub_divmod64): Likewise.
12293         * include/grub/fshelp.h (grub_fshelp_read_file): Change the types
12294         of SECTOR, LEN and FILESIZE to grub_disk_addr_t, grub_size_t and
12295         grub_off_t, respectively.
12296         All callers and references changed.
12298         * include/grub/fs.h (struct grub_fs): Change the type of LEN to
12299         grub_size_t in "read".
12300         All callers and references changed.
12302         * include/grub/file.h (struct grub_file): Change the types of
12303         "offset" and "size" to grub_off_t and grub_off_t,
12304         respectively. Change the type of SECTOR to grub_disk_addr_t in
12305         "read_hook".
12306         (grub_file_read): Change the type of LEN to grub_size_t.
12307         (grub_file_seek): Return grub_off_t. Change the type of OFFSET to
12308         grub_off_t.
12309         (grub_file_size): Return grub_off_t.
12310         (grub_file_tell): Likewise.
12311         All callers and references changed.
12313         * include/grub/disk.h (struct grub_disk_dev): Change the types of
12314         SECTOR and SIZE to grub_disk_addr_t and grub_size_t in "read" and
12315         "write".
12316         (struct grub_disk): Change the type of "total_sectors" to
12317         grub_uint64_t. Change the type of SECTOR to grub_disk_addr_t in
12318         "read_hook".
12319         (grub_disk_read): Change the types of SECTOR, OFFSET and SIZE to
12320         grub_disk_addr_t, grub_off_t and grub_size_t, respectively.
12321         (grub_disk_write): Likewise.
12322         All callers and references changed.
12324         * fs/iso9660.c (grub_iso9660_susp_iterate): Cast parameters to
12325         char * for grub_strncmp to silence gcc.
12326         (grub_iso9660_mount): Likewise.
12327         (grub_iso9660_mount): Likewise.
12328         (grub_iso9660_read_symlink): Likewise. Also, remove the nonsense
12329         return statement.
12330         (grub_iso9660_iterate_dir): Likewise.
12331         (grub_iso9660_label): Cast DATA->VOLDESC.VOLNAME to char *.
12333         * fs/hfs.c (grub_hfs_read_file): Change the types of SECTOR and
12334         LEN to grub_disk_addr_t and grub_size_t, respectively.
12336         * fs/hfsplus.c (grub_hfsplus_read_file): Likewise.
12338         * fs/jfs.c (grub_jfs_read_file): Likewise.
12340         * fs/minix.c (grub_jfs_read_file): Likewise.
12342         * fs/sfs.c (grub_jfs_read_file): Likewise.
12344         * fs/ufs.c (grub_jfs_read_file): Likewise.
12346         * fs/xfs.c (grub_jfs_read_file): Likewise.
12348         * fs/fat.c (grub_fat_read_data): Change the types of SECTOR, LEN
12349         and SIZE to grub_disk_addr_t, grub_size_t and grub_size_t,
12350         respectively.
12352         * fs/ext2.c (grub_ext2_read_block): When an error happens, set
12353         BLKNR to -1 instead of returning GRUB_ERRNO.
12354         (grub_ext2_read_file): Change the types of SECTOR and
12355         LEN to grub_disk_addr_t and grub_size_t, respectively.
12357         * fs/affs.c (grub_affs_read_file): Change the types of SECTOR and
12358         LEN to grub_disk_addr_t and grub_size_t, respectively.
12360         * font/manager.c (grub_font_get_glyph): Cast BITMAP to char * for
12361         grub_file_read.
12363         * disk/ieee1275/ofdisk.c (grub_ofdisk_read): Fix the format
12364         string. Do not cast SECTOR explicitly.
12366         * disk/i386/pc/biosdisk.c (grub_biosdisk_open): Change the type of
12367         TOTAL_SECTORS to grub_uint64_t. Do not mask DRP->TOTAL_SECTORS.
12368         (grub_biosdisk_rw): Change the types of SECTOR and SIZE to
12369         grub_disk_addr_t and grub_size_t, respectively. If the sector is
12370         over 2TB and LBA mode is not supported, raise an error.
12371         (get_safe_sectors): New function.
12372         (grub_biosdisk_read): Use get_safe_sectors.
12373         (grub_biosdisk_write): Likewise.
12375         * disk/efi/efidisk.c (grub_efidisk_read): Fix the format string.
12376         (grub_efidisk_write): Likewise.
12378         * disk/loopback.c (delete_loopback): Cosmetic changes.
12379         (grub_cmd_loopback): Likewise. Also, test NEWDEV->FILENAME
12380         correctly.
12381         (grub_loopback_open): Likewise.
12382         (grub_loopback_read): Likewise. Also, change the type of POS to
12383         grub_off_t, and fix the usage of grub_memset.
12385         * commands/i386/pc/play.c: Include grub/machine/time.h.
12387         * commands/ls.c (grub_ls_list_files): Use "llu" instead of "d" to
12388         print FILE->SIZE.
12390         * commands/configfile.c: Include grub/env.h.
12392         * commands/cmp.c (grub_cmd_cmp): Do not use ERR, but use
12393         GRUB_ERRNO directly instead. Change the type of POS to
12394         grub_off_t. Follow the coding standard.
12396         * commands/blocklist.c: Include grub/partition.h.
12397         (grub_cmd_blocklist): Return an error if the underlying device is
12398         not a disk. Take the starting sector of a partition into account,
12399         if a partition is used.
12401         * boot/i386/pc/diskboot.S (bootloop): Adapted to the new offset of
12402         a length field.
12403         (lba_mode): Support 64-bit addresses.
12404         (chs_mode): Likewise.
12405         (copy_buffer): Adapted to the new offsets of a length field and a
12406         segment field.
12407         (blocklist_default_start): Allocate 64-bit space.
12409         * boot/i386/pc/boot.S (force_lba): Removed.
12410         (boot_drive): Moved to under KERNEL_SECTOR.
12411         (kernel_sector): Moved to under KERNEL_SEGMENT. Allocate 64-bit
12412         space.
12413         (real_start): Set %si earlier. Remove code for FORCE_LBA, since it
12414         is useless.
12415         (lba_mode): Refactored to support a 64-bit address. More size
12416         optimization.
12417         (setup_sectors): Likewise.
12419 2006-06-04  Yoshinori K. Okuji  <okuji@enbug.org>
12421         * DISTLIST: Added include/grub/i386/linux.h. Removed
12422         include/grub/i386/pc/linux.h
12424         * configure.ac (AC_INIT): Bumped to 1.94.
12426         * config.guess: Updated from gnulib.
12427         * config.sub: Likewise.
12428         * install-sh: Likewise.
12429         * mkinstalldirs: Likewise.
12431 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12433         * conf/common.rmk (grub_modules_init.lst): Depended on
12434         grub_emu_SOURCES, excluding grub_emu_init.c, instead of
12435         MODSRCFILES.
12437         * genmk.rb (PModule::rule): Reverted the previous change.
12439 2006-06-02  Yoshinori K. Okuji  <okuji@enbug.org>
12441         * conf/common.rmk (grub_modules_init.lst): Depends on
12442         $(MODSRCFILES). Grep only the files in $(MODSRCFILES). Make sure
12443         that the target does not exist before producing.
12444         (grub_modules_init.h): Remove the target before generating.
12445         (grub_emu_init.c): Likewise.
12447         * genmk.rb (PModule::rule): Add source files into MODSRCFILES.
12449 2006-05-31  Jeroen Dekkers  <jeroen@dekkers.cx>
12451         * configure.ac: Don't set host_m32 for x86_64. Also reset LIBS
12452         for the target-specific tests. Make sure that we also have the
12453         up-to-date target variables for those tests.
12455 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12457         * genmk.rb (Image::rule): Prefix CFLAGS or ASFLAGS with TARGET_.
12458         (PModule::rule): Likewise.
12460 2006-05-31  Yoshinori K. Okuji  <okuji@enbug.org>
12462         * genmk.rb (Image::rule): Set FLAG to CFLAGS or ASFLAGS instead of
12463         TARGET_CFLAGS or TARGET_ASFLAGS. There is no reason why
12464         target-specific flags should be prefixed.
12465         (PModule::rule): Likewise.
12467 2006-05-30  Yoshinori K. Okuji  <okuji@enbug.org>
12469         * configure.ac (CMP): Check if cmp is available explicitly.
12471 2006-05-29  Yoshinori K. Okuji  <okuji@enbug.org>
12473         * util/powerpc/ieee1275/grub-install.in (host_cpu): Removed.
12474         (target_cpu): New variable.
12475         (pkglibdir): Use target_cpu instead of host_cpu.
12477         * util/i386/pc/grub-install.in (host_cpu): Removed.
12478         (target_cpu): New variable.
12479         (pkglibdir): Use target_cpu instead of host_cpu.
12481         * util/genmoddep.c: Removed.
12483         * kern/efi/mm.c (filter_memory_map): Use GRUB_CPU_SIZEOF_VOID_P
12484         instead of GRUB_HOST_SIZEOF_VOID_P.
12485         * kern/dl.c: Likewise.
12487         * include/grub/i386/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed to
12488         ...
12489         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12490         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12491         (GRUB_TARGET_SIZEOF_LONG): ... this.
12492         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12493         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12494         * include/grub/powerpc/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12495         to ...
12496         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12497         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12498         (GRUB_TARGET_SIZEOF_LONG): ... this.
12499         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12500         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12501         * include/grub/sparc64/types.h (GRUB_HOST_SIZEOF_VOID_P): Renamed
12502         to ...
12503         (GRUB_TARGET_SIZEOF_VOID_P): ... this.
12504         (GRUB_HOST_SIZEOF_LONG): Renamed to ...
12505         (GRUB_TARGET_SIZEOF_LONG): ... this.
12506         (GRUB_HOST_WORDS_BIGENDIAN): Renamed to ...
12507         (GRUB_TARGET_WORDS_BIGENDIAN): ... this.
12509         * include/grub/types.h [!GRUB_UTIL] (GRUB_CPU_SIZEOF_VOID_P): Use
12510         GRUB_TARGET_SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P.
12511         [!GRUB_UTIL] (GRUB_CPU_SIZEOF_LONG): Use GRUB_TARGET_SIZEOF_LONG
12512         instead of GRUB_HOST_SIZEOF_LONG.
12513         [!GRUB_UTIL]: Refer to GRUB_TARGET_WORDS_BIGENDIAN instead of
12514         GRUB_HOST_WORDS_BIGENDIAN to define or undefine
12515         GRUB_CPU_WORDS_BIGENDIAN.
12516         Refer to SIZEOF_VOID_P instead of GRUB_HOST_SIZEOF_VOID_P to
12517         define grub_host_addr_t, grub_host_off_t, grub_host_size_t and
12518         grub_host_ssize_t.
12520         * conf/i386-efi.rmk (noinst_UTILITIES): Removed.
12521         (genmoddep_SOURCES): Likewise.
12522         * conf/i386-pc.rmk (noinst_UTILITIES): Likewise.
12523         (genmoddep_SOURCES): Likewise.
12524         * conf/conf/powerpc-ieee1275.rmk (noinst_UTILITIES): Likewise.
12525         (genmoddep_SOURCES): Likewise.
12526         * conf/conf/conf/sparc64-ieee1275.rmk (noinst_UTILITIES):
12527         Likewise.
12528         (genmoddep_SOURCES): Likewise.
12530         * genmoddep.awk: New file.
12532         * genmk.rb (Image::rule): Use TARGET_CC, TARGET_CPPFLAGS,
12533         TARGET_CFLAGS, TARGET_ASFLAGS and TARGET_LDFLAGS instead of CC,
12534         CPPFLAGS, CFLAGS, ASFLAGS and LDFLAGS, respectively.
12535         (PModule::rule): Likewise.
12536         (Program::rule): Likewise.
12537         (Utility::rule): Use CC, CPPFLAGS, CFLAGS and LDFLAGS instead of
12538         BUILD_CC, BUILD_CPPFLAGS, BUILD_CFLAGS and BUILD_LDFLAGS,
12539         respectively.
12541         * configure.ac: Rewritten intensively to use host and target
12542         instead of build and host, respectively.
12544         * Makefile.in (pkglibdir): Use target_cpu instead of host_cpu.
12545         (host_cpu): Removed.
12546         (target_cpu): New variable.
12547         (CPPFLAGS): Added @CPPFLAGS@ and -DGRUB_LIBDIR=\"$(pkglibdir)\".
12548         (BUILD_CC): Removed.
12549         (BUILD_CFLAGS): Likewise.
12550         (BUILD_CPPFLAGS): Likewise.
12551         (TARGET_CC): New variable.
12552         (TARGET_CFLAGS): Likewise.
12553         (TARGET_CPPFLAGS): Likewise.
12554         (TARGET_LDFLAGS): Likewise.
12555         (AWK): Likewise.
12556         (include): Use target_cpu instead of host_cpu.
12557         (moddep.lst:): Use genmoddep.awk instead of genmoddep.
12559         * DISTLIST: Added genmoddep.awk. Removed util/genmoddep.c.
12561 2006-05-29  Vesa Jaaskelainen  <chaac@nic.fi>
12563         * include/grub/script.h (grub_script_cmdif): Renamed field 'bool' to
12564         'exec_to_evaluate'.  Renamed field 'true' to 'exec_on_true'.  Renamed
12565         field 'false' to 'exec_on_false'.
12566         (grub_script_create_cmdif): Renamed argument names to reflect above
12567         changes.
12569         * normal/execute.c (grub_script_execute_cmdif): Likewise.
12571         * normal/script.c (grub_script_create_cmdif): Likewise.
12573 2006-05-28  Yoshinori K. Okuji  <okuji@enbug.org>
12575         * fs/hfsplus.c (grub_hfsplus_btree_recoffset): Moved to near the
12576         top.
12577         (grub_hfsplus_btree_recptr): Likewise.
12578         (grub_hfsplus_find_block): Do not take RETRY any longer. Use
12579         FILEBLOCK both to pass a block number and store next block
12580         number.
12581         (grub_hfsplus_read_block): Rewritten heavily to support an extent
12582         overflow file correctly. Specify errors appropriately, because
12583         fshelp expects that GRUB_ERRNO is set when fails. Reuse
12584         grub_hfsplus_btree_recptr to get the pointer to a found key.
12585         (grub_hfsplus_btree_search): Return 1 instead of 0 when no match
12586         is found.
12588         * conf/i386-efi.rmk (pkgdata_MODULES): Added _linux.mod and
12589         linux.mod.
12590         (_linux_mod_SOURCES): New variable.
12591         (_linux_mod_CFLAGS): Likewise.
12592         (_linux_mod_LDFLAGS): Likewise.
12593         (linux_mod_SOURCES): Likewise.
12594         (linux_mod_CFLAGS): Likewise.
12595         (linux_mod_LDFLAGS): Likewise.
12597         * DISTLIST: Added loader/i386/efi/linux.c,
12598         loader/i386/efi/linux_normal.c and
12599         include/grub/i386/efi/loader.h.
12601         * loader/i386/efi/linux.c: New file.
12602         * loader/i386/efi/linux_normal.c: Likewise.
12603         * include/grub/i386/efi/loader.h: Likewise.
12605 2006-05-27  Yoshinori K. Okuji  <okuji@enbug.org>
12607         * commands/blocklist.c: New file.
12609         * DISTLIST: Added commands/blocklist.c.
12611         * term/efi/console.c (grub_console_highlight_color): Use a lighter
12612         color for the background, and a darker color for the foreground.
12613         (grub_console_checkkey): Return READ_KEY.
12614         (grub_console_cls): Set the background to
12615         GRUB_EFI_BACKGROUND_BLACK temporarily to clean out the screen.
12617         * kern/efi/efi.c (grub_efi_exit_boot_services): New function.
12619         * include/grub/i386/linux.h (struct linux_kernel_params): Fixed
12620         the size of "padding5", "hd0_drive_info" and "hd1_drive_info".
12622         * include/grub/efi/efi.h (grub_efi_exit_boot_services): New
12623         prototype.
12625         * include/grub/efi/api.h (GRUB_EFI_TEXT_ATTR): Do not shift
12626         BG. The spec is wrong again.
12628         * include/grub/normal.h [GRUB_UTIL] (grub_blocklist_init): New
12629         prototype.
12630         [GRUB_UTIL] (grub_blocklist_fini): Likewise.
12632         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
12633         commands/blocklist.c.
12634         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
12636         * conf/common.rmk (pkgdata_MODULES): Added blocklist.mod.
12637         (blocklist_mod_SOURCES): New variable.
12638         (blocklist_mod_CFLAGS): Likewise.
12639         (blocklist_mod_LDFLAGS): Likewise.
12641 2006-05-20  Yoshinori K. Okuji  <okuji@enbug.org>
12643         * boot/i386/pc/boot.S (real_start): Set %si earlier to eliminate
12644         duplication.
12645         (lba_mode): Use %eax more intensively to reduce the code size.
12647 2006-05-20  Marco Gerards  <marco@gnu.org>
12649         * normal/lexer.c (grub_script_yylex): Don't filter out newlines.
12651         * normal/parser.y (commandblock): Defined as <cmd>.  A subroutine
12652         for `menuentry'.
12653         (script): Accept leading newlines.
12654         (newlines): New rule to describe 0 or more newlines.
12655         (commands): Accept `command' with trailing newline.  Fixed the
12656         order in which arguments were passed to `grub_script_add_cmd'.
12657         Accept commands separated by newlines.
12658         (function): Changed to accept newlines.
12659         (menuentry) Rewritten.
12661         * normal/script.c (grub_script_create_cmdmenu): Add new entries in
12662         front of the list, instead of to the end.
12664 2006-05-19  Yoshinori K. Okuji  <okuji@enbug.org>
12666         * util/i386/pc/grub-install.in (bindir): New variable.
12667         (grub_mkimage): Use BINDIR instead of SBINDIR. Reported by Lee
12668         Shaver <lbgwjl@gmail.com>.
12670 2006-05-14  Yoshinori K. Okuji  <okuji@enbug.org>
12672         * kern/i386/pc/startup.S: Include grub/cpu/linux.h instead of
12673         grub/machine/linux.h
12674         * loader/i386/pc/linux.c: Likewise.
12676         * include/grub/i386/pc/linux.h: Moved to ...
12677         * include/grub/i386/linux.h: ... here.
12679         * include/grub/i386/linux.h (struct linux_kernel_params): New
12680         struct.
12682 2006-05-09  Vesa Jaaskelainen  <chaac@nic.fi>
12684         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Corrected bounds
12685         checking.
12686         (grub_video_vbe_blit_glyph): Likewise.
12687         (grub_video_vbe_blit_bitmap): Likewise.
12688         (grub_video_vbe_blit_render_target): Likewise.
12690 2006-05-09  Yoshinori K. Okuji  <okuji@enbug.org>
12692         * configure.ac (--with-platform): Properly quote the square
12693         brackets.
12695 2006-05-08  Marco Gerards  <marco@gnu.org>
12697         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Renamed from
12698         this...
12699         (kernel_elf_HEADERS): ...to this.  Updated all users.
12700         (grubof_symlist.c): Renamed from this...
12701         (kernel_elf_symlist.c): ...to this.  Updated all users.
12702         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12703         (grubof_SOURCES): Renamed from this...
12704         (kernel_elf_SOURCES): ...to this.
12705         (grubof_HEADERS): Renamed from this...
12706         (kernel_elf_HEADERS): ...to this.
12707         (grubof_CFLAGS): Renamed from this...
12708         (kernel_elf_CFLAGS): ...to this.
12709         (grubof_ASFLAGS): Renamed from this...
12710         (kernel_elf_ASFLAGS): ...to this.
12711         (grubof_LDFLAGS): Renamed from this...
12712         (kernel_elf_LDFLAGS): ...to this.
12714         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Renamed from
12715         this...
12716         (kernel_elf_HEADERS): ...to this.  Updated all users.
12717         (grubof_symlist.c): Renamed from this...
12718         (kernel_elf_symlist.c): ...to this.  Updated all users.
12719         (pkgdata_PROGRAMS): Changed `grubof' to `kernel.elf'.
12720         (grubof_SOURCES): Renamed from this...
12721         (kernel_elf_SOURCES): ...to this.
12722         (grubof_HEADERS): Renamed from this...
12723         (kernel_elf_HEADERS): ...to this.
12724         (grubof_CFLAGS): Renamed from this...
12725         (kernel_elf_CFLAGS): ...to this.
12726         (grubof_ASFLAGS): Renamed from this...
12727         (kernel_elf_ASFLAGS): ...to this.
12728         (grubof_LDFLAGS): Renamed from this...
12729         (kernel_elf_LDFLAGS): ...to this.
12731         * util/powerpc/ieee1275/grub-mkimage.c (add_segments): Use
12732         `kernel.elf' instead of `grubof'.
12734 2006-05-08  Yoshinori K. Okuji  <okuji@enbug.org>
12736         Add --with-platform to configure. Use pkglibdir instead of
12737         pkgdatadir. This is reported by Roger Leigh.
12739         * util/powerpc/ieee1275/grub-install.in (datadir): Removed.
12740         (host_vendor): Likewise.
12741         (host_os): Likewise.
12742         (pkgdatadir): Likewise.
12743         (platform): New variable.
12744         (pkglibdir): Likewise.
12745         Use PKGLIBDIR instead of PKGDATADIR.
12747         * util/i386/pc/grub-install.in (datadir): Removed.
12748         (host_vendor): Likewise.
12749         (host_os): Likewise.
12750         (pkgdatadir): Likewise.
12751         (platform): New variable.
12752         (pkglibdir): Likewise.
12753         Use PKGLIBDIR instead of PKGDATADIR.
12755         * util/powerpc/ieee1275/grub-mkimage.c (usage): Use GRUB_LIBDIR
12756         instead of GRUB_DATADIR.
12757         (main): Likewise.
12758         * util/i386/pc/grub-mkimage.c (usage): Likewise.
12759         (main): Likewise.
12760         * util/i386/efi/grub-mkimage.c (usage): Likewise.
12761         (main): Likewise.
12763         * configure.ac (--with-platform): New option.
12764         Use PLATFORM instead of HOST_VENDOR to specify a platform.
12766         * Makefile.in: Include a makefile based on PLATFORM instead of
12767         HOST_VENDOR.
12768         (pkgdatadir): Not appended by the machine type.
12769         (pkglibdir): Appended by the machine type.
12770         (host_vendor): Removed.
12771         (platform): New variable.
12772         (BUILD_CPPFLAGS): Specify GRUB_LIBDIR instead of GRUB_DATADIR.
12773         (install-local): Use PKGLIBDIR instead of PKGDATADIR.
12774         (uninstall): Likewise.
12776 2006-05-07  Yoshinori K. Okuji  <okuji@enbug.org>
12778         Use the environment context in the menu. Remove the commands
12779         "default" and "timeout", and use variables instead.
12781         * normal/menu.c: Include grub/env.h.
12782         (print_entry): Cast TITLE to silence gcc.
12783         (get_timeout): New function.
12784         (set_timeout): Likewise.
12785         (get_entry_number): Likewise.
12786         (run_menu): Use a default entry, a fallback entry and a timeout
12787         in the environment variables "default", "fallback" and
12788         "timeout". Also, tweak the default entry if it is not within the
12789         current menu entries.
12790         (grub_menu_run): Use a fallback entry in the environment variable
12791         "fallback".
12793         * normal/main.c (read_config_file): Do not initialize
12794         NEWMENU->DEFAULT_ENTRY, NEWMENU->FALLBACK_ENTRY or
12795         NEWMENU->TIMEOUT.
12796         (grub_normal_execute): Use a data slot to store the menu.
12798         * include/grub/normal.h (struct grub_menu): Removed default_entry,
12799         fallback_entry and timeout.
12800         (struct grub_menu_list): Removed.
12801         (grub_menu_list_t): Likewise.
12802         (struct grub_context): Likewise.
12803         (grub_context_t): Likewise.
12804         (grub_context_get): Likewise.
12805         (grub_context_get_current_menu): Likewise.
12806         (grub_context_push_menu): Likewise.
12807         (grub_context_pop_menu): Likewise.
12808         (grub_default_init): Likewise.
12809         (grub_default_fini): Likewise.
12810         (grub_timeout_init): Likewise.
12811         (grub_timeout_fini): Likewise.
12813         * conf/sparc64-ieee1275.rmk (pkgdata_MODULES): Removed default.mod
12814         and timeout.mod.
12815         (normal_mod_SOURCES): Removed normal/context.c.
12817         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Removed
12818         commands/default.c, commands/timeout.c and normal/context.c.
12819         (normal_mod_SOURCES): Removed normal/context.c.
12821         * conf/i386-pc.rmk (grub_emu_SOURCES): Removed commands/default.c,
12822         commands/timeout.c and normal/context.c.
12823         (normal_mod_SOURCES): Removed normal/context.c.
12825         * conf/i386-efi.rmk (grub_emu_SOURCES): Removed
12826         commands/default.c, commands/timeout.c and normal/context.c.
12827         (normal_mod_SOURCES): Removed normal/context.c.
12829         * conf/common.rmk (pkgdata_MODULES): Removed default.mod and
12830         timeout.mod.
12831         (default_mod_SOURCES): Removed.
12832         (default_mod_CFLAGS): Likewise.
12833         (default_mod_LDFLAGS): Likewise.
12834         (timeout_mod_SOURCES): Removed.
12835         (timeout_mod_CFLAGS): Likewise.
12836         (timeout_mod_LDFLAGS): Likewise.
12838         * DISTLIST: Removed commands/default.c, commands/timeout.c and
12839         normal/context.c.
12841         * commands/default.c: Removed.
12842         * commands/timeout.c: Likewise.
12843         * normal/context.c: Likewise.
12845 2006-05-07  Vesa Jaaskelainen  <chaac@nic.fi>
12847         * kern/i386/pc/startup.S (grub_exit): Added missing .code32 tag.
12849 2006-05-02  Yoshinori K. Okuji  <okuji@enbug.org>
12851         * kern/env.c (struct grub_env_context): Removed "sorted". Renamed
12852         "next" to "prev" for readability.
12853         (struct grub_env_sorted_var): New struct.
12854         (grub_env_context): Renamed to ...
12855         (initial_context): ... this.
12856         (grub_env_var_context): Renamed to ...
12857         (current_context): ... this.
12858         (grub_env_find): Look only at CURRENT_CONTEXT.
12859         (grub_env_context_open): Rewritten to copy exported variables from
12860         previous context.
12861         (grub_env_context_close): Rewritten according to the new
12862         scheme. Also, add an assertion to prevent the initial context from
12863         removed.
12864         (grub_env_insert): Removed the code for the sorted list.
12865         (grub_env_remove): Likewise.
12866         (grub_env_export): Simply mark the variable with
12867         GRUB_ENV_VAR_GLOBAL.
12868         (grub_env_set): A cosmetic change for naming consistency.
12869         (grub_env_get): Likewise.
12870         (grub_env_unset): Likewise.
12871         (grub_env_iterate): Rewritten to sort variables within this
12872         function.
12873         (grub_register_variable_hook): Fixed for naming consistency. Call
12874         grub_env_find again, only if NAME is not found at the first time.
12875         (mangle_data_slot_name): New function.
12876         (grub_env_set_data_slot): Likewise.
12877         (grub_env_get_data_slot): Likewise.
12878         (grub_env_unset_data_slot): Likewise.
12880         * include/grub/env.h (grub_env_var_type): New enum.
12881         (GRUB_ENV_VAR_LOCAL): New constant.
12882         (GRUB_ENV_VAR_GLOBAL): Likewise.
12883         (GRUB_ENV_VAR_DATA): Likewise.
12884         (struct grub_env_var): Removed "sort_next" and "sort_prevp". Added
12885         "type".
12886         (grub_env_set): Replace VAR with NAME for consistency.
12887         (grub_register_variable_hook): Likewise.
12888         (grub_env_export): Specify the name of the argument.
12889         (grub_env_set_data_slot): New prototype.
12890         (grub_env_get_data_slot): Likewise.
12891         (grub_env_unset_data_slot): Likewise.
12893 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12895         Extend the loader so that GRUB can accept a loader which comes
12896         back to GRUB when a loaded image exits. Also, this change adds
12897         support for a chainloader on EFI.
12899         * term/efi/console.c: Include grub/misc.h.
12900         (grub_console_checkkey): Display a scan code on the top for
12901         debugging. This will be removed once the EFI port gets stable.
12902         Correct the scan code mapping.
12904         * kern/efi/mm.c (sort_memory_map): Sort in a descending order to
12905         allocate memory from larger regions, in order to reduce the number
12906         of allocated regions. Otherwise, the MacOSX loader panics.
12907         (filter_memory_map): Avoid less than 1MB for compatibility with
12908         other loaders.
12909         (add_memory_regions): Allocate from the tail of a region, if
12910         possible, to avoid allocating a region near to 1MB, for the MacOSX
12911         loader.
12913         * kern/efi/init.c (grub_efi_set_prefix): Specify
12914         GRUB_EFI_IMAGE_HANDLE to grub_efi_get_loaded_image.
12916         * kern/efi/efi.c (grub_efi_get_loaded_image): Accept a new
12917         argument IMAGE_HANDLE and specify it to get a loaded image.
12918         (grub_arch_modules_addr): Specify GRUB_EFI_IMAGE_HANDLE to
12919         grub_efi_get_loaded_image.
12920         (grub_efi_get_filename): Divide the length by the size of
12921         grub_efi_char16_t.
12922         (grub_efi_get_device_path): New function.
12923         (grub_efi_print_device_path): Print End Device Path nodes. Divide
12924         the length by the size of grub_efi_char16_t for a file path device
12925         path node.
12927         * kern/loader.c (grub_loader_noreturn): New variable.
12928         (grub_loader_set): Accept a new argument NORETURN. Set
12929         GRUB_LOADER_NORETURN to NORETURN.
12930         All callers changed.
12931         (grub_loader_boot): If GRUB_LOADER_NORETURN is false, do not call
12932         grub_machine_fini.
12934         * include/grub/efi/efi.h (grub_efi_get_device_path): New
12935         prototype.
12936         (grub_efi_get_loaded_image): Take an argument to specify an image
12937         handle.
12939         * include/grub/loader.h (grub_loader_set): Added one more argument
12940         NORETURN.
12942         * disk/efi/efidisk.c (make_devices): Use grub_efi_get_device_path
12943         instead of grub_efi_open_protocol.
12944         (grub_efidisk_get_device_name): Likewise.
12945         (grub_efidisk_close): Print a newline.
12946         (grub_efidisk_get_device_handle): Fixed to use
12947         GRUB_EFI_DEVICE_PATH_SUBTYPE instead of
12948         GRUB_EFI_DEVICE_PATH_TYPE.
12950         * disk/efi/efidisk.c (device_path_guid): Moved to ...
12951         * kern/efi/efi.c (device_path_guid): ... here.
12953         * conf/i386-efi.rmk (pkgdata_MODULES): Added _chain.mod and
12954         chain.mod.
12955         (kernel_mod_HEADERS): Added efi/disk.h.
12956         (_chain_mod_SOURCES): New variable.
12957         (_chain_mod_CFLAGS): Likewise.
12958         (_chain_mod_LDFLAGS): Likewise.
12959         (chain_mod_SOURCES): Likewise.
12960         (chain_mod_CFLAGS): Likewise.
12961         (chain_mod_LDFLAGS): Likewise.
12963         * DISTLIST: Added include/grub/efi/chainloader.h,
12964         loader/efi/chainloader.c and loader/efi/chainloader_normal.c.
12966         * include/grub/efi/chainloader.h: New file.
12967         * loader/efi/chainloader.c: Likewise.
12968         * loader/efi/chainloader_normal.c: Likewise.
12970 2006-04-30  Marco Gerards  <marco@gnu.org>
12972         * commands/configfile.c (grub_cmd_source): New function.
12973         (GRUB_MOD_INIT): Register the commands `source' and `.'.
12974         (GRUB_MOD_FINI): De-register the commands `source' and `.'.
12976 2006-04-30  Marco Gerards  <marco@gnu.org>
12978         * normal/execute.c (grub_script_execute_cmd): Change the return
12979         type to `grub_err_t'.  Correctly return the error.
12980         (grub_script_execute_cmdline): In case a command line is not a
12981         command or a function, try to interpret it as an assignment.
12983 2006-04-30  Yoshinori K. Okuji  <okuji@enbug.org>
12985         * fs/hfsplus.c (grub_hfsplus_read_block): Fixed a memory leak.
12986         (grub_hfsplus_iterate_dir): Reordered to skip unknown nodes. Also,
12987         skip a node whose name is obviously invalid as UTF-16,
12988         i.e. contains a NUL character. Stop the iteration when the last
12989         directory entry is found. Instead of using the return value of
12990         grub_hfsplus_btree_iterate_node, store the value in RET and use
12991         it, because the iterator can be stopped by the last directory
12992         entry.
12994 2006-04-30  Marco Gerards  <marco@gnu.org>
12996         * include/grub/env.h (grub_env_export): New prototype.  Reported
12997         by Jan C. Kleinsorge <jan.kleinsorge@udo.edu>.
12999 2006-04-30  Marco Gerards  <marco@gnu.org>
13001         * fs/hfsplus.c (grub_hfsplus_iterate_dir): Correctly calculate the
13002         size of the extents in a catalog file record.
13004 2006-04-29  Marco Gerards  <marco@gnu.org>
13006         * commands/configfile.c (grub_cmd_configfile): Execute the
13007         configfile within its own context.
13009         * include/grub/env.h (grub_env_context_open): New prototype.
13010         (grub_env_context_close): Likewise.
13012         * kern/env.c (grub_env): Removed.
13013         (grub_env_sorted): Likewise.
13014         (grub_env_context): New variable.
13015         (grub_env_var_context): Likewise.
13016         (grub_env_find): Search both the active context and the global
13017         context.
13018         (grub_env_context_open): New function.
13019         (grub_env_context_close): Likewise.
13020         (grub_env_insert): Likewise.
13021         (grub_env_remove): Likewise.
13022         (grub_env_export): Likewise.
13023         (grub_env_set): Changed to use helper functions to avoid code
13024         duplication.
13025         (grub_env_iterate): Rewritten so both the current context and the
13026         global context are being used.
13028         * normal/command.c (export_command): New function.
13029         (grub_command_init): Register the `export' function.
13031 2006-04-26  Yoshinori K. Okuji  <okuji@enbug.org>
13033         * util/i386/pc/grub-mkimage.c (compress_kernel): Cast arguments
13034         explicitly to suppress gcc's warnings.
13035         * fs/fat.c (grub_fat_find_dir): Likewise.
13036         (grub_fat_label): Likewise.
13037         * fs/xfs.c (grub_xfs_read_inode): Likewise.
13038         (grub_xfs_mount): Likewise.
13039         (grub_xfs_label): Likewise.
13040         * fs/affs.c (grub_affs_mount): Likewise.
13041         (grub_affs_label): Likewise.
13042         (grub_affs_iterate_dir): Likewise.
13043         * fs/sfs.c (grub_sfs_mount): Likewise.
13044         (grub_sfs_iterate_dir): Likewise.
13045         * fs/ufs.c (grub_ufs_lookup_symlink): Likewise.
13046         * fs/hfs.c (grub_hfs_mount): Likewise.
13047         (grub_hfs_cmp_catkeys): Likewise.
13048         (grub_hfs_find_dir): Likewise.
13049         (grub_hfs_dir): Likewise.
13050         (grub_hfs_label): Likewise.
13051         * fs/jfs.c (grub_jfs_mount): Likewise.
13052         (grub_jfs_opendir): Likewise.
13053         (grub_jfs_getent): Likewise.
13054         (grub_jfs_lookup_symlink): Likewise.
13055         (grub_jfs_label): Likewise.
13056         * fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
13057         (grub_hfsplus_iterate_dir): Likewise.
13058         (grub_hfsplus_btree_iterate_node): Made static.
13060         * util/grub-emu.c (prefix): New variable.
13061         (grub_machine_set_prefix): New function.
13062         (main): Do not set the environment variable "prefix" here. Only
13063         set PREFIX, which is used later by grub_machine_set_prefix.
13065         * include/grub/video.h: Do not include grub/symbol.h.
13066         (grub_video_register): Not exported. This symbol is not defined in
13067         the kernel.
13068         (grub_video_unregister): Likewise.
13069         (grub_video_iterate): Likewise.
13070         (grub_video_setup): Likewise.
13071         (grub_video_restore): Likewise.
13072         (grub_video_get_info): Likewise.
13073         (grub_video_get_blit_format): Likewise.
13074         (grub_video_set_palette): Likewise.
13075         (grub_video_get_palette): Likewise.
13076         (grub_video_set_viewport): Likewise.
13077         (grub_video_get_viewport): Likewise.
13078         (grub_video_map_color): Likewise.
13079         (grub_video_map_rgb): Likewise.
13080         (grub_video_map_rgba): Likewise.
13081         (grub_video_fill_rect): Likewise.
13082         (grub_video_blit_glyph): Likewise.
13083         (grub_video_blit_bitmap): Likewise.
13084         (grub_video_blit_render_target): Likewise.
13085         (grub_video_scroll): Likewise.
13086         (grub_video_swap_buffers): Likewise.
13087         (grub_video_create_render_target): Likewise.
13088         (grub_video_delete_render_target): Likewise.
13089         (grub_video_set_active_render_target): Likewise.
13091         * include/grub/symbol.h [GRUB_SYMBOL_GENERATOR] (EXPORT_FUNC):
13092         Undefined.
13093         [GRUB_SYMBOL_GENERATOR] (EXPORT_VAR): Likewise.
13095         * conf/sparc64-ieee1275.rmk (grubof_symlist.c): Depended on
13096         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13097         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13098         instead of $(srcdir)/genkernsyms.sh.
13100         * conf/powerpc-ieee1275.rmk (grubof_symlist.c): Depended on
13101         config.h. Use gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13102         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13103         instead of $(srcdir)/genkernsyms.sh.
13105         * conf/i386-pc.rmk (symlist.c): Depended on config.h. Use
13106         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13107         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13108         instead of $(srcdir)/genkernsyms.sh.
13110         * conf/i386-efi.rmk (symlist.c): Depended on config.h. Use
13111         gensymlist.sh instead of $(srcdir)/gensymlist.sh.
13112         (kernel_syms.lst): Depended on config.h. Use genkernsyms.sh
13113         instead of $(srcdir)/genkernsyms.sh.
13115         * configure.ac (AC_CONFIG_FILES): Added gensymlist.sh and
13116         genkernsyms.sh.
13118         * Makefile.in (DISTCLEANFILES): Added gensymlist.sh and
13119         genkernsyms.sh.
13120         (gensymlist.sh): New target.
13121         (genkernsyms.sh): Likewise.
13123         * DISTLIST: Removed genkernsyms.sh and gensymlist.sh. Added
13124         genkernsyms.sh.in and gensymlist.sh.in.
13126         * genkernsyms.sh: Removed.
13127         * gensymlist.sh: Likewise.
13129         * genkernsyms.sh.in: New file.
13130         * gensymlist.sh.in: Likewise.
13132 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13134         * kern/powerpc/ieee1275/init.c (grub_machine_set_prefix): Do not
13135         clobber "prefix", since we may have already set it manually.
13137 2006-04-25  Hollis Blanchard  <hollis@penguinppc.org>
13139         * kern/misc.c (abort): New alias for grub_abort.
13141 2006-04-25  Yoshinori K. Okuji  <okuji@enbug.org>
13143         A new machine-specific function "grub_machine_set_prefix" is
13144         defined. This is called after loading modules, so that a prefix
13145         initialization can use modules. Also, this change adds an
13146         intensive debugging feature for the memory manager via the
13147         configure option "--enable-mm-debug".
13149         * partmap/gpt.c (gpt_partition_map_iterate): Add one more into
13150         PART.LEN.
13152         * kern/sparc64/ieee1275/init.c (abort): Removed.
13153         (grub_stop): Likewise.
13154         (grub_exit): New function.
13155         (grub_set_prefix): Renamed to ...
13156         (grub_machine_set_prefix): ... this.
13157         (grub_machine_init): Do not call grub_set_prefix.
13159         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Renamed to ...
13160         (grub_machine_set_prefix): ... this.
13161         (grub_machine_init): Do not call grub_set_prefix.
13163         * kern/i386/pc/init.c (grub_machine_set_prefix): New function.
13164         (grub_machine_init): Do not set the prefix here.
13166         * kern/i386/efi/init.c (grub_machine_set_prefix): New function.
13168         * kern/efi/init.c: Include grub/mm.h.
13169         (grub_efi_set_prefix): New function.
13171         * kern/efi/efi.c (grub_exit): Call grub_efi_fini.
13172         (grub_efi_get_filename): New function.
13173         (grub_print_device_path): Renamed to ...
13174         (grub_efi_print_device_path): ... this.
13176         * kern/mm.c [MM_DEBUG] (grub_malloc): Undefined.
13177         [MM_DEBUG] (grub_realloc): Likewise.
13178         [MM_DEBUG] (grub_free): Likewise.
13179         [MM_DEBUG] (grub_memalign): Likewise.
13180         [MM_DEBUG] (grub_mm_debug): New variable.
13181         [MM_DEBUG] (grub_debug_malloc): New function.
13182         [MM_DEBUG] (grub_debug_free): New function.
13183         [MM_DEBUG] (grub_debug_realloc): New function.
13184         [MM_DEBUG] (grub_debug_memalign): New function.
13186         * kern/misc.c (grub_abort): Print a newline to distinguish
13187         the message.
13189         * kern/main.c (grub_main): Call grub_machine_set_prefix and
13190         grub_set_root_dev after loading modules. This is necessary when
13191         setting a prefix depends on modules.
13193         * include/grub/efi/efi.h (grub_print_device_path): Renamed to ...
13194         (grub_efi_print_device_path): ... this.
13195         (grub_efi_get_filename): New prototype.
13196         (grub_efi_set_prefix): Likewise.
13198         * include/grub/efi/disk.h: Include grub/efi/api.h, grub/symbol.h
13199         and grub/disk.h.
13200         (grub_efidisk_get_device_handle): New prototype.
13201         (grub_efidisk_get_device_name): Likewise.
13203         * include/grub/mm.h: Include config.h.
13204         (MM_DEBUG): Removed.
13205         [MM_DEBUG && !GRUB_UTIL] (grub_mm_debug): New prototype.
13206         [MM_DEBUG && !GRUB_UTIL] (grub_malloc): New macro.
13207         [MM_DEBUG && !GRUB_UTIL] (grub_realloc): Likewise.
13208         [MM_DEBUG && !GRUB_UTIL] (grub_memalign): Likewise.
13209         [MM_DEBUG && !GRUB_UTIL] (grub_free): Likewise.
13210         [MM_DEBUG && !GRUB_UTIL] (grub_debug_malloc): New prototype.
13211         [MM_DEBUG && !GRUB_UTIL] (grub_debug_realloc): New prototype.
13212         [MM_DEBUG && !GRUB_UTIL] (grub_debug_memalign): New prototype.
13213         [MM_DEBUG && !GRUB_UTIL] (grub_debug_free): New prototype.
13215         * include/grub/kernel.h (grub_machine_set_prefix): New prototype.
13217         * disk/efi/efidisk.c: Include grub/partition.h.
13218         (iterate_child_devices): New function.
13219         (add_device): First, compare only last device path nodes, so that
13220         devices are sorted by the types.
13221         (grub_efidisk_get_device_handle): New function.
13222         (grub_efidisk_get_device_name): Likewise.
13224         * configure.ac (--enable-mm-debug): New option to enable the
13225         memory manager debugging feature. This makes the binary much
13226         bigger, so is disabled by default.
13228 2006-04-23  Yoshinori K. Okuji  <okuji@enbug.org>
13230         Use grub_abort instead of grub_stop, and grub_exit must be
13231         define in each architecture now. Also, this change adds support
13232         for EFI disks.
13234         * util/i386/pc/grub-probefs.c: Include grub/term.h.
13235         (grub_getkey): New function.
13236         (grub_term_get_current): Likewise.
13238         * util/i386/pc/grub-setup.c: Include grub/term.h.
13239         (grub_getkey): New function.
13240         (grub_term_get_current): Likewise.
13242         * util/misc.c (grub_stop): Renamed to ...
13243         (grub_exit): ... this.
13245         * kern/powerpc/ieee1275/init.c (abort): Renamed to ...
13246         (grub_exit): ... this.
13247         (grub_machine_init): Use grub_abort instead of abort.
13248         (grub_stop): Removed.
13250         * kern/powerpc/ieee1275/cmain.c (cmain): Use grub_abort instead of
13251         abort.
13253         * kern/i386/pc/startup.S (grub_exit): New function.
13254         (cold_reboot): New label.
13256         * kern/efi/init.c: Include grub/efi/disk.h and grub/env.h.
13257         (grub_efi_init): Call grub_efidisk_init.
13258         (grub_efi_fini): Call grub_efidisk_fini.
13260         * kern/efi/efi.c: Include grub/mm.h.
13261         (grub_efi_console_control_guid): Renamed to ...
13262         (console_control_guid): ... this.
13263         (grub_efi_loaded_image_guid): Renamed to ...
13264         (loaded_image_guid): ... this.
13265         (grub_efi_locate_handle): New function.
13266         (grub_efi_open_protocol): Likewise.
13267         (grub_efi_set_text_mode): Use CONSOLE_CONTROL_GUID instead of
13268         GRUB_EFI_CONSOLE_CONTROL_GUID.
13269         (grub_efi_exit): Removed.
13270         (grub_stop): Likewise.
13271         (grub_efi_get_loaded_image): Use grub_efi_open_protocol.
13272         (grub_exit): New function.
13273         (grub_print_device_path): Likewise.
13275         * kern/rescue.c (grub_rescue_cmd_exit): New function.
13276         (grub_enter_rescue_mode): Register "exit".
13278         * kern/misc.c (grub_real_dprintf): A cosmetic change.
13279         (grub_abort): New function.
13281         * kern/err.c (grub_fatal): Use grub_abort instead of grub_stop.
13283         * include/grub/sparc64/ieee1275/kernel.h (abort): Removed.
13285         * include/grub/powerpc/ieee1275/kernel.h (abort): Removed.
13287         * include/grub/efi/efi.h (grub_efi_exit): Removed.
13288         (grub_print_device_path): New prototype.
13289         (grub_efi_locate_handle): Likewise.
13290         (grub_efi_open_protocol): Likewise.
13292         * include/grub/efi/disk.h (grub_efidisk_fini): New file.
13293         * disk/efi/efidisk.c: Likewise.
13295         * DISTLIST: Added disk/efi/efidisk.c and include/grub/efi/disk.h.
13297         * include/grub/efi/console_control.h
13298         (GRUB_EFI_CONSOLE_CONTROL_GUID): Use an array for the last 8 bytes.
13300         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): Specify the
13301         last 8 bytes as an array.
13302         (GRUB_EFI_DISK_IO_GUID): New macro.
13303         (GRUB_EFI_BLOCK_IO_GUID): Likewise.
13304         (GRUB_EFI_DEVICE_PATH_GUID): Likewise.
13305         (grub_efi_ipv6_address_t): Change the type to grub_uint16_t from
13306         grub_uint8_t.
13307         (struct grub_efi_guid): Use an array to specify the last 8 bytes.
13308         (struct grub_efi_device_path): Rename the member "sub_type" to
13309         "subtype".
13310         (GRUB_EFI_DEVICE_PATH_TYPE): New macro.
13311         (GRUB_EFI_DEVICE_PATH_SUBTYPE): Likewise.
13312         (GRUB_EFI_DEVICE_PATH_LENGTH): Likewise.
13313         (GRUB_EFI_END_DEVICE_PATH_TYPE): Likewise.
13314         (GRUB_EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE): Likewise.
13315         (GRUB_EFI_END_THIS_DEVICE_PATH_SUBTYPE): Likewise.
13316         (GRUB_EFI_END_ENTIRE_DEVICE_PATH): Likewise.
13317         (GRUB_EFI_NEXT_DEVICE_PATH): Likewise.
13318         (GRUB_EFI_HARDWARE_DEVICE_PATH_TYPE): Likewise.
13319         (GRUB_EFI_PCI_DEVICE_PATH_SUBTYPE): Likewise.
13320         (struct grub_efi_pci_device_path): New structure.
13321         (grub_efi_pci_device_path_t): New type.
13322         (GRUB_EFI_PCCARD_DEVICE_PATH_SUBTYPE): New macro.
13323         (struct grub_efi_pccard_device_path): New structure.
13324         (grub_efi_pccard_device_path_t): New type.
13325         (GRUB_EFI_MEMORY_MAPPED_DEVICE_PATH_SUBTYPE): New macro.
13326         (struct grub_efi_memory_mapped_device_path): New structure.
13327         (grub_efi_memory_mapped_device_path_t): New type.
13328         (GRUB_EFI_VENDOR_DEVICE_PATH_SUBTYPE): New macro.
13329         (struct grub_efi_vendor_device_path): New structure.
13330         (grub_efi_vendor_device_path_t): New type.
13331         (GRUB_EFI_CONTROLLER_DEVICE_PATH_SUBTYPE): New macro.
13332         (struct grub_efi_controller_device_path): New structure.
13333         (grub_efi_controller_device_path_t): New type.
13334         (GRUB_EFI_ACPI_DEVICE_PATH_TYPE): New macro.
13335         (GRUB_EFI_ACPI_DEVICE_PATH_SUBTYPE): Likewise.
13336         (struct grub_efi_acpi_device_path): New structure.
13337         (grub_efi_acpi_device_path_t): New type.
13338         (GRUB_EFI_EXPANDED_ACPI_DEVICE_PATH_SUBTYPE): New macro.
13339         (struct grub_efi_expanded_acpi_device_path): New structure.
13340         (grub_efi_expanded_acpi_device_path_t): New type.
13341         (GRUB_EFI_EXPANDED_ACPI_HIDSTR): New macro.
13342         (GRUB_EFI_EXPANDED_ACPI_UIDSTR): Likewise.
13343         (GRUB_EFI_EXPANDED_ACPI_CIDSTR): Likewise.
13344         (GRUB_EFI_MESSAGING_DEVICE_PATH_TYPE): Likewise.
13345         (GRUB_EFI_ATAPI_DEVICE_PATH_SUBTYPE): Likewise.
13346         (struct grub_efi_atapi_device_path): New structure.
13347         (grub_efi_atapi_device_path_t): New type.
13348         (GRUB_EFI_FIBRE_CHANNEL_DEVICE_PATH_SUBTYPE): New macro.
13349         (struct grub_efi_fibre_channel_device_path): New structure.
13350         (grub_efi_fibre_channel_device_path_t): New type.
13351         (GRUB_EFI_1394_DEVICE_PATH_SUBTYPE): New macro.
13352         (struct grub_efi_1394_device_path): New structure.
13353         (grub_efi_1394_device_path_t): New type.
13354         (GRUB_EFI_USB_DEVICE_PATH_SUBTYPE): New macro.
13355         (struct grub_efi_usb_device_path): New structure.
13356         (grub_efi_usb_device_path_t): New type.
13357         (GRUB_EFI_USB_CLASS_DEVICE_PATH_SUBTYPE): New macro.
13358         (struct grub_efi_usb_class_device_path): New structure.
13359         (grub_efi_usb_class_device_path_t): New type.
13360         (GRUB_EFI_I2O_DEVICE_PATH_SUBTYPE): New macro.
13361         (struct grub_efi_i2o_device_path): New structure.
13362         (grub_efi_i2o_device_path_t): New type.
13363         (GRUB_EFI_MAC_ADDRESS_DEVICE_PATH_SUBTYPE): New macro.
13364         (struct grub_efi_mac_address_device_path): New structure.
13365         (grub_efi_mac_address_device_path_t): New type.
13366         (GRUB_EFI_IPV4_DEVICE_PATH_SUBTYPE): New macro.
13367         (struct grub_efi_ipv4_device_path): New structure.
13368         (grub_efi_ipv4_device_path_t): New type.
13369         (GRUB_EFI_IPV6_DEVICE_PATH_SUBTYPE): New macro.
13370         (struct grub_efi_ipv6_device_path): New structure.
13371         (grub_efi_ipv6_device_path_t): New type.
13372         (GRUB_EFI_INFINIBAND_DEVICE_PATH_SUBTYPE): New macro.
13373         (struct grub_efi_infiniband_device_path): New structure.
13374         (grub_efi_infiniband_device_path_t): New type.
13375         (GRUB_EFI_UART_DEVICE_PATH_SUBTYPE): New macro.
13376         (struct grub_efi_uart_device_path): New structure.
13377         (grub_efi_uart_device_path_t): New type.
13378         (GRUB_EFI_VENDOR_MESSAGING_DEVICE_PATH_SUBTYPE): New macro.
13379         (struct grub_efi_vendor_messaging_device_path): New structure.
13380         (grub_efi_vendor_messaging_device_path_t): New type.
13381         (GRUB_EFI_MEDIA_DEVICE_PATH_TYPE): New macro.
13382         (GRUB_EFI_HARD_DRIVE_DEVICE_PATH_SUBTYPE): Likewise.
13383         (struct grub_efi_hard_drive_device_path): New structure.
13384         (grub_efi_hard_drive_device_path_t): New type.
13385         (GRUB_EFI_CDROM_DEVICE_PATH_SUBTYPE): New macro.
13386         (struct grub_efi_cdrom_device_path): New structure.
13387         (grub_efi_cdrom_device_path_t): New type.
13388         (GRUB_EFI_VENDOR_MEDIA_DEVICE_PATH_SUBTYPE): New macro.
13389         (struct grub_efi_vendor_media_device_path): New structure.
13390         (grub_efi_vendor_media_device_path_t): New type.
13391         (GRUB_EFI_FILE_PATH_DEVICE_PATH_SUBTYPE): New macro.
13392         (struct grub_efi_file_path_device_path): New structure.
13393         (grub_efi_file_path_device_path_t): New type.
13394         (GRUB_EFI_PROTOCOL_DEVICE_PATH_SUBTYPE): New macro.
13395         (struct grub_efi_protocol_device_path): New structure.
13396         (grub_efi_protocol_device_path_t): New type.
13397         (GRUB_EFI_BIOS_DEVICE_PATH_TYPE): New macro.
13398         (GRUB_EFI_BIOS_DEVICE_PATH_SUBTYPE): Likewise.
13399         (struct grub_efi_bios_device_path): New structure.
13400         (grub_efi_bios_device_path_t): New type.
13401         (struct grub_efi_disk_io): New structure.
13402         (grub_efi_disk_io_t): New type.
13403         (struct grub_efi_block_io_media): New structure.
13404         (grub_efi_block_io_media_t): New type.
13405         (struct grub_efi_block_io): New structure.
13406         (grub_efi_block_io_t): New type.
13408         * include/grub/misc.h (grub_stop): Removed.
13409         (grub_exit): New prototype.
13410         (grub_abort): Likewise.
13412         * include/grub/disk.h (enum grub_disk_dev_id): Added
13413         GRUB_DISK_DEVICE_EFIDISK_ID.
13415         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added
13416         disk/efi/efidisk.c.
13417         (kernel_syms.lst): Remove the target if an error occurs.
13419 2006-04-22  Yoshinori K. Okuji  <okuji@enbug.org>
13421         * kern/misc.c (grub_lltoa): Rewritten the decimal conversion part,
13422         as it was simply too buggy.
13424 2006-04-21  Yoshinori K. Okuji  <okuji@enbug.org>
13426         * kern/misc.c (grub_lltoa): New function.
13427         (grub_vsprintf): Added support for the long long suffix,
13428         i.e. "ll".
13430 2006-04-20  Hollis Blanchard  <hollis@penguinppc.org>
13432         * Makefile.in (LDFLAGS): Add variable.
13433         (LD): Remove variable.
13434         * configure.ac: Add -m32 to LDFLAGS.
13435         * genmk.rb (PModule#rule): Use $(CC) instead of $(LD).
13436         * conf/powerpc-ieee1275.rmk (COMMON_LDFLAGS): Add variable.
13437         (grubof_LDFLAGS): Use $(COMMON_LDFLAGS).
13438         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS, normal_mod_LDFLAGS,
13439         suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS): New
13440         variables.
13441         * conf/sparc64-ieee1275.rmk (COMMON_LDFLAGS): Add -nostdlib.
13442         * conf/i386-pc.rmk (COMMON_LDFLAGS): Add -nostdlib.
13443         * conf/i386-efi.rmk (COMMON_LDFLAGS): Add -nostdlib.
13445 2006-04-20  Vesa Jaaskelainen  <chaac@nic.fi>
13447         * term/gfxterm.c (grub_gfxterm_getcharwidth): Fixed character
13448         length for unknown glyph.
13450 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13452         Add support for pre-loaded modules into the EFI port.
13454         * util/i386/efi/grub-mkimage.c (make_mods_section): Rewritten
13455         completely. Accept one more argument DIR. The caller has changed.
13457         * kern/i386/efi/init.c (grub_arch_modules_addr): Removed.
13459         * kern/efi/efi.c: Include grub/efi/pe32.h and grub/kernel.h.
13460         (grub_efi_loaded_image_guid): New variable.
13461         (grub_efi_get_loaded_image): New function.
13462         (grub_arch_modules_addr): Likewise.
13464         * include/grub/efi/efi.h (grub_efi_get_loaded_image): New
13465         prototype.
13467         * include/grub/efi/api.h (GRUB_EFI_LOADED_IMAGE_GUID): New macro.
13468         (struct grub_efi_loaded_image): New structure.
13469         (grub_efi_loaded_image_t): New type.
13471 2006-04-20  Yoshinori K. Okuji  <okuji@enbug.org>
13473         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
13474         size with GRUB_OS_AREA_SIZE as grub_size_t instead of
13475         grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
13477 2006-04-19  Roger Leigh  <rleigh@whinlatter.ukfsn.org>
13479         * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.
13481 2006-04-19  Yoshinori K. Okuji  <okuji@enbug.org>
13483         * DISTLIST: Added include/grub/efi/console.h,
13484         include/grub/efi/time.h, include/grub/i386/efi/kernel.h,
13485         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13487         * include/grub/efi/console.h: New file.
13488         * include/grub/efi/time.h: Likewise.
13489         * include/grub/i386/efi/kernel.h: Likewise.
13490         * kern/efi/init.c: Likewise.
13491         * kern/efi/mm.c: Likewise.
13492         * term/efi/console.c: Likewise.
13494         * kern/i386/efi/init.c: Do not include grub/machine/time.h.
13495         (grub_stop): Removed.
13496         (grub_get_rtc): Likewise.
13497         (grub_machine_init): Simply call grub_efi_init.
13498         (grub_machine_fini): Call grub_efi_fini.
13500         * kern/efi/efi.c: Include grub/machine/time.h and grub/term.h.
13501         (grub_efi_output_string): Removed.
13502         (grub_efi_stall): New function.
13503         (grub_stop): Likewise.
13504         (grub_get_rtc): Likewise.
13506         * include/grub/efi/efi.h (grub_efi_output_string): Removed.
13507         (grub_efi_stall): New prototype.
13508         (grub_efi_allocate_pages): Likewise.
13509         (grub_efi_free_pages): Likewise.
13510         (grub_efi_get_memory_map): Likewise.
13511         (grub_efi_mm_init): Likewise.
13512         (grub_efi_mm_fini): Likewise.
13513         (grub_efi_init): Likewise.
13514         (grub_efi_fini): Likewise.
13516         * include/grub/i386/efi/time.h: Do not include
13517         grub/symbol.h. Include grub/efi/time.h.
13518         (GRUB_TICKS_PER_SECOND): Removed.
13519         (grub_get_rtc): Likewise.
13521         * include/grub/efi/api.h (struct grub_efi_memory_descriptor):
13522         Added padding. The EFI spec is buggy.
13523         (GRUB_EFI_BLACK): New macro.
13524         (GRUB_EFI_BLUE): Likewise.
13525         (GRUB_EFI_GREEN): Likewise.
13526         (GRUB_EFI_CYAN): Likewise.
13527         (GRUB_EFI_RED): Likewise.
13528         (GRUB_EFI_MAGENTA): Likewise.
13529         (GRUB_EFI_BROWN): Likewise.
13530         (GRUB_EFI_LIGHTGRAY): Likewise.
13531         (GRUB_EFI_BRIGHT): Likewise.
13532         (GRUB_EFI_DARKGRAY): Likewise.
13533         (GRUB_EFI_LIGHTBLUE): Likewise.
13534         (GRUB_EFI_LIGHTGREEN): Likewise.
13535         (GRUB_EFI_LIGHTCYAN): Likewise.
13536         (GRUB_EFI_LIGHTRED): Likewise.
13537         (GRUB_EFI_LIGHTMAGENTA): Likewise.
13538         (GRUB_EFI_YELLOW): Likewise.
13539         (GRUB_EFI_WHITE): Likewise.
13540         (GRUB_EFI_BACKGROUND_BLACK): Likewise.
13541         (GRUB_EFI_BACKGROUND_BLUE): Likewise.
13542         (GRUB_EFI_BACKGROUND_GREEN): Likewise.
13543         (GRUB_EFI_BACKGROUND_CYAN): Likewise.
13544         (GRUB_EFI_BACKGROUND_RED): Likewise.
13545         (GRUB_EFI_BACKGROUND_MAGENTA): Likewise.
13546         (GRUB_EFI_BACKGROUND_BROWN): Likewise.
13547         (GRUB_EFI_BACKGROUND_LIGHTGRAY): Likewise.
13548         (GRUB_EFI_TEXT_ATTR): Likewise.
13550         * conf/i386-efi.rmk (kernel_mod_SOURCES): Added kern/efi/efi.c,
13551         kern/efi/init.c, kern/efi/mm.c, and term/efi/console.c.
13552         (kernel_mod_HEADERS): Added efi/time.h.
13554 2006-04-18  Yoshinori K. Okuji  <okuji@enbug.org>
13556         * DISTLIST: Added conf/i386-efi.mk, conf/i386-efi.rmk,
13557         include/grub/efi/api.h, include/grub/efi/console_control.h,
13558         include/grub/efi/efi.h, include/grub/efi/pe32.h,
13559         include/grub/i386/efi/time.h, kern/efi/efi.c,
13560         kern/i386/efi/init.c, kern/i386/efi/startup.S,
13561         and util/i386/efi/grub-mkimage.c.
13563         * Makefile.in (RMKFILES): Added i386-efi.rmk.
13565         * genmk.rb (PModule#rule): Do not export symbols if
13566         #{prefix}_EXPORTS is set to "no".
13568         * conf/i386-efi.mk: New file.
13569         * conf/i386-efi.rmk: Likewise.
13570         * include/grub/efi/api.h: Likewise.
13571         * include/grub/efi/console_control.h: Likewise.
13572         * include/grub/efi/efi.h: Likewise.
13573         * include/grub/efi/pe32.h: Likewise.
13574         * include/grub/i386/efi/time.h: Likewise.
13575         * kern/efi/efi.c: Likewise.
13576         * kern/i386/efi/init.c: Likewise.
13577         * kern/i386/efi/startup.S: Likewise.
13578         * util/i386/efi/grub-mkimage.c: Likewise.
13580 2006-04-17  Marco Gerards  <marco@gnu.org>
13582         * include/grub/script.h: Include <grub/parser.h> and
13583         "grub_script.tab.h".
13584         (struct grub_lexer_param): New struct.
13585         (struct grub_parser_param): Likewise.
13586         (grub_script_create_arglist): Pass the state in an argument.
13587         (grub_script_add_arglist): Likewise.
13588         (grub_script_create_cmdline): Likewise.
13589         (grub_script_create_cmdblock): Likewise.
13590         (grub_script_create_cmdif): Likewise.
13591         (grub_script_create_cmdmenu): Likewise.
13592         (grub_script_add_cmd): Likewise.
13593         (grub_script_arg_add): Likewise.
13594         (grub_script_lexer_ref): Likewise.
13595         (grub_script_lexer_deref): Likewise.
13596         (grub_script_lexer_record_start): Likewise.
13597         (grub_script_lexer_record_stop): Likewise.
13598         (grub_script_mem_record): Likewise.
13599         (grub_script_mem_record_stop): Likewise.
13600         (grub_script_malloc): Likewise.
13601         (grub_script_yylex): Likewise.
13602         (grub_script_yyparse): Likewise.
13603         (grub_script_yyerror): Likewise.
13604         (grub_script_yylex): Likewise.
13605         (grub_script_lexer_init): Return the state.
13607         * normal/lexer.c (grub_script_lexer_state): Removed variable.
13608         (grub_script_lexer_done): Likewise.
13609         (grub_script_lexer_getline): Likewise.
13610         (grub_script_lexer_refs): Likewise.
13611         (script): Likewise.
13612         (newscript): Likewise.
13613         (record): Likewise.
13614         (recording): Likewise.
13615         (recordpos): Likewise.
13616         (recordlen): Likewise.
13617         (grub_script_lexer_init): Return the state instead of setting
13618         global variables.
13619         (grub_script_lexer_ref): Use the newly added argument for state
13620         instead of globals.
13621         (grub_script_lexer_deref): Likewise.
13622         (grub_script_lexer_record_start): Likewise.
13623         (grub_script_lexer_record_stop): Likewise.
13624         (recordchar): Likewise.
13625         (nextchar): Likewise.
13626         (grub_script_yylex2): Likewise.
13627         (grub_script_yylex): Likewise.
13628         (grub_script_yyerror): Likewise.
13630         * normal/parser.y (func_mem): Removed variable.
13631         (menu_entry): Likewise.
13632         (err): Likewise.
13633         (%lex-param): New parser option.
13634         (%parse-param): Likewise.
13635         (script): Always return the AST.
13636         (argument): Pass the state around.
13637         (arguments): Likewise.
13638         (grubcmd): Likewise.
13639         (commands): Likewise.
13640         (function): Likewise.
13641         (menuentry): Likewise.
13642         (if_statement): Likewise.
13643         (if): Likewise.
13645         * normal/script.c (grub_script_memused): Removed variable.
13646         (grub_script_parsed): Likewise.
13647         (grub_script_malloc): Added a state argument.  Use that instead of
13648         global variables.
13649         (grub_script_mem_record): Likewise.
13650         (grub_script_mem_record_stop): Likewise.
13651         (grub_script_arg_add): Likewise.
13652         (grub_script_add_arglist): Likewise.
13653         (grub_script_create_cmdline): Likewise.
13654         (grub_script_create_cmdif): Likewise.
13655         (grub_script_create_cmdmenu): Likewise.
13656         (grub_script_add_cmd): Likewise.
13657         (grub_script_parse): Setup the state before calling the parser.
13659 2006-04-16  Marco Gerards  <marco@gnu.org>
13661         * normal/command.c (grub_command_init): Remove the title command.
13663         * normal/lexer.c (grub_script_yylex): Renamed from this...
13664         (grub_script_yylex2): ... to this.
13665         (grub_script_yylex): New function.  Temporary
13666         introduced to filter some tokens.
13667         (grub_script_yyerror): Print a newline.
13669         * normal/main.c (read_config_file): Output information about the
13670         lines that contain errors.  Wait for a key after all lines have
13671         been processed.  Don't return an empty menu.
13673         * normal/parser.y (func_mem): Don't initialize.
13674         (menu_entry): Likewise.
13675         (err): New variable.
13676         (script): Don't return anything when an error was encountered.
13677         (ws, returns): Removed rules.
13678         (argument): Disabled concatenated variable support.
13679         (arguments): Remove explicit separators.
13680         (grubcmd): Likewise.
13681         (function): Likewise.
13682         (menuentry): Likewise.
13683         (if): Likewise.
13684         (commands): Likewise.  Add error handling.
13686         * normal/script.c (grub_script_create_cmdline): If
13687         `grub_script_parsed' is 0, assume the parser encountered an error.
13689 2006-04-02  Yoshinori K. Okuji  <okuji@enbug.org>
13691         * configure.ac: Add support for EFI. Fix the typo
13692         BUILD_LDDFLAGS. Restore the LDFLAGS after testing.
13694 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13696         * util/unifont2pff.rb: Removed unnecessary byte ordering.  Now
13697         foreign multibyte characters should be shown correctly.
13699 2006-04-01  Vesa Jaaskelainen  <chaac@nic.fi>
13701         * normal/main.c (grub_normal_menu_addentry): Fixed menu size
13702         calculation.
13703         (read_config_file): Made it to close file before returning.
13705 2006-03-31  Vesa Jaaskelainen  <chaac@nic.fi>
13707         * DISTLIST: Added include/grub/i386/pc/vbeblit.h,
13708         include/grub/i386/pc/vbefill.h, video/i386/pc/vbeblit.c,
13709         video/i386/pc/vbefill.c.
13711         * conf/i386-pc.rmk (vbe_mod_SOURCES): Added video/i386/pc/vbeblit.c,
13712         video/i386/pc/vbefill.c.
13714         * include/grub/video.h (grub_video_blit_format): New enum.
13715         (grub_video_mode_info): Added new member blit_format.
13716         (grub_video_get_blit_format): New function prototype.
13718         * include/grub/i386/pc/vbe.h (grub_video_vbe_get_video_ptr): New
13719         function prototype.
13720         (grub_video_vbe_map_rgb): Likewise.
13721         (grub_video_vbe_unmap_color): Likewise.
13723         * include/grub/i386/pc/vbeblit.h: New file.
13725         * include/grub/i386/pc/vbefill.h: New file.
13727         * video/video.c (grub_video_get_blit_format): New function.
13728         (grub_video_vbe_get_video_ptr): Re-declared as non-static.
13729         (grub_video_vbe_map_rgb): Likewise.
13730         (grub_video_vbe_unmap_color): Likewise.
13732         * video/i386/pc/vbe.c (grub_video_vbe_fill_rect): Changed to use more
13733         optimized fills.
13734         (grub_video_vbe_blit_render_target): Changed to use more optimized
13735         blits.
13736         (grub_video_vbe_setup): Added detection for optimized settings.
13737         (grub_video_vbe_create_render_target): Likewise.
13739         * video/i386/pc/vbeblit.c: New file.
13741         * video/i386/pc/vbefill.c: New file.
13743 2006-03-30  Vesa Jaaskelainen  <chaac@nic.fi>
13745         * font/manager.c (grub_font_get_glyph): Removed font fixup from
13746         here...
13748         * util/unifont2pff.rb: ... and moved it to here.  Improved argument
13749         parsing to support both hex and dec ranges.  If filename was missing
13750         show usage information.
13752 2006-03-14  Vesa Jaaskelainen  <chaac@nic.fi>
13754         * DISTLIST: Added include/grub/video.h, term/gfxterm.c,
13755         video/video.c, commands/videotest.c.  Removed term/i386/pc/vesafb.c.
13757         * conf/i386-pc.rmk (pkgdata_MODULES): Added video.mod,
13758         gfxterm.mod, videotest.mod.  Removed vga.mod, vesafb.mod.
13759         (video_mod_SOURCES): Added.
13760         (video_mod_CFLAGS): Likewise.
13761         (video_mod_LDFLAGS): Likewise.
13762         (gfxterm_mod_SOURCES): Likewise.
13763         (gfxterm_mod_CFLAGS): Likewise.
13764         (gfxterm_mod_LDFLAGS): Likewise.
13765         (videotest_mod_SOURCES): Likewise.
13766         (videotest_mod_CFLAGS): Likewise.
13767         (videotest_mod_LDFLAGS): Likewise.
13768         (vesafb_mod_SOURCES): Removed.
13769         (vesafb_mod_CFLAGS): Likewise.
13770         (vesafb_mod_LDFLAGS): Likewise.
13771         (vga_mod_SOURCES): Likewise.
13772         (vga_mod_CFLAGS): Likewise.
13773         (vga_mod_LDFLAGS): Likewise.
13775         * commands/videotest.c: New file.
13777         * font/manager.c (fill_with_default_glyph): Modified to use
13778         grub_font_glyph.
13779         (grub_font_get_glyph): Likewise.
13780         (fontmanager): Renamed from this...
13781         (font_manager): ... to this.
13783         * include/grub/font.h (grub_font_glyph): Added new structure.
13784         (grub_font_get_glyph): Modified to use grub_font_glyph.
13786         * include/grub/misc.h (grub_abs): Added as inline function.
13788         * include/grub/video.h: New file.
13790         * include/grub/i386/pc/vbe.h (GRUB_VBE_STATUS_OK): New macro.
13791         (GRUB_VBE_MEMORY_MODEL_PACKED_PIXEL): Likewise.
13792         (GRUB_VBE_MEMORY_MODEL_DIRECT_COLOR): Likewise.
13793         (grub_vbe_get_controller_info): Renamed from this...
13794         (grub_vbe_bios_get_controller_info): ... to this.
13795         (grub_vbe_get_mode_info): Renamed from this...
13796         (grub_vbe_bios_get_mode_info): ... to this.
13797         (grub_vbe_set_mode): Renamed from this...
13798         (grub_vbe_bios_set_mode): ... to this.
13799         (grub_vbe_get_mode): Renamed from this...
13800         (grub_vbe_bios_get_mode): ... to this.
13801         (grub_vbe_set_memory_window): Renamed from this...
13802         (grub_vbe_bios_set_memory_window): ... to this.
13803         (grub_vbe_get_memory_window): Renamed from this...
13804         (grub_vbe_bios_get_memory_window): ... to this.
13805         (grub_vbe_set_scanline_length): Renamed from this...
13806         (grub_vbe_set_scanline_length): ... to this.
13807         (grub_vbe_get_scanline_length): Renamed from this...
13808         (grub_vbe_bios_get_scanline_length): ... to this.
13809         (grub_vbe_set_display_start): Renamed from this...
13810         (grub_vbe_bios_set_display_start): ... to this.
13811         (grub_vbe_get_display_start): Renamed from this...
13812         (grub_vbe_bios_get_display_start): ... to this.
13813         (grub_vbe_set_palette_data): Renamed from this...
13814         (grub_vbe_bios_set_palette_data): ... to this.
13815         (grub_vbe_set_pixel_rgb): Removed.
13816         (grub_vbe_set_pixel_index): Likewise.
13818         * kern/i386/pc/startup.S (grub_vbe_get_controller_info): Renamed
13819         from this...
13820         (grub_vbe_bios_get_controller_info): ... to this.
13821         (grub_vbe_get_mode_info): Renamed from this...
13822         (grub_vbe_bios_get_mode_info): ... to this.
13823         (grub_vbe_set_mode): Renamed from this...
13824         (grub_vbe_bios_set_mode): ... to this.
13825         (grub_vbe_get_mode): Renamed from this...
13826         (grub_vbe_bios_get_mode): ... to this.
13827         (grub_vbe_set_memory_window): Renamed from this...
13828         (grub_vbe_bios_set_memory_window): ... to this.
13829         (grub_vbe_get_memory_window): Renamed from this...
13830         (grub_vbe_bios_get_memory_window): ... to this.
13831         (grub_vbe_set_scanline_length): Renamed from this...
13832         (grub_vbe_set_scanline_length): ... to this.
13833         (grub_vbe_get_scanline_length): Renamed from this...
13834         (grub_vbe_bios_get_scanline_length): ... to this.
13835         (grub_vbe_set_display_start): Renamed from this...
13836         (grub_vbe_bios_set_display_start): ... to this.
13837         (grub_vbe_get_display_start): Renamed from this...
13838         (grub_vbe_bios_get_display_start): ... to this.
13839         (grub_vbe_set_palette_data): Renamed from this...
13840         (grub_vbe_bios_set_palette_data): ... to this.
13841         (grub_vbe_bios_get_controller_info): Fixed problem with registers
13842         getting corrupted after calling it.  Added more pushes and pops.
13843         (grub_vbe_bios_set_mode): Likewise.
13844         (grub_vbe_bios_get_mode): Likewise.
13845         (grub_vbe_bios_get_memory_window): Likewise.
13846         (grub_vbe_bios_set_scanline_length): Likewise.
13847         (grub_vbe_bios_get_scanline_length): Likewise.
13848         (grub_vbe_bios_get_display_start): Likewise.
13849         (grub_vbe_bios_set_palette_data): Likewise.
13851         * normal/cmdline.c (cl_set_pos): Refresh the screen.
13852         (cl_insert): Likewise.
13853         (cl_delete): Likewise.
13855         * term/gfxterm.c: New file.
13857         * term/i386/pc/vesafb.c: Removed file.
13859         * video/video.c: New file.
13861         * video/i386/pc/vbe.c (real2pm): Added new function.
13862         (grub_video_vbe_draw_pixel): Likewise.
13863         (grub_video_vbe_get_video_ptr): Likewise.
13864         (grub_video_vbe_get_pixel): Likewise
13865         (grub_video_vbe_init): Likewise.
13866         (grub_video_vbe_fini): Likewise.
13867         (grub_video_vbe_setup): Likewise.
13868         (grub_video_vbe_get_info): Likewise.
13869         (grub_video_vbe_set_palette): Likewise.
13870         (grub_video_vbe_get_palette): Likewise.
13871         (grub_video_vbe_set_viewport): Likewise.
13872         (grub_video_vbe_get_viewport): Likewise.
13873         (grub_video_vbe_map_color): Likewise.
13874         (grub_video_vbe_map_rgb): Likewise.
13875         (grub_video_vbe_map_rgba): Likewise.
13876         (grub_video_vbe_unmap_color): Likewise.
13877         (grub_video_vbe_fill_rect): Likewise.
13878         (grub_video_vbe_blit_glyph): Likewise.
13879         (grub_video_vbe_blit_bitmap): Likewise.
13880         (grub_video_vbe_blit_render_target): Likewise.
13881         (grub_video_vbe_scroll): Likewise.
13882         (grub_video_vbe_swap_buffers): Likewise.
13883         (grub_video_vbe_create_render_target): Likewise.
13884         (grub_video_vbe_delete_render_target): Likewise.
13885         (grub_video_vbe_set_active_render_target): Likewise.
13886         (grub_vbe_set_pixel_rgb): Remove function.
13887         (grub_vbe_set_pixel_index): Likewise.
13888         (index_color_mode): Remove static variable.
13889         (active_mode): Likewise.
13890         (framebuffer): Likewise.
13891         (bytes_per_scan_line): Likewise.
13892         (grub_video_vbe_adapter): Added new static variable.
13893         (framebuffer): Likewise.
13894         (render_target): Likewise.
13895         (initial_mode): Likewise.
13896         (mode_in_use): Likewise.
13897         (mode_list): Likewise.
13899 2006-03-10  Marco Gerards  <marco@gnu.org>
13901         * configure.ac (AC_INIT): Bumped to 1.93.
13903         * DISTLIST: Added `include/grub/hfs.h'.
13905 2006-02-01  Yoshinori K. Okuji  <okuji@enbug.org>
13907         * boot/i386/pc/boot.S (general_error): Before looping, try INT
13908         18H, which might help the BIOS falling back to next boot media.
13910 2006-01-25  Yoshinori K. Okuji  <okuji@enbug.org>
13912         * util/i386/pc/grub-install.in: Escape a backslash. Reported by
13913         Poe Chen <poe.poechen@gmail.com>.
13915 2006-01-17  Marco Gerards  <marco@gnu.org>
13917         * include/grub/normal.h: Include <grub/script.h>.
13918         (grub_command_list): Removed struct.
13919         (grub_command_list_t): Removed type.
13920         (grub_menu_entry): Remove members `num' and `command_list'.  Add
13921         members `commands' and `sourcecode'.
13922         * include/grub/script.h: Add inclusion guards.
13923         (grub_script_cmd_menuentry): New struct.
13924         (grub_script_execute_menuentry): New prototype.
13925         (grub_script_lexer_record_start): Likewise.
13926         (grub_script_lexer_record_stop): Likewise.
13927         * normal/execute.c (grub_script_execute_menuentry): New function.
13928         * normal/lexer.c (record, recording, recordpos, recordlen): New
13929         variables.
13930         (grub_script_lexer_record_start): New function.
13931         (grub_script_lexer_record_stop): Likewise.
13932         (recordchar): Likewise.
13933         (nextchar): Likewise.
13934         (grub_script_yylex): Use `nextchar' to fetch new characters.  Use
13935         2048 as the buffer size.  Add the tokens `menuentry' and `@'.
13936         * normal/main.c: Include <grub/parser.h> and <grub/script.h>
13937         (current_menu): New variable.
13938         (free_menu): Mainly rewritten.
13939         (grub_normal_menu_addentry): New function.
13940         (read_config_file): Rewritten.
13941         * normal/menu.c (run_menu_entry): Mainly rewritten.
13942         * normal/menu_entry.c (make_screen): Rewritten the code to insert
13943         the menu entry.
13944         (run): Mainly rewritten.
13945         * normal/parser.y (menu_entry): New variable.
13946         (GRUB_PARSER_TOKEN_MENUENTRY): New token.
13947         (menuentry): New rule.
13948         (command): Add `menuentry'.
13949         (if_statement): Allow additional returns before `fi'.
13950         * normal/script.c (grub_script_create_cmdmenu): New function.
13952 2006-01-03  Marco Gerards  <marco@gnu.org>
13954         * INSTALL: GNU Bison is required.
13955         * configure.ac: Rewritten the test to detect Bison.
13956         * Makefile.in (YACC): New variable.  Reported by Xun Sun
13957         <xun.sun.cn@gmail.com>.
13959 2006-01-03  Marco Gerards  <marco@gnu.org>
13961         * fs/hfsplus.c (grub_hfsplus_read_block): Convert the offset of
13962         the HFS+ filesystem to filesystem blocks.
13963         (grub_hfsplus_iterate_dir): Cast the `fileinfo' assignment so a
13964         GCC warning is silenced.
13966 2006-01-03  Marco Gerards  <marco@gnu.org>
13968         * partmap/apple.c (apple_partition_map_iterate): Convert the data
13969         read from disk from big endian to host byte order.
13971 2006-01-03  Hollis Blanchard  <hollis@penguinppc.org>
13973         * fs/hfs.c: Include <grub/hfs.h>.  Added reference to the official
13974         documentation.
13975         (GRUB_HFS_EMBED_HFSPLUS_SIG): New macro.
13976         (grub_hfs_mount): Grammar fix in error. Make sure this is not an
13977         embedded HFS+ filesystem.
13978         (GRUB_HFS_MAGIC, grub_hfs_extent, grub_hfs_datarecord_t)
13979         (grub_hfs_sblock): Move from here...
13980         * include/grub/hfs.h: To here...  New file.
13981         * fs/hfsplus.c: Include <grub/hfs.h>.  Added reference to the official
13982         documentation.
13983         (GRUB_HFSPLUS_MAGIC, GRUB_HFSPLUSX_MAGIC, GRUB_HFSPLUS_SBLOCK):
13984         New macros.
13985         (grub_hfsplus_volheader): Change type of member `magic' to
13986         `grub_uint16_t'.
13987         (grub_hfsplus_data): Add new member `embedded_offset'.
13988         (grub_hfsplus_read_block): Add the HFS+ wrapper offset to the
13989         returned block.
13990         (grub_hfsplus_mount): Read the HFS+ wrapper if it exists.
13991         Calculate the offset.
13993 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
13995         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRP_ADDR):
13996         Removed.
13997         (GRUB_BOOT_MACHINE_DRP_SIZE): Likewise.
13999 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14001         * kern/env.c (grub_env_set): Check if ENV->VALUE instead of
14002         ENV->NAME is NULL after allocating ENV->VALUE.
14004 2005-12-25  Marco Gerards  <marco@gnu.org>
14006         * kern/env.c (grub_env_set): Rewritten the error handling code.
14008 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14010         * geninit.sh: Made more robust, and more portable.
14012 2005-12-25  Marco Gerards  <marco@gnu.org>
14014         Add support for Apple HFS+ filesystems.
14016         * fs/hfsplus.c: New file.
14018         * DISTLIST: Added `fs/hfsplus.c'.
14020         * conf/common.rmk (pkgdata_MODULES): Add `hfsplus.mod'.
14021         (hfsplus_mod_SOURCES): New variable.
14022         (hfsplus_mod_CFLAGS): Likewise.
14023         (hfsplus_mod_LDFLAGS): Likewise.
14024         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/hfsplus.c'.
14025         (grub_setup_SOURCES): Likewise.
14026         (grub_mkdevicemap_SOURCES): Likewise.
14027         (grub_emu_SOURCES): Likewise.
14028         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
14030         * fs/fshelp.c (grub_fshelp_log2blksize): New function.
14032         * include/grub/fshelp.h (grub_fshelp_log2blksize): new prototype.
14034 2005-12-25  Yoshinori K. Okuji  <okuji@enbug.org>
14036         * DISTLIST: Added geninitheader.sh, geninit.sh, commands/test.c,
14037         commands/i386/pc/play.c, conf/common.mk, conf/common.rmk,
14038         include/grub/parser.h, include/grub/script.h, kern/parser.c,
14039         kern/sparc64/cache.S, normal/execute.c, normal/function.c,
14040         normal/lexer.c, normal/parser.y, normal/script.c, and
14041         partmap/gpt.c.
14042         Removed kern/sparc64/cache.c.
14044         * conf/common.rmk (DISTCLEANFILES): Added grub_script.tab.c,
14045         grub_script.tab.h, grub_modules_init.lst, grub_modules_init.h,
14046         grub_emu_init.c.
14048         * configure.ac (AC_INIT): Bumped to 1.92.
14050 2005-12-24  Vesa Jaaskelainen  <chaac@nic.fi>
14052         * kern/err.c (grub_error_push): Added new function to support error
14053         stacks.
14054         (grub_error_pop): Likewise.
14055         (grub_error_stack_items): New local variable to support error stacks.
14056         (grub_error_stack_pos): Likewise.
14057         (grub_error_stack_assert): Likewise.
14058         (GRUB_ERROR_STACK_SIZE): Added new define to configure maximum error
14059         stack depth.
14060         (grub_print_error): Added support to print errors from error stack.
14062         * include/grub/err.h (grub_error_push): Added function prototype.
14063         (grub_error_pop): Likewise.
14065 2005-12-09  Hollis Blanchard  <hollis@penguinppc.org>
14067         * configure.ac: Accept `powerpc64' as host_cpu.
14068         (amd64): Rename to `biarch32'.
14070         * kern/powerpc/cache.S (grub_arch_sync_caches): Handle
14071         non-cacheline-aligned addresses.
14073         * kern/dl.c (grub_dl_load_core): Add grub_dprintf messages.
14074         (grub_dl_flush_cache): Likewise.  Only call `grub_arch_sync_caches'
14075         if `size' is non-zero.
14077 2005-12-03  Marco Gerards  <mgerards@xs4all.nl>
14079         * conf/common.rmk (grub_modules_init.lst): Use `-printf "%P\n"'
14080         and `cd' to make sure the filename is not prefixed with a
14081         directory name.
14082         (pkgdata_MODULES): Add `gpt.mod'.
14083         (gpt_mod_SOURCES): New variable.
14084         (gpt_mod_CFLAGS): Likewise.
14085         (gpt_mod_LDFLAGS): Likewise.
14087         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/gpt.c'.
14089         * include/grub/pc_partition.h (GRUB_PC_PARTITION_TYPE_GPT_DISK):
14090         New macro.
14092         * partmap/gpt.c: New file.
14094         * partmap/pc.c (pc_partition_map_iterate): Don't continue when a
14095         GPT partition map is detected.
14097 2005-12-03  Vincent Pelletier  <subdino2004@yahoo.fr>
14099         * commands/i386/pc/play.c: New file.
14100         * conf/i386-pc.rmk (pkgdata_MODULES): Added play.mod.
14101         (play_mod_SOURCES, play_mod_CFLAGS, play_mod_LDFLAGS): New
14102         macros.
14104 2005-11-27  Marco Gerards  <mgerards@xs4all.nl>
14106         * include/grub/dl.h (GRUB_MOD_INIT): Use `__attribute__
14107         ((unused))' to silence gcc warning.
14109 2005-11-26  Hollis Blanchard  <hollis@penguinppc.org>
14111         * configure.ac: Correct `AC_PROG_YACC' test.
14113 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14115         * util/powerpc/ieee1275/grub-install.in: Run the mount point
14116         check before installing files.
14118 2005-11-22  Mike Small  <smallm@panix.com>
14120         * util/powerpc/ieee1275/grub-install.in (grubdir): Fixed partition
14121         number regex so multidigit numbers are recognized correctly.
14123 2005-11-22  Mike Small  <smallm@panix.com>
14125         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Add a
14126         debugging message before attempting to claim memory.
14127         (grub_rescue_cmd_initrd): Add a claim debugging message and try
14128         multiple addresses in case of failure.
14130 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14132         * term/tparm.c (get_space): Remove empty `if' statement.
14134         * fs/ufs.c (grub_ufs_find_file): Remove `grub_le_to_cpu32'.
14136         * kern/parser.c (check_varstate): Rename `state' to 's'.
14138 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14140         * partmap/acorn.c: Change `unsigned' to `unsigned int'.  Move all
14141         variable definitions to the beginning of each function.  Sort stack
14142         variables by size.
14143         (find): Rename to `acorn_partition_map_find'.  Cast `grub_disk_read'
14144         `buf' argument to `char *'.
14146 2005-11-22  Hollis Blanchard  <hollis@penguinppc.org>
14148         * conf/powerpc-ieee1275.rmk: Include conf/common.mk.
14149         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14150         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14151         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14152         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14153         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14154         configfile.mod, search.mod, gzio.mod and test.mod.
14155         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14156         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14157         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14158         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14159         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14160         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14161         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14162         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14163         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14164         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14165         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14166         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14167         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14168         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14169         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14170         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14171         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14172         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14173         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14174         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14175         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14176         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14177         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Removed.
14179         * conf/common.mk (grub_modules_init.lst): Use `find' instead of
14180         `grep --include'.
14181         (pkgdata_MODULES): Add test.mod.
14183 2005-11-18  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14185         * genmk.rb: Fixed list rules moved to Makefile.in.  Recognise
14186         appending to variables with "+=".
14187         (PModule): Use full pathname to generate *.lst filenames.
14189         * Makefile.in: Fixed list rules moved from genmk.rb.
14190         (.DELETE_ON_ERROR): New special target.
14191         (RMKFILES): Add common.rmk and sparc64-ieee1275.rmk.
14193         * conf/i386-pc.rmk: Include conf/common.mk.
14194         (pkgdata_MODULES): Removed fshelp.mod, fat.mod, ext2.mod, ufs.mod,
14195         minix.mod, hfs.mod, jfs.mod, xfs.mod, affs.mod, sfs.mod,
14196         hello.mod, boot.mod, terminal.mod, ls.mod, cmp.mod, cat.mod,
14197         help.mod, font.mod, terminfo.mod, amiga.mod, apple.mod, pc.mod,
14198         sun.mod, acorn.mod, loopback.mod, default.mod, timeout.mod,
14199         configfile.mod, search.mod, gzio.mod and test.mod.
14200         (symlist.c, grub_script.tab.c, grub_script.tab.h, kernel_syms.lst)
14201         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c)
14202         (fshelp_mod_SOURCES, fshelp_mod_CFLAGS, fshelp_mod_LDFLAGS)
14203         (fat_mod_SOURCES, fat_mod_CFLAGS, fat_mod_LDFLAGS)
14204         (ext2_mod_SOURCES, ext2_mod_CFLAGS, ext2_mod_LDFLAGS)
14205         (ufs_mod_SOURCES, ufs_mod_CFLAGS, ufs_mod_LDFLAGS)
14206         (minix_mod_SOURCES, minix_mod_CFLAGS, minix_mod_LDFLAGS)
14207         (hfs_mod_SOURCES, hfs_mod_CFLAGS, hfs_mod_LDFLAGS, jfs_mod_SOURCES)
14208         (jfs_mod_CFLAGS, jfs_mod_LDFLAGS, iso9660_mod_SOURCES)
14209         (iso9660_mod_CFLAGS, iso9660_mod_LDFLAGS, xfs_mod_SOURCES)
14210         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14211         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14212         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, hello_mod_SOURCES)
14213         (hello_mod_CFLAGS, hello_mod_LDFLAGS, boot_mod_SOURCES)
14214         (boot_mod_CFLAGS, boot_mod_LDFLAGS, terminal_mod_SOURCES)
14215         (terminal_mod_CFLAGS, terminal_mod_LDFLAGS, ls_mod_SOURCES)
14216         (ls_mod_CFLAGS, ls_mod_LDFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
14217         (cmp_mod_LDFLAGS, cat_mod_SOURCES, cat_mod_CFLAGS, cat_mod_LDFLAGS)
14218         (help_mod_SOURCES, help_mod_CFLAGS, help_mod_LDFLAGS)
14219         (font_mod_SOURCES, font_mod_CFLAGS, font_mod_LDFLAGS)
14220         (terminfo_mod_SOURCES, terminfo_mod_CFLAGS, terminfo_mod_LDFLAGS)
14221         (amiga_mod_SOURCES, amiga_mod_CFLAGS, amiga_mod_LDFLAGS)
14222         (apple_mod_SOURCES, apple_mod_CFLAGS, apple_mod_LDFLAG): Move from
14223         here...
14224         * conf/common.rmk: ... to here.  New file.
14226         * conf/common.mk: New file.
14228 2005-11-18  Yoshinori K. Okuji  <okuji@enbug.org>
14230         * conf/powerpc-ieee1275.rmk (grub_script.tab.h): Unified to ...
14231         (grub_script.tab.c): ... here.
14233         * conf/sparc64-ieee1275.rmk (grub_script.tab.h): Unified to ...
14234         (grub_script.tab.c): ... here.
14236         * conf/i386-pc.rmk (grub_script.tab.h): Unified to ...
14237         (grub_script.tab.c): ... here.
14239         * normal/command.c (grub_command_find): Fixed a memory leak of
14240         MODULE_NAME. Reported by Mike Small <smallm@panix.com>.
14242 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14244         * include/grub/symbol.h: (FUNCTION): Use double quotes instead of
14245         "@" which marks the start of a comment on ARM.
14246         (VARIABLE): Likewise.
14248 2005-11-13  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14250         Add support for Linux/ADFS partition tables.
14252         * partmap/acorn.c: New file.
14254         * include/grub/acorn_filecore.h: Likewise.
14256         * DISTLIST: Added `partmap/acorn.c' and
14257         `include/grub/acorn_filecore.h'.
14259         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14260         `partmap/acorn.c'.
14261         (pkgdata_MODULES): Add `acorn.mod'.
14262         (acorn_mod_SOURCES): New variable.
14263         (acorn_mod_CFLAGS): Likewise.
14265         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14266         `partmap/acorn.c'.
14267         (pkgdata_MODULES): Add `acorn.mod'.
14268         (acorn_mod_SOURCES): New variable.
14269         (acorn_mod_CFLAGS): Likewise.
14271         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `partmap/acorn.c'.
14272         (pkgdata_MODULES): Add `acorn.mod'.
14273         (acorn_mod_SOURCES): New variable.
14274         (acorn_mod_CFLAGS): Likewise.
14275         (acorn_mod_LDFLAGS): Likewise.
14277         * include/types.h (grub_disk_addr_t): New typedef.
14279 2005-11-13  Marco Gerards  <mgerards@xs4all.nl>
14281         * geninit.sh: New file.
14283         * geninitheader.sh: Likewise.
14285         * commands/boot.c (grub_boot_init, grub_boot_fini): Removed.
14286         * commands/cat.c (grub_cat_init, grub_cat_fini): Likewise.
14287         * commands/cmp.c (grub_cmp_init, grub_cmp_fini): Likewise.
14288         * commands/configfile.c (grub_configfile_init)
14289         (grub_configfile_fini): Likewise.
14290         * commands/default.c (grub_default_init, grub_default_fini):
14291         Likewise.
14292         * commands/help.c (grub_help_init, grub_help_fini): Likewise.
14293         * commands/ls.c (grub_ls_init, grub_ls_fini): Likewise.
14294         * commands/search.c (grub_search_init, grub_search_fini): Likewise.
14295         * commands/terminal.c (grub_terminal_init, grub_terminal_fini):
14296         Likewise.
14297         * commands/test.c (grub_test_init, grub_test_fini): Likewise.
14298         * commands/timeout.c (grub_timeout_init, grub_timeout_fini):
14299         Likewise.
14300         * commands/i386/pc/halt.c (grub_halt_init, grub_halt_fini): Likewise.
14301         * commands/ieee1275/halt.c (grub_halt_init, grub_halt_fini):
14302         Likewise.
14303         * commands/i386/pc/reboot.c (grub_reboot_init, grub_reboot_fini):
14304         Likewise.
14305         * commands/ieee1275/reboot.c (grub_reboot_init, grub_reboot_fini):
14306         Likewise.
14307         * disk/loopback.c (grub_loop_init, grub_loop_fini): Likewise.
14308         * fs/affs.c (grub_affs_init, grub_affs_fini): Likewise.
14309         * fs/ext2.c (grub_ext2_init, grub_ext2_fini): Likewise.
14310         * fs/fat.c (grub_fat_init, grub_fat_fini): Likewise.
14311         * fs/hfs.c (grub_hfs_init, grub_hfs_fini): Likewise.
14312         * fs/iso9660.c (grub_iso9660_init, grub_iso9660_fini): Likewise.
14313         * fs/jfs.c (grub_jfs_init, grub_jfs_fini): Likewise.
14314         * fs/minix.c (grub_minix_init, grub_minix_fini): Likewise.
14315         * fs/sfs.c (grub_sfs_init, grub_sfs_fini): Likewise.
14316         * fs/ufs.c (grub_ufs_init, grub_ufs_fini): Likewise.
14317         * fs/xfs.c (grub_xfs_init, grub_xfs_fini): Likewise.
14318         * normal/main.c (grub_normal_init, grub_normal_fini): Likewise.
14319         * partmap/amiga.c (grub_amiga_partition_map_init)
14320         (grub_amiga_partition_map_fini): Likewise.
14321         * partmap/apple.c (grub_apple_partition_map_init)
14322         (grub_apple_partition_map_fini): Likewise.
14323         * partmap/pc.c (grub_pc_partition_map_init)
14324         (grub_pc_partition_map_fini): Likewise.
14325         * partmap/sun.c (grub_sun_partition_map_init,
14326         grub_sun_partition_map_fini): Likewise.
14327         * term/terminfo.c (grub_terminal_init, grub_terminal_fini):
14328         Likewise.
14330         * util/grub-emu.c: Include <grub_modules_init.h>.
14331         (main): Don't initialize and de-initialize any modules directly,
14332         use `grub_init_all' and `grub_fini_all' instead.
14334         * term/i386/pc/vesafb.c (grub_vesafb_init): Renamed to
14335         `grub_vesafb_mod_init'.
14336         (grub_vesafb_fini): Renamed to `grub_vesafb_mod_fini'.  Updated
14337         all users.
14338         * term/i386/pc/vga.c (grub_vga_init): Renamed to
14339         `grub_vga_mod_init'.  Updated all users.
14340         (grub_vga_fini): Renamed to `grub_vga_mod_fini'.
14342         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `grub_emu_init.c'.
14343         (grub_modules_init.lst, grub_modules_init.h, grub_emu_init.c): New
14344         rules.
14346         * include/grub/dl.h (GRUB_MOD_INIT): Add argument `name'.
14347         Generate a function to initialize the module in utilities.
14348         Updated all callers.
14349         (GRUB_MOD_FINI): Add argument `name'.  Generate a function to
14350         initialize the module in utilities.  Updated all callers.
14352 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14354         * term/ieee1275/ofconsole.c (grub_ofconsole_cls): Use both the ANSI
14355         escape sequence and a literal ^L to clear the screen.
14357         * commands/ieee1275/suspend.c (grub_cmd_suspend): Clear the screen
14358         when returning from Open Firmware.
14360 2005-11-09  Hollis Blanchard  <hollis@penguinppc.org>
14362         * term/ieee1275/ofconsole.c (grub_ofconsole_width): New variable.
14363         (grub_ofconsole_height): Likewise.
14364         (grub_ofconsole_putchar): If `grub_curr_x' exceeds console width,
14365         manually insert a '\n'.
14366         (grub_ofconsole_getwh): Set and return `grub_ofconsole_width' and
14367         `grub_ofconsole_height'.  Return early if these are already set.
14369 2005-11-07  Vincent Pelletier  <subdino2004@yahoo.fr>
14371         * conf/sparc64-ieee1275.rmk (grub_emu_SOURCES): Add
14372         `commands/test.c', `fs/affs.c', `fs/sfs.c', `fs/xfs.c',
14373         `normal/execute.c', `normal/lexer.c', `io/gzio.c',
14374         `kern/parser.c', `grub_script.tab.c', `normal/function.c'
14375         and `normal/script.c'.
14376         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14377         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14378         (test_mod_SOURCES): New variable.
14379         (test_mod_CFLAGS): Likewise.
14380         (test_mod_LDFLAGS): Likewise.
14381         (pkgdata_MODULES): Add `test.mod'.
14382         (grub_script.tab.c): New rule.
14383         (grub_script.tab.h): Likewise.
14385 2005-11-07  Marco Gerards  <mgerards@xs4all.nl>
14387         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
14388         `commands/test.c', `normal/execute.c', `normal/lexer.c',
14389         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14390         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14391         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14392         (test_mod_SOURCES): New variable.
14393         (test_mod_CFLAGS): Likewise.
14394         (pkgdata_MODULES): Add `test.mod'.
14395         (grub_script.tab.c): New rule.
14396         (grub_script.tab.h): Likewise.
14398 2005-11-06  Marco Gerards  <mgerards@xs4all.nl>
14400         Add initial scripting support.
14402         * commands/test.c: New file.
14403         * include/grub/script.h: Likewise.
14404         * normal/execute.c: Likewise.
14405         * normal/function.c: Likewise.
14406         * normal/lexer.c: Likewise.
14407         * normal/parser.y: Likewise.
14408         * normal/script.c: Likewise.
14410         * configure.ac: Add `AC_PROG_YACC' test.
14412         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c',
14413         `normal/execute.c', `normal/lexer.c', `grub_script.tab.c',
14414         `normal/function.c' and `normal/script.c'.
14415         (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c',
14416         `grub_script.tab.c', `normal/function.c' and `normal/script.c'.
14417         (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New
14418         variables.
14419         (pkgdata_MODULES): Add `test.mod'.
14420         (grub_script.tab.c): New rule.
14421         (grub_script.tab.h): Likewise.
14423         * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'.
14425         * include/grub/normal.h (grub_test_init): New prototype.
14426         (grub_test_fini): Likewise.
14428         * normal/command.c: Include <grub/script.h>.
14429         (grub_command_execute): Rewritten.
14431         * util/grub-emu.c (main): Call `grub_test_init' and
14432         `grub_test_fini'.
14434 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14436         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Initialize `msecs'
14437         to 0.
14438         * term/ieee1275/ofconsole.c (grub_ofconsole_checkkey): Return -1 if
14439         there are no pending characters.
14441 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14443         * kern/powerpc/ieee1275/openfw.c (grub_ieee1275_get_devname): Use
14444         `grub_strndup' to drop device arguments. Replace unnecessary
14445         `grub_strndup' with `grub_strdup'.
14447 2005-11-03  Hollis Blanchard  <hollis@penguinppc.org>
14449         * kern/term.c (grub_cls): Do not call grub_cur_term->cls() if the
14450         `debug' environment variable has been set.
14452 2005-11-02  Hollis Blanchard  <hollis@penguinppc.org>
14454         * Makefile.in (install-local): Use $(DATA).
14455         (uninstall): Likewise.
14456         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Move grub-mkimage...
14457         (sbin_UTILITIES): ... to here.
14458         (sbin_SCRIPTS): New variable.
14459         (grub_install_SOURCES): New variable.
14460         * util/powerpc/ieee1275/grub-install.in: New file.
14461         * util/powerpc/ieee1275/grub-mkimage.c (kernel_path): Remove
14462         variable.
14463         (add_segments): Call `grub_util_get_path'.
14465 2005-10-28  Yoshinori K. Okuji  <okuji@enbug.org>
14467         From Timothy Baldwin:
14468         * commands/ls.c (grub_ls_list_files): Close FILE with
14469         grub_file_close.
14470         * kern/misc.c (grub_vsprintf): Terminate the string S with NUL.
14472 2005-10-24  Marco Gerards  <mgerards@xs4all.nl>
14474         * include/grub/parser.h: New file.
14476         * kern/parser.c: Likewise.
14478         * conf/i386-pc.rmk (kernel_img_SOURCES): Add `kern/parser.c'.
14479         (grub_setup_SOURCES): Likewise.
14480         (grub_probefs_SOURCES): Likewise.
14481         (grub_emu_SOURCES): Likewise.
14482         (kernel_img_HEADERS): Add `parser.h'.
14484         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14485         (grub_emu_SOURCES): Add `kern/parser.c'.
14486         (grubof_SOURCES): Likewise.
14488         * conf/sparc64-ieee1275.rmk (grubof_HEADERS): Add `parser.h'.
14489         (grubof_SOURCES): Add `kern/parser.c'.
14491         * include/grub/misc.h (grub_split_cmdline): Removed prototype.
14493         * kern/misc.c (grub_split_cmdline): Removed function.
14495         * kern/rescue.c: Include <grub/parser.h>.
14496         (grub_enter_rescue_mode): Use `grub_parser_split_cmdline' instead
14497         of `grub_split_cmdline'.
14499         * normal/command.c: Include <grub/parser.h>.
14500         (grub_command_execute):  Use `grub_parser_split_cmdline' instead
14501         of `grub_split_cmdline'.
14503         * normal/completion.c: Include <grub/parser.h>.
14504         (cmdline_state): New variable.
14505         (iterate_dir): End the filename with a quote depending on the
14506         command line state.
14507         (get_state): new function.
14508         (grub_normal_do_completion): Use `grub_parser_split_cmdline' to
14509         split the arguments and determine the current argument.  When the
14510         argument string is not quoted, escape all spaces.
14512 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14514         * normal/sparc64/setjmp.S: New file.
14516 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14518         * include/grub/sparc64/libgcc.h: New file.
14519         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Remove -Av9.
14520         (normal_mod_SOURCES): Use normal/sparc64/setjmp.S instead of
14521         normal/sparc64/setjmp.c.
14523 2005-10-23  Vincent Pelletier  <subdino2004@yahoo.fr>
14525         * kern/sparc64/dl.c: Rewritten for SPARCV9 ELF.
14526         * kern/sparc64/cache.S: New file.
14527         * kern/sparc64/cache.c: Removed.
14528         * conf/sparc64-ieee1275.rmk (COMMON_ASFLAGS): Add -Av9.
14529         (COMMON_CFLAGS): Add -mno-app-regs.  Remove -mcpu=v9 and
14530         -mtune=ultrasparc.
14531         (COMMON_LDFLAGS): Add -melf64_sparc.
14532         (grubof_HEADERS): Add sparc64/libgcc.h and machine/kernel.h.
14533         (grubof_SOURCES): Use cache.S instead of cache.c.
14534         (grubof_LDFLAGS): Add -mno-app-regs.  Replace "-Xlinker
14535         --oformat -Xlinker elf64-sparc" by "-Bstatic,-melf64_sparc".
14536         (pkgdata_MODULES): Uncomment. Leave linux.mod and _linux.mod
14537         commented though.
14538         (normal_mod_SOURCES): Add normal/completion.c and normal/misc.c.
14539         (_linux_mod_SOURCES, _linux_mod_CFLAGS, linux_mod_SOURCES)
14540         (linux_mod_CFLAGS): Commented out.
14541         (_linux_mod_LDFLAGS, linux_mod_LDFLAGS): New macro, commented
14542         out because module isn't built.
14543         (fshelp_mod_LDFLAGS, fat_mod_LDFLAGS, ext2_mod_LDFLAGS)
14544         (ufs_mod_LDFLAGS, minix_mod_LDFLAGS, hfs_mod_LDFLAGS)
14545         (jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS, normal_mod_LDFLAGS)
14546         (hello_mod_LDFLAGS, boot_mod_LDFLAGS, terminal_mod_LDFLAGS)
14547         (ls_mod_LDFLAGS, cmp_mod_LDFLAGS, cat_mod_LDFLAGS)
14548         (font_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14549         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14550         (suspend_mod_LDFLAGS, reboot_mod_LDFLAGS, halt_mod_LDFLAGS)
14551         (help_mod_LDFLAGS, default_mod_LDFLAGS, timeout_mod_LDFLAGS)
14552         (configfile_mod_LDFLAGS, search_mod_LDFLAGS, xfs_mod_SOURCES)
14553         (xfs_mod_CFLAGS, xfs_mod_LDFLAGS, affs_mod_SOURCES)
14554         (affs_mod_CFLAGS, affs_mod_LDFLAGS, sfs_mod_SOURCES)
14555         (sfs_mod_CFLAGS, sfs_mod_LDFLAGS, gzio_mod_SOURCES)
14556         (gzio_mod_CFLAGS, gzio_mod_LDFLAGS): New macro.
14558 2005-10-20  Yoshinori K. Okuji  <okuji@enbug.org>
14560         * util/i386/pc/grub-probefs.c (main): Call grub_xfs_init and
14561         grub_xfs_fini. Do not call grub_hfs_init or grub_hfs_fini any
14562         longer, because HFS should not be used on PC.
14564 2005-10-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
14566         * io/gzio.c (grub_gzio_read): Use OFFSET instead of FILE->OFFSET
14567         consistently within the loop.
14569 2005-10-15  Marco Gerards  <mgerards@xs4all.nl>
14571         * fs/xfs.c (grub_xfs_iterate_dir): Detect an error if part of a
14572         directory can not be read.
14574 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14576         * configure.ac (AC_INIT): Increase the version number to 1.91.
14578         * DISTLIST: Added include/grub/terminfo.h, include/grub/tparm.h,
14579         include/grub/i386/pc/serial.h, term/terminfo.c, term/tparm.c and
14580         term/i386/pc/serial.c.
14582 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14584         * kern/file.c (grub_file_seek): Seeking to an offset equal to a
14585         file size must be permitted.
14587         * kern/i386/pc/startup.S (multiboot_trampoline): Fix a mistake
14588         between %ah and %al.
14590 2005-10-15  Yoshinori K. Okuji  <okuji@enbug.org>
14592         * fs/xfs.c (grub_xfs_iterate_dir): Change the type of BLK to
14593         grub_uint64_t.
14594         Call the hook with a NUL-terminated filename.
14595         (grub_xfs_mount): Use grub_be_to_cpu32 instead of
14596         grub_cpu_to_be32.
14598         * kern/term.c (cursor_state): New variable.
14599         (grub_term_set_current): Reset the cursor state on a new
14600         terminal.
14601         (grub_setcursor): Rewritten to use CURSOR_STATE.
14602         (grub_getcursor): New function.
14604         * include/grub/term.h (grub_getcursor): New prototype.
14606         * io/gzio.c (test_header): Align BUF for accessing it as 32-bit
14607         integers on ARM. Reported by Timothy Baldwin
14608         <T.E.Baldwin99@members.leeds.ac.uk>.
14610 2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
14612         * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
14613         allocated.
14614         (grub_sfs_dir): Likewise.
14616 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
14618         Add support for the SFS filesystem.
14620         * fs/sfs.c: New file.
14622         * DISTLIST: Added `fs/sfs.c'.
14624         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/sfs.c'.
14625         (grub_probefs_SOURCES): Likewise.
14626         (grub_emu_SOURCES): Likewise.
14627         (pkgdata_MODULES): Add `sfs.mod'.
14628         (sfs_mod_SOURCES): New variable.
14629         (sfs_mod_CFLAGS): Likewise.
14630         (sfs_mod_LDFLAGS): Likewise.
14632         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/sfs.c'.
14633         (pkgdata_MODULES): Add `sfs.mod'.
14634         (sfs_mod_SOURCES): New variable.
14635         (sfs_mod_CFLAGS): Likewise.
14637         * util/grub-emu.c (main): Call `grub_sfs_init' and
14638         `grub_sfs_fini'.
14640         * include/grub/fs.h (grub_sfs_init): New prototype.
14641         (grub_sfs_fini): Likewise.
14643 2005-10-07  Marco Gerards  <mgerards@xs4all.nl>
14645         Add support for the AFFS filesystem.
14647         * fs/affs.c: New file.
14649         * DISTLIST: Added `fs/affs.c'.
14651         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/affs.c'.
14652         (grub_probefs_SOURCES): Likewise.
14653         (grub_emu_SOURCES): Likewise.
14654         (pkgdata_MODULES): Add `affs.mod'.
14655         (affs_mod_SOURCES): New variable.
14656         (affs_mod_CFLAGS): Likewise.
14657         (affs_mod_LDFLAGS): Likewise.
14659         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/affs.c'.
14660         (pkgdata_MODULES): Add `affs.mod'.
14661         (affs_mod_SOURCES): New variable.
14662         (affs_mod_CFLAGS): Likewise.
14664         * util/grub-emu.c (main): Call `grub_affs_init' and
14665         `grub_affs_fini'.
14667         * include/grub/fs.h (grub_affs_init): New prototype.
14668         (grub_affs_fini): Likewise.
14670 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14672         * fs/xfs.c (grub_xfs_iterate_dir): Add parentheses.
14674 2005-10-01  Marco Gerards  <mgerards@xs4all.nl>
14676         * configure.ac: Accept `x86_64' as host_cpu.  In that case add
14677         `-m32' to CFLAGS.
14679         * genmk.rb (class PModule): Always use `$(#{prefix}_LDFLAGS)' when
14680         linking.
14682         * conf/i386-pc.rmk (COMMON_CFLAGS): Add `-m32'.
14683         (COMMON_LDFLAGS): New variable.
14684         (kernel_img_LDFLAGS): Include `COMMON_FLAGS'.
14685         (_chain_mod_LDFLAGS, fshelp_mod_LDFLAGS, fat_mod_LDFLAGS)
14686         (ext2_mod_LDFLAGS, ufs_mod_LDFLAGS, minix_mod_LDFLAGS)
14687         (hfs_mod_LDFLAGS, jfs_mod_LDFLAGS, iso9660_mod_LDFLAGS)
14688         (xfs_mod_LDFLAGS, _linux_mod_LDFLAGS, linux_mod_LDFLAGS)
14689         (normal_mod_LDFLAGS, hello_mod_LDFLAGS, boot_mod_LDFLAGS)
14690         (terminal_mod_LDFLAGS, ls_mod_LDFLAGS, cmp_mod_LDFLAGS)
14691         (cat_mod_LDFLAGS, help_mod_LDFLAGS, reboot_mod_LDFLAGS)
14692         (halt_mod_LDFLAGS, vga_mod_LDFLAGS, font_mod_LDFLAGS)
14693         (terminfo_mod_LDFLAGS, serial_mod_LDFLAGS, _multiboot_mod_LDFLAGS)
14694         (multiboot_mod_LDFLAGS, amiga_mod_LDFLAGS, apple_mod_LDFLAGS)
14695         (pc_mod_LDFLAGS, sun_mod_LDFLAGS, loopback_mod_LDFLAGS)
14696         (default_mod_LDFLAGS, timeout_mod_LDFLAGS, configfile_mod_LDFLAGS)
14697         (vbe_mod_LDFLAGS, vesafb_mod_LDFLAGS, vbeinfo_mod_LDFLAGS)
14698         (vbetest_mod_LDFLAGS, search_mod_LDFLAGS, gzio_mod_LDFLAGS): New
14699         variables.
14700         (normal_mod_ASFLAGS): Add `-m32'.
14702         * include/grub/types.h (grub_host_addr_t, grub_host_off_t)
14703         (grub_host_size_t, grub_host_ssize_t): New types.
14704         (grub_addr_t, grub_off_t, grub_size_t, grub_ssize_t): Make type
14705         dependent of `GRUB_CPU_SIZEOF_VOID_P' instead on
14706         `GRUB_HOST_SIZEOF_VOID_P'.
14708         * include/grub/kernel.h (struct grub_module_header): Type of
14709         member offset changed to `grub_host_off_t'.  Type of member size
14710         changed to `grub_host_size_t'.
14711         (struct grub_module_info): Type of member offset changed to
14712         `grub_host_off_t'.  Type of member size changed to
14713         `grub_host_size_t'.
14715 2005-09-29  Yoshinori K. Okuji  <okuji@enbug.org>
14717         Make GRUB's kernel compliant to Multiboot Specification.
14719         * kern/i386/pc/startup.S (multiboot_header): New label.
14720         (multiboot_entry): Likewise.
14721         (multiboot_trampoline): Likewise.
14723         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
14724         Increased to 0x4A0.
14726         * fs/xfs.c (grub_xfs_iterate_dir): Fix a syntax error. You may not
14727         put parentheses after a question mark.
14728         [!GRUB_UTIL] (my_mod): New variable.
14730         * util/grub-emu.c (main): Call grub_xfs_init and grub_xfs_fini.
14732 2005-09-28  Marco Gerards  <mgerards@xs4all.nl>
14734         Adds support for the XFS filesystem.  Btrees are not supported
14735         yet.
14737         * fs/xfs.c: New file.
14739         * DISTLIST: Added `fs/xfs.c'.
14741         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `fs/xfs.c'.
14742         (grub_probefs_SOURCES): Likewise.
14743         (grub_emu_SOURCES): Likewise.
14744         (pkgdata_MODULES): Add `xfs.mod'.
14745         (xfs_mod_SOURCES): New variable.
14746         (xfs_mod_CFLAGS): Likewise.
14748         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add `fs/xfs.c'.
14749         (pkgdata_MODULES): Add `xfs.mod'.
14750         (xfs_mod_SOURCES): New variable.
14751         (xfs_mod_CFLAGS): Likewise.
14753         * util/grub-emu.c (main): Call `grub_xfs_init' and
14754         `grub_xfs_fini'.
14756         * include/grub/fs.h (grub_xfs_init): New prototype.
14757         (grub_xfs_fini): Likewise.
14760 2005-09-18  Vesa Jaaskelainen  <chaac@nic.fi>
14762         * video/i386/pc/vbe.c (grub_vbe_set_video_mode): In indexed
14763         color modes, allow greater than 16 colors to be configured as
14764         a default palette.
14766 2005-09-03  Yoshinori K. Okuji  <okuji@enbug.org>
14768         * normal/completion.c (complete_arguments): Add the qualifier
14769         const into OPTIONS.
14771         From Omniflux <omniflux+lists@omniflux.com>:
14772         * include/grub/terminfo.h: New file.
14773         * include/grub/tparm.h: Likewise.
14774         * include/grub/i386/pc/serial.h: Likewise.
14775         * term/terminfo.c: Likewise.
14776         * term/tparm.c: Likewise.
14777         * term/i386/pc/serial.c: Likewise.
14778         * conf/i386-pc.rmk (pkgdata_MODULES): Added terminfo.mod and
14779         serial.mod.
14780         (terminfo_mod_SOURCES): New variable.
14781         (terminfo_mod_CFLAGS): Likewise.
14782         (serial_mod_SOURCES): Likewise.
14783         (serial_mod_CFLAGS): Likewise.
14785 2005-08-31  Yoshinori K. Okuji  <okuji@enbug.org>
14787         * DISTLIST: Replaced boot/powerpc/ieee1275/crt0.S and
14788         boot/powerpc/ieee1275/cmain.c with kern/powerpc/ieee1275/crt0.S
14789         and kern/powerpc/ieee1275/cmain.c, respectively.
14791         * boot/powerpc/ieee1275/crt0.S: Moved to ...
14792         * kern/powerpc/ieee1275/crt0.S: ... here.
14794         * boot/powerpc/ieee1275/cmain.c: Moved to ...
14795         * kern/powerpc/ieee1275/cmain.c: ... here.
14797         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Use
14798         kern/powerpc/ieee1275/crt0.S and kern/powerpc/ieee1275/cmain.c
14799         instead of boot/powerpc/ieee1275/crt0.S and
14800         boot/powerpc/ieee1275/cmain.c, respectively.
14802         * boot/i386/pc/boot.S (lba_mode): Do not store the total number of
14803         sectors. It was not used anyway.
14805 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14807         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): Fix
14808         `unused parameter' warning.
14810 2005-08-30  Hollis Blanchard  <hollis@penguinppc.org>
14812         * term/ieee1275/ofconsole.c (grub_ofconsole_getcharwidth): New
14813         function.
14814         (grub_ofconsole_term): Specify grub_ofconsole_getcharwidth as
14815         getcharwidth.
14817 2005-08-28  Marco Gerards  <metgerards@student.han.nl>
14819         * include/grub/normal.h (enum grub_completion_type): Added
14820         `GRUB_COMPLETION_TYPE_ARGUMENT'.
14822         * normal/cmdline.c (print_completion): Handle
14823         the `GRUB_COMPLETION_TYPE_ARGUMENT' type.
14824         * normal/menu_entry.c (store_completion): Likewise.
14826         * normal/completion.c (complete_arguments): New function.
14827         (grub_normal_do_completion): Call `complete_arguments' when the
14828         current words start with a dash.
14830 2005-08-27  Marco Gerards  <metgerards@student.han.nl>
14832         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Fix typo (use
14833         `gzio.mod' instead of `io.mod').
14835 2005-08-22  Yoshinori K. Okuji  <okuji@enbug.org>
14837         * gendistlist.sh (EXTRA_DISTFILES): Added genfslist.sh.
14838         (DISTDIRS): Added io and video.
14839         Rewrite the search routine to make an output consistently.
14841         * DISTLIST: Added conf/sparc64-ieee1275.mk,
14842         conf/sparc64-ieee1275.rmk, include/grub/gzio.h,
14843         include/grub/ieee1275/ieee1275.h, include/grub/ieee1275/ofdisk.h,
14844         io/gzio.c, kern/sparc64/cache.c, kern/sparc64/dl.c,
14845         kern/sparc64/ieee1275/init.c, kern/sparc64/ieee1275/openfw.c and
14846         util/powerpc/ieee1275/misc.c.
14848         * include/grub/gzio.h: New file.
14849         * io/gzio.c: Likewise.
14851         * kern/file.c (grub_file_close): Call grub_device_close only if
14852         FILE->DEVICE is not NULL.
14854         * include/grub/mm.h [!NULL] (NULL): New macro.
14856         * include/grub/err.h (GRUB_ERR_BAD_GZIP_DATA): New constant.
14858         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added io/gzip.c.
14859         (pkgdata_MODULES): Added gzio.mod.
14860         (gzio_mod_SOURCES): New variable.
14861         (gzio_mod_CFLAGS): Likewise.
14863         * conf/i386-pc.rmk (grub_emu_SOURCES): Added io/gzip.c.
14864         (pkgdata_MODULES): Added gzio.mod.
14865         (gzio_mod_SOURCES): New variable.
14866         (gzio_mod_CFLAGS): Likewise.
14868         * commands/cat.c: Include grub/gzio.h.
14869         (grub_cmd_cat): Use grub_gzfile_open instead of
14870         grub_file_open.
14872         * commands/cmp.c: Include grub/gzio.h.
14873         (grub_cmd_cmp): Use grub_gzfile_open instead of
14874         grub_file_open.
14876         * loader/i386/pc/multiboot.c: Include grub/gzio.h.
14877         (grub_rescue_cmd_multiboot): Use grub_gzfile_open instead of
14878         grub_file_open.
14879         (grub_rescue_cmd_module): Likewise.
14881 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14883         * conf/sparc64-ieee1275.rmk (grubof_SOURCES): The first file must be
14884         kern/sparc64/ieee1275/init.c because it contains _start.
14885         * conf/sparc64-ieee1275.mk: Generated from conf/sparc64-ieee1275.rmk.
14887 2005-08-21  Vincent Pelletier  <subdino2004@yahoo.fr>
14889         * configure.ac: Add support for sparc64 host with ieee1275
14890         firmware.
14891         * configure: Generated from configure.ac.
14892         * disk/ieee1275/ofdisk.c (grub_ofdisk_open): Use grub_ssize_t
14893         instead of int.
14894         (grub_ofdisk_read): Likewise.
14895         (grub_ofdisk_open): Use %p to print pointer values, and cast the
14896         pointers as (void *) to remove a warning.
14897         (grub_ofdisk_close): Likewise.
14898         (grub_ofdisk_read): Likewise.
14899         * kern/ieee1275/ieee1275.c (grub_ieee1275_exit): This never
14900         returns, so make it return void to remove a warning.
14901         * include/grub/ieee1275/ieee1275.h (grub_ieee1275_exit):
14902         Corresponding prototype change.
14903         * kern/mm.c (grub_mm_init_region): Use %p to print pointer
14904         values, and cast the pointers as (void *) to remove a warning.
14905         (grub_mm_dump): Likewise.
14906         * conf/sparc64-ieee1275.mk: New file.
14907         * conf/sparc64-ieee1275.rmk: Likewise.
14908         * include/grub/sparc64/setjmp.h: Likewise.
14909         * include/grub/sparc64/types.h: Likewise.
14910         * include/grub/sparc64/ieee1275/console.h: Likewise.
14911         * include/grub/sparc64/ieee1275/ieee1275.h: Likewise.
14912         * include/grub/sparc64/ieee1275/kernel.h: Likewise.
14913         * include/grub/sparc64/ieee1275/time.h: Likewise.
14914         * kern/sparc64/cache.c: Likewise.
14915         * kern/sparc64/dl.c: Likewise.
14916         * kern/sparc64/ieee1275/init.c: Likewise.
14917         * kern/sparc64/ieee1275/openfw.c: Likewise.
14919 2005-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
14921         * util/console.c (grub_ncurses_putchar): If C is greater than
14922         0x7f, set C to a question mark.
14923         (grub_ncurses_getcharwidth): New function.
14924         (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
14925         getcharwidth.
14927         * normal/menu.c (print_entry): Made aware of Unicode. First,
14928         convert TITLE to UCS-4, and predict the cursor position by
14929         grub_getcharwidth.
14931         * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
14932         const to SRC.
14933         * kern/misc.c (grub_utf16_to_utf8): Likewise.
14935 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14937         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Specify
14938         the boot file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14939         grub_strcat.
14941         * loader/i386/pc/linux.c (grub_rescue_cmd_linux): Specify the boot
14942         file by the option BOOT_IMAGE. Use grub_stpcpy instead of
14943         grub_strcpy and grub_strlen. Take it into account that a space
14944         character is inserted as a delimiter.
14946 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14948         * partmap/pc.c (pc_partition_map_iterate): Include the value of an
14949         invalid magic in the error.
14951         * commands/search.c: New file.
14953         * util/grub-emu.c (main): Call grub_search_init and
14954         grub_search_fini.
14956         * kern/rescue.c (grub_rescue_print_disks): Removed.
14957         (grub_rescue_print_devices): New function.
14958         (grub_rescue_cmd_ls): Use grub_device_iterate with
14959         grub_rescue_print_devices instead of grub_disk_dev_iterate with
14960         grub_rescue_print_disks.
14962         * kern/partition.c (grub_partition_iterate): Return the result of
14963         PARTMAP->ITERATE instead of GRUB_ERRNO.
14965         * kern/device.c: Include grub/partition.h.
14966         (grub_device_iterate): New function.
14968         * include/grub/partition.h (grub_partition_iterate): Return int
14969         instead of grub_err_t.
14971         * include/grub/normal.h [GRUB_UTIL] (grub_search_init): New
14972         prototype.
14973         [GRUB_UTIL] (grub_search_fini): Likewise.
14975         * include/grub/device.h (grub_device_iterate): New prototype.
14977         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
14978         commands/search.c.
14979         (pkgdata_MODULES): Added search.mod.
14980         (search_mod_SOURCES): New variable.
14981         (search_mod_CFLAGS): Likewise.
14983         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/search.c.
14984         (pkgdata_MODULES): Added search.mod.
14985         (search_mod_SOURCES): New variable.
14986         (search_mod_CFLAGS): Likewise.
14988         * commands/ls.c (grub_ls_list_disks): Renamed to ...
14989         (grub_ls_list_devices): ... this, and use grub_device_iterate.
14990         All callers changed.
14992         * DISTLIST: Added commands/search.c.
14994 2005-08-20  Yoshinori K. Okuji  <okuji@enbug.org>
14996         * kern/term.c (grub_putchar): Use grub_utf8_to_ucs4 for the
14997         conversion.
14998         (grub_getcharwidth): New function.
15000         * kern/misc.c (grub_utf8_to_ucs4): New function.
15002         * include/grub/term.h (struct grub_term): Added a new member
15003         "getcharwidth".
15004         (grub_getcharwidth): New prototype.
15006         * include/grub/misc.h (grub_utf8_to_ucs4): New prototype.
15008         * term/i386/pc/console.c (map_char): New function. Segregated from
15009         grub_console_putchar.
15010         (grub_console_putchar): Use map_char.
15011         (grub_console_getcharwidth): New function.
15012         (grub_console_term): Specified grub_console_getcharwidth as
15013         getcharwidth.
15015         * term/i386/pc/vga.c (grub_vga_getcharwidth): New function.
15016         (grub_vga_term): Specified grub_vga_getcharwidth as getcharwidth.
15018         * term/i386/pc/vesafb.c (grub_virtual_screen_setup): Return
15019         GRUB_ERRNO.
15020         (grub_vesafb_init): Do not use RC. Instead, use GRUB_ERRNO. Rely
15021         on grub_strtoul completely.
15022         (write_char): Declare local variables in the beginning of the
15023         function.
15024         (grub_vesafb_getcharwidth): New function.
15025         (grub_vesafb_term): Specified grub_vesafb_getcharwidth as
15026         getcharwidth.
15028 2005-08-19  Yoshinori K. Okuji  <okuji@enbug.org>
15030         * DISTLIST: Replace commands/i386/pc/vbe_list_modes.c and
15031         commands/i386/pc/vbe_test.c with commands/i386/pc/vbeinfo.c and
15032         commands/i386/pc/vbetest.c.
15034         * video/i386/pc/vbe.c (grub_vbe_probe): If INFOBLOCK is not NULL,
15035         call grub_vbe_get_controller_info again, because the returned
15036         information is volatile.
15037         (grub_vbe_set_video_mode): Mostly rewritten.
15038         (grub_vbe_get_video_mode): Use grub_vbe_probe and use
15039         grub_vbe_status_t correctly.
15040         (grub_vbe_get_video_mode_info): Likewise.
15041         (grub_vbe_set_pixel_rgb): Use a switch statement rather than
15042         several if statements.
15044         * commands/i386/pc/vbe_list_modes.c: Renamed to ...
15045         * commands/i386/pc/vbeinfo.c: ... this.
15047         * commands/i386/pc/vbe_test.c: Renamed to ...
15048         * commands/i386/pc/vbetest.c: ... this.
15050         * commands/i386/pc/vbeinfo.c (grub_cmd_vbe_list_modes): Renamed to
15051         ...
15052         (grub_cmd_vbeinfo): ... this. Save video modes before
15053         iterating. Skip a video mode, if it is not available, not enough
15054         information is given or it is monochrome. Show the memory
15055         model. Leave the interpretation of MODEVAR to grub_strtoul
15056         completely.
15057         (GRUB_MOD_INIT): Rename vbe_list_modes to vbeinfo.
15058         (GRUB_MOD_FINI): Likewise.
15060         * commands/i386/pc/vbetest.c (grub_cmd_vbe_test): Renamed to ...
15061         (grub_cmd_vbetest): ... this. Don't print unnecessarily. Use
15062         grub_err_t instead of grub_uint32_t. Don't use SPTR. Remove a
15063         duplicated grub_env_get. Leave the interpretation of MODEVAR to
15064         grub_strtoul completely.
15065         (real2pm): Removed.
15066         (GRUB_MOD_INIT): Rename vbe_test to vbetest.
15067         (GRUB_MOD_FINI): Likewise.
15069         * normal/misc.c: Include grub/mm.h.
15071         * conf/i386-pc.rmk (pkgdata_MODULES): Replaced vbe_test.mod and
15072         vbe_list_modes with vbetest.mod and vbeinfo.mod.
15073         (vbe_list_modes_mod_SOURCES): Removed.
15074         (vbe_list_modes_mod_CFLAGS): Likewise.
15075         (vbe_test_mod_SOURCES): Likewise.
15076         (vbe_test_mod_CFLAGS): Likewise.
15077         (vbeinfo_mod_SOURCES): New variable.
15078         (vbeinfo_mod_CFLAGS): Likewise.
15079         (vbetest_mod_SOURCES): Likewise.
15080         (vbetest_mod_CFLAGS): Likewise.
15082 2005-08-18  Yoshinori K. Okuji  <okuji@enbug.org>
15084         * normal/misc.c: New file.
15086         * DISTLIST: Added normal/misc.c.
15088         * partmap/amiga.c (amiga_partition_map_iterate): Add an argument
15089         DISK to HOOK. Call HOOK with DISK.
15090         * partmap/apple.c (apple_partition_map_iterate): Likewise.
15091         * partmap/pc.c (pc_partition_map_iterate): Likewise.
15092         * partmap/sun.c (sun_partition_map_iterate): Likewise.
15094         * normal/menu_entry.c (struct screen): Added a new member
15095         "completion_shown".
15096         (completion_buffer): New global variable.
15097         (make_screen): Set SCREEN->COMPLETION_SHOWN to zero.
15098         (store_completion): New function.
15099         (complete): Likewise.
15100         (clear_completions): Likewise.
15101         (grub_menu_entry_run): If SCREEN->COMPLETION_SHOWN is non-zero,
15102         call clear_completions and reset SCREEN->COMPLETION_SHOWN. If C is
15103         a tab, call complete.
15105         * normal/completion.c (disk_dev): Removed.
15106         (print_simple_completion): Likewise.
15107         (print_partition_completion): Likewise.
15108         (print_func): New global variable.
15109         (add_completion): Do not take the arguments WHAT or PRINT any
15110         longer. Added a new argument TYPE. Instead of printing directly,
15111         call PRINT_FUNC if not NULL.
15112         All callers changed.
15113         (complete_device): Use a local variable DEV instead of
15114         DISK_DEV. Do not move CURRENT_WORD to the end of a device name.
15115         (grub_normal_do_completion): Take a new argument HOOK. Do not
15116         initialize DISK_DEV. Initialize PRINT_FUNC to HOOK. If RET is an
15117         empty string, return NULL instead.
15118         All callers changed.
15120         * normal/cmdline.c (print_completion): New function.
15122         * kern/partition.c (grub_partition_iterate): Add an argument DISK
15123         to HOOK.
15124         All callers changed.
15126         * kern/disk.c (grub_print_partinfo): Removed.
15128         * include/grub/partition.h (struct grub_partition_map): Add a new
15129         argument DISK into HOOK of ITERATE.
15130         (grub_partition_iterate): Add a new argument DISK to HOOK.
15132         * include/grub/normal.h (enum grub_completion_type): New enum.
15133         (grub_completion_type_t): New type.
15134         (GRUB_COMPLETION_TYPE_COMMAND): New constant.
15135         (GRUB_COMPLETION_TYPE_DEVICE): Likewise.
15136         (GRUB_COMPLETION_TYPE_PARTITION): Likewise.
15137         (GRUB_COMPLETION_TYPE_FILE): Likewise.
15138         (grub_normal_do_completion): Added a new argument HOOK.
15139         (grub_normal_print_device_info): New prototype.
15141         * include/grub/disk.h (grub_print_partinfo): Removed.
15143         * conf/i386-pc.rmk (grub_emu_SOURCES): Added normal/misc.c.
15144         (normal_mod_SOURCES): Likewise.
15145         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
15146         (normal_mod_SOURCES): Likewise.
15148         * commands/ls.c (grub_ls_list_disks): Use
15149         grub_normal_print_device_info instead of grub_print_partinfo. Free
15150         PNAME.
15151         (grub_ls_list_files): Use grub_normal_print_device_info instead of
15152         duplicating the code.
15154 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15156         * commands/i386/pc/vbe_list_modes.c: Update source formatting to
15157         follow GCS more precisely.
15158         * commands/i386/pc/vbe_test.c: Likewise.
15159         * include/grub/i386/pc/vbe.h: Likewise.
15160         * term/i386/pc/vesafb.c: Likewise.
15161         * video/i386/pc/vbe.c: Likewise.
15163 2005-08-16  Vesa Jaaskelainen  <chaac@nic.fi>
15165         * DISTLIST: Added term/i386/pc/vesafb.c
15166         DISTLIST: Added video/i386/pc/vbe.c
15167         DISTLIST: Added commands/i386/pc/vbe_list_modes.c.
15168         DISTLIST: Added commands/i386/pc/vbe_test.c.
15169         * commands/i386/pc/vbe_list_modes.c: New file.
15170         * commands/i386/pc/vbe_test.c: Likewise.
15171         * term/i386/pc/vesafb.c: Likewise.
15172         * video/i386/pc/vbe.c: Likewise.
15173         * include/grub/i386/pc/vbe.h (GRUB_VBE_DEFAULT_VIDEO_MODE): Added define.
15174         (grub_vbe_probe) Added prototype.
15175         (grub_vbe_set_video_mode) Likewise.
15176         (grub_vbe_get_video_mode) Likewise.
15177         (grub_vbe_get_video_mode_info) Likewise.
15178         (grub_vbe_set_pixel_rgb) Likewise.
15179         (grub_vbe_set_pixel_index) Likewise.
15180         * conf/i386-pc.rmk (pkgdata_MODULES): Added vbe.mod.
15181         (pkgdata_MODULES): Added vesafb.mod.
15182         (pkgdata_MODULES): Added vbe_list_modes.mod.
15183         (pkgdata_MODULES): Added vbe_test.mod.
15184         (vbe_mod_SOURCES): Added.
15185         (vbe_mod_CFLAGS): Likewise.
15186         (vesafb_mod_SOURCES): Likewise.
15187         (vesafb_mod_CFLAGS): Likewise.
15188         (vbe_list_modes_mod_SOURCES): Likewise.
15189         (vbe_list_modes_mod_CFLAGS): Likewise.
15190         (vbe_test_mod_SOURCES): Likewise.
15191         (vbe_test_mod_CFLAGS): Likewise.
15193 2005-08-14  Yoshinori K. Okuji  <okuji@enbug.org>
15195         * normal/command.c (grub_command_execute): If INTERACTIVE is
15196         false and GRUB_COMMAND_FLAG_NO_ECHO is not specified, print
15197         CMDLINE. Disable the pager if INTERACTIVE is true.
15198         All callers are changed.
15200         * normal/main.c (grub_normal_execute): Read command.lst and fs.lst
15201         before reading a config file.
15202         * normal/main.c (read_config_file): Even if a command is not
15203         found, register it if it is within an entry.
15205         * util/grub-emu.c: Include sys/types.h and unistd.h.
15206         (options): Added --hold.
15207         (struct arguments): Added a new member "hold".
15208         (parse_opt): If KEY is 'H', set ARGS->HOLD to ARG or -1 if ARG is
15209         missing.
15210         (main): Initialize ARGS.HOLD to zero. Wait until ARGS.HOLD is
15211         cleared by a debugger, if it is not zero.
15213         * include/grub/normal.h (grub_command_execute): Add an argument
15214         INTERACTIVE.
15216 2005-08-14  Vesa Jaaskelainen  <chaac@nic.fi>
15218         * DISTLIST: Added include/grub/i386/pc/vbe.h.
15220 2005-08-13  Yoshinori K. Okuji  <okuji@enbug.org>
15222         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): Replace the test
15223         program with another one, because the old one didn't detect a bug
15224         in gcc-3.4. Always use regparm 2, because the new test is still
15225         not enough for gcc-4.0. Someone must investigate a simple test
15226         case which detects a bug in gcc-4.0.
15228 2005-08-12  Yoshinori K. Okuji  <okuji@enbug.org>
15230         * DISTLIST: Added normal/completion.c.
15232         * normal/completion.c: New file.
15234         * term/i386/pc/console.c (grub_console_getwh): New function.
15235         (grub_console_term): Assign grub_console_getwh to getwh.
15237         * normal/cmdline.c (grub_tab_complete): Removed. Now the same
15238         function is defined in normal/completion.c as
15239         grub_normal_do_completion.
15240         (grub_cmdline_get): Use grub_normal_do_completion instead of
15241         grub_tab_complete.
15243         * kern/partition.c (grub_partition_map_iterate): Return 1 if HOOK
15244         returns non-zero, otherwise return 0.
15245         (grub_partition_iterate): First, probe the partition map. Then,
15246         call ITERATE only for this partition map.
15248         * kern/misc.c (grub_strncmp): Rewritten.
15250         * kern/disk.c (grub_disk_dev_iterate): Return 1 if P->ITERATE
15251         returns non-zero. Otherwise return 0.
15253         * include/grub/partition.h (grub_partition_map_iterate): Return
15254         int instead of void.
15256         * include/grub/normal.h (grub_normal_do_completion): New prototype.
15258         * include/grub/misc.h (grub_strncmp): Change the type of N to
15259         grub_size_t.
15261         * include/grub/disk.h (grub_disk_dev_iterate): Return int instead
15262         of void.
15264         * normal/menu.c (draw_border): Cast GRUB_TERM_BORDER_WIDTH to
15265         unsigned explicitly before comparing it with I.
15267         * kern/main.c (grub_env_write_root): Add the attribute unused into
15268         VAR.
15270         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
15271         normal/completion.c.
15272         (normal_mod_SOURCES): Likewise.
15273         * conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.
15274         (normal_mod_SOURCES): Likewise.
15276         * normal/command.c (grub_iterate_commands): If ITERATE returns
15277         non-zero, return one immediately.
15279 2005-08-09  Vesa Jaaskelainen  <chaac@nic.fi>
15281         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vbe.h.
15282         * kern/i386/pc/startup.S: Updated Global Descriptor table's
15283         descriptions.
15284         (grub_vbe_get_controller_info): New function.
15285         (grub_vbe_get_mode_info): Likewise.
15286         (grub_vbe_set_mode): Likewise.
15287         (grub_vbe_get_mode): Likewise.
15288         (grub_vbe_set_memory_window): Likewise.
15289         (grub_vbe_get_memory_window): Likewise.
15290         (grub_vbe_set_scanline_length): Likewise.
15291         (grub_vbe_get_scanline_length): Likewise.
15292         (grub_vbe_set_display_start): Likewise.
15293         (grub_vbe_get_display_start): Likewise.
15294         (grub_vbe_set_palette_data): Likewise.
15295         * include/grub/i386/pc/vbe.h: New file.
15297 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15299         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15300         kern/ieee1275/of.c with kern/ieee1275/ieee1275.c.
15301         * DISTLIST: Likewise.
15302         * kern/ieee1275/of.c: Moved to ...
15303         * kern/ieee1275/ieee1275.c: ... here.
15305 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15307         * term/ieee1275/ofconsole.c: Include <grub/mm.h>.
15308         (grub_ofconsole_getwh): Cast -1 to type grub_ieee1275_ihandle_t.
15309         Pass 0 as `end' parameter to grub_strtoul().
15311 2005-08-08  Hollis Blanchard  <hollis@penguinppc.org>
15313         * include/grub/powerpc/ieee1275/console.h: Do not include
15314         <grub/types.h>.  Do not include <grub/symbol.h>.  Remove ASM_FILE
15315         ifdef.
15316         (grub_console_cur_color): Remove i386-specific prototype.
15317         (grub_console_real_putchar): Likewise.
15318         (grub_console_checkkey): Likewise.
15319         (grub_console_getkey): Likewise.
15320         (grub_console_getxy): Likewise.
15321         (grub_console_gotoxy): Likewise.
15322         (grub_console_cls): Likewise.
15323         (grub_console_setcursor): Likewise.
15324         * kern/powerpc/ieee1275/init.c: Don't include <grub/console.h>.
15325         Include <grub/machine/console.h>.
15326         * term/ieee1275/ofconsole.c: Likewise.
15328 2005-08-08  Yoshinori K. Okuji  <okuji@enbug.org>
15330         * Makefile.in (LIBLZO): New variable.
15332         * configure.ac: Check for LZO version 2.
15334         * util/i386/pc/grub-mkimage.c [HAVE_LZO_LZO1X_H]: Include
15335         lzo/lzo1x.h instead of lzo1x.h.
15337         * conf/i386-pc.rmk (grub_mkimage_LDFLAGS): Use $(LIBLZO) instead
15338         of -llzo.
15340         * util/i386/pc/grub-setup.c (main): Do not free PREFIX
15341         twice. Reported by Vladimir Serbinenko <phcoder@gmail.com>.
15343         * partmap/pc.c (pc_partition_map_probe): Restore P->DATA after
15344         copying the data from PARTITION to P.
15346 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15348         * kern/rescue.c (grub_rescue_cmd_rmmod): If the reference count is
15349         negative, unload the module.
15351         * util/i386/pc/grub-setup.c (setup): The name of the PC partition
15352         map is "pc_partition_map" but not "pc".
15353         (usage): Fix the description. The options are --boot-image and
15354         --core-image but not --boot-file or --core-file.
15355         (main): If not specified explicitly, make BOOT_FILE and CORE_FILE
15356         based on DEFAULT_BOOT_FILE and DEFAULT_CORE_FILE with DIR or
15357         DEFAULT_DIRECTORY.
15359         * util/i386/pc/grub-install.in: Do not specify --boot-file or
15360         --core-file. Specify INSTALL_DEVICE as an argument.
15362         * util/console.c: Include config.h.
15363         [HAVE_NCURSeS_CURSES_H]: Include ncurses/curses.h.
15364         [HAVE_NCURSES_H]: Include ncurses.h.
15365         [HAVE_CURSES_H]: Include curses.h.
15366         [!A_NORMAL] (A_NORMAL): Defined as zero.
15367         [!A_STANDOUT] (A_STANDOUT): Likewise.
15369         * conf/i386-pc.rmk (grub_emu_LDFLAGS): Use $(LIBCURSES) instead of
15370         -lncurses.
15371         * conf/powerpc-ieee1275.rmk (grub_emu_LDFLAGS): Likewise.
15373         * configure.ac: Check for curses libraries and headers.
15375         * Makefile.in (LIBCURSES): New variable.
15377         * genmk.rb (Script::rule): Set the executable bits.
15379         * util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): The
15380         name of the PC partition map is "pc_partition_map" but not "pc".
15382 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15384         * util/i386/pc/grub-install.in (grub_probefs): New variable.
15385         (modules): Likewise.
15386         (usage): Added descriptions for --modules and --grub-probefs.
15387         Handle --modules and --grub-probefs. Save the arguments in MODULES
15388         and GRUB_PROBEFS, respectively.
15389         Auto-detect a filesystem module against GRUBDIR. If the result is
15390         empty and modules are not specified explicitly, abort the
15391         installation. Add the result to MODULES.
15393         * DISTLIST: Removed boot/powerpc/ieee1275/ieee1275.c,
15394         disk/powerpc/ieee1275/ofdisk.c,
15395         include/grub/powerpc/ieee1275/init.h and
15396         term/powerpc/ieee1275/ofconsole.c.
15397         Added disk/ieee1275/ofdisk.c, kern/ieee1275/of.c and
15398         term/ieee1275/ofconsole.c.
15400         * include/grub/powerpc/ieee1275/console.h: Resurrected.
15402         * COPYING: Upgraded to the latest version. Only the address of the
15403         FSF office has changed.
15405 2005-08-07  Yoshinori K. Okuji  <okuji@enbug.org>
15407         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Replaced
15408         kern/ieee1275.c with kern/ieee1275/of.c.
15410         * kern/ieee1275.c: Moved to ...
15411         * kern/ieee1275/of.c: ... here.
15413 2005-08-06  Yoshinori K. Okuji  <okuji@enbug.org>
15415         * conf/i386-pc.rmk (kernel_img_HEADERS): Reordered for
15416         readability.
15418         * config.guess: Updated to the latest version from gnulib.
15419         * config.sub: Likewise.
15420         * install.sh: Likewise.
15421         * mkinstalldirs: Likewise.
15423         * include/grub/console.h: Removed. This file is arch-specific. Do
15424         not put this in include/grub.
15426         * include/grub/i386/pc/console.h: Resurrected.
15428         * util/console.c: Include grub/machine/console.h instead of
15429         grub/console.h.
15430         * util/grub-emu.c: Likewise.
15432 2005-08-04  Marco Gerards  <metgerards@student.han.nl>
15434         * kern/term.c (grub_putcode): Use `grub_getwh' instead of
15435         hardcoded value.
15437         From Vincent Pelletier  <subdino2004@yahoo.fr>
15438         * include/grub/term.h (GRUB_TERM_WIDTH, GRUB_TERM_HEIGHT):
15439         Redefined to use grub_getwh.
15440         (grub_term): New member named getwh.
15441         (grub_getwh): New prototype.
15442         * kern/term.c (grub_getwh): New function.
15443         * term/i386/pc/console.c (grub_console_getwh): New function.
15444         (grub_console_term): New member `getwh'.
15445         * term/i386/pc/vga.c (grub_vga_getwh): New function.
15446         (grub_vga_term): New member `getwh'.
15447         * term/ieee1275/ofconsole.c (grub_ofconsole_readkey): Use
15448         grub_ssize_t.
15449         (grub_ofconsole_getw): New function.
15450         (grub_ofconsole_init): Use grub_ssize_t and unsigned char.
15451         (grub_ofconsole_term): New field named getwh and new initial
15452         value.
15454 2005-08-03  Hollis Blanchard  <hollis@penguinppc.org>
15456         * include/grub/powerpc/ieee1275/ieee1275.h: Move ...
15457         * include/grub/ieee1275/ieee1275.h: ... to here.  All users updated.
15458         Move `abort', `grub_reboot', and `grub_halt' prototypes ...
15459         * include/grub/powerpc/ieee1275/kernel.h: ... to here.
15460         * commands/ieee1275/halt.c: Include <grub/machine/kernel.h> instead
15461         of <grub/machine/ieee1275.h>.
15462         * commands/ieee1275/reboot.c: Likewise.
15463         * boot/powerpc/ieee1275/ieee1275.c: Move ...
15464         * kern/ieee1275.c: ... to here.  All users updated.  Change all
15465         parameter structs to use new type `grub_ieee1275_cell_t'.
15466         * term/powerpc/ieee1275/ofconsole.c: Move ...
15467         * term/ieee1275/ofconsole.c: ... to here.  All users updated.
15468         * disk/powerpc/ieee1275/ofdisk.c: Move ...
15469         * disk/ieee1275/ofdisk.c: ... to here.  All users updated.
15470         * boot/powerpc/ieee1275/cmain.c: Change `grub_ieee1275_entry_fn' type
15471         to return int.
15472         * include/grub/i386/pc/console.h: Move to include/grub/console.h.
15473         Remove unused prototypes.  All users updated.
15474         * include/grub/powerpc/ieee1275/console.h: Removed.
15475         * include/grub/powerpc/ieee1275/ieee1275.h: Define
15476         `grub_ieee1275_cell_t'.
15477         * kern/powerpc/ieee1275/openfw.c: Include <grub/machine/kernel.h>.
15478         Cast comparisons with -1 to the correct type.
15479         * loader/powerpc/ieee1275/linux.c (kernel_entry_t): Change parameter
15480         type to match `grub_ieee1275_entry_fn'.
15482 2005-08-01  Yoshinori K. Okuji  <okuji@enbug.org>
15484         * DISTLIST: Added util/i386/pc/grub-probefs.c.
15486         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-probefs.
15487         (grub_setup_SOURCES): Removed partmap/amiga.c, partmap/apple.c and
15488         partmap/sun.c.
15489         (grub_probefs_SOURCES): New variable.
15491         * util/i386/pc/grub-probefs.c: New file.
15493         * util/i386/pc/grub-setup.c (main): Call
15494         grub_pc_partition_map_init, grub_ufs_init, grub_minix_init,
15495         grub_hfs_init and grub_jfs_init to initialize the system. Call
15496         grub_ufs_fini, grub_minix_fini, grub_hfs_fini, grub_jfs_init and
15497         grub_pc_partition_map_fini to finish the system.
15499 2005-07-31  Yoshinori K. Okuji  <okuji@enbug.org>
15501         * loader/i386/pc/multiboot.c (grub_multiboot_is_elf32): New
15502         function.
15503         (grub_multiboot_load_elf32): Likewise.
15504         (grub_multiboot_is_elf64): Likewise.
15505         (grub_multiboot_load_elf64): Likewise.
15506         (grub_multiboot_load_elf): Likewise.
15507         (grub_rescue_cmd_multiboot): Call grub_multiboot_load_elf to load
15508         an ELF32 or ELF64 file.
15509         This is based on a patch from Ruslan Nikolaev <nruslan@mail.com>.
15511         From Serbinenko Vladimir <serbinenko.vova@list.ru>:
15512         * kern/disk.c (grub_print_partinfo): Check if FS->LABEL is not
15513         NULL before calling FS->LABEL.
15514         * fs/fat.c (grub_fat_dir): Initialize DIRNAME to NULL.
15515         * commands/ls.c (grub_ls_list_files): Show labels, if possible.
15516         (grub_ls_list_disks): Check if FS and FS->LABEL are not NULL
15517         before calling FS->LABEL.
15519 2005-07-26  Yoshinori K. Okuji  <okuji@enbug.org>
15521         * util/i386/pc/grub-install.in (datadir): New variable.
15522         (libdir): Removed.
15523         (pkgdatadir): New variable.
15524         (pkglibdir): Removed.
15526 2005-07-24  Yoshinori K. Okuji  <okuji@enbug.org>
15528         * DISTLIST: Added util/i386/pc/grub-install.in.
15530         * util/i386/pc/grub-install.in: New file.
15532         * conf/i386-pc.rmk (sbin_SCRIPTS): New variable.
15533         (grub_install_SOURCES): Likewise.
15535         * genmk.rb: Added support for scripts.
15536         (Script): New class.
15537         (scripts): New variable.
15539         * Makefile.in (install-local): Install sbin_SCRIPTS by
15540         INSTALL_SCRIPT.
15541         (uninstall): Remove sbin_SCRIPTS.
15543         * util/i386/pc/grub-setup.c (main): If the argument is not a GRUB
15544         device, try to get a GRUB device by
15545         grub_util_biosdisk_get_grub_dev.
15546         Free DEST_DEV.
15548         * util/i386/pc/grub-mkdevicemap.c (usage): Remove a duplicated
15549         description for --device-map.
15551 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15553         Change the semantics of variable hooks. They now return strings
15554         instead of error values.
15556         * util/i386/pc/grub-setup.c: Include grub/env.h.
15557         (setup): Use grub_device_set_root instead of grub_env_set.
15559         * kern/rescue.c (grub_rescue_cmd_root): Use grub_env_set and
15560         grub_env_get instead of grub_device_set_root and
15561         grub_device_get_root, respectively.
15563         * kern/main.c (grub_env_write_root): New function.
15564         (grub_set_root_dev): Register grub_env_write_hook for "root". Use
15565         grub_env_set instead of grub_device_set_root.
15567         * kern/env.c (HASHSZ): Reduced to 13, because GRUB does not need
15568         many variables.
15569         (grub_env_set): Set ENV->VALUE to the result of ENV->WRITE_HOOK
15570         rather than calling ENV->WRITE_HOOK afterwards.
15571         (grub_env_get): Return the result of ENV->READ_HOOK rather than
15572         passing a pointer of a pointer.
15573         (grub_register_variable_hook): Change the types of "read_hook" and
15574         "write_hook" to grub_env_read_hook_t and grub_env_write_hook_t,
15575         respectively.
15576         Allocate the default empty string on the heap, because this string
15577         may be freed later.
15579         * kern/device.c: Include grub/env.h.
15580         (grub_device_set_root): Removed.
15581         (grub_device_get_root): Likewise.
15582         (grub_device_open): Use grub_env_get instead of
15583         grub_device_get_root.
15585         * include/grub/env.h (grub_env_read_hook_t): New type.
15586         (grub_env_write_hook_t): Likewise.
15587         (grub_env_var): Change the types of "read_hook" and "write_hook"
15588         to grub_env_read_hook_t and grub_env_write_hook_t, respectively.
15589         (grub_register_variable_hook): Likewise.
15591         * include/grub/device.h (grub_device_set_root): Removed.
15592         (grub_device_set_root): Likewise.
15594         * fs/fat.c (grub_fat_dir): Make a copy of PATH in DIRNAME, and
15595         make sure that DIRNAME terminates with '/', so that
15596         grub_fat_find_dir will fail if PATH is not a directory.
15598         * commands/ls.c (grub_ls_list_files): Remove the qualifier const
15599         from DIRNAME.
15600         Use the qualifier auto for print_files and print_files_long.
15601         If FS->DIR sets GRUB_ERRNO to GRUB_ERR_BAD_FILE_TYPE, try DIRNAME
15602         as a regular file.
15603         Put a newline only if there is no error.
15604         (grub_cmd_ls): Remove grub_ls_print_files, because this is not
15605         used.
15607 2005-07-20  Yoshinori K. Okuji  <okuji@enbug.org>
15609         * kern/partition.c (grub_partition_probe): Initialize PART to
15610         NULL. Otherwise, when no partition map is registered, this returns
15611         a garbage.
15613 2005-07-19  Yoshinori K. Okuji  <okuji@enbug.org>
15615         * partmap/apple.c (apple_partition_map_iterate): Check if POS
15616         equals GRUB_DISK_SECTOR_SIZE to see if the partition table is
15617         valid.
15619 2005-07-18  Yoshinori K. Okuji  <okuji@enbug.org>
15621         * commands/ls.c (grub_ls_list_disks): Print the filesystem
15622         information on each device, if it does not have partitions. Print
15623         "Device" instead of "Disk", because this function is not specific
15624         to disk devices.
15626         * normal/main.c (grub_rescue_cmd_normal): Make the variable CONFIG
15627         static to ensure that it is put on the memory rather than a
15628         register.
15630 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15632         * commands/cat.c (GRUB_MOD_INIT): Use better documentation.
15633         (grub_cat_init): Likewise.
15634         * loader/i386/pc/chainloader_normal.c (GRUB_MOD_INIT): Likewise.
15635         (options): Likewise.
15636         * commands/configfile.c (GRUB_MOD_INIT): Likewise.
15637         (grub_configfile_init): Likewise.
15638         * font/manager.c (GRUB_MOD_INIT): Likewise.
15639         * commands/help.c (GRUB_MOD_INIT): Likewise.
15640         (grub_help_init): Likewise.
15641         * normal/command.c (grub_command_init): Likewise.
15642         * loader/i386/pc/linux_normal.c (GRUB_MOD_INIT): Likewise.
15643         * disk/loopback.c (grub_loop_init): Likewise.
15644         (GRUB_MOD_INIT): Likewise.
15645         * commands/ls.c (grub_ls_init): Likewise.
15646         (GRUB_MOD_INIT): Likewise.
15647         (options): Likewise.
15648         * commands/boot.c (grub_boot_init): Likewise.
15649         (GRUB_MOD_INIT): Likewise.
15650         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Likewise.
15651         * commands/i386/pc/reboot.c (grub_reboot_init): Likewise.
15652         (GRUB_MOD_INIT): Likewise.
15653         * commands/cmp.c (grub_cmp_init): Likewise.
15654         (GRUB_MOD_INIT): Likewise.
15656         * normal/arg.c: Use <> instead of "" to include header files.
15657         (SHORT_ARG_HELP): New macro.
15658         (SHORT_ARG_USAGE): Likewise.
15659         (help_options): Specify SHORT_ARG_HELP and SHORT_ARG_USAGE instead
15660         of 'h' and 'u' for help and usage, respectively. Use more GNU-like
15661         descriptions.
15662         (find_short): Check if C is 'h' or 'u' explicitly.
15663         (grub_arg_show_help): Use space characters instead of tabs. Treat
15664         SHORT_ARG_HELP and SHORT_ARG_USAGE exceptionally so that -h and -u
15665         are shown with --help and --usage only if they are not used for
15666         the command itself.
15667         (parse_option): Use SHORT_ARG_HELP and SHORT_ARG_USAGE instead of
15668         'h' and 'u'.
15670         * include/grub/arg.h (struct grub_arg_option): Add the qualifier
15671         const into "longarg". Change the type of "shortarg" to int.
15673 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15675         * boot/i386/pc/boot.S (boot_drive_check): New label.
15677         * include/grub/i386/pc/boot.h (GRUB_BOOT_MACHINE_DRIVE_CHECK): New
15678         macro.
15680         * util/i386/pc/grub-setup.c (setup): Added a workaround for BIOSes
15681         which do not pass a boot drive correctly. Copied from GRUB Legacy.
15683 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15685         * kern/i386/pc/startup.S (gate_a20_try_system_control_port_a):
15686         When turning off Gate A20, skip the check and return immediately,
15687         because this is not fatal usually.
15689 2005-07-17  Yoshinori Okuji  <okuji@enbug.org>
15691         * conf/i386-pc.rmk (pxeboot_img_LDFLAGS): The text address should
15692         be 0x7C00 instead of 0x8000.
15694         * boot/i386/pc/pxeboot.S: Rewritten.
15696         * kern/i386/pc/startup.S (gate_a20_try_bios): No need to specify
15697         EXT_C.
15698         (gate_a20_check_state): Read a byte from 0x108000. Invert the
15699         result.
15701 2005-07-16  Yoshinori K. Okuji  <okuji@enbug.org>
15703         * kern/i386/pc/startup.S (grub_gate_a20): Rewritten for
15704         robustness. This routine now supports a BIOS call and System
15705         Control Port A to modify the gate A20.
15707         * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
15708         Increased to 0x440.
15710 2005-07-12  Hollis Blanchard  <hollis@penguinppc.org>
15712         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): dprintf the
15713         device path and resulting ihandle.
15714         (grub_ofdisk_close): dprintf the ihandle being closed.
15715         (grub_ofdisk_read): dprintf function parameters.
15716         * kern/mm.c (grub_mm_init_region): Likewise.
15717         * loader/powerpc/ieee1275/linux.c: Remove extra whitespace.
15718         (grub_linux_boot): dprintf the Linux entry point, initrd address and
15719         size, and boot arguments.
15720         (grub_rescue_cmd_linux): dprintf each ELF segment's address and size
15721         before loading into memory.
15722         (grub_rescue_cmd_initrd): dprintf the initrd's address and size
15723         before loading into memory.
15725 2005-07-12  Yoshinori K. Okuji  <okuji@enbug.org>
15727         * kern/mm.c: Added much documentation.
15728         (GRUB_MM_ALIGN_LOG2): When GRUB_CPU_SIZEOF_VOID_P is
15729         8, set to 5 instead of 8.
15731 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15733         * DISTLIST: Added util/i386/pc/grub-mkimage.c.
15735         * conf/i386-pc.rmk (sbin_UTILITIES): Added grub-mkdevicemap.
15736         (grub_mkdevicemap_SOURCES): New variable.
15738         * util/i386/pc/grub-mkdevicemap.c: New file. Mostly copied from
15739         lib/device.c of GRUB Legacy.
15741 2005-07-10  Yoshinori Okuji  <okuji@enbug.org>
15743         * commands/ls.c (grub_ls_list_files): Check if *PATH is NUL
15744         instead of PATH is NULL.
15746 2005-07-09  Vincent Pelletier  <subdino2004@yahoo.fr>
15748         * commands/cmp.c (BUFFER_SIZE): New macro.
15749         (grub_cmd_cmp): Close the right file at the right time.  Compare
15750         only data just read.  Don't report files of different  size as
15751         identical.  Dynamically allocate buffers.  Move variable
15752         declarations at the beginning of function.
15754 2005-07-09  Yoshinori Okuji  <okuji@enbug.org>
15756         * aclocal.m4 (grub_I386_CHECK_REGPARM_BUG): The return value was
15757         reverse.
15759 2004-07-04  Vincent Pelletier  <subdino2004@yahoo.fr>
15761         * normal/cmdline.c (grub_cmdline_get): Don't fallback on ctrl-d
15762         when backspace is pressed at beginning of line.
15764 2005-07-03  Yoshinori Okuji  <okuji@enbug.org>
15766         * DISTLIST: Added genfslist.sh.
15768         * normal/main.c (fs_module_list): New variable.
15769         (autoload_fs_module): New function.
15770         (read_fs_list): Likewise.
15771         (grub_normal_execute): Call read_fs_list.
15773         * kern/fs.c (grub_fs_autoload_hook): New variable.
15774         (grub_fs_probe): Added support for auto-loading.
15776         * include/grub/normal.h (struct grub_fs_module_list): New struct.
15777         (grub_fs_module_list_t): New type.
15779         * include/grub/fs.h (grub_fs_autoload_hook_t): New type.
15780         (grub_fs_autoload_hook): New prototype.
15782         * genfslist.sh: New file.
15784         * genmk.rb: Added a rule to generate a filesystem list.
15786 2005-06-30  Marco Gerards  <metgerards@student.han.nl>
15788         * configure.ac: Fix the test for cross-compiling.
15790         * genmk.rb (Program): Use `$(CC)' instead of `$(BUILD_CC)'.  Don't
15791         define GRUB_UTIL anymore.
15793         * util/powerpc/ieee1275/grub-mkimage.c (load_note): Endian fixes
15794         so this function works on other systems than just big endian.
15795         (load_modules): Likewise.
15796         (add_segments): Likewise.
15798 2005-06-23  Hollis Blanchard  <hollis@penguinppc.org>
15800         * kern/misc.c (grub_vsprintf): Add `longfmt'.  If format string
15801         contains `l' modifier, get a long from va_arg().
15803 2005-06-23  Yoshinori K. Okuji  <okuji@enbug.org>
15805         * kern/mm.c (grub_free): If the next free block which is being
15806         merged is the first free block, set the first block to the block
15807         being freed.
15808         Reported by Vincent Guffens <guffens@inma.ucl.ac.be>.
15810 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15812         * boot/powerpc/ieee1275/cmain.c (cmain): Initialize
15813         `grub_ieee1275_chosen'.
15815 2005-05-08  Hollis Blanchard  <hollis@penguinppc.org>
15817         * boot/powerpc/ieee1275/cmain.c (module_info): Remove definition.
15818         (grub_ieee1275_chosen): New variable.
15819         (cmain): Initialize and use `grub_ieee1275_chosen' instead of
15820         `chosen'.
15821         * boot/powerpc/ieee1275/crt0.S (init_stack): Remove stack space.
15822         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
15823         Rename first argument to `phandle' for consistency.
15824         (grub_ieee1275_get_property_length): Likewise.
15825         (grub_ieee1275_next_property): Likewise.  Change type of first argument
15826         to grub_ieee1275_phandle_t.
15827         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_entry_fn):
15828         Move export next to declaration.
15829         (grub_ieee1275_chosen): New variable.
15830         * include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MODULE_BASE):
15831         Correct cosmetic typo.
15832         * kern/powerpc/ieee1275/init.c (grub_set_prefix): Use
15833         `grub_ieee1275_chosen'.
15834         * kern/powerpc/ieee1275/openfw.c (grub_map): Likewise.
15835         * loader/powerpc/ieee1275/linux.c (grub_linux_boot): Likewise.
15836         (grub_rescue_cmd_linux): Set `initrd_addr' to 0.
15837         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_refresh): Use
15838         `grub_ieee1275_chosen'.
15840 2005-05-10  Hollis Blanchard  <hollis@penguinppc.org>
15842         * boot/powerpc/ieee1275/cmain.c (cmain): Remove code to parse
15843         /chosen/bootargs.
15844         * kern/powerpc/ieee1275/init.c (grub_machine_init): Parse
15845         /chosen/bootargs as "variable=value" pairs.
15847 2005-05-08  Vincent Pelletier  <subdino2004@yahoo.fr>
15849         * include/grub/misc.h (grub_dprintf): New macro.
15850         (grub_real_dprintf): New prototype.
15851         (grub_strword): Likewise.
15852         (grub_iswordseparator): Likewise.
15853         * kern/misc.c (grub_real_dprintf): New function.
15854         (grub_strword): Likewise.
15855         (grub_iswordseparator): Likewise.
15857 2005-04-30  Hollis Blanchard  <hollis@penguinppc.org>
15859         * boot/powerpc/ieee1275/cmain.c: Don't include grub/machine/init.h.
15860         (roundup): Remove macro.
15861         (grub_ieee1275_flags): Make static.
15862         (grub_ieee1275_realmode): Remove.
15863         (grub_ieee1275_test_flag): New function.
15864         (grub_ieee1275_set_flag): Likewise.
15865         (find_options): Rename to `grub_ieee1275_find_options'; update
15866         callers. Set GRUB_IEEE1275_FLAG_REAL_MODE and
15867         GRUB_IEEE1275_FLAG_0_BASED_PARTITIONS.
15868         (cmain): New prototype.
15869         (cmain): Use `grub_ieee1275_set_flag' instead of accessing
15870         `grub_ieee1275_flags' directly.
15871         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Remove
15872         machine/biosdisk.h.
15873         * disk/powerpc/ieee1275/ofdisk.c: Include grub/machine/ofdisk.h.
15874         Don't include grub/machine/init.h.
15875         (grub_ofdisk_open): Call `grub_ieee1275_test_flag'.
15876         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
15877         Remove prototype.
15878         (grub_ieee1275_realmode): Likewise.
15879         (grub_ieee1275_flag): New enum.
15880         (grub_ieee1275_test_flag): New prototype.
15881         (grub_ieee1275_set_flag): New prototype.
15882         * include/grub/powerpc/ieee1275/init.h: Remove file.
15883         * include/grub/powerpc/ieee1275/ofdisk.h: New file.
15884         * kern/powerpc/ieee1275/init.c: Don't include grub/machine/init.h.
15885         Include grub/machine/console.h.  Include grub/machine/ofdisk.h.
15886         (grub_machine_fini): Don't call `grub_ieee1275_release'.  Remove
15887         comment.
15888         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Call
15889         `grub_ieee1275_test_flag'.
15890         (grub_ieee1275_encode_devname): Likewise.
15892 2005-04-21  Hollis Blanchard  <hollis@penguinppc.org>
15894         * include/grub/powerpc/ieee1275/ieee1275.h
15895         (grub_ieee1275_encode_devname): New prototype.
15896         (grub_ieee1275_get_filename): Likewise.
15897         * kern/powerpc/ieee1275/init.c (grub_translate_ieee175_path): New
15898         function.
15899         (grub_set_prefix): Likewise.
15900         (grub_machine_init): Call grub_set_prefix.
15901         * kern/powerpc/ieee1275/openfw.c: Fix typos.
15902         (grub_parse_type): New enum.
15903         (grub_ieee1275_get_devargs): New function.
15904         (grub_ieee1275_get_devname): Likewise.
15905         (grub_ieee1275_parse_args): Likewise.
15906         (grub_ieee1275_get_filename): Likewise.
15907         (grub_ieee1275_encode_devname): Likewise.
15909 2005-03-30  Marco Gerards  <metgerards@student.han.nl>
15911         * kern/powerpc/ieee1275/init.c (grub_machine_fini): Don't call
15912         `grub_loader_unset'.
15914 2005-03-26  Hollis Blanchard  <hollis@penguinppc.org>
15916         * commands/ieee1275/halt.c (grub_cmd_halt): Call grub_halt
15917         instead of grub_ieee1275_interpret.
15918         (grub_halt_init): New function.
15919         (grub_halt_fini): Likewise.
15920         (GRUB_MOD_INIT): Correct message grammar.
15921         * commands/ieee1275/reboot.c (grub_cmd_reboot): Call grub_reboot
15922         instead of grub_ieee1275_interpret.
15923         (grub_reboot_init): New function.
15924         (grub_reboot_fini): Likewise.
15925         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Replace
15926         commands/i386/pc/halt.c, commands/i386/pc/reboot.c, and
15927         util/i386/pc/misc.c with commands/ieee1275/halt.c,
15928         commands/ieee1275/reboot.c, and util/powerpc/ieee1275/misc.c.
15929         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_fini): New
15930         function.
15931         * include/grub/powerpc/ieee1275/console.h (grub_console_fini):
15932         Add prototype.
15933         * include/grub/powerpc/ieee1275/ieee1275.h (grub_reboot): Add
15934         prototype.
15935         (grub_halt): Likewise.
15936         * include/grub/powerpc/ieee1275/init.h: Remove inaccurate comment.
15937         (cmain): Remove __attribute__((unused)).
15938         * kern/powerpc/ieee1275/init.c (grub_heap_start): New variable.
15939         (grub_heap_len): Likewise.
15940         (grub_machine_fini): New function.
15941         * kern/powerpc/ieee1275/openfw.c (grub_reboot): New function.
15942         (grub_halt): Likewise.
15943         * term/powerpc/ieee1275/ofconsole.c (grub_console_fini): New
15944         function.
15945         * util/powerpc/ieee1275/misc.c: New file.
15947 2005-03-19  Yoshinori K. Okuji  <okuji@enbug.org>
15949         * DISTLIST: New file.
15950         * gendistlist.sh: Likewise.
15952         * Makefile.in (COMMON_DISTFILES): Removed.
15953         (BOOT_DISTFILES): Likewise.
15954         (CONF_DISTFILES): Likewise.
15955         (DISK_DISTFILES): Likewise.
15956         (FS_DISTFILES): Likewise.
15957         (INCLUDE_DISTFILES): Likewise.
15958         (KERN_DISTFILES): Likewise.
15959         (LOADER_DISTFILES): Likewise.
15960         (TERM_DISTFILES): Likewise.
15961         (UTIL_DISTFILES): Likewise.
15962         (DISTFILES): Likewise.
15963         (uninstall): Uninstall files in $(pkgdata_DATA).
15964         (DISTLIST): New target.
15965         (distdir): Use the contents of the file DISTLIST to get a list of
15966         distributed files.
15968 2005-03-18  Yoshinori K. Okuji  <okuji@enbug.org>
15970         * fs/fat.c (grub_fat_mount): Ignore the 3rd bit of a media
15971         descriptor. This is ported from GRUB Legacy.
15973         * gencmdlist.sh: Added an extra semicolon to make it work with
15974         old sed versions. Reported by Robert Bihlmeyer
15975         <robbe@orcus.priv.at>.
15977 2005-03-08  Yoshinori Okuji  <okuji@enbug.org>
15979         Automatic loading of commands is supported.
15981         * normal/main.c (read_command_list): New function.
15982         (grub_normal_execute): Call read_command_list.
15984         * normal/command.c (grub_register_command): Return zero or CMD.
15985         Allocate CMD->NAME from the heap.
15986         Initialize CMD->MODULE_NAME to zero.
15987         Find the same name as well. If the same command is found and it is
15988         a dummy command, overwrite members. If it is not a dummy command,
15989         return zero.
15990         (grub_unregister_command): Free Q->NAME and Q->MODULE_NAME.
15991         (grub_command_find): If a dummy command is found, load a module
15992         and retry to find a command only once.
15994         * normal/cmdline.c (grub_tab_complete): Call grub_command_find to
15995         make sure that each command is loaded.
15997         * include/grub/normal.h (GRUB_COMMAND_FLAG_NOT_LOADED): New
15998         macro.
15999         (struct grub_command): Remove const from the member `name'.
16000         Add a new member `module_name'.
16001         (grub_register_command): Return grub_command_t.
16003         * commands/help.c (grub_cmd_help): Call grub_command_find to make
16004         sure that each command is loaded.
16006         * genmk.rb (PModule::rule): Specify a module name without the
16007         suffix ".mod" to gencmdlist.sh.
16009 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16011         * gencmdlist.sh: New file.
16013         * genmk.rb (PModule::rule): Generate a rule for a command list.
16014         Clean command.lst.
16015         Generate command.lst from $(COMMANDFILES).
16017         * Makefile.in (COMMON_DISTFILES): Added gencmdlist.sh.
16018         (DATA): Added $(pkgdata_DATA).
16019         (install-local): Install files in $(pkgdata_DATA).
16021 2005-03-02  Yoshinori K. Okuji  <okuji@enbug.org>
16023         * term/i386/pc/vga.c (debug_command): Removed.
16024         (GRUB_MOD_INIT): Do not register the command "debug".
16026         From Hollis Blanchard:
16027         * commands/configfile.c: New file.
16028         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16029         commands/configfile.c.
16030         (pkgdata_MODULES): Added configfile.mod.
16031         (configfile_mod_SOURCES): New variable.
16032         (configfile_mod_CFLAGS): Likewise.
16033         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Added
16034         commands/configfile.c.
16035         (pkgdata_MODULES): Added configfile.mod.
16036         (configfile_mod_SOURCES): New variable.
16037         (configfile_mod_CFLAGS): Likewise.
16038         * util/grub-emu.c (main): Call grub_configfile_init and
16039         grub_configfile_fini.
16040         * include/grub/normal.h [GRUB_UTIL] (grub_configfile_init): New
16041         prototype.
16042         [GRUB_UTIL] (grub_configfile_fini): Likewise.
16044 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16046         * normal/arg.c (grub_arg_show_help): Do not show the bug report
16047         address.
16049         * commands/help.c (grub_cmd_help): Do not print newlines after
16050         the last command in print_command_help.
16052 2005-02-27  Yoshinori K. Okuji  <okuji@enbug.org>
16054         * commands/default.h: New file.
16055         * commands/timeout.h: Likewise.
16056         * normal/context.c: Likewise.
16058         * util/misc.c: Do not include sys/times.h.
16059         Include sys/time.h and grub/machine/time.h.
16060         (grub_get_rtc): Rewritten with gettimeofday.
16062         * util/grub-emu.c (main): Call grub_default_init and
16063         grub_timeout_init before grub_normal_init, and call
16064         grub_timeout_fini and grub_default_fini after grub_main.
16066         * util/console.c (grub_ncurses_checkkey): Return the read
16067         character or -1.
16069         * normal/menu.c (run_menu): Set MENU->TIMEOUT to -1 once it
16070         timeouts.
16072         * normal/main.c (read_config_file): Push MENU. If this fails,
16073         print an error and wait for a user input.
16074         Print an error only if GRUB_ERRNO is not GRUB_ERR_NONE.
16075         If a menu is empty or an error occurs, pop MENU.
16076         (grub_normal_execute): Pop and free MENU after grub_menu_run
16077         returns.
16079         * kern/loader.c (grub_loader_boot): Call grub_machine_fini.
16081         * include/grub/powerpc/ieee1275/time.h [GRUB_UTIL]: Do not
16082         include time.h.
16083         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16084         without GRUB_UTIL.
16085         * include/grub/i386/pc/time.h [GRUB_UTIL]: Do not include
16086         time.h.
16087         [GRUB_UTIL] (GRUB_TICKS_PER_SECOND): Use the same definition as
16088         without GRUB_UTIL.
16090         * include/grub/normal.h (struct grub_menu_list): New struct.
16091         (grub_menu_list_t): New type.
16092         (struct grub_context): New struct.
16093         (grub_context_t): New type.
16094         (grub_register_command): Got rid of EXPORT_FUNC.
16095         (grub_unregister_command): Likewise.
16096         (grub_context_get): New prototype.
16097         (grub_context_get_current_menu): Likewise.
16098         (grub_context_push_menu): Likewise.
16099         (grub_context_pop_menu): Likewise.
16100         [GRUB_UTIL] (grub_default_init): Likewise.
16101         [GRUB_UTIL] (grub_default_fini): Likewise.
16102         [GRUB_UTIL] (grub_timeout_init): Likewise.
16103         [GRUB_UTIL] (grub_timeout_fini): Likewise.
16105         * conf/i386-pc.rmk (grub_emu_SOURCES): Added commands/default.c,
16106         commands/timeout.c and normal/context.c.
16107         (pkgdata_MODULES): Added default.mod and timeout.mod.
16108         (normal_mod_SOURCES): Added normal/context.c.
16109         (default_mod_SOURCES): New variable.
16110         (default_mod_CFLAGS): Likewise.
16111         (timeout_mod_SOURCES): Likewise.
16112         (timeout_mod_CFLAGS): Likewise.
16113         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Copied from
16114         conf/i386-pc.rmk.
16115         (pkgdata_MODULES): Added default.mod and timeout.mod.
16116         (normal_mod_SOURCES): Added normal/context.c.
16117         (default_mod_SOURCES): New variable.
16118         (default_mod_CFLAGS): Likewise.
16119         (timeout_mod_SOURCES): Likewise.
16120         (timeout_mod_CFLAGS): Likewise.
16122         * Makefile.in (all-local): Added $(MKFILES).
16124 2005-02-21  Vincent Pelletier  <subdino2004@yahoo.fr>
16126         * conf/i386-pc.rmk (grub_setup_SOURCES): Add `partmap/sun.c'.
16127         (grub_emu_SOURCES): Likewise.
16128         (pkgdata_MODULES): Add `sun.mod'.
16129         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16130         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16131         `partmap/sun.c'.
16132         (pkgdata_MODULES): Add `sun.mod'.
16133         (sun_mod_SOURCES, sun_mod_CFLAGS): New variables.
16134         * include/grub/partition.h (grub_sun_partition_map_init): New
16135         prototype.
16136         (grub_sun_partition_map_fini): Likewise.
16137         * partmap/sun.c: New file.
16138         * util/grub-emu.c (main): Initialize and de-initialize the sun
16139         partitionmap support.
16141 2005-02-19  Yoshinori K. Okuji  <okuji@enbug.org>
16143         This implements an Emacs-like menu entry editor.
16145         * normal/menu_entry.c: New file.
16147         * util/console.c (grub_ncurses_putchar): Translate some Unicode
16148         characters to ASCII.
16149         (saved_char): New variable.
16150         (grub_ncurses_checkkey): Rewritten completely.
16151         (grub_ncurses_getkey): Likewise.
16152         (grub_ncurses_init): Call raw instead of cbreak.
16154         * normal/menu.c (print_entry): Do not put a space.
16155         (init_page): Renamed to ...
16156         (grub_menu_init_page): ... this. All callers changed.
16157         (edit_menu_entry): Removed.
16158         (run_menu): Call grub_menu_entry_run instead of edit_menu_entry.
16160         * normal/cmdline.c (grub_cmdline_run): Call grub_setcursor.
16162         * kern/misc.c (grub_vprintf): Call grub_refresh.
16164         * normal/menu.c (DISP_LEFT): Renamed to ...
16165         * include/grub/term.h (GRUB_TERM_DISP_LEFT): ... this.
16166         * normal/menu.c (DISP_UP): Renamed to ...
16167         * include/grub/term.h (GRUB_TERM_DISP_UP): ... this.
16168         * normal/menu.c (DISP_RIGHT): Renamed to ...
16169         * include/grub/term.h (GRUB_TERM_DISP_RIGHT): ... this.
16170         * normal/menu.c (DISP_DOWN): Renamed to ...
16171         * include/grub/term.h (GRUB_TERM_DISP_DOWN): ... this.
16172         * normal/menu.c (DISP_HLINE): Renamed to ...
16173         * include/grub/term.h (GRUB_TERM_DISP_HLINE): ... this.
16174         * normal/menu.c (DISP_VLINE): Renamed to ...
16175         * include/grub/term.h (GRUB_TERM_DISP_VLINE): ... this.
16176         * normal/menu.c (DISP_UL): Renamed to ...
16177         * include/grub/term.h (GRUB_TERM_DISP_UL): ... this.
16178         * normal/menu.c (DISP_UR): Renamed to ...
16179         * include/grub/term.h (GRUB_TERM_DISP_UR): ... this.
16180         * normal/menu.c (DISP_LL): Renamed to ...
16181         * include/grub/term.h (GRUB_TERM_DISP_LL): ... this.
16182         * normal/menu.c (DISP_LR): Renamed to ...
16183         * include/grub/term.h (GRUB_TERM_DISP_LR): ... this.
16184         * normal/menu.c (TERM_WIDTH): Renamed to ...
16185         * include/grub/term.h (GRUB_TERM_WIDTH): ... this.
16186         * normal/menu.c (TERM_HEIGHT): Renamed to ...
16187         * include/grub/term.h (GRUB_TERM_HEIGHT): ... this.
16188         * normal/menu.c (TERM_INFO_HEIGHT): Renamed to ...
16189         * include/grub/term.h (GRUB_TERM_INFO_HEIGHT): ... this.
16190         * normal/menu.c (TERM_MARGIN): Renamed to ...
16191         * include/grub/term.h (GRUB_TERM_MARGIN): ... this.
16192         * normal/menu.c (TERM_SCROLL_WIDTH): Renamed to ...
16193         * include/grub/term.h (GRUB_TERM_SCROLL_WIDTH): ... this.
16194         * normal/menu.c (TERM_TOP_BORDER_Y): Renamed to ...
16195         * include/grub/term.h (GRUB_TERM_TOP_BORDER_Y): ... this.
16196         * normal/menu.c (TERM_LEFT_BORDER_X): Renamed to ...
16197         * include/grub/term.h (GRUB_TERM_LEFT_BORDER_X): ... this.
16198         * normal/menu.c (TERM_BORDER_WIDTH): Renamed to ...
16199         * include/grub/term.h (GRUB_TERM_BORDER_WIDTH): ... this.
16200         * normal/menu.c (TERM_MESSAGE_HEIGHT): Renamed to ...
16201         * include/grub/term.h (GRUB_TERM_MESSAGE_HEIGHT): ... this.
16202         * normal/menu.c (TERM_BORDER_HEIGHT): Renamed to ...
16203         * include/grub/term.h (GRUB_TERM_BORDER_HEIGHT): ... this.
16204         * normal/menu.c (TERM_NUM_ENTRIES): Renamed to ...
16205         * include/grub/term.h (GRUB_TERM_NUM_ENTRIES): ... this.
16206         * normal/menu.c (TERM_FIRST_ENTRY_Y): Renamed to ...
16207         * include/grub/term.h (GRUB_TERM_FIRST_ENTRY_Y): ... this.
16208         * normal/menu.c (TERM_ENTRY_WIDTH): Renamed to ...
16209         * include/grub/term.h (GRUB_TERM_ENTRY_WIDTH): ... this.
16210         * normal/menu.c (TERM_CURSOR_X): Renamed to ...
16211         * include/grub/term.h (GRUB_TERM_CURSOR_X): ... this.
16212         All callers changed.
16214         * include/grub/normal.h: New prototype.
16216         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16217         normal/menu_entry.c.
16218         (normal_mod_SOURCES): Likewise.
16219         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.
16220         (normal_mod_SOURCES): Likewise.
16222 2005-02-15  Yoshinori K. Okuji  <okuji@enbug.org>
16224         * include/grub/normal.h (grub_halt_init): New prototype.
16225         (grub_halt_fini): Likewise.
16226         (grub_reboot_init): Likewise.
16227         (grub_reboot_fini): Likewise.
16229         * util/grub-emu.c: Include signal.h.
16230         (main_env): New global variable.
16231         (grub_machine_init): Ignore SIGINT. Otherwise grub-emu cannot
16232         catch C-c.
16233         (grub_machine_fini): New function.
16234         (main): Call grub_halt_init and grub_reboot_init before
16235         grub_main, and grub_reboot_fini and grub_halt_fini after it.
16236         Call setjmp with MAIN_ENV to go back afterwards.
16237         Call grub_machine_fini right before return.
16239         * include/grub/util/misc.h: Include setjmp.h.
16240         (main_env): New prototype.
16242         * include/grub/kernel.h (grub_machine_fini): New prototype.
16243         * include/grub/i386/pc/biosdisk.h (grub_biosdisk_fini): Likewise.
16244         * include/grub/i386/pc/console.h (grub_console_fini): Likewise.
16246         * disk/i386/pc/biosdisk.c (grub_biosdisk_fini): New function.
16247         * kern/i386/pc/init.c (grub_machine_fini): Likewise.
16248         * term/i386/pc/console.c (grub_console_fini): Likewise.
16250         * util/i386/pc/misc.c: New file.
16252         * conf/i386-pc.rmk (grub_emu_SOURCES): Added
16253         util/i386/pc/misc.c, commands/i386/pc/halt.c and
16254         commands/i386/pc/reboot.c.
16256 2005-02-14  Guillem Jover  <guillem@hadrons.org>
16258         * include/grub/dl.h (grub_dl_check_header): New prototype.
16259         (grub_arch_dl_check_header): Change return type to grub_err_t,
16260         remove size parameter and export function.  Update all callers.
16261         * kern/dl.c (grub_dl_check_header): New function.
16262         (grub_dl_load_core): Use `grub_dl_check_header' instead of
16263         `grub_arch_dl_check_header'.  Check ELF type.  Check if sections
16264         are inside the core.
16265         * kern/i386/dl.c (grub_arch_dl_check_header): Remove arch
16266         independent ELF header checks.
16267         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16268         * loader/i386/pc/multiboot.c (grub_rescue_cmd_multiboot): Use
16269         `grub_dl_check_header' instead of explicit checks.  Check for the
16270         ELF type.
16271         * loader/powerpc/ieee1275/linux.c (grub_rescue_cmd_linux): Use
16272         `grub_dl_check_header' instead of explicit checks.  Remove arch
16273         specific ELF header checks.
16275         * util/grub-emu.c (grub_arch_dl_check_header): Remove the
16276         argument SIZE.
16278 2005-02-13  Hollis Blanchard  <hollis@penguinppc.org>
16280         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add ls.mod.
16281         * include/grub/powerpc/libgcc.h (__mulsf3): New prototype.
16283 2005-02-12  Hollis Blanchard  <hollis@penguinppc.org>
16285         * kern/partition.c (grub_partition_probe): Clear `grub_errno' and
16286         return 0 if `grub_errno' is GRUB_ERR_BAD_PART_TABLE.
16287         (part_map_iterate): Clear `grub_errno' and return 0 if
16288         `partmap->iterate' returns GRUB_ERR_BAD_PART_TABLE.
16289         * partmap/amiga.c (amiga_partition_map_iterate): Return
16290         GRUB_ERR_BAD_PART_TABLE if no partition map magic is found.
16291         * partmap/apple.c (apple_partition_map_iterate): Likewise.
16293 2005-02-01  Guillem Jover  <guillem@hadrons.org>
16295         * loader/i386/pc/multiboot_normal.c (GRUB_MOD_INIT): Fix module
16296         help info.
16298 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16300         * include/grub/powerpc/ieee1275/loader.h (grub_load_linux):
16301         Removed prototype.
16302         (grub_rescue_cmd_linux): New prototype.
16303         (grub_rescue_cmd_initrd): Likewise.
16304         * powerpc/ieee1275/linux.c (grub_linux_boot): Remove struct
16305         `bi_rec'.
16306         (grub_linux_release_mem): Release the memory for the initrd.
16307         (grub_load_linux): Renamed from this...
16308         (grub_rescue_cmd_linux): ...To this.  Changed all callers.
16309         Changed `entry' not to be static.  Loop over memory regions to
16310         find another one when the default fails.
16311         (grub_rescue_cmd_initrd): New function.
16312         (grub_linux_init): Remove function.
16313         (grub_linux_fini): Likewise.
16314         (GRUB_MOD_INIT): Register `initrd'.
16315         (GRUB_MOD_FINI): Unregister `initrd'.
16316         * powerpc/ieee1275/linux_normal.c (grub_linux_normal_init):
16317         Function removed.
16318         (grub_linux_normal_fini): Likewise.
16319         (GRUB_MOD_INIT): Register `initrd'.
16320         (GRUB_MOD_FINI): Unregister `initrd'.
16322 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16324         * commands/help.c: New file.
16325         * normal/arg.c (show_help): Renamed to...
16326         (grub_arg_show_help): ... this.
16327         * commands/i386/pc/halt.c: New file.
16328         * commands/i386/pc/reboot.c: Likewise.
16329         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/help.c'.
16330         (pkgdata_MODULES): Add `reboot.mod', `halt.mod' and `help.mod'.
16331         (help_mod_SOURCES, help_mod_CFLAGS, reboot_mod_SOURCES)
16332         (reboot_mod_CFLAGS, halt_mod_SOURCES, halt_mod_CFLAGS): New
16333         variables.
16334         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16335         `commands/help.c'.
16336         (pkgdata_MODULES): Add `help.mod'.
16337         (help_mod_SOURCES, help_mod_CFLAGS): New variables.
16338         * grub/i386/pc/init.h (grub_reboot): New prototype.
16339         (grub_halt): Likewise.
16340         * include/grub/normal.h (grub_arg_show_help): New prototype.
16341         (grub_help_init): Likewise.
16342         (grub_help_fini): Likewise.
16343         * util/grub-emu.c (main): Initialize and deinitialize the help
16344         command.
16346         * normal/cmdline.c (grub_cmdline_get): Doc fix.
16348         * normal/command.c (grub_command_init): Fixed the description of
16349         the `set' and `unset' commands.
16351 2005-01-31  Marco Gerards  <metgerards@student.han.nl>
16353         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_interpret): New
16354         function.
16355         * commands/ieee1275/halt.c: New file.
16356         * commands/ieee1275/reboot.c: Likewise.
16357         * commands/ieee1275/suspend.c (grub_cmd_suspend): Use
16358         `__attribute__ ((unused))'.  Some GCS related fixed.
16359         (grub_suspend_init) [GRUB_UTIL]: Function removed.
16360         (grub_suspend_fini): Likewise.
16361         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add `reboot.mod'
16362         and `halt.mod'.
16363         (reboot_mod_SOURCES, reboot_mod_CFLAGS, halt_mod_SOURCES)
16364         (halt_mod_CFLAGS): New variables.
16365         * include/grub/powerpc/ieee1275/ieee1275.h
16366         (grub_ieee1275_interpret): New prototype.
16368 2005-01-29  Yoshinori K. Okuji  <okuji@enbug.org>
16370         * include/grub/misc.h (memmove): New prototype.
16371         (memcpy): Likewise.
16373 2005-01-22  Hollis Blanchard  <hollis@penguinppc.org>
16375         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Don't initialize
16376         `devpath' to 0.  Use `name' instead of `devpath' with `grub_strndup'.
16378 2005-01-22  Marco Gerards  <metgerards@student.han.nl>
16380         * kern/misc.c (grub_strndup): Function rewritten.
16382 2005-01-22  Vincent Pelletier  <subdino2004@yahoo.fr>
16384         * normal/menu.c (TERM_WIDTH): Macro redefined.
16385         (TERM_TOP_BORDER_Y): Likewise.
16386         (draw_border): Replaced while-loop by a for-loop.  Make the number
16387         of lines consistent with the number of lines displayed in
16388         print_entries.  Added a margin below the rectangle.
16389         (print_entry): Make the entry fit in the rectangle.
16390         (print_entries): Display the scroll arrows next to the right
16391         border.
16393 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16395         * fs/minix.c (grub_minix_find_file): Reserve more space for
16396         `fpath' so the \0 can be stored.  Use `grub_strcpy' instead of
16397         `grub_strncpy' to copy `path' into it.
16399 2005-01-21  Marco Gerards  <metgerards@student.han.nl>
16401         Add the loopback device, a device via which files can be accessed
16402         as devices.
16404         * conf/i386-pc.rmk (grub_emu_SOURCES): Add `disk/loopback.c'.
16405         (pkgdata_MODULES): Add loopback.mod.
16406         (loopback_mod_SOURCES): New variable.
16407         (loopback_mod_CFLAGS): Likewise.
16408         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add
16409         `disk/loopback.c'.
16410         (pkgdata_MODULES): Add loopback.mod.
16411         (loopback_mod_SOURCES): New variable.
16412         (loopback_mod_CFLAGS): Likewise.
16413         * disk/loopback.c: new file.
16414         * include/grub/normal.h (grub_loop_init): New prototype.
16415         (grub_loop_fini): New prototype.
16416         * util/grub-emu.c (main): Initialize and de-initialize loopback
16417         support.
16418         * include/grub/disk.h (grub_disk_dev_id): Add
16419         `GRUB_DISK_DEVICE_LOOPBACK_ID'.
16421 2005-01-20  Hollis Blanchard  <hollis@penguinppc.org>
16423         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_enter): New
16424         function.
16425         * conf/powerpc-ieee1275.rmk (pkgdata_MODULES): Add suspend.mod.
16426         (suspend_mod_SOURCES): New variable.
16427         (suspend_mod_CFLAGS): Likewise.
16428         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_enter):
16429         New prototype.
16430         * commands/ieee1275/suspend.c: New file.
16432 2005-01-20  Timothy Baldwin  <T.E.Baldwin99@members.leeds.ac.uk>
16434         * include/grub/dl.h (GRUB_MOD_INIT): Changed `__attribute__
16435         ((unused))' to `__attribute__ ((used))'.
16436         (GRUB_MOD_FINI): Likewise.
16437         * kern/dl.c (grub_dl_load_file): Fix null pointer dereference.
16438         * genmk.rb (PModule): Assign space to common symbols when linking
16439         modules.
16441 2005-01-20  Marco Gerards  <metgerards@student.han.nl>
16443         * include/grub/mm.h (grub_mm_init_region): Change the type of the
16444         `unsigned' arguments to `grub_size_t'.
16445         (grub_malloc): Likewise.
16446         (grub_realloc): Likewise.
16447         (grub_memalign): Likewise.
16448         * kern/i386/dl.c (grub_arch_dl_check_header): Likewise.
16449         * kern/powerpc/dl.c (grub_arch_dl_check_header): Likewise.
16450         * util/misc.c (grub_malloc): Likewise.
16451         (grub_realloc): Likewise.
16452         * kern/mm.c (get_header_from_pointer): Change the casts to
16453         `unsigned' into a cast to `grub_size_t'.
16455         * fs/fshelp.c (grub_fshelp_find_file): The `oldnode' should always
16456         point to `currnode' when `currnode' is changed.
16458         * util/grub-emu.c (main): Initialize `progname'.  Reported by Nico
16459         Schottelius <nico-linux@schottelius.org>.
16461 2005-01-09  Hollis Blanchard  <hollis@penguinppc.org>
16463         * util/powerpc/ieee1275/grub-mkimage.c: Include <string.h>.
16464         (note_path): Remove variable.
16465         (GRUB_IEEE1275_NOTE_NAME): New macro.
16466         (GRUB_IEEE1275_NOTE_TYPE): Likewise.
16467         (grub_ieee1275_note_hdr): New structure.
16468         (grub_ieee1275_note_desc): Likewise.
16469         (grub_ieee1275_note): Likewise.
16470         (load_note): Remove `dir' argument.  All callers updated.  Remove
16471         `note_img' and `path'.  Do not load a file from `note_path'.
16472         Initialize a struct grub_ieee1275_note and write that to `out'.
16473         Use GRUB_IEEE1275_MODULE_BASE instead of MODULE_BASE.
16475 2005-01-05  Marco Gerards  <metgerards@student.han.nl>
16477         * util/misc.c (grub_util_read_image): Revert last change.  It
16478         called `grub_util_read_at', which seeks from the beginning of the
16479         file.
16481 2005-01-04  Hollis Blanchard  <hollis@penguinppc.org>
16483         * TODO: Add note about endianness in grub-mkimage.
16484         * boot/powerpc/ieee1275/crt0.S (note): Remove unused .note
16485         section.
16486         * conf/powerpc-ieee1275.rmk (bin_UTILITIES): Add grub-mkimage.
16487         (grub_mkimage_SOURCES): New target.
16488         * include/grub/kernel.h (grub_start_addr): Remove variable.
16489         (grub_end_addr): Likewise.
16490         (grub_total_module_size): Likewise.
16491         (grub_kernel_image_size): Likewise.
16492         (GRUB_MODULE_MAGIC): New constant.
16493         (grub_module_info): New structure.
16494         (grub_arch_modules_addr): New prototype.
16495         (grub_get_end_addr): Remove prototype.
16496         * include/grub/i386/pc/kernel.h (grub_end_addr): New prototype.
16497         * include/grub/powerpc/ieee1275/kernel.h: New file.
16498         * include/grub/util/misc.h (grub_util_get_fp_size): New
16499         prototype.
16500         (grub_util_read_at): Likewise.
16501         (grub_util_write_image_at): Likewise.
16502         * kern/main.c (grub_get_end_addr): Remove function.
16503         (grub_load_modules): Call grub_arch_modules_addr instead of using
16504         grub_end_addr.  Look for a grub_module_info struct in memory.  Use
16505         the grub_module_info fields instead of calling grub_get_end_addr
16506         as loop conditions.  Move grub_add_unused_region code here.
16507         (grub_add_unused_region): Remove function.
16508         * kern/i386/pc/init.c: Include grub/cache.h.
16509         (grub_machine_init): Remove call to grub_get_end_addr.  Remove
16510         one call to add_mem_region.
16511         (grub_arch_modules_addr): New function.
16512         * kern/powerpc/ieee1275/init.c (grub_end_addr): Remove variable.
16513         (grub_total_module_size): Likewise.
16514         Include grub/machine/kernel.h.
16515         (grub_arch_modules_addr): New function.
16516         * util/grub-emu.c (grub_end_addr): Remove variable.
16517         (grub_total_module_size): Likewise.
16518         (grub_arch_modules_addr): New function.
16519         * util/misc.c: Include unistd.h.
16520         (grub_util_get_fp_size): New function.
16521         (grub_util_read_at): Likewise.
16522         (grub_util_write_image_at): Likewise.
16523         (grub_util_read_image): Call grub_util_read_at.
16524         (grub_util_write_image): Call grub_util_write_image_at.
16525         * util/i386/pc/grub-mkimage.c (generate_image): Allocate
16526         additional memory in kernel_img for a struct grub_module_info.
16527         Fill in that grub_module_info.
16528         * util/powerpc/ieee1275/grub-mkimage.c: New file.
16530 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16532         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_milliseconds):
16533         New function.
16534         * include/grub/powerpc/ieee1275/ieee1275.h
16535         (grub_ieee1275_milliseconds): New prototype.
16536         * include/grub/powerpc/ieee1275/time.h (GRUB_TICKS_PER_SECOND):
16537         Change to 1000.
16538         * kern/powerpc/ieee1275/init.c (grub_get_rtc): Call
16539         grub_ieee1275_milliseconds.
16541 2005-01-03  Hollis Blanchard  <hollis@penguinppc.org>
16543         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_realmode): New
16544         variable.
16545         (find_options): New function.
16546         (cmain): Call find_options.
16547         * include/grub/powerpc/ieee1275/ieee1275.h
16548         (grub_ieee1275_realmode): New extern variable.
16549         * kern/powerpc/ieee1275/openfw.c (grub_claimmap): Only call
16550         grub_map if grub_ieee1275_realmode is false.
16552 2004-12-29  Marco Gerards  <metgerards@student.han.nl>
16554         * normal/cmdline.c (grub_cmdline_get): Redone logic so no empty
16555         lines are inserted and make it work like readline.  Reported by
16556         Vincent Pelletier <subdino2004@yahoo.fr>.
16558 2004-12-28  Marco Gerards  <metgerards@student.han.nl>
16560         * boot/powerpc/ieee1275/crt0.S (_start): Don't set up the stack.
16562         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCE): Remove
16563         `kern/powerpc/cache.S'.
16565 2004-12-27  Marco Gerards  <metgerards@student.han.nl>
16567         * genmk.rb: Handle the `Program' class in the main loop.  Written
16568         by Johan Rydberg <jrydberg@gnu.org>.
16569         (Program): New class.
16570         (programs): New variable.
16571         * boot/powerpc/ieee1275/cmain.c: Include <grub/machine/ieee1275.h>
16572         instead of "grub/machine/ieee1275.h".  Include <grub/kernel.h>
16573         instead of "grub/kernel.h".  Include <grub/machine/init.h>.
16574         (help_arch): Function removed.
16575         * conf/powerpc-ieee1275.rmk (grubof_HEADERS): Add
16576         `powerpc/libgcc.h' and `loader.h'.
16577         (pkgdata_PROGRAMS): New variable.
16578         (sbin_UTILITIES): Variable removed.
16579         (grub_emu_SOURCES): Added kern/powerpc/cache.S.
16580         (grubof_SOURCES): Variable re-defined so it only includes the
16581         core functionality.
16582         (grubof_CFLAGS): Remove `-DGRUBOF'.
16583         (pkgdata_MODULES, fshelp_mod_SOURCES, fshelp_mod_CFLAGS,
16584         (fat_mod_SOURCES, fat_mod_CFLAGS, ext2_mod_SOURCES)
16585         (ext2_mod_CFLAGS, ufs_mod_SOURCES, ufs_mod_CFLAGS)
16586         (minix_mod_SOURCES, minix_mod_CFLAGS, hfs_mod_SOURCES)
16587         (hfs_mod_CFLAGS, jfs_mod_SOURCES, jfs_mod_CFLAGS)
16588         (iso9660_mod_SOURCES, iso9660_mod_CFLAGS, _linux_mod_SOURCES)
16589         (_linux_mod_CFLAGS, linux_mod_SOURCES, linux_mod_CFLAGS)
16590         (normal_mod_SOURCES, normal_mod_CFLAGS, normal_mod_ASFLAGS)
16591         (hello_mod_SOURCES, hello_mod_CFLAGS, boot_mod_SOURCES)
16592         (boot_mod_CFLAGS, terminal_mod_SOURCES, terminal_mod_CFLAGS)
16593         (ls_mod_SOURCES, ls_mod_CFLAGS, cmp_mod_SOURCES, cmp_mod_CFLAGS)
16594         (cat_mod_SOURCES, cat_mod_CFLAGS, font_mod_SOURCES)
16595         (font_mod_CFLAGS, amiga_mod_SOURCES, amiga_mod_CFLAGS)
16596         (apple_mod_SOURCES, apple_mod_CFLAGS, pc_mod_SOURCES)
16597         (pc_mod_CFLAGS): New variables.
16598         * disk/powerpc/ieee1275/ofdisk.c: Include <grub/machine/init.h>.
16599         (grub_ofdisk_iterate): Add a prototype for `dev_iterate'.
16600         * include/grub/dl.h (grub_arch_dl_sync_caches): New prototype.
16601         * include/grub/loader.h (grub_os_area_addr, grub_os_area_size):
16602         Moved from here...
16603         * include/grub/i386/pc/init.h (grub_os_area_addr)
16604         (rub_os_area_size): ... to here.
16605         * include/grub/powerpc/ieee1275/ieee1275.h
16606         (grub_ieee1275_entry_fn): Export symbol.
16607         * include/grub/powerpc/ieee1275/init.h: New file.
16608         * include/grub/powerpc/libgcc.h: Likewise.
16609         * include/grub/cache.h: Likewise.
16610         * kern/powerpc/cache.S: Likewise.  Written by Hollis Blanchard
16611         <hollis@penguinppc.org>.
16612         * kern/dl.c: Include <grub/cache.h>.
16613         (grub_dl_flush_cache): New function.
16614         (grub_dl_load_core): Call `grub_dl_flush_cache' to flush the cache
16615         for this module.
16616         * kern/powerpc/ieee1275/init.c (grub_ofdisk_init)
16617         (grub_console_init): Removed prototypes.
16618         (grub_machine_init): Don't initialize the modules anymore.
16619         * kern/powerpc/ieee1275/openfw.c (grub_map): Make the function
16620         static.
16621         * include/grub/powerpc/types.h (GRUB_HOST_WORDS_LITTLEENDIAN):
16622         Macro undef removed.
16623         (GRUB_HOST_WORDS_BIGENDIAN): New macro.
16624         * kern/powerpc/dl.c (grub_arch_dl_relocate_symbols): Add
16625         relocation `R_PPC_REL32'.  Return an error when the relocation is
16626         unknown.
16627         * Makefile.in (DATA): Add `$(pkgdata_PROGRAMS)'.
16628         * kern/i386/pc/init.c (grub_arch_sync_caches): New function.
16629         * util/misc.c (grub_arch_sync_caches): Likewise.
16631 2004-12-19  Marco Gerards  <metgerards@student.han.nl>
16633         * conf/powerpc-ieee1275.rmk (MOSTLYCLEANFILES): Remove
16634         `symlist.c', add `grubof_symlist.c'.
16635         (symlist.c): Variable removed.
16636         (grubof_HEADERS): Variable added.
16637         (grubof_symlist.c): New target.
16638         (kernel_syms.lst): Use `grubof_HEADERS' instead of
16639         `kernel_img_HEADERS'.
16640         (grubof_SOURCES): Add `kern/powerpc/dl.c' and `grubof_symlist.c'.
16641         * kern/powerpc/dl.c: New file.
16642         * kern/powerpc/ieee1275/init.c (grub_arch_dl_check_header):
16643         Function removed.
16644         (grub_arch_dl_relocate_symbols): Likewise.
16645         (grub_register_exported_symbols): Likewise.
16647 2004-12-13  Marco Gerards  <metgerards@student.han.nl>
16649         * fs/ext2.c (grub_ext2_open): Don't use data after freeing it.
16650         (grub_ext2_dir): Likewise.  Don't return in case of an error, jump
16651         to fail instead.  Reported by Vincent Pelletier
16652         <subdino2004@yahoo.fr>.
16654         * fs/fshelp.c (grub_fshelp_find_file): Don't free `oldnode' when
16655         it is not allocated.  Reported by Vincent Pelletier
16656         <subdino2004@yahoo.fr>.
16658         * normal/cmdline.c (grub_tab_complete): Add a blank line to the
16659         output so the output looks better.
16661 2004-12-04  Marco Gerards  <metgerards@student.han.nl>
16663         Modulize the partition map support and add support for the amiga
16664         partition map.
16666         * commands/ls.c: Include <grub/partition.h> instead of
16667         <grub/machine/partition.h>.
16668         * kern/disk.c: Likewise.
16669         * kern/rescue.c: Likewise.
16670         * loader/i386/pc/chainloader.c: Likewise.
16671         * normal/cmdline.c: Likewise.
16672         * kern/powerpc/ieee1275/init.c: Likewise.
16673         (grub_machine_init): Call `grub_pc_partition_map_init',
16674         `grub_amiga_partition_map_init' and
16675         `grub_apple_partition_map_init'.
16676         * conf/i386-pc.rmk (kernel_img_SOURCES): Remove
16677         `disk/i386/pc/partition.c'.  Add `kern/partition.c'.
16678         (kernel_img_HEADERS): Remove `machine/partition.h'.  Add
16679         `partition.h' and `pc_partition.h'.
16680         (grub_setup_SOURCES): Remove
16681         `disk/i386/pc/partition.c'.  Add `kern/partition.c',
16682         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16683         (grub_emu_SOURCES): Likewise.
16684         (pkgdata_MODULES): Add `amiga.mod', `apple.mod' and `pc.mod'.
16685         (amiga_mod_SOURCES, amiga_mod_CFLAGS, apple_mod_SOURCES)
16686         (apple_mod_CFLAGS, pc_mod_SOURCES, pc_mod_CFLAGS): New variables.
16687         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16688         `disk/powerpc/ieee1275/partition.c'.  Add `kern/partition.c',
16689         `partmap/amiga.c', `partmap/apple.c' and `partmap/pc.c'.
16690         (grubof_SOURCES): Likewise.
16691         * disk/i386/pc/partition.c: File removed.
16692         * disk/powerpc/ieee1275/partition.c: Likewise.
16693         * include/grub/powerpc/ieee1275/partition.h: Likewise.
16694         * include/grub/i386/pc/partition.h: Likewise.
16695         * kern/partition.c: New file.
16696         * partmap/amiga.c: Likewise.
16697         * partmap/apple.c: Likewise.
16698         * partmap/pc.c: Likewise.
16699         * include/grub/partition.h: Likewise..
16700         * include/grub/pc_partition.h: Likewise.
16701         * util/grub-emu.c: Include <grub/partition.h> instead of
16702         <grub/machine/partition.h>.
16703         (main): Call `grub_pc_partition_map_init',
16704         `grub_amiga_partition_map_init' and
16705         `grub_apple_partition_map_init' and deinitialize afterwards.
16706         * util/i386/pc/biosdisk.c: Include `#include
16707         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16708         `<grub/machine/partition.h>'.
16709         * util/i386/pc/grub-setup.c: Likewise.
16710         * util/i386/pc/biosdisk.c: Likewise.
16711         (grub_util_biosdisk_get_grub_dev): Only access the PC specific
16712         partition information in case of a PC partition.
16713         * util/i386/pc/grub-setup.c: Include `#include
16714         <grub/partition.h>' and `include <grub/pc_partition.h>' instead of
16715         `<grub/machine/partition.h>'.
16716         (setup): Only access the PC specific partition information in case
16717         of a PC partition.
16719 2004-11-17  Hollis Blanchard  <hollis@penguinppc.org>
16721         * kern/powerpc/ieee1275/init.c (grub_setjmp): Remove function.
16722         (grub_longjmp): Likewise.
16723         * include/grub/powerpc/setjmp.h (grub_jmp_buf): Set array size to
16724         20.
16725         * normal/powerpc/setjmp.S: New file.
16726         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
16727         `normal/powerpc/setjmp.S'.
16728         (grubof_CFLAGS): Add `-DGRUBOF'.
16729         * include/grub/setjmp.h [GRUB_UTIL]: Changed condition to
16730         [GRUB_UTIL && !GRUBOF].
16732 2004-11-16  Marco Gerards  <metgerards@student.han.nl>
16734         * kern/powerpc/ieee1275/openfw.c (grub_devalias_iterate): Skip any
16735         property named `name'.  Correctly handle the error returned by
16736         `grub_ieee1275_finddevice' if a device can not be opened.
16738 2004-11-02  Hollis Blanchard  <hollis@penguinppc.org>
16740         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_readkey): Test
16741         `actual' for negativity.
16742         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Remove
16743         kern/fshelp.c.
16745 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16747         * term/i386/pc/vga.c (VGA_HEIGHT): Changed to 350.
16748         (PAGE_OFFSET): New macro.
16749         (CRTC_ADDR_PORT): Likewise.
16750         (CRTC_DATA_PORT): Likewise.
16751         (START_ADDR_HIGH_REGISTER): Likewise.
16752         (START_ADDR_LOW_REGISTER): Likewise.
16753         (GRAPHICS_ADDR_PORT): Likewise.
16754         (GRAPHICS_DATA_PORT): Likewise.
16755         (READ_MAP_REGISTER): Likewise.
16756         (INPUT_STATUS1_REGISTER): Likewise.
16757         (INPUT_STATUS1_VERTR_BIT): Likewise.
16758         (page): New variable.
16759         (wait_vretrace): New function.
16760         (set_read_map): Likewise.
16761         (set_start_address): Likewise.
16762         (grub_vga_init): Use mode 0x10 instead of mode 0x12.  Switch to
16763         the right page.
16764         (check_vga_mem): Take the page into account.
16765         (write_char): Likewise.
16766         (write_cursor): Likewise.
16767         (scroll_up): Likewise.  Copy the page to the page that is not
16768         shown and switch between both pages.
16769         (grub_vga_putchar): Fix off by one error.
16770         (grub_vga_cls): Wait for the vertical retrace.  Take the page into
16771         account.
16773 2004-11-01  Marco Gerards  <metgerards@student.han.nl>
16775         Add support for iso9660 (including rockridge).
16777         * conf/i386-pc.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16778         (iso9660_mod_SOURCES): New variable.
16779         (iso9660_mod_CFLAGS): Likewise.
16780         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/iso9660.c.
16781         * include/grub/fs.h (grub_iso9660_init): New prototype.
16782         * util/grub-emu.c (main): Call `grub_iso9660_init'.
16783         * fs/iso9660.c: New file.
16785         * include/grub/misc.h (grub_strncat): New prototype.
16786         * kern/misc.c (grub_strncat): New function.
16788         * fs/hfs.c (grub_hfs_mount): Translate the error
16789         `GRUB_ERR_OUT_OF_RANGE' to `GRUB_ERR_BAD_FS'.
16790         * fs/jfs.c (grub_jfs_mount): Likewise.
16791         * fs/ufs.c (grub_ufs_mount): Likewise.
16793 2004-10-28  Hollis Blanchard  <hollis@penguinppc.org>
16795         * boot/powerpc/ieee1275/cmain.c (cmain): Remove asm statements
16796         which initialized BAT registers.
16797         * boot/powerpc/ieee1275/ieee1275.c (IEEE1275_CALL_ENTRY_FN,
16798         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16799         Move from here...
16800         * include/grub/powerpc/ieee1275/ieee1275.h (IEEE1275_CALL_ENTRY_FN,
16801         grub_ieee1275_common_hdr, INIT_IEEE1275_COMMON):
16802         ... to here.
16803         * kern/powerpc/ieee1275/openfw.c (grub_map): New function.
16804         (grub_mapclaim): Likewise.
16805         * loader/powerpc/ieee1275/linux.c (grub_load_linux): Use
16806         grub_mapclaim instead of grub_ieee1275_claim.  Assign linux_addr by
16807         hand.
16809 2004-10-19  Hollis Blanchard  <hollis@penguinppc.org>
16811         * conf/powerpc-ieee1275.rmk (COMMON_ASFLAGS): Remove -fno-builtin.
16812         (COMMON_CFLAGS): Remove -fno-builtin and -D__ASSEMBLY__. Add
16813         -ffreestanding and -msoft-float.
16815 2004-10-15  Hollis Blanchard  <hollis@penguinppc.org>
16817         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_open): Do not
16818         append ":0" to devpath if the GRUB_IEEE1275_NO_PARTITION_0 flag is
16819         set in grub_ieee1275_flags.
16821 2004-10-14  Hollis Blanchard  <hollis@penguinppc.org>
16823         * include/grub/powerpc/ieee1275/ieee1275.h (abort): Add function
16824         prototype.
16825         * kern/powerpc/ieee1275/init.c (grub_machine_init): Call
16826         grub_console_init first.
16827         Change the memory range used for grub_ieee1275_claim and
16828         grub_mm_init_region.
16829         Print an error message if the claim fails.
16830         Include <grub/misc.h>.
16832 2004-10-13  Hollis Blanchard  <hollis@penguinppc.org>
16834         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_iterate):
16835         Call grub_children_iterate for device nodes of type `scsi',
16836         `ide', or `ata'.
16837         (grub_ofdisk_open): Remove manual device alias resolution.
16838         Fix memory leak when device cannot be opened.
16839         * include/grub/powerpc/ieee1275/ieee1275.h
16840         (grub_children_iterate): New prototype.
16841         * kern/powerpc/ieee1275/openfw.c (grub_children_iterate):
16842         New function.
16843         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16844         Return -1 if args.size was -1.
16846 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16848         * boot/powerpc/ieee1275/cmain.c (grub_ieee1275_flags): New global.
16849         (cmain): Accept 3 parameters. Test for 0xdeadbeef, indicating Old
16850         World Macintosh. If Old Wold, set flag in grub_ieee1275_flags; claim
16851         Open Firmware's memory for it; claim memory from _start to _end.
16852         * boot/powerpc/ieee1275/crt0.S (__bss_start): New extern.
16853         (_end): New extern.
16854         (_start): Zero BSS from __bss_start to _end.
16855         * include/grub/powerpc/ieee1275/ieee1275.h (grub_ieee1275_flags):
16856         New extern.
16857         (GRUB_IEEE1275_NO_PARTITION_0): New #define.
16859 2004-10-11  Hollis Blanchard  <hollis@penguinppc.org>
16861         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): Return
16862         -1 if args.base was -1.
16864 2004-10-08  Hollis Blanchard  <hollis@penguinppc.org>
16866         * term/powerpc/ieee1275/ieee1275.c (grub_ofconsole_cls): Use an ANSI
16867         escape sequence instead of a literal ^L. Also call
16868         grub_ofconsole_gotoxy.
16870 2004-10-03  Hollis Blanchard  <hollis@penguinppc.org>
16872         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_claim): change
16873         void *  arguments to grub_addr_t.  All callers updated.  Also make
16874         the `result' argument optional.
16875         (grub_ieee1275_release): change void * arguments to grub_addr_t.
16876         All callers updated.
16878 2004-09-22  Hollis Blanchard  <hollis@penguinppc.org>
16880         * commands/ls.c (grub_ls_list_files): Use the string following the
16881         initial ')', if present, as the filesystem path.
16882         * kern/rescue.c (grub_rescue_cmd_ls): Likewise.
16884         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): List crt0.S first.
16886 2004-09-18  Yoshinori K. Okuji  <okuji@enbug.org>
16888         Make the source code of the menu interface more readable.
16890         * normal/menu.c: Include grub/mm.h.
16891         (TERM_WIDTH): New macro.
16892         (TERM_HEIGHT): Likewise.
16893         (TERM_INFO_HEIGHT): Likewise.
16894         (TERM_MARGIN): Likewise.
16895         (TERM_SCROLL_WIDTH): Likewise.
16896         (TERM_TOP_BORDER_Y): Likewise.
16897         (TERM_LEFT_BORDER_X): Likewise.
16898         (TERM_BORDER_WIDTH): Likewise.
16899         (TERM_MESSAGE_HEIGHT): Likewise.
16900         (TERM_BORDER_HEIGHT): Likewise.
16901         (TERM_NUM_ENTRIES): Likewise.
16902         (TERM_FIRST_ENTRY_Y): Likewise.
16903         (TERM_ENTRY_WIDTH): Likewise.
16904         (TERM_CURSOR_X): Likewise.
16905         (draw_border): Use macros instead of magic numbers.
16906         (print_entry): Likewise.
16907         (print_entries): Likewise.
16908         (run_menu): Likewise. Also, handle the key 'e'.
16909         (run_menu_entry): Ignore empty command lines.
16910         (print_message): Added a new argument EDIT. If EDIT is true,
16911         print a different message.
16912         (init_page): Likewise.
16913         (edit_menu_entry): New function. Not implemented yet.
16915 2004-09-17  Marco Gerards  <metgerards@student.han.nl>
16917         Add `linux.mod' and `multiboot.mod' so linux and multiboot kernels
16918         can be loaded from normal mode.
16920         * conf/i386-pc.rmk (pkgdata_MODULES): Add `linux.mod' and
16921         `multiboot.mod'.
16922         (linux_mod_SOURCES, linux_mod_CFLAGS, multiboot_mod_SOURCES)
16923         (multiboot_mod_CFLAGS): New variables.
16924         * loader/i386/pc/linux_normal.c: New file.
16925         * loader/i386/pc/multiboot_normal.c: Likewise.
16927         * loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Don't use the
16928         attribute `unused'.
16930         * fs/ext2.c (grub_ext2_iterate_dir): Fix typos in inode type.  Use
16931         `fdiro' to read the mode information from instead of `diro'.
16933         * fs/fshelp.c (grub_fshelp_find_file): Set type to foundtype after
16934         looking up a symlink.
16936         * include/grub/normal.h (GRUB_COMMAND_FLAG_NO_ARG_PARSE): New
16937         macro.
16938         * normal/command.c (grub_command_execute): Don't parse the
16939         arguments when `GRUB_COMMAND_FLAG_NO_ARG_PARSE' is set in the
16940         flags of the command.
16942         * normal/menu.c (grub_menu_run): Fix typo.
16944 2004-09-14  Hollis Blanchard  <hollis@penguinppc.org>
16946         * kern/powerpc/ieee1275/init.c (abort): Trap into Open Firmware.
16948         * term/powerpc/ieee1275/ofconsole.c (grub_ofconsole_gotoxy): Use
16949         `y + 1' instead of `y - 1'.
16951         * conf/powerpc-ieee1275.rmk (grubof_LDFLAGS): Add `-N' and `-S'.
16953 2004-09-14  Yoshinori K. Okuji  <okuji@enbug.org>
16955         From Hollis Blanchard <hollis@penguinppc.org>:
16956         * kern/misc.c (memmove): New alias for grub_memmove.
16957         (memcmp): New alias for grub_memcmp.
16958         (memset): New alias for grub_memset.
16959         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_get_property):
16960         Change "int handle" to "grub_ieee1275_phandle_t handle".
16961         * include/grub/powerpc/ieee1275/ieee1275.h
16962         (grub_ieee1275_get_property): Likewise.
16964 2004-09-12  Tomas Ebenlendr  <ebik@ucw.cz>
16966         Added normal mode command `chainloader' as module chain.mod, which
16967         depends on normal.mod and _chain.mod.
16969         * conf/i386-pc.rmk (pkgdata_MODULES): Add `chain.mod'.
16970         (chain_mod_SOURCES, chain_mod_CFLAGS): Variables added.
16971         * include/grub/i386/pc/loader.h (grub_rescue_cmd_chainloader):
16972         Deleted prototype.
16973         * loader/i386/pc/chainloader.c (grub_rescue_cmd_chainloader): All
16974         but arguments parsing moved to ...
16975         (grub_chainloader_cmd): ... here.  New function.
16976         * include/grub/i386/pc/chainloader.h: New file.
16977         * loader/i386/pc/chainloader_normal.c: Likewise.
16979 2004-09-11  Marco Gerards  <metgerards@student.han.nl>
16981         * conf/i386-pc.rmk (kernel_img_SOURCES): Added kern/fshelp.c.
16982         (grub_mkimage_LDFLAGS): Likewise.
16983         (grub_emu_SOURCES): Likewise.
16984         (kernel_img_HEADERS): Added fshelp.h.
16985         * fs/ext2.c: Include <grub/fshelp.h>.
16986         (FILETYPE_REG): New macro.
16987         (FILETYPE_INO_REG): Likewise.
16988         (grub_ext_sblock): Renamed to `grub_ext2_sblock'.
16989         Changed all users.
16990         (ext2_block_group): Renamed to `grub_ext2_block_group'.  Changed
16991         all users.
16992         (grub_fshelp_node): New struct.
16993         (grub_ext2_data): Added member `diropen'.  Changed member `inode'
16994         to a pointer.
16995         (grub_ext2_get_file_block): Removed function.
16996         (grub_ext2_read_block): New function.
16997         (grub_ext2_read_file): Replaced parameter `data' by `node'.
16998         This function was written.
16999         (grub_ext2_mount): Read the root inode.  Create a diropen struct.
17000         (grub_ext2_find_file): Removed function.
17001         (grub_ext2_read_symlink): New function.
17002         (grub_ext2_iterate_dir): Likewise.
17003         (grub_ext2_open): Rewritten.
17004         (grub_ext2_dir): Rewritten.
17005         * include/grub/fshelp.h: New file.
17006         * fs/fshelp.c: Likewise.
17008 2004-09-10  Yoshinori K. Okuji  <okuji@enbug.org>
17010         * normal/menu.c: Include grub/loader.h and grub/machine/time.h.
17011         (print_message): Add a missing newline.
17012         (run_menu): Added timeout support.
17013         (run_menu_entry): New local function.
17014         (grub_menu_run): Added support for booting.
17016         * kern/loader.c (grub_loader_is_loaded): New function.
17018         * include/grub/powerpc/ieee1275/time.h: Include grub/symbol.h.
17019         (grub_get_rtc): Exported.
17021         * include/grub/i386/pc/time.h: Include grub/symbol.h.
17022         (grub_get_rtc): Exported.
17024         * include/grub/normal.h (struct grub_command_list): Remove
17025         constant from the member `command'.
17027         * include/grub/loader.h (grub_loader_is_loaded): Declared.
17029         * include/grub/err.h (GRUB_ERR_INVALID_COMMAND): New constant.
17031         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/time.h.
17033 2004-08-28  Marco Gerards  <metgerards@student.han.nl>
17035         Add support for the JFS filesystem.
17037         * fs/jfs.c: New file.
17038         * include/grub/fs.h (grub_jfs_init): New prototype.
17039         (grub_jfs_fini): New prototype.
17040         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/jfs.c.
17041         (grub_emu_SOURCES): Likewise.
17042         (pkgdata_MODULES): Add jfs.mod.
17043         (jfs_mod_SOURCES): New variable.
17044         (jfs_mod_CFLAGS): Likewise.
17045         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs.jfs.c.
17046         (grubof_SOURCES): Likewise.
17047         * util/grub-emu.c (main): Initialize and deinitialize JFS support.
17049         * fs/fat.c (grub_fat_find_dir): Convert the filename little
17050         endian to the host endian.
17051         (grub_fat_utf16_to_utf8): Move function from there...
17052         * kern/misc.c (grub_utf16_to_utf8): ...to here.  Do not convert
17053         the endianness of the source string anymore.
17054         * include/grub/misc.h (grub_utf16_to_utf8): New prototype.
17056 2004-08-24  Marco Gerards  <metgerards@student.han.nl>
17058         * commands/boot.c (grub_boot_init) [GRUB_UTIL]: Make conditional.
17059         (grub_boot_fini) [GRUB_UTIL]: Likewise.
17060         (GRUB_MOD_INIT) [!GRUB_UTIL]: Likewise.
17061         (GRUB_MOD_FINI) [!GRUB_UTIL]: Likewise.
17063         * fs/hfs.c (grub_hfs_find_node): Add a prototype for `node_found'.
17064         (grub_hfs_iterate_dir): Make the function static.  Add prototypes
17065         for `node_found' and `it_dir'.
17066         (grub_hfs_dir): Add prototype for `dir_hook'.
17068         * fs/minix.c (grub_minix_get_file_block): Add prototype for
17069         `grub_get_indir'.  Rename `indir' in two blocks to `indir16'
17070         and `indir32' to silence a gcc warning.
17072         * include/grub/fs.h (grub_hfs_init): New prototype.
17073         (grub_hfs_fini): Likewise.
17076 2004-08-21  Yoshinori K. Okuji  <okuji@enbug.org>
17078         Each disk device has its own id now. This is useful to make use
17079         of multiple disk devices.
17081         * include/grub/disk.h (grub_disk_dev_id): New enum.
17082         (GRUB_DISK_DEVICE_BIOSDISK_ID): New constant.
17083         (GRUB_DISK_DEVICE_OFDISK_ID): Likewise.
17085         * disk/i386/pc/biosdisk.c (grub_biosdisk_dev): Specify
17086         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17088         * disk/powerpc/ieee1275/ofdisk.c (grub_ofdisk_dev): Specify
17089         GRUB_DISK_DEVICE_OFDISK_ID as an id.
17091         * util/i386/pc/biosdisk.c (grub_util_biosdisk_dev): Specify
17092         GRUB_DISK_DEVICE_BIOSDISK_ID as an id.
17094         * include/grub/disk.h (struct grub_disk_dev): Added a new member
17095         "id" which is used by the cache manager.
17097         * normal/main.c (grub_normal_init_page): Use "GNU GRUB" instead
17098         of just "GRUB".
17100 2004-08-18  Marco Gerards  <metgerards@student.han.nl>
17102         * fs/hfs.c: New file.
17103         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/hfs.c.
17104         (grub_emu_SOURCES): Likewise.
17105         (pkgdata_MODULES): Add hfs.mod.
17106         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/hfs.c.
17107         (grubof_SOURCES): Likewise.
17108         * util/grub-emu.c (main): Initialize and deinitialize HFS support.
17110         * include/grub/misc.h (grub_strncasecmp): Add prototype.
17111         * kern/misc.c (grub_strncasecmp): Add function.
17113 2004-08-14  Marco Gerards  <metgerards@student.han.nl>
17115         * include/grub/arg.h (GRUB_ARG_OPTION_OPTIONAL): Surround macro
17116         with parentheses.
17118         * fs/ext2.c (FILETYPE_UNKNOWN): New macro.
17119         (grub_ext2_dir): In case the directory entry type is unknown, read
17120         it from the inode.
17122 2004-08-02  Peter Bruin  <pjbruin@dds.nl>
17124         * loader/powerpc/ieee1275/linux.c (grub_linux_init): Pass
17125         grub_load_linux instead of grub_rescue_cmd_linux as second
17126         argument of grub_rescue_register_command.
17128         * Makefile.in (RMKFILES): Add conf/powerpc-ieee1275.rmk.
17130 2004-07-27  Marco Gerards  <metgerards@student.han.nl>
17132         * boot/powerpc/ieee1275/ieee1275.c (grub_ieee1275_release): New
17133         function.
17134         * commands/boot.c: Remove the check for `GRUB_UTIL'.
17135         * conf/powerpc-ieee1275.rmk (grubof_SOURCES): Add
17136         `loader/powerpc/ieee1275/linux.c',
17137         `loader/powerpc/ieee1275/linux_normal.c' and `commands/boot.c'.
17138         * include/grub/powerpc/ieee1275/ieee1275.h
17139         (grub_ieee1275_release): New prototype.
17140         * include/grub/powerpc/ieee1275/loader.h: Rewritten.
17141         * kern/powerpc/ieee1275/init.c (grub_machine_init): Initialize
17142         normal, boot, linux and linux_normal.
17143         * loader/powerpc/ieee1275/linux.c: New file.
17144         * loader/powerpc/ieee1275/linux_normal.c: Likewise.
17146 2004-07-12  Marco Gerards  <metgerards@student.han.nl>
17148         * normal/arg.c (grub_arg_parse): Correct error handling after
17149         reallocating the argumentlist (check if `argl' is not null instead
17150         of checking if `args' is not null).
17151         * kern/mm.c (grub_realloc): Return the same pointer when using the
17152         same region, instead of returning the header address.
17154 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17156         * disk/powerpc/ieee1275/partition.c (grub_partition_iterate): Skip
17157         one block instead of two when looking for the initial partition.
17158         (grub_partition_probe): Initialize the local variable `p' with 0.
17159         Use base 10 for the grub_strtoul call.
17160         * kern/misc.c (grub_strncpy): Fix off by one bug.  Eliminated the
17161         need for one local variable.
17162         (grub_strtoul): Don't add the new value to `num', instead of that
17163         just assign it.
17165 2004-07-11  Marco Gerards  <metgerards@student.han.nl>
17167         * conf/i386-pc.rmk (pkgdata_IMAGE): Add pxeboot.img.
17168         (pxeboot_img_SOURCES): New variable.
17169         (pxeboot_img_ASFLAGS): Likewise.
17170         (pxeboot_img_LDFLAGS): Likewise.
17171         * boot/i386/pc/pxeboot.S: New file.  Based on pxeloader.S from
17172         GRUB Legacy and boot.S.  Adopted for GRUB 2 by lode leroy
17173         <lode_leroy@hotmail.com>.
17175 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17177         * kern/rescue.c (grub_enter_rescue_mode): Don't continue when
17178         there was no input.
17180 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17182         * normal/cmdline.c (grub_set_history): Fix off by one bug.  Fixed
17183         the history buffer logic.
17185 2004-06-27  Tomas Ebenlendr  <ebik@ucw.cz>
17187         * fs/ext2.c (FILETYPE_INO_MASK, FILETYPE_INO_DIRECTORY)
17188         (FILETYPE_INO_SYMLINK): New macros.
17189         (grub_ext2_find_file): Check if the node is a directory using the
17190         inode stat information instead of using the filetype in the
17191         dirent.  Exclude the first character of an absolute symlink.
17192         (grub_ext2_dir): Mask out the filetype part of the mode member of
17193         the inode.
17195 2004-05-24  Marco Gerards  <metgerards@student.han.nl>
17197         Add support for UFS version 1 and 2.  Add support for the minix
17198         filesystem version 1 and 2, both the variants with 14 and 30 long
17199         filenames.
17201         * conf/i386-pc.rmk (grub_setup_SOURCES): Add fs/ufs.c and
17202         fs/minix.c.
17203         (grub_emu_SOURCES): Likewise.
17204         (pkgdata_MODULES): Add ufs.mod and minix.mod.
17205         (ufs_mod_SOURCES): New variable.
17206         (ufs_mod_CFLAGS): Likewise.
17207         (minix_mod_SOURCES): Likewise.
17208         (minix_mod_CFLAGS): Likewise.
17209         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add fs/ufs.c and
17210         fs/minix.c.
17211         (grubof_SOURCES): Likewise.
17212         * fs/ufs.c: New file.
17213         * fs/minix.c: New file.
17214         * include/grub/fs.h (grub_ufs_init): New prototype.
17215         (grub_ufs_fini): Likewise.
17216         (grub_minix_init): Likewise.
17217         (grub_minix_fini): Likewise.
17218         * util/grub-emu.c (main): Initialize and deinitialize UFS and
17219         minix fs.
17221 2004-04-30  Jeroen Dekkers  <jeroen@dekkers.cx>
17223         * conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Add normal/arg.c,
17224         commands/ls.c, commands/terminal.c, commands/boot.c,
17225         commands/cmp.c and commands/cat.c.
17226         (grubof_LDFLAGS): Add -nostdlib -static-libgcc -lgcc.
17228         * kern/powerpc/ieee1275/init.c: Include "grub/env.h" instead of
17229         "env.h"
17231 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17233         All symbols prefixed with PUPA_ and pupa_ are renamed to GRUB_
17234         and grub_, respectively. Because the conversion is trivial and
17235         mechanical, I omit the details here. Please refer to the CVS
17236         if you need more information.
17238 2004-04-04  Yoshinori K. Okuji  <okuji@enbug.org>
17240         * include/pupa: Renamed to ...
17241         * include/grub: ... this.
17242         * util/i386/pc/pupa-mkimage.c: Renamed to ...
17243         * util/i386/pc/grub-mkimage.c: ... this.
17244         * util/i386/pc/pupa-setup.c: Renamed to ...
17245         * util/i386/pc/grub-setup.c: ... this.
17246         * util/pupa-emu.c: Renamed to ...
17247         * util/grub-emu.c: ... this.
17249 2004-03-29  Marco Gerards  <metgerards@student.han.nl>
17251         Add support for the newworld apple macintosh (PPC).  This has been
17252         tested on the powerbook 2000 only.  It only adds support for
17253         generic ieee1275 functions, console and disk support.  This should
17254         be easy to port to other architectures with support for Open
17255         Firmware.
17257         * configure.ac: Accept the powerpc as host_cpu.  In the case of
17258         the powerpc cpu set the host_vendor to ieee1275.  Make sure the i386
17259         specific tests are only executed while building for the i386.
17260         Inverse test for crosscompile.
17261         * genmk.rb (Utility): Allow assembler files.
17262         * normal/cmdline.c (pupa_tab_complete): Reset pupa_errno.
17263         * conf/powerpc-ieee1275.rmk: New file.
17264         * disk/powerpc/ieee1275/ofdisk.c: Likewise.
17265         * disk/powerpc/ieee1275/partition.c: Likewise.
17266         * include/pupa/powerpc/ieee1275/biosdisk.h: Likewise.
17267         * include/pupa/powerpc/ieee1275/console.h: Likewise.
17268         * include/pupa/powerpc/ieee1275/partition.h: Likewise.
17269         * include/pupa/powerpc/ieee1275/time.h: Likewise.
17270         * include/pupa/powerpc/ieee1275/util/biosdisk.h: Likewise.
17271         * include/pupa/powerpc/ieee1275/multiboot.h: Likewise.
17272         * include/pupa/powerpc/ieee1275/loader.h
17273         * include/pupa/powerpc/setjmp.h: Likewise.
17274         * include/pupa/powerpc/types.h: Likewise.
17275         * kern/powerpc/ieee1275/init.c: Likewise.
17276         * kern/powerpc/ieee1275/openfw.c: Likewise.
17277         * term/powerpc/ieee1275/ofconsole.c: Likewise.
17279         These files were written by Johan Rydberg
17280         (jrydberg@night.trouble.net) and I only modified them slightly.
17282         * boot/powerpc/ieee1275/cmain.c: New file.
17283         * boot/powerpc/ieee1275/crt0.S: Likewise.
17284         * boot/powerpc/ieee1275/ieee1275.c: Likewise.
17285         * include/pupa/powerpc/ieee1275/ieee1275.h: Likewise.
17287 2004-03-14  Jeroen Dekkers  <jeroen@dekkers.cx>
17289         * Makefile.in: Update copyright.
17290         * genmodsrc.sh: Likewise.
17291         * gensymlist.sh: Likewise.
17292         * term/i386/pc/vga.c: Indent correctly.
17294         * util/i386/pc/pupa-mkimage.c (usage): Use PACKAGE_BUGREPORT as
17295         bugreporting address.
17296         * util/i386/pc/pupa-setup.c (usage): Likewise,
17297         (main): Call pupa_ext2_init and pupa_ext2_fini.
17299         * fs/fat.c (log2): Renamed to ...
17300         (fat_log2): ... this.
17301         All callers changed.
17302         * kern/misc.c (memcpy): Alias to pupa_memmove.
17303         * loader/i386/pc/multiboot.c (pupa_rescue_cmd_multiboot): Fix
17304         lvalue cast.
17305         * util/console.c (pupa_ncurses_fini): Return 0.
17307         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open)[__linux__]:
17308         Move fail label here.
17309         [__GNU__]: Don't warn when using stat.
17310         (open_device)[!__linux__]: Check if FD < 0 instead of !FD.
17311         (pupa_util_biosdisk_get_pupa_dev)[__GNU__]: Change type of N to
17312         long int. Use strtol instead of strtoul.
17314 2004-03-14  Marco Gerards  <metgerards@student.han.nl>
17316         * commands/boot.c: New file.
17317         * commands/cat.c: Likewise.
17318         * commands/cmp.c: Likewise.
17319         * commands/ls.c: Likewise.
17320         * commands/terminal.c: Likewise.
17321         * normal/command.c: Include <pupa/env.h> and <pupa/dl.h>.
17322         (pupa_register_command): Changed interface to match the new
17323         argument parser.
17324         (pupa_command_execute): Changed (almost rewritten) so it uses
17325         pupa_split_command.  Added support for setting variables using the
17326         syntax `foo=bar'.
17327         (rescue_command): Changed to work with the new argument parser.
17328         (terminal_command): Moved from here to commands/terminal.c.
17329         (set_command): New function.
17330         (unset_command): New function.
17331         (insmod_command): New function.
17332         (rmmod_command): New function.
17333         (lsmod_command): New function.
17334         (pupa_command_init): Don't initialize the command terminal
17335         anymore.  Initialize the commands set, unset, insmod, rmmod and
17336         lsmod.
17337         * conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/env.c.
17338         (kernel_img_HEADERS): Add arg.h and env.h.
17339         (pupa_mkimage_LDFLAGS): Add kern/env.c.
17340         (pupa_emu_SOURCES): Add kern/env.c, commands/ls.c,
17341         commands/terminal.c commands/boot.c commands/cmp.c commands/cat.c,
17342         normal/arg.c.
17343         (pkgdata_MODULES): Add ls.mod, boot.mod, cmp.mod, cat.mod and
17344         terminal.mod.
17345         (normal_mod_SOURCES): Add normal/arg.c and normal/arg.c.
17346         (boot_mod_SOURCES): New variable.
17347         (terminal_mod_SOURCES): Likewise.
17348         (ls_mod_SOURCES): Likewise.
17349         (cmp_mod_SOURCES): Likewise.
17350         (cat_mod_SOURCES): Likewise.
17352         * normal/arg.c: New file.
17353         * kern/env.c: Likewise.
17354         * include/pupa/arg.h: Likewise.
17355         * include/pupa/env.h: Likewise.
17356         * font/manager.c (font_command): Changed to match argument parsing
17357         interface changes.
17358         (PUPA_MOD_INIT): Likewise.
17359         * hello/hello.c (pupa_cmd_hello): Likewise.
17360         (PUPA_MOD_INIT): Likewise.
17361         * include/pupa/disk.h: Include <pupa/device.h>.
17362         (pupa_print_partinfo): New prototype.
17363         * include/pupa/dl.h (pupa_dl_set_prefix): Prototype removed.
17364         (pupa_dl_get_prefix): Likewise.
17365         * include/pupa/misc.h: Include <pupa/err.h>.
17366         (pupa_isgraph): New prototype.
17367         (pupa_isdigit): Likewise.
17368         (pupa_split_cmdline): Likewise.
17369         * include/pupa/normal.h: Include <pupa/arg.h>.
17370         (pupa_command): Changed the prototype of the member `func' to
17371         match the argument parsing interface.  Added member `options'.
17372         (pupa_register_command): Updated to match function.
17373         (pupa_arg_parse): New prototype.
17374         (pupa_hello_init) [PUPA_UTIL]: New prototype.
17375         (pupa_hello_fini) [PUPA_UTIL]: Likewise.
17376         (pupa_ls_init) [PUPA_UTIL]: Likewise.
17377         (pupa_ls_fini) [PUPA_UTIL]: Likewise.
17378         (pupa_cat_init) [PUPA_UTIL]: Likewise.
17379         (pupa_cat_fini) [PUPA_UTIL]: Likewise.
17380         (pupa_boot_init) [PUPA_UTIL]: Likewise.
17381         (pupa_boot_fini) [PUPA_UTIL]: Likewise.
17382         (pupa_cmp_init) [PUPA_UTIL]: Likewise.
17383         (pupa_cmp_fini) [PUPA_UTIL]: Likewise.
17384         (pupa_terminal_init) [PUPA_UTIL]: Likewise.
17385         (pupa_terminal_fini) [PUPA_UTIL]: Likewise.
17386         * kern/disk.c: Include <pupa/file.h>.
17387         (pupa_print_partinfo): New function.
17388         * kern/dl.c: Include <pupa/env.h>.
17389         (pupa_dl_dir): Variable removed.
17390         (pupa_dl_load): Use the environment variable `prefix' instead of
17391         the variable pupa_dl_dir.
17392         (pupa_dl_set_prefix): Function removed.
17393         (pupa_dl_get_prefix): Likewise.
17394         * kern/i386/pc/init.c: Include <pupa/env.h>.
17395         (pupa_machine_init): Use the environment variable `prefix' instead of
17396         using pupa_dl_set_prefix to set the prefix.
17397         * kern/main.c: Include <pupa/env.h>.
17398         (pupa_set_root_dev): Use the environment variable `prefix' instead of
17399         using pupa_dl_get_prefix to get the prefix.
17400         * kern/misc.c: Include <pupa/env.h>.
17401         (pupa_isdigit): New function.
17402         (pupa_isgraph): Likewise.
17403         (pupa_ftoa): Likewise.
17404         (pupa_vsprintf): Added support for printing values of the type
17405         `double'.  Make it possible to format variable output when using
17406         formatting like `%1.2%f'.
17407         (pupa_split_cmdline): New function.
17408         * kern/rescue.c: Include <pupa/env.h>.
17409         (next_word): Removed function.
17410         (pupa_rescue_cmd_prefix): Likewise.
17411         (pupa_rescue_cmd_set): New function.
17412         (pupa_rescue_cmd_unset): New function.
17413         (pupa_enter_rescue_mode): Use the `pupa_split_cmdline' function to
17414         split the command line instead of splitting it here.  Added
17415         support for setting variables using the syntax `foo=bar'.  Don't
17416         initialize the prefix command anymore.  Initialized the set and
17417         unset commands.
17418         * normal/cmdline.c: Include <pupa/env.h>.
17419         (pupa_tab_complete): Added prototypes for print_simple_completion,
17420         print_partition_completion, add_completion, iterate_commands,
17421         iterate_dev, iterate_part and iterate_dir. Moved code to print
17422         partition information from here to kern/disk.c.
17423         (pupa_cmdline_run): Don't check if the function exists anymore.
17424         * normal/main.c: Include <pupa/env.h>.
17425         (pupa_rescue_cmd_normal): Use the environment variable `prefix'
17426         instead of using pupa_dl_get_prefix to get the prefix.
17427         * term/i386/pc/vga.c: Include <pupa/arg.h>.
17428         (check_vga_mem): Cast pointers to `void *' to silence a gcc
17429         warning.
17430         (pupa_vga_putchar) [! DEBUG_VGA]: Removed for this case.
17431         (pupa_vga_setcolor): Declare unused variables with `__attribute__
17432         ((unused))' to silence a gcc warning.
17433         (pupa_vga_setcolor): Likewise.
17434         (debug_command): Changed to match argument parsing
17435         interface changes.
17436         * util/pupa-emu.c: Include <pupa/env.h>.
17437         (options): Added 0's for unused fields to silence a gcc warning.
17438         (argp): Likewise.
17439         (main): Use the environment variable `prefix' instead of using
17440         pupa_dl_set_prefix to set the prefix.  Initialize the commands ls,
17441         boot, cmp, cat and terminal.  Finish the commands boot, cmp, cat
17442         and terminal.
17444         * util/i386/pc/getroot.c: Include <pupa/i386/pc/util/biosdisk.h>.
17445         * util/misc.c: Include <malloc.h>.
17446         (pupa_malloc): Rewritten so errors are correctly reported.
17447         (pupa_realloc): Likewise.
17448         (pupa_memalign): Likewise.
17449         (pupa_mm_init_region): Declare unused variables with
17450         `__attribute__ ((unused))' to silence a gcc warning.
17451         * normal/i386/setjmp.S: Remove tab at the end of the file to
17452         silence a gcc warning.
17453         * loader/i386/pc/linux.c (pupa_rescue_cmd_initrd): Declare unused
17454         variables with `__attribute__ ((unused))' to silence a gcc
17455         warning.
17456         * loader/i386/pc/multiboot.c (pupa_multiboot_unload): Make the
17457         local variable i unsigned to silence a gcc warning.
17459         * kern/term.c: Include <pupa/misc.h>.
17460         (pupa_more_lines): New variable.
17461         (pupa_more): Likewise.
17462         (pupa_putcode): When the pager is active pause at the end of every
17463         screen.
17464         (pupa_set_more): New function.
17465         * include/pupa/term.h (pupa_set_more): New prototype.
17468 2004-03-07  Yoshinori K. Okuji  <okuji@enbug.org>
17470         Now this project is GRUB 2 rather than PUPA. The location of
17471         the CVS repository was moved to GRUB's.
17473         * configure.ac: Use bug-grub as the reporting address.
17474         Use GRUB instead of PUPA.
17475         Change the version number to 1.90.
17477 2004-02-24  Yoshinori K. Okuji  <okuji@enbug.org>
17479         * genkernsyms.sh: Updated copyright information.
17480         * genmk.rb: Likewise.
17481         * genmodsrc.sh: Likewise.
17482         * gensymlist.sh: Likewise.
17483         * boot/i386/pc/boot.S: Likewise.
17484         * boot/i386/pc/diskboot.S: Likewise.
17485         * disk/i386/pc/biosdisk.c: Likewise.
17486         * disk/i386/pc/partition.c: Likewise.
17487         * font/manager.c: Likewise.
17488         * fs/ext2.c: Likewise.
17489         * fs/fat.c: Likewise.
17490         * include/pupa/boot.h: Likewise.
17491         * include/pupa/device.h: Likewise.
17492         * include/pupa/disk.h: Likewise.
17493         * include/pupa/dl.h: Likewise.
17494         * include/pupa/elf.h: Likewise.
17495         * include/pupa/err.h: Likewise.
17496         * include/pupa/file.h: Likewise.
17497         * include/pupa/font.h: Likewise.
17498         * include/pupa/fs.h: Likewise.
17499         * include/pupa/kernel.h: Likewise.
17500         * include/pupa/loader.h: Likewise.
17501         * include/pupa/misc.h: Likewise.
17502         * include/pupa/mm.h: Likewise.
17503         * include/pupa/net.h: Likewise.
17504         * include/pupa/normal.h: Likewise.
17505         * include/pupa/rescue.h: Likewise.
17506         * include/pupa/setjmp.h: Likewise.
17507         * include/pupa/symbol.h: Likewise.
17508         * include/pupa/term.h: Likewise.
17509         * include/pupa/types.h: Likewise.
17510         * include/pupa/i386/setjmp.h: Likewise.
17511         * include/pupa/i386/types.h: Likewise.
17512         * include/pupa/i386/pc/biosdisk.h: Likewise.
17513         * include/pupa/i386/pc/boot.h: Likewise.
17514         * include/pupa/i386/pc/console.h: Likewise.
17515         * include/pupa/i386/pc/init.h: Likewise.
17516         * include/pupa/i386/pc/kernel.h: Likewise.
17517         * include/pupa/i386/pc/linux.h: Likewise.
17518         * include/pupa/i386/pc/loader.h: Likewise.
17519         * include/pupa/i386/pc/memory.h: Likewise.
17520         * include/pupa/i386/pc/multiboot.h: Likewise.
17521         * include/pupa/i386/pc/partition.h: Likewise.
17522         * include/pupa/i386/pc/time.h: Likewise.
17523         * include/pupa/i386/pc/vga.h: Likewise.
17524         * include/pupa/i386/pc/util/biosdisk.h: Likewise.
17525         * include/pupa/util/getroot.h: Likewise.
17526         * include/pupa/util/misc.h: Likewise.
17527         * include/pupa/util/resolve.h: Likewise.
17528         * kern/device.c: Likewise.
17529         * kern/disk.c: Likewise.
17530         * kern/dl.c: Likewise.
17531         * kern/err.c: Likewise.
17532         * kern/file.c: Likewise.
17533         * kern/fs.c: Likewise.
17534         * kern/loader.c: Likewise.
17535         * kern/main.c: Likewise.
17536         * kern/misc.c: Likewise.
17537         * kern/mm.c: Likewise.
17538         * kern/rescue.c: Likewise.
17539         * kern/term.c: Likewise.
17540         * kern/i386/dl.c: Likewise.
17541         * kern/i386/pc/init.c: Likewise.
17542         * kern/i386/pc/lzo1x.S: Likewise.
17543         * kern/i386/pc/startup.S: Likewise.
17544         * loader/i386/pc/chainloader.c: Likewise.
17545         * loader/i386/pc/linux.c: Likewise.
17546         * loader/i386/pc/multiboot.c: Likewise.
17547         * normal/cmdline.c: Likewise.
17548         * normal/command.c: Likewise.
17549         * normal/main.c: Likewise.
17550         * normal/menu.c: Likewise.
17551         * normal/i386/setjmp.S: Likewise.
17552         * term/i386/pc/console.c: Likewise.
17553         * term/i386/pc/vga.c: Likewise.
17554         * util/console.c: Likewise.
17555         * util/genmoddep.c: Likewise.
17556         * util/misc.c: Likewise.
17557         * util/pupa-emu.c: Likewise.
17558         * util/resolve.c: Likewise.
17559         * util/unifont2pff.rb: Likewise.
17560         * util/i386/pc/biosdisk.c: Likewise.
17561         * util/i386/pc/getroot.c: Likewise.
17562         * util/i386/pc/pupa-mkimage.c: Likewise.
17563         * util/i386/pc/pupa-setup.c: Likewise.
17565 2004-02-15  Jeroen Dekkers  <jeroen@dekkers.cx>
17567         * fs/ext2.c (pupa_ext2_read_file): Correct the value of BLOCKEND
17568         when it is EXT2_BLOCK_SIZE (data).  New argument READ_HOOK, all
17569         callers changed.  Set DATA->DISK->READ_HOOK to READ_HOOK before
17570         reading and reset it after reading.
17571         (pupa_ext2_close): Return PUPA_ERR_NONE.
17573         * include/pupa/i386/pc/linux.h (PUPA_LINUX_INITRD_MAX_ADDRESS):
17574         Correct value.
17575         (struct linux_kernel_header): Add kernel_version and
17576         initrd_addr_max.
17577         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Check whether
17578         pupa_file_read succeeds.
17579         (pupa_rescue_cmd_initrd): Implement.
17581 2003-12-03  Marco Gerards  <metgerards@student.han.nl>
17583         * fs/ext2.c (pupa_ext2_label): New function.
17584         (pupa_ext2_fs): Added label.
17585         * fs/fat.c (pupa_fat_label): New function.
17586         (pupa_fat_fs): Added label.
17587         * include/pupa/fs.h (struct pupa_fs): Added prototype label.
17589         * kern/misc.c (pupa_strndup): New function.
17590         * include/pupa/misc.h (pupa_strndup): New prototype.
17592         * include/pupa/normal.h: Include <pupa/err.h>.
17593         (pupa_set_history): New prototype.
17594         (pupa_iterate_commands): New prototype.
17595         * normal/cmdline.c: Include <pupa/machine/partition.h>,
17596         <pupa/disk.h>, <pupa/file.h>.
17597         (hist_size): New variable.
17598         (hist_lines): Likewise.
17599         (hist_end): Likewise.
17600         (hist_used): Likewise.
17601         (pupa_set_history): New function.
17602         (pupa_history_get): Likewise.
17603         (pupa_history_add): Likewise.
17604         (pupa_history_replace): Likewise.
17605         (pupa_tab_complete): Likewise.
17606         (pupa_cmdline_run): Added tab completion and history buffer.  Tab
17607         completion shows partitionnames while completing partitions, this
17608         feature was suggested by Jeff Bailey.
17609         * normal/command.c (pupa_iterate_commands): New function.
17610         * normal/main.c (PUPA_DEFAULT_HISTORY_SIZE): New macro.
17611         (pupa_normal_init): Initialize history buffer.
17612         (PUPA_MOD_INIT): Likewise.
17613         (pupa_normal_fini): Free the history buffer.
17614         (PUPA_MOD_FINI): Likewise.
17616         * util/console.c (pupa_ncurses_getkey): Accept 127 as backspace
17617         key.
17619         * aclocal.m4 (pupa_I386_CHECK_REGPARM_BUG): New DEFUN.
17620         * configure.ac [i386]: Check for regparam bug.
17621         (NESTED_FUNC_ATTR) [! i386]: Defined.
17623 2003-11-17  Marco Gerards  <metgerards@student.han.nl>
17625         * conf/i386-pc.rmk (sbin_UTILITIES): Added pupa-emu.
17626         (pupa_setup_SOURCES): Added util/i386/pc/getroot.c.
17627         (pupa_emu_SOURCES): New variable.
17628         (pupa_emu_LDFLAGS): Likewise.
17629         * include/pupa/fs.h (pupa_ext2_init) [PUPA_UTIL]: New prototype.
17630         (pupa_ext2_fini) [PUPA_UTIL]: Likewise.
17631         * include/pupa/normal.h (pupa_normal_init) [PUPA_UTIL]: Likewise.
17632         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17633         * include/pupa/setjmp.h [PUPA_UTIL]: Include <setjmp.h>.
17634         (pupa_jmp_buf): New typedef.
17635         (pupa_setjmp) [PUPA_UTIL]: New macro.
17636         (pupa_longjmp) [PUPA_UTIL]: Likewise.
17637         * include/pupa/term.h (struct pupa_term): New member `refresh'.
17638         (pupa_refresh): New prototype.
17639         * include/pupa/util/getroot.h: New file.
17640         * kern/misc.c (pupa_vsprintf): Refresh the screen after updating
17641         it.
17642         * kern/rescue.c (pupa_rescue_get_command_line): Likewise.
17643         (pupa_rescue_cmd_cat): Likewise.
17644         (pupa_rescue_cmd_ls): Likewise.
17645         (pupa_rescue_cmd_testload): Likewise.
17646         (pupa_rescue_cmd_lsmod): Likewise.
17647         * normal/cmdline.c (pupa_cmdline_get): Likewise.
17648         * normal/menu.c (run_menu): Likewise.
17649         * kern/term.c (pupa_cls): Likewise.
17650         (pupa_refresh): New function.
17651         * normal/normal.c (pupa_normal_init) [PUPA_UTIL]: New function.
17652         (pupa_normal_fini) [PUPA_UTIL]: Likewise.
17653         * util/console.c: New file.
17655         * util/i386/pc/getroot.c: New file.
17656         * util/i386/pc/pupa-setup.c: Include <pupa/util/getroot.h>.
17657         (pupa_putchar): New function.
17658         (pupa_refresh): Likewise.
17659         (xgetcwd): Function moved to ...
17660         (strip_extra_slashes): Likewise.
17661         (get_prefix): Likewise.
17662         * util/i386/pc/getroot.c: ... here.
17663         (find_root_device): Function moved and renamed to...
17664         * util/i386/pc/getroot.c (pupa_find_root_device): ... here.
17665         Changed all callers.
17666         * util/i386/pc/pupa-setup.c (guess_root_device): Function moved
17667         and renamed to...
17668         * util/i386/pc/getroot.c (pupa_guess_root_device): ... here.
17669         Changed all callers.
17670         * util/misc.c (pupa_memalign): New function.
17671         (pupa_mm_init_region): Likewise.
17672         (pupa_register_exported_symbols): Likewise.
17673         (pupa_putchar): Function removed.
17674         * util/pupa-emu.c: New file.
17676 2003-11-16  Jeroen Dekkers  <jeroen@dekkers.cx>
17678         * conf/i386-pc.rmk (pkgdata_MODULES): Add _multiboot.mod.
17679         (_multiboot_mod_SOURCES): New variable.
17680         (_multiboot_mod_CFLAGS): Likewise.
17681         * loader/i386/pc/multiboot.c: New file.
17682         * include/pupa/i386/pc/multiboot.h: Likewise.
17683         * kern/i386/pc/startup.S: Include pupa/machine/multiboot.h.
17684         (pupa_multiboot_real_boot): New function.
17685         * include/pupa/i386/pc/loader.h: Include pupa/machine/multiboot.h.
17686         (pupa_multiboot_real_boot): New prototype.
17687         (pupa_rescue_cmd_multiboot): Likewise
17688         (pupa_rescue_cmd_module): Likewise.
17690         * kern/loader.c (pupa_loader_set): Continue when
17691         pupa_loader_unload_func() fails.
17692         (pupa_loader_unset): New function.
17693         * include/pupa/loader.h (pupa_loader_unset): New prototype.
17695         * kern/misc.c (pupa_stpcpy): New function.
17696         * include/pupa/misc.h (pupa_stpcpy): New prototype.
17698 2003-11-12  Marco Gerards  <metgerards@student.han.nl>
17700         * disk/i386/pc/biosdisk.c (pupa_biosdisk_open): Correctly check
17701         for available extensions.
17703         * include/pupa/i386/pc/time.h: New file.
17704         * kern/disk.c: Include <pupa/machine/time.h>.
17705         (PUPA_CACHE_TIMEOUT): New macro.
17706         (pupa_last_time): New variable.
17707         (pupa_disk_open): Flush the cache when there was a timeout.
17708         (pupa_disk_close): Reset the timer.
17709         * kern/i386/pc/startup.S (pupa_get_rtc): Renamed from
17710         pupa_currticks.
17711         * util/misc.c: Include <sys/times.h>
17712         (pupa_get_rtc): New function.
17714 2003-11-09  Jeroen Dekkers  <jeroen@dekkers.cx>
17716         * fs/ext2.c (struct pupa_ext2_inode): Declare struct datablocks
17717         as blocks.
17718         (pupa_ext2_get_file_block): Use blocks member.
17720         * fs/ext2.c (pupa_ext2_read_file): Only set skipfirst for the
17721         first block. Return -1 instead of pupa_errno on error.
17723 2003-10-27  Marco Gerards  <metgerards@student.han.nl>
17725         * README: In the pupa-mkimage example use _chain instead of chain
17726         and ext2 instead of fat.
17727         * TODO: Replace ext2fs with jfs as an example.  Add an item for
17728         adding journal playback for ext2fs.
17729         * conf/i386-pc.rmk (pupa_setup_SOURCES): Added fs/ext2.c.
17730         (pkgdata_MODULES): Added ext2.mod.
17731         (ext2_mod_SOURCES): New variable.
17732         (ext2_mod_CFLAGS): Likewise.
17733         * include/pupa/err.h (pupa_err_t): Added PUPA_ERR_SYMLINK_LOOP.
17734         * include/pupa/misc.h (pupa_strncpy): New prototype.
17735         (pupa_strcat): Likewise.
17736         (pupa_strncmp): Likewise.
17737         * kern/misc.c (pupa_strcat): Enable function.
17738         (pupa_strncpy): New function.
17739         (pupa_strncmp): Likewise.
17740         * fs/ext2.c: New file.
17742         * kern/disk.c (pupa_disk_read): Set pupa_errno to PUPA_ERR_NONE
17743         when the read failed before retrying.
17744         * util/i386/pc/biosdisk.c (_LARGEFILE_SOURCE): Removed.
17745         (_FILE_OFFSET_BITS): Likewise.
17746         * configure.ac: Added AC_SYS_LARGEFILE.
17748 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17750         * genmk.rb (PModule#rule): Make sure to get only symbol names
17751         from the output of nm.
17752         Reported by Robert Millan <zeratul2@wanadoo.es>.
17754 2003-09-25  Yoshinori K. Okuji  <okuji@enbug.org>
17756         I forgot to check in these changes for a long time. This adds
17757         incomplete support for VGA console, and this is still very
17758         buggy. Also, a lot of consideration is required for I18N,
17759         UNICODE, and VGA font issues. Therefore, assume that this is
17760         such that "better than nothing".
17762         * font/manager.c: New file.
17763         * include/pupa/font.h: Likewise.
17764         * include/pupa/i386/pc/vga.h: Likewise.
17765         * term/i386/pc/vga.c: Likewise.
17766         * util/unifont2pff.rb: Likewise.
17768         * conf/i386-pc.rmk (kernel_img_HEADERS): Added machine/vga.h.
17769         (pkgdata_MODULES): Added vga.mod and font.mod.
17770         (vga_mod_SOURCES): New variables.
17771         (vga_mod_CFLAGS): Likewise.
17772         (font_mod_SOURCES): Likewise.
17773         (font_mod_CFLAGS): Likewise.
17775         * include/pupa/err.h (PUPA_ERR_BAD_FONT): New constant.
17777         * include/pupa/term.h: Include pupa/err.h.
17778         (struct pupa_term): Added init and fini.
17779         Changed the argument of putchar to pupa_uint32_t.
17781         * include/pupa/i386/pc/console.h: Include pupa/symbol.h.
17782         (pupa_console_real_putchar): New prototype.
17783         (pupa_console_putchar): Removed.
17784         (pupa_console_checkkey): Exported.
17785         (pupa_console_getkey): Likewise.
17787         * kern/misc.c (pupa_vsprintf): Add support for UNICODE
17788         characters.
17790         * kern/term.c (pupa_term_set_current): Rewritten.
17791         (pupa_putchar): Likewise.
17792         (pupa_putcode): New function.
17794         * kern/i386/pc/startup.S (pupa_console_putchar): Renamed to ...
17795         (pupa_console_real_putchar): ... this.
17796         (pupa_vga_set_mode): New function.
17797         (pupa_vga_get_font): Likewise.
17799         * normal/command.c: Include pupa/term.h.
17800         (terminal_command): New function.
17801         (pupa_command_init): Register the command "terminal".
17803         * normal/menu.c (DISP_LEFT): Changed to a UNICODE value.
17804         (DISP_UP): Likewise.
17805         (DISP_RIGHT): Likewise.
17806         (DISP_DOWN): Likewise.
17807         (DISP_HLINE): Likewise.
17808         (DISP_VLINE): Likewise.
17809         (DISP_UL): Likewise.
17810         (DISP_UR): Likewise.
17811         (DISP_LL): Likewise.
17812         (DISP_LR): Likewise.
17814         * term/i386/pc/console.c (pupa_console_putchar): New function.
17816 2003-02-08  NIIBE Yutaka  <gniibe@m17n.org>
17818         * util/resolve.c (pupa_util_resolve_dependencies): BUG
17819         FIX. Reverse the path_list.
17821         * include/pupa/normal.h: Export pupa_register_command and
17822         pupa_unregister_command.
17824         * hello/hello.c (pupa_cmd_hello): New module.
17825         * conf/i386-pc.rmk: Added hello.mod.
17827 2003-01-31  Yoshinori K. Okuji  <okuji@enbug.org>
17829         * kern/i386/pc/lzo1x.S: New file.
17831         * util/i386/pc/pupa-mkimage.c: Include lzo1x.h.
17832         (compress_kernel): New variable.
17833         (generate_image): Heavily modified to support compressing a
17834         large part of the core image.
17836         * util/misc.c (pupa_util_read_image): Fix a file descriptor
17837         leak.
17838         (pupa_util_load_image): New function.
17840         * kern/i386/pc/startup.S: Include pupa/machine/kernel.h.
17841         (pupa_compressed_size): New variable.
17842         (codestart): Enable Gate A20 here.
17843         Decompress the compressed part of the core image.
17844         Rearrange the code to put functions and variables which are
17845         required for initialization in the non-compressed part.
17846         Include lzo1x.S.
17848         * kern/i386/pc/init.c (pupa_machine_init): Don't enable Gate A20
17849         here.
17851         * include/pupa/util/misc.h (pupa_util_write_image): Declared.
17853         * include/pupa/i386/pc/kernel.h
17854         (PUPA_KERNEL_MACHINE_COMPRESSED_SIZE): New macro.
17855         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): Increased by 4.
17856         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
17857         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
17858         (PUPA_KERNEL_MACHINE_RAW_SIZE): New macro.
17860         * conf/i386-pc.rmk (pupa_mkimage_LDFLAGS): New variable.
17862         * genmk.rb (Image#rule): Put LDFLAGS at the end of a line.
17863         (Utility#rule): Likewise.
17865         * configure.ac: Check if LZO is available.
17867 2003-01-20  Yoshinori K. Okuji  <okuji@enbug.org>
17869         * include/pupa/normal.h: New file.
17870         * include/pupa/setjmp.h: Likewise.
17871         * include/pupa/i386/setjmp.h: Likewise.
17872         * normal/cmdline.c: Likewise.
17873         * normal/command.c: Likewise.
17874         * normal/main.c: Likewise.
17875         * normal/menu.c: Likewise.
17876         * normal/i386/setjmp.S: Likewise.
17878         * loader/i386/pc/linux.c (pupa_rescue_cmd_linux): Made global.
17879         (pupa_rescue_cmd_initrd): Likewise.
17881         * loader/i386/pc/chainloader.c (pupa_rescue_cmd_chainloader):
17882         Likewise.
17884         * kern/i386/pc/startup.S (translation_table): New variable.
17885         (translate_keycode): New function.
17886         (pupa_console_getkey): Call translate_keycode.
17888         * kern/rescue.c (attempt_normal_mode): New function.
17889         (pupa_enter_rescue_mode): Attempt to execute the normal mode. If
17890         it failed, print a message.
17892         * kern/mm.c (pupa_real_malloc): Print more information when a
17893         free magic is broken.
17894         (pupa_free): If the first free header is not free actually, set
17895         it to P.
17897         * kern/main.c (pupa_load_normal_mode): Just load the module
17898         "normal".
17899         (pupa_main): Don't print the message
17900         "Entering into rescue mode..." here.
17902         * include/pupa/i386/pc/loader.h (pupa_rescue_cmd_initrd):
17903         Declared.
17904         (pupa_rescue_cmd_initrd): Likewise.
17905         (pupa_rescue_cmd_initrd): Likewise.
17907         * include/pupa/symbol.h (FUNCTION): Specify the type.
17908         (VARIABLE): Likewise.
17910         * include/pupa/err.h (pupa_err_t): Added
17911         PUPA_ERR_UNKNOWN_COMMAND.
17913         * include/pupa/dl.h (pupa_dl_set_prefix): Exported.
17914         (pupa_dl_get_prefix): Likewise.
17916         * conf/i386-pc.rmk (pkgdata_MODULES): Added normal.mod.
17917         Added _chain.mod and _linux.mod instead of chain.mod and
17918         linux.mod.
17919         (chain_mod_SOURCES): Renamed to ...
17920         (_chain_mod_SOURCES): ... this.
17921         (chain_mod_CFLAGS): Renamed to ...
17922         (_chain_mod_CFLAGS): ... this.
17923         (linux_mod_SOURCES): Renamed to ...
17924         (_linux_mod_SOURCES): ... this.
17925         (linux_mod_CFLAGS): Renamed to ...
17926         (_linux_mod_CFLAGS): ... this.
17927         (normal_mod_SOURCES): New variable.
17928         (normal_mod_CFLAGS): Likewise.
17929         (normal_mod_ASFLAGS): Likewise.
17931 2003-01-18  Yoshinori K. Okuji  <okuji@enbug.org>
17933         * kern/rescue.c (pupa_rescue_cmd_rmmod): Call pupa_dl_unload, if
17934         possible.
17936         * kern/dl.c (pupa_dl_ref): Refer depending modules
17937         recursively.
17938         (pupa_dl_unref): Unrefer depending modules recursively.
17939         Don't call pupa_dl_unload implicitly, because PUPA can crash if
17940         a module is unloaded before one depending on that module is
17941         unloaded.
17942         (pupa_dl_unload): Unload depending modules explicitly,
17943         if possible.
17945 2003-01-17  Yoshinori K. Okuji  <okuji@enbug.org>
17947         * include/pupa/i386/pc/linux.h: New file.
17948         * loader/i386/pc/linux.c: Likewise.
17950         * loader/i386/pc/chainloader.c (pupa_chainloader_boot_sector):
17951         Removed.
17952         (pupa_chainloader_unload): Return PUPA_ERR_NONE.
17953         (pupa_rescue_cmd_chainloader): Read the image to 0x7C00 instead
17954         of PUPA_CHAINLOADER_BOOT_SECTOR.
17956         * kern/i386/pc/startup.S: Include pupa/machine/linux.h.
17957         (pupa_linux_prot_size): New variable.
17958         (pupa_linux_tmp_addr): Likewise.
17959         (pupa_linux_real_addr): Likewise.
17960         (pupa_linux_boot_zimage): New function.
17961         (pupa_linux_boot_bzimage): Likewise.
17963         * kern/i386/pc/init.c (struct mem_region): New structure.
17964         (MAX_REGIONS): New macro.
17965         (mem_regions): New variable.
17966         (num_regions): Likewise.
17967         (pupa_os_area_addr): Likewise.
17968         (pupa_os_area_size): Likewise.
17969         (pupa_lower_mem): Likewise.
17970         (pupa_upper_mem): Likewise.
17971         (add_mem_region): New function.
17972         (compact_mem_regions): Likewise.
17973         (pupa_machine_init): Set PUPA_LOWER_MEM and PUPA_UPPER_MEM to
17974         the size of the conventional memory and that of so-called upper
17975         memory (before the first memory hole).
17976         Instead of adding each found region to free memory, use
17977         add_mem_region and add them after removing overlaps.
17978         Also, add only 1/4 of the upper memory to free memory. The rest
17979         is used for loading OS images. Maybe this is ad hoc, but this
17980         makes it much easier to relocate OS images when booting.
17982         * kern/rescue.c (pupa_rescue_cmd_module): Removed.
17983         (pupa_enter_rescue_mode): Don't register initrd and module.
17985         * kern/mm.c: Include pupa/dl.h.
17987         * kern/main.c: Include pupa/file.h and pupa/device.h.
17989         * kern/loader.c (pupa_loader_load_module_func): Removed.
17990         (pupa_loader_load_module): Likewise.
17992         * kern/dl.c (pupa_dl_load): Use the suffix ``.mod'' instead of
17993         ``.o''.
17995         * include/pupa/i386/pc/loader.h (pupa_linux_prot_size): Declared.
17996         (pupa_linux_tmp_addr): Likewise.
17997         (pupa_linux_real_addr): Likewise.
17998         (pupa_linux_boot_zimage): Likewise.
17999         (pupa_linux_boot_bzimage): Likewise.
18001         * include/pupa/i386/pc/init.h (pupa_lower_mem): Declared.
18002         (pupa_upper_mem): Likewise.
18003         (pupa_gate_a20): Don't export, because turning off Gate A20 in a
18004         module is too dangerous.
18006         * include/pupa/loader.h (pupa_os_area_addr): Declared.
18007         (pupa_os_area_size): Likewise.
18008         (pupa_loader_set): Remove the first argument. Loader doesn't
18009         manage modules or initrd any longer.
18010         (pupa_loader_load_module): Removed.
18012         * conf/i386-pc.rmk (pkgdata_MODULES): Added linux.mod.
18013         (linux_mod_SOURCES): New variable.
18014         (linux_mod_CFLAGS): Likewise.
18016 2003-01-07  Yoshinori K. Okuji  <okuji@enbug.org>
18018         * util/i386/pc/pupa-setup.c (setup): Convert the endianness of
18019         the length of a blocklist correctly.
18021         * util/i386/pc/biosdisk.c (pupa_util_biosdisk_open) [__linux__]:
18022         Use ioctl only if the OS file is a block device.
18023         (pupa_util_biosdisk_open): Don't use ST.ST_BLOCKS, because it is
18024         not very useful for normal files.
18026         * kern/main.c (pupa_set_root_dev): New function.
18027         (pupa_load_normal_mode): Likewise.
18028         (pupa_main): Call those above.
18030         * include/pupa/types.h (pupa_swap_bytes16): Cast the result to
18031         pupa_uint16_t.
18033         * include/pupa/kernel.h (pupa_enter_normal_mode): Removed.
18035 2003-01-06  Yoshinori K. Okuji  <okuji@enbug.org>
18037         * util/i386/pc/pupa-setup.c: Include pupa/machine/kernel.h.
18038         (setup): Configure the installed partition information and the
18039         dl prefix.
18041         * loader/i386/pc/chainloader.c (my_mod): New variable.
18042         (pupa_chainloader_unload): New function.
18043         (pupa_rescue_cmd_chainloader): Refer itself.
18044         (PUPA_MOD_INIT): Save its own module in MY_MOD.
18046         * kern/i386/pc/startup.S (install_partition): Removed.
18047         (version_string): Likewise.
18048         (config_file): Likewise.
18049         (pupa_install_dos_part): New variable.
18050         (pupa_install_bsd_part): Likewise.
18051         (pupa_prefix): Likewise.
18052         (pupa_chainloader_real_boot): Call pupa_dl_unload_all.
18054         * kern/i386/pc/init.c: Include pupa/machine/kernel.h, pupa/dl.h
18055         and pupa/misc.h.
18056         (make_install_device): New function.
18057         (pupa_machine_init): Set the dl prefix.
18059         * kern/rescue.c: Include pupa/rescue.h and pupa/dl.h.
18060         (buf): Renamed to ...
18061         (linebuf): ... this.
18062         (pupa_rescue_cmd_prefix): New function.
18063         (pupa_rescue_cmd_insmod): Likewise.
18064         (pupa_rescue_cmd_rmmod): Likewise.
18065         (pupa_rescue_cmd_lsmod): Likewise.
18066         (pupa_enter_rescue_mode): Register new commands: prefix, insmod,
18067         rmmod and lsmod.
18069         * kern/mm.c (pupa_memalign): If failed even after invalidating
18070         disk caches, unload unneeded modules and retry.
18072         * kern/misc.c (pupa_memmove): New function.
18073         (pupa_memcpy): Removed.
18074         (pupa_strcpy): New function.
18075         (pupa_itoa): Made static.
18077         * kern/dl.c (pupa_dl_iterate): New function.
18078         (pupa_dl_ref): Likewise.
18079         (pupa_dl_unref): Likewise.
18080         (pupa_dl_unload): Return if succeeded or not.
18081         (pupa_dl_unload_unneeded): New function.
18082         (pupa_dl_unload_all): Likewise.
18083         (pupa_dl_init): Renamed to ...
18084         (pupa_dl_set_prefix): ... this.
18085         (pupa_dl_get_prefix): New function.
18087         * include/pupa/i386/pc/kernel.h: Include pupa/types.h.
18088         (PUPA_KERNEL_MACHINE_INSTALL_DOS_PART): New macro.
18089         (PUPA_KERNEL_MACHINE_INSTALL_BSD_PART): Likewise.
18090         (PUPA_KERNEL_MACHINE_PREFIX): Likewise.
18091         (pupa_install_dos_part): Declared.
18092         (pupa_install_bsd_part): Likewise.
18093         (pupa_prefix): Likewise.
18094         (pupa_boot_drive): Likewise.
18096         * include/pupa/types.h: Fix a typo.
18098         * include/pupa/misc.h (pupa_memcpy): New macro. Just an alias to
18099         pupa_memmove.
18100         (pupa_memmove): Declared.
18101         (pupa_strcpy): Likewise.
18103         * include/pupa/dl.h (PUPA_MOD_INIT): Change the prototype. Now
18104         pupa_mod_init takes one argument, its own module.
18105         (pupa_dl_unload_unneeded): Declared.
18106         (pupa_dl_unload_all): Likewise.
18107         (pupa_dl_ref): Likewise.
18108         (pupa_dl_unref): Likewise.
18109         (pupa_dl_iterate): Likewise.
18110         (pupa_dl_init): Renamed to ...
18111         (pupa_dl_set_prefix): ... this.
18112         (pupa_dl_get_prefix): Declared.
18114         * fs/fat.c [!PUPA_UTIL] (my_mod): New variable.
18115         (pupa_fat_dir) [!PUPA_UTIL]: Prevent the fat module from being
18116         unloaded.
18117         (pupa_fat_open) [!PUPA_UTIL]: Refer itself if succeeded.
18118         (pupa_fat_close) [!PUPA_UTIL]: Unrefer itself.
18120         * configure.ac (tmp_CFLAGS): Added -Wshadow, -Wpointer-arith,
18121         -Wmissing-prototypes, -Wundef and -Wstrict-prototypes.
18123 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18125         * util/i386/pc/pupa-setup.c (setup): Define the internal
18126         function find_first_partition_start at the top level, because GCC
18127         3.0.x cannot compile internal functions in deeper scopes
18128         correctly.
18129         (find_root_device): Use lstat instead of stat.
18130         Don't follow symbolic links.
18131         Fix the path-constructing code.
18133         * util/i386/pc/biosdisk.c [__linux__] (BLKFLSBUF): New macro.
18134         (pupa_util_biosdisk_open) [__linux__]: Get the size of a device
18135         by a BLKGETSIZE ioctl first, because block devices don't fill
18136         the member st_mode of the structure stat on Linux.
18137         [__linux__] (linux_find_partition): Use a temporary buffer
18138         REAL_DEV for the working space. Copy it to DEV before returning.
18139         (open_device) [__linux__]: Call ioctl with BLKFLSBUF to make the
18140         buffer cache consistent.
18141         (get_os_disk) [__linux__]: Use the length 5 instead of 4 for
18142         strncmp. The previous value was merely wrong.
18143         (pupa_util_biosdisk_get_pupa_dev): Use stat instead of lstat.
18145         * fs/fat.c (pupa_fat_read_data): Shift 4 instead of 12 when the
18146         FAT size is 12. The previous value was merely wrong.
18148         * kern/main.c (pupa_main): Don't split the starting message from
18149         newlines.
18151         * kern/term.c (pupa_putchar): Put CR after LF instead of before
18152         LF, because BIOS goes crazy about character attributes in this
18153         case.
18155 2003-01-03  Yoshinori K. Okuji  <okuji@enbug.org>
18157         * include/i386/pc/util/biosdisk.h: New file.
18158         * util/i386/pc/biosdisk.c: Likewise.
18159         * util/i386/pc/pupa-setup.c: Likewise.
18161         * Makefile.in (INCLUDE_DISTFILES): Added
18162         include/pupa/i386/pc/util/biosdisk.h.
18163         (UTIL_DISTFILES): Added biosdisk.c and pupa-setup.c under the
18164         directory util/i386/pc.
18165         (install-local): Added a rule for sbin_UTILITIES.
18166         (uninstall): Likewise.
18168         * util/i386/pc/pupa-mkimage.c (usage): Fix a typo in the doc.
18170         * util/misc.c (xrealloc): New function.
18171         (pupa_malloc): Likewise.
18172         (pupa_free): Likewise.
18173         (pupa_realloc): Likewise.
18174         (pupa_stop): Likewise.
18175         (pupa_putchar): Likewise.
18177         * kern/disk.c (pupa_disk_read): Prevent L from underflowing.
18179         * include/pupa/util/misc.h (xrealloc): Declared.
18181         * include/pupa/i386/pc/boot.h (PUPA_BOOT_MACHINE_BPB_START): New
18182         macro.
18183         (PUPA_BOOT_MACHINE_BPBEND): Renamed to ...
18184         (PUPA_BOOT_MACHINE_BPB_END): ... this.
18186         * include/pupa/fs.h [PUPA_UTIL] (pupa_fat_init): Declared.
18187         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18189         * fs/fat.c [PUPA_UTIL] (pupa_fat_init): Defined. Maybe a better
18190         way should be implemented.
18191         [PUPA_UTIL] (pupa_fat_fini): Likewise.
18193         * disk/i386/pc/biosdisk.c (pupa_biosdisk_call_hook): Increase
18194         the size of NAME for safety.
18195         (pupa_biosdisk_iterate): Search hard disks to 0x90 instead of
18196         0x88.
18198         * conf/i386-pc.rmk (sbin_UTILITIES): New variable.
18199         (pupa_setup_SOURCES): Likewise.
18201         * genmk.rb (Utility#rule): Add $(BUILD_CFLAGS) into the rules.
18203 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18205         * kern/i386/pc/startup.S (push_get_mmap_entry): Revert to a
18206         bunch of pushl's from pusha, because this destroys the return
18207         value.
18209 2002-12-28  Yoshinori K. Okuji  <okuji@enbug.org>
18211         Use -mrtd and -mregparm=3 to reduce the generated code sizes.
18212         This means that any missing prototypes could be fatal. Also, you
18213         must take care when writing assembly code. See the comments at
18214         the beginning of startup.S, for more details.
18216         * kern/i386/pc/startup.S (pupa_halt): Modified for the new
18217         compilation mechanism.
18218         (pupa_chainloader_real_boot): Likewise.
18219         (pupa_biosdisk_rw_int13_extensions): Likewise.
18220         (pupa_biosdisk_rw_standard): Likewise.
18221         (pupa_biosdisk_check_int13_extensions): Likewise.
18222         (pupa_biosdisk_get_diskinfo_int13_extensions): Likewise.
18223         (pupa_biosdisk_get_diskinfo_standard): Likewise.
18224         (pupa_get_memsize): Likewise.
18225         (pupa_get_mmap_entry): Likewise.
18226         (pupa_console_putchar): Likewise.
18227         (pupa_console_setcursor): Likewise.
18228         (pupa_getrtsecs): Use pushl instead of push.
18230         * kern/i386/pc/init.c (pupa_machine_init): Use the scratch
18231         memory instead of the stack for a mmap entry, because some
18232         BIOSes may ignore the maximum size and overflow.
18234         * conf/i386-pc.rmk (COMMON_CFLAGS): Added -mrtd and -mregparm=3.
18236         * genmk.rb (PModule#rule): Compile automatically generated
18237         sources with module-specific CFLAGS as well as other sources.
18239 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18241         * configure.ac: Check ld.
18242         Replace CFLAGS and CPPFLAGS with BUILD_CFLAGS and BUILD_CPPFLAGS
18243         respectively, before checking endianness and sizes.
18245         * Makefile.in (LD): New variable.
18247 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18249         * Makefile.in (BUILD_CC): CC -> BUILD_CC.
18251 2002-12-27  Yoshinori K. Okuji  <okuji@enbug.org>
18253         * Changelog: New file.